代码拉取完成,页面将自动刷新
Run the getModels.sh file from command line to download the needed model files
sudo chmod a+x getModels.sh
./getModels.sh
Command line usage for object detection using YOLOv3
Python
Using CPU
python3 object_detection_yolo.py --image=bird.jpg --device 'cpu'
python3 object_detection_yolo.py --video=run.mp4 --device 'cpu'
Using GPU
python3 object_detection_yolo.py --image=bird.jpg --device 'gpu'
python3 object_detection_yolo.py --video=run.mp4 --device 'gpu'
C++:
Using CPU
./build/object_detection_yolo --image=bird.jpg --device=cpu
./build/object_detection_yolo --video=run.mp4 --device=cpu
Using GPU
./build/object_detection_yolo --image=bird.jpg --device=gpu
./build/object_detection_yolo --video=run.mp4 --device=gpu
g++ -ggdb pkg-config --cflags --libs /usr/local/Cellar/opencv3/3.4.2/lib/pkgconfig/opencv.pc object_detection_yolo.cpp -o object_detection_yolo.out
Using CMake
mkdir build && cd build
cmake ..
cmake --build . --config Release
cd ..
mkdir build
cd build
cmake -G "Visual Studio 16 2019" ..
cmake --build . --config Release
cd ..
Note: To run on Windows system, change syntax accordingly:
.\build\Release\object_detection_yolo --video=run.mp4 --device=gpu
Want to become an expert in AI? AI Courses by OpenCV is a great place to start.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。