pytorch / android-demo-app

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

Getting bounding boxes mismatch for D2Go in Live mode #158

Open tuttelikz opened 3 years ago

tuttelikz commented 3 years ago

Running a D2Go example on Android Galaxy Note9.

Getting mismatch in bounding box for D2Go in live mode (demo video also has this issue). What could be the source? (More like d2go.pt model or rendering on actual device). Maybe I could try to contribute solving this issue if got some more guidance.

Here is the screenshot:

drawing
AhmedHessuin commented 3 years ago

@tuttelikz did you find a solution ? thanks in advance

tuttelikz commented 3 years ago

@AhmedHessuin, nope i did not. Shifted to ObjectDetection example, that seems to work better.

AhmedHessuin commented 3 years ago

@tuttelikz
i solved the issue by making the scale x =1 and scale y = 1 in object detection file

AhmedHessuin commented 3 years ago

image @tuttelikz

tuttelikz commented 3 years ago

oh great, @AhmedHessuin 👍. hope to check out some time this week!

tuttelikz commented 3 years ago

how about sending pull request upon this, @AhmedHessuin? 😃 but it is probably better to ask opinion from @jeffxtang or @IvanKobzarev on this matter, since there could be more tests to run..

jwwinship commented 2 years ago

Can confirm that @AhmedHessuin 's solution works for me. I have absolutely no idea why the scaling is causing such an issue (I don't really understand the bitmap parts), but setting these scales to 1 made bounding boxes work perfectly.