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

Where to apply anchor condition #18

Closed syedali1621 closed 3 years ago

syedali1621 commented 3 years ago

I am using yolov2tiny my own model and i want to show 3d model when it detects specific class. Could you describe where to put if condition. My model is train on 3 classes i need to show 3 different 3d models when it detect each class. For example when it detect class 1 i need to show class 1 3d model, when it detect class 2 then class 2 3d model and same case for class 3.

Thank you

derenlei commented 3 years ago

Hi @syedali1621, I think you could anchor your 3d models here: https://github.com/derenlei/Unity_Detection2AR/blob/main/Assets/Scripts/AnchorCreator.cs#L50. Labels could be accessed through outline.Label.

syedali1621 commented 3 years ago

@derenlei Thank you i used outline.label to apply if condition but in PhoneARCamera script.