ncnn-android-yolov8 icon indicating copy to clipboard operation
ncnn-android-yolov8 copied to clipboard

How to convert pt file to ncnn for this android demo???

Open mzoltan77 opened this issue 1 year ago • 23 comments

I managed to convert my own pt model to work well with this demo? I tried many ways, but none were compatible. The new ultralystic is installed. Converting towards yolo is not good. I set nc to 1 because I only need 1, I also paid attention to the file names (param, bin) and the names of input and output. But unfortunately, either about 200 squares appear, or the program exits immediately when run. I would appreciate help on what steps to take to convert my own pt file compatible with the param and bin files featured in the demo. Thank you very much in advance! So far, no one has been able to find a solution to this. :(

This is not work, (my img size is 640×640 too):

from ultralytics import YOLO

Create a model

model = YOLO('yolov8n.pt')

Export the model to NCNN with arguments

model.export(format='ncnn', half=True, imgsz=640)

@FeiGeChuanShu ??? Please share, how can I convert from pt to your param and bin file? Step by step. Onnx file is working perfectly in Python, but if I convert is to ncnn doesnt work.

mzoltan77 avatar Feb 16 '24 13:02 mzoltan77