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

Tiny YOLOv3 confidence 100% #17

Closed janedoesrepo closed 3 years ago

janedoesrepo commented 3 years ago

Hi, thanks for this neat App! When running the v3 model I get mostly confidence scores of 100% for every object, even if the prediction is wrong. Has anyone else had this issue and knows how to solve it?

derenlei commented 3 years ago

Hi @janedoesrepo, are you using the example v3 model or yours? I didn't have this issue running the example model on my phone. Are the confidence scores changing or they're always high once they show up?

janedoesrepo commented 3 years ago

Happy to hear that the v3 model works! I'm using your model but I adapted your code to run on a HoloLens. The confidence scores are always high.

Having checked the post-processing/parsing like a 100 times either the model or the input/pre-processing have to be faulty. It works fine with the v2 model though which is why I'm suspecting that the v3 model is causing the problem.

I will run some tests and get back to you. If you have any ideas in the meantime I'd really appreciate your feedback.

syedali1621 commented 3 years ago

@janedoesrepo i think you should check confidence threshold increase it to 0.8 then check. Could you tell me which repository you used to train yolov3tiny ?

janedoesrepo commented 3 years ago

I tried upgrading Barracuda from stable to 1.3.1 preview but the detected objects are still completely random and the confidence is always 100%. Unfortunately it is hard to Debug on HoloLens because I'm using a plugin for the camera access that doesn't run in editor.

@syedali1621 , I used the yolov3 from this repository.

I'll have to try again someday next month, am quite busy atm. You can close the issue or wait until I found the problem. Thank a lot!

derenlei commented 3 years ago

@janedoesrepo Ok, thanks! Closing this for now.

syedali1621 commented 3 years ago

@derenlei Which repository i think you forget to mentioned the url. Did you use darknet if yes then how you converted it to .onnx?