/yolov5-img-monitor

Images added by asynchronous monitoring are inferred by yolov5, and the detected images and confidence scores are output.

Primary LanguageC++

yolov5-img-monitor

result

Script that monitors folders asynchronously, infers with C++ YOLOv5 when additional images are detected, and stores the detected images and confidence scores.

Build Requirements

  • OpenCV 4.5.4+
  • CMake-gui 3.2+
  • Windows

How to convert Pytorch".pt" to ONNX".onnx"

Since yolov5 is in .pt format, it is necessary to convert the ".pt" format to ".onnx" format to be inferred by the c++ dnn module.

Please see https://github.com/ultralytics/yolov5

git clone https://github.com/ultralytics/yolov5  # clone
cd yolov5
pip install -r requirements.txt  # install
python export.py --weights yolov5s.pt --include onnx # convert

Quick Usage

  1. Start asynchronous monitoring
git clone https://github.com/ta-ke-inf/yolov5-cpp.git
cd ./yolov5-cpp/yolov5-cpp
mkdir image result result_img
yolov5-cpp.exe
  1. Copy test.png to the image folder you just created.