[TOC]
- ubuntu18
- opencv4
- realsense
- libtorch
- web交互程序依賴:
- python3
- flask
- gevent
- opencv-python
-
安装Opencv4
略。。。
-
安装librorch
建议使用源码安装:
git clone --recursive https://github.com/pytorch/pytorch cd pytorch git checkout 1.6 # if you are updating an existing checkout git submodule sync git submodule update --init --recursive python tools/build_libtorch.py
-
安装realsense
安装步骤参照这里。
-
安装Zbar
sudo apt-get install libzbar-dev libzbar0
-
修改CmakeLists文件
将下面一行修改成自己libtorch的目录:
set(CMAKE_PREFIX_PATH ~/install/pytorch/torch/)
-
编译
mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. make -j6
- web交互界面依賴安裝
pip3 install opencv-python pip3 install flask # pip3 install gevent
github: YOLOv5-LibTorch