derenlei / Unity_Detection2AR

Localize 2D image object detection in 3D Scene with Yolo in Unity Barracuda and ARFoundation.
https://derenlei.medium.com/object-detection-with-localization-using-unity-barracuda-and-arfoundation-794b4eff02f8
MIT License
218 stars 61 forks source link

Custom model gives bad bounding boxes #36

Open Kanyade opened 3 years ago

Kanyade commented 3 years ago

Greetings!

I tried running this project with my custom model and it seems to work somewhat fine, it detects the objects (2 classes) but it does not show bounding boxes on my mobile.

The reason is that it gives irrealistic width, height values for the object which cannot be seen on the mobile screen(2220x1080) as seen in the picture below:

image

The original model seems to work fine:

image

This is the part where I added the debug messages in PhoneARCamera:

image

Another thing that bugs me is that the position values are negative with my custom model but it still places the anchor to the object in real life, so it can certainly detect it, but something is off. Any idea why this might be?

jgcbrouns commented 2 years ago

Have you tried checking your custom anchors that you generated and correctly importing these for inference?