pytorch / android-demo-app

PyTorch android examples of usage in applications
1.45k stars 596 forks source link

getting bad prediction with torchlite model (torchscript.ptl) when compared to pytorch model (.pt).... #249

Open Heena-S-Patel opened 2 years ago

Heena-S-Patel commented 2 years ago

I have imaplemented yolov3 model on custom dataset...When I test my model with .pt, it runs accurately on python script with detect.py file....However, when I converted it to torchscript.ptl format and run it in this project it provides wrong prediction...Also. this project doesn't support to run .pt file ...It's my kind request to provide solution for it...

Heena-S-Patel commented 2 years ago

Can anyone please give solution to my issue...?

geekli commented 2 years ago

Same problem, detect.py ok. The result on ”ObjectDetection App“ very bad after converted by export.py.

geekli commented 2 years ago

I found the reason, because I set wrong value to mOutputColumn. It should be 4+1+classes.size() private static int mOutputColumn = 9+5; // left, top, right, bottom, score and xxx class probability