pytorch / android-demo-app

PyTorch android examples of usage in applications
1.48k stars 607 forks source link

The predicted category does not match and the drawing box does not appear #324

Closed julien0220 closed 1 year ago

julien0220 commented 1 year ago

There is no problem with the direct prediction of the exported script image When I put the exported script into the asserts folder and modify the configuration according to the readme, the prediction category does not match and the box is not drawn

image

I have 44 categories of garbage classification, written in a txt file, written in Simplified Chinese. I modified the test pictures, weight file, category txt file, and nothing else. This is my preProcessor.java. private static int mOutputRow = 25200; // as decided by the YOLOv5 model for input image of size 640*640 private static int mOutputColumn = 49; // left, top, right, bottom, score and 80 class probability private static float mThreshold = 0.25f; // score above which a detection is generated private static int mNmsLimit = 15; Thank you so much for browsing and helping me out

julien0220 commented 1 year ago

Just Reinstalling the app solves the problem, but the effect on Android is much worse than that on PC