TexasInstruments / edgeai-yolov5

YOLOv5 🚀 in PyTorch > ONNX > CoreML > TFLite. Forked from https://ultralytics.com/yolov5
https://github.com/TexasInstruments/edgeai
GNU General Public License v3.0
650 stars 120 forks source link

Where is the pt file that can be run on TDA4 #5

Closed youbinqiao closed 2 years ago

youbinqiao commented 2 years ago

❔Question

I have try these two model https://github.com/TexasInstruments/edgeai-yolov5/tree/master/pretrained_models/models/yolov5s6_640_ti_lite/weights/yolov5s6_640_ti_lite_37p4_56p0.onnx https://github.com/TexasInstruments/edgeai-yolov5/tree/master/pretrained_models/models/yolov5s6_640_ti_lite/weights/best.pt

Convert best.pt to best.onnx using the command below: python export.py --weights pretrained_models/yolov5s6_640_ti_lite/weights/best.pt --img 640 --batch 1 --simplify --export-nms --opset 11

and when I used the file ./out/tidl_model_import.out to compile yolov5s6_640_ti_lite_37p4_56p0.onnx and best.onnx to bin file, I found yolov5s6_640_ti_lite_37p4_56p0.onnx can be complied successfully and best.onnx was failed. The picture below is the error log.

prototxt:https://github.com/TexasInstruments/edgeai-yolov5/tree/master/pretrained_models/models/yolov5s6_640_ti_lite/weights/yolov5s6_640_ti_lite_metaarch.prototxt

My question is, if I want to train my datasheet, and run the model on TDA4, then I need the pt file that can be export to onnx, and the onnx file can be complied to bin file successfully. Where is the pt file located?

image

debapriyamaji commented 2 years ago

Hi, The prototxt file may not be in line with the model. We have added support to generate the prototxt along with the onnx file. Please try with the latest code and let us know.

Regards, Debapriya