stereolabs / zed-unity

ZED SDK Unity plugin
https://www.stereolabs.com/documentation/guides/using-zed-with-unity/introduction.html
MIT License
243 stars 57 forks source link

replacing bounding boxes of custom objects with prefabs/models #271

Closed samphilips closed 8 months ago

samphilips commented 9 months ago

Preliminary Checks

Proposal

Could you guide me how to replace prefabs for replacing 3d boxes around differernt objects with different prefabs, I have already done that for single object, by changing the 3D bounding box prefab with custom object prefab of single object- bag at the moment, image however I want to add multiple prefab for example, if a chair is detected using YOLO, I want the 3bouding box to be replaced with chair prefab, and if bag is detected then I want it to be replaced with chair prefab, I am attaching the image of what I have achieved so far, changing bag detection, right now I have filtered only bag to be detected, image

real world image

Use-Case

No response

Anything else?

No response

SLJLMacarit commented 9 months ago

Hi @samphilips, You'd have to make a script of your own or extend ZED3DObjectVisualizer.cs. You can take a look at the Visualize3DBoundingBox function to see how the 3D boxes are managed and when the prefab is called and used. Then you'd add your own prefabs in the script variables and test the label or sublabel on the detected objects to know which prefab to spawn.

github-actions[bot] commented 8 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days