YOLOv5 LibTorch
通过LibTorch C ++ API部署YOLOv5进行实时对象检测
环境
Ubuntu 18.04
OpenCV 3.2.0
LibTorch 1.6.0
CMake 3.10.2
入门
安装OpenCV。
sudo apt-get install libopencv-dev
安装LibTorch。
wget https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip
unzip libtorch-shared-with-deps-latest.zip
编辑“ CMakeLists.txt”以正确配置OpenCV和LibTorch。
编译并运行。
cd build
cmake ..
make
./../bin/YOLOv5
1