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

What is the point of checking twice whether there are bounding boxes for the same object or not? #27

Open Kanyade opened 3 years ago

Kanyade commented 3 years ago

We already check for them in the first place(PhoneARCamera.cs):

image

And then we check again:

image

Or am I missing something? By deleting the latter it works just as fine.

rooi commented 3 years ago

If I'm correct the later part should filter the bounding boxes over several frames while the first part only looks at the current frame. I do notice much more bounding boxes when deleting the later part.

However, with the later part enabled, the application freezes on my iPhone when there or more then 3 bounding boxes. When I remove the following line it works, but this also disables the filtering: this.boxSavedOutlines = temp;

Does it work for you?

Does someone have an idea on what may cause the application to freeze? I thought of some multithreading conflict to the List, but add lock (also to the AnchorCreator.cs) do not seem to work