开源软件名称:doleron/yolov5-opencv-cpp-python开源软件地址:https://github.com/doleron/yolov5-opencv-cpp-python开源编程语言:Python 51.4%开源软件介绍:yolov5-opencv-cpp-pythonExample of performing inference with ultralytics YOLO V5, OpenCV 4.5.4 DNN, C++ and Python Looking for YOLO V4 OpenCV C++/Python inference? Check this repository Code explanationThis code is explained in this medium article PrerequisitesMake sure you have already on your system:
IMPORTANT!!! Note that OpenCV versions prior to 4.5.4 will not work at all. Running the python scriptThe python code is here. git clone https://github.com/doleron/yolov5-opencv-cpp-python.git
cd yolov5-opencv-cpp-python
python python/yolo.py If your machine/OpenCV install are CUDA capable you can try out running using the GPU: git clone https://github.com/doleron/yolov5-opencv-cpp-python.git
cd yolov5-opencv-cpp-python
python python/yolo.py cuda Running the C++ programThe C++ code is here. git clone https://github.com/doleron/yolov5-opencv-cpp-python.git
cd yolov5-opencv-cpp-python
g++ -O3 cpp/yolo.cpp -o yolo_example `pkg-config --cflags --libs opencv4`
./yolo_example Or using CUDA if available: git clone https://github.com/doleron/yolov5-opencv-cpp-python.git
cd yolov5-opencv-cpp-python
g++ -O3 cpp/yolo.cpp -o yolo_example `pkg-config --cflags --libs opencv4`
./yolo_example cuda PS.: Video sample from https://www.youtube.com/watch?v=NyLF8nHIquM Which YOLO version should I use?This repository uses YOLO V5 but it is not the only YOLO version out there. You can read this article to learn more about YOLO versions and choose the more suitable one for you. Exporting yolo v5 models to .onnx formatCheck here: ultralytics/yolov5#251 My commands were: git clone https://github.com/ultralytics/yolov5
cd yolov5
pip install -r requirements.txt And then to convert the model: 全部评论
专题导读
上一篇:Kitura/Package-Builder: Build and utility scripts used for continuous integratio ...发布时间:2022-04-21下一篇:petejkim/wallet.ts: Utilities for cryptocurrency wallets, written in TypeScript发布时间:2022-04-21热门推荐
热门话题
阅读排行榜
|
请发表评论