Skip to content

🧠 Real-time object detection in mixed reality on Meta Quest 3 using Unity, Sentis (YOLO), and passthrough camera. Anchors 3D bounding boxes to real-world objects with Scene Understanding and live detection overlay UI.

Notifications You must be signed in to change notification settings

sandeepv6/questvision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🧠 AI-Powered Object Detection & 3D Bounding Boxes in Mixed Reality (Quest 3)

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.


πŸš€ Features

  • πŸ” 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)

πŸ“Έ Preview

(Include screenshots or GIFs of bounding boxes overlaying real-world objects here)


πŸ› οΈ Tech Stack

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

πŸ“¦ Setup Instructions

βœ… Prerequisites


🧱 Unity Setup (Simplified)

  1. Create a new Unity project with 3D (URP) or Built-in Pipeline
  2. Import:
    • Meta XR SDK / PassthroughCamera Samples
    • Unity Sentis
  3. Enable XR:
    • Install OpenXR and enable Meta Quest Support
    • Under Android β†’ check:
      • β˜‘ Passthrough
      • β˜‘ Scene
      • β˜‘ Scene Anchors
  4. Add permissions:
    • In PassthroughCameraPermissions script or manifest:
      com.oculus.permission.USE_SCENE
      com.oculus.permission.PASSTHROUGH_CAMERA
      
  5. Build settings:
    • IL2CPP, ARM64
    • Min API Level 31 (Android 12)

🧠 How It Works

  1. The passthrough feed is captured via Meta’s API
  2. Every frame is sent to Unity Sentis, which runs YOLO object detection
  3. Bounding boxes are drawn in 2D using Unity UI
  4. A 3D raycast is performed for each detection to anchor it in world space
  5. Detected objects are shown in a floating detection panel in AR

πŸ’‘ Example Use Cases

  • 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

πŸ§ͺ Known Issues

  • Raycast may log EnvironmentRaycastManager is not supported if 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).

πŸ“Œ TODO / Roadmap

  • 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

πŸ“œ License

MIT License (or your choice)


πŸ™Œ Credits

  • Meta XR SDK + PassthroughCamera Samples
  • Unity Sentis team
  • YOLO open-source model community

πŸ‘‹ Author

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!

About

🧠 Real-time object detection in mixed reality on Meta Quest 3 using Unity, Sentis (YOLO), and passthrough camera. Anchors 3D bounding boxes to real-world objects with Scene Understanding and live detection overlay UI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published