This project brings real-time object detection to mixed reality using the Meta Quest 3. It combines Unity's passthrough APIs, Metaβs PassthroughCamera API, and Unity Sentis for AI inference with YOLO, anchoring object detections into the physical world.
- π Object Detection using YOLO model via Unity Sentis
- π· Passthrough Camera integration for full-color MR vision
- π¦ 2D & 3D Bounding Boxes rendered in screen space and real-world coordinates
- π― Scene Understanding Raycasting to anchor detections in 3D
- π Live Detection List Panel in AR HUD
- β‘ Optimized for Meta Quest 3 (OpenXR, Android build)
(Include screenshots or GIFs of bounding boxes overlaying real-world objects here)
| Technology | Role |
|---|---|
| Unity 2022+ | Core development environment |
| Unity Sentis | AI inference (YOLO) |
| Meta PassthroughCamera API | Access to passthrough feed |
| Meta Scene Understanding | World raycasting for 3D anchors |
| OpenXR + Meta Quest Support | XR integration |
| WebCam fallback (Editor) | Editor-based testing without Quest builds |
- Meta Quest 3 with Developer Mode enabled
- Unity 2022+ with OpenXR
- Meta XR SDK + PassthroughCamera Samples
- Unity Sentis package (via Package Manager)
- A YOLO model (.onnx) configured for Sentis
- Create a new Unity project with 3D (URP) or Built-in Pipeline
- Import:
- Meta XR SDK / PassthroughCamera Samples
- Unity Sentis
- Enable XR:
- Install OpenXR and enable Meta Quest Support
- Under Android β check:
- β Passthrough
- β Scene
- β Scene Anchors
- Add permissions:
- In PassthroughCameraPermissions script or manifest:
com.oculus.permission.USE_SCENE com.oculus.permission.PASSTHROUGH_CAMERA
- In PassthroughCameraPermissions script or manifest:
- Build settings:
- IL2CPP, ARM64
- Min API Level 31 (Android 12)
- The passthrough feed is captured via Metaβs API
- Every frame is sent to Unity Sentis, which runs YOLO object detection
- Bounding boxes are drawn in 2D using Unity UI
- A 3D raycast is performed for each detection to anchor it in world space
- Detected objects are shown in a floating detection panel in AR
- AR productivity apps that track objects on desks
- Real-world object recognition training
- Accessible tech: real-time feedback for visually impaired users
- MR games with object-based interaction
- Raycast may log
EnvironmentRaycastManager is not supportedif Scene Understanding is not properly enabled or Quest permissions arenβt granted. - YOLO confidence score placeholder (
1.0) β customize with your model output if needed. - Must build to Quest to test raycast functionality (wonβt work in Editor).
- Add audio feedback for detections
- Switch YOLO model dynamically (small/medium/large)
- Add tap-to-select or hand tracking interaction
- Export detected object logs for analysis
MIT License (or your choice)
- Meta XR SDK + PassthroughCamera Samples
- Unity Sentis team
- YOLO open-source model community
Built by Sandeep Virk as part of a university CV/AR project using Unity + Meta XR + AI.
Feel free to fork, contribute, or reach out!