ibaiGorordo / ONNX-YOLOv8-Object-Detection

Python scripts performing object detection using the YOLOv8 model in ONNX.
MIT License
393 stars 101 forks source link

Scores are smaller #13

Closed kopyl closed 1 year ago

kopyl commented 1 year ago

Hey. I converted Pytorch model to ONNX with this: https://github.com/ultralytics/ultralytics : model.export(format="onnx").

Is it because.

  1. I need to change something in my code when using inference with your tool?
  2. I need to change something the code of your tool?
  3. It's the result of the conversion to ONNX?

Could you please help? (:

Some comparison: ONNX (first image):

[['bear', 0.7407247424125671],
 ['apple', 0.5914568901062012],
 ['apple', 0.5120987892150879]]

Torch (first image):

[['bear', 0.8472723364830017],
 ['apple', 0.6253159046173096],
 ['apple', 0.6134308576583862]]

(second image) ONNX: 0,6926791071891785 Torch: 0,8411726951599121

Also ONNX model on conversion is for some reason way bigger than Torch's...

kopyl commented 1 year ago

Fixed: https://github.com/ibaiGorordo/ONNX-YOLOv8-Object-Detection/issues/8#issuecomment-1595629369