Real time object detection with deployment of YOLOv5 through LibTorch C++ API
- Ubuntu 20.04
- OpenCV 4.2.0
- LibTorch 1.12.1+cu113
- CUDA 11.3
-
Install Package.
git clone https://github.com/Parkeunseok/Libtorch_yolov5.git
-
Install LibTorch.
wget https://download.pytorch.org/libtorch/cu113/libtorch-cxx11-abi-shared-with-deps-1.12.1%2Bcu113.zip unzip libtorch-cxx11-abi-shared-with-deps-1.12.1+cu113.zip
-
Edit "CMakeLists.txt" to configure OpenCV and LibTorch correctly.
-
Compile and run.
cd ~ workspace/ catkin build or catkin_make source devel/setup.bash roslaunch Libtorch_yolov5 Libtorch_yolov5.launch
-
Weights file share
https://drive.google.com/drive/folders/0AMhURE7Yf6NwUk9PVA