English | [中文](https://github.com/AllentDan/LibtorchTutorials/blob/main/README_Chinese.md)

<div align="center">

![logo](https://raw.githubusercontent.com/AllentDan/ImageBase/main/detection/LibtorchTutorials.png)  
**A code repository for libtorch tutorials, which contains lessons for utilizing libtorh (or pytorch c++).**  

</div>


## Environment
- Libtorch 1.7+
- Opencv 2.4+

## Table of contents
- [Environment setting](https://github.com/AllentDan/LibtorchTutorials/tree/main/lesson1-Environment)
- [Tensor operations](https://github.com/AllentDan/LibtorchTutorials/tree/main/lesson2-TensorOperations)
- [Basic models](https://github.com/AllentDan/LibtorchTutorials/tree/main/lesson3-BasicModels)
- [Dataset utilization](https://github.com/AllentDan/LibtorchTutorials/tree/main/lesson4-DatasetUtilization)
- [Training VGG model](https://github.com/AllentDan/LibtorchTutorials/tree/main/lesson5-TrainingVGG)
- [Training U-Net model](https://github.com/AllentDan/LibtorchTutorials/tree/main/lesson6-Segmentation)
- [Training yolo4 tiny model](https://github.com/AllentDan/LibtorchTutorials/tree/main/lesson7-Detection)
- [Conclusion](https://github.com/AllentDan/LibtorchTutorials/tree/main/lesson8-Conclusion)

## Related repository
Based on libtorch, I released following repositories:
- [LibtorchTutorials](https://github.com/AllentDan/LibtorchTutorials)
- [LibtorchSegmentation](https://github.com/AllentDan/LibtorchSegmentation)
- [LibtorchDetection](https://github.com/AllentDan/LibtorchDetection)