我试图通过使用https://github.com/pjreddie/darknet从视频文件做对象检测。我已经为openv安装了libopencv-dev
。我在Makefile
中设置了opencv4=1
然后运行这段代码。./darknet detector demo cfg/coco.data cfg/yolo-tiny-obj.cfg yolov3.weights data/1.mp4
得到了错误Demo needs OpenCV for webcam images.
有人能帮我吗?谢谢。
- 尝试清理make文件并重新编译darknet
make clean
make
- 您可以从git加载OpenCV并安装源代码
git clone https://github.com/opencv/opencv
cd opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j7
sudo make install
然后用
重新编译暗网make clean
make