This repository provides a fast inference API to demo object detection task.
The ./yolov5_onnx.onnx is exported by official yolov5s.pt using export.py.
The model input size is (3,640,640) with NCHW + RGB format.
Please use netron app to see more model details.
The testing data is located at ./data for the quick demo.
install the required packages
pip3 install -r requirements
python3 ./test_onnx.py
The inference code will save the raw output tensor for debugging purposes, as well as visualized images and a text file containing labels, coordinates, and confidence scores.
To test the robustness of the model, there are several testing data with different resolution put in ./data folder.
The text file records class_name/ class_index/ xyxy coordinates/ confidence score.
Class | xmin | ymin | xmax | ymax | Confidence |
---|---|---|---|---|---|
bicycle | 111 | 130 | 561 | 419 | 0.42154 |
car | 466 | 74 | 689 | 172 | 0.52157 |
truck | 467 | 77 | 690 | 174 | 0.60903 |
dog | 131 | 218 | 313 | 550 | 0.90332 |
official repo: yolov5
Please contact me, if you are interested in this project or have any questions.