pytorch / android-demo-app

PyTorch android examples of usage in applications
1.47k stars 606 forks source link

Why boxes are totally wrong? #155

Closed turgut090 closed 3 years ago

turgut090 commented 3 years ago

Hi. I trained my custom data with yolo5 from the official repo. The results are pretty good. However, after running detection from Android Studio I get strange box annotations. BTW, I changed only the following elements:

private static int mOutputColumn = 23;
and
Result result = new Result(cls, outputs[i*23+4], rect);

based on https://github.com/pytorch/android-demo-app/issues/102 Screenshot from 2021-06-19 19-23-11

turgut090 commented 3 years ago

I guess this is related to the number of classes. Although I set the number correctly there is still something that needs to be changed. Could you help with that @jeffxtang ?