Can Monocular Depth Add Useful Distance to Object Detection?¶
Completed
Motivation¶
Ordinary object detection identifies what and where, but not how far away. DepthEye12 combines a detector with monocular depth estimation to add approximate scene distance without requiring a depth camera.
Problem¶
Running two visual models per frame is expensive, and dense depth values must be reduced into one useful estimate per detected object.
Architecture¶
YOLOv12 produces classes and bounding boxes. MiDaS DPT-Hybrid produces a monocular depth map for the same frame. A DetectionDepthModel owns both pipelines and samples depth inside each detected region before annotating the video.
Both models are loaded into VRAM once. Depth is sampled over bounding-box regions rather than treated as a separate per-pixel output in the annotation path.
Implementation¶
The frame loop accepts arbitrary video resolutions, runs both models, and emits bounding boxes, labels, confidence values, and estimated depth for each object. OpenCV handles video input and rendered output.
Results¶
The completed pipeline produces annotated video with per-object depth estimates. No calibrated distance error or throughput figure is recorded, so the output is described as estimated depth rather than metric range.
Lessons Learned¶
Combining independently trained models creates a useful system quickly, but it does not make monocular depth metrically calibrated. The interface should preserve that uncertainty.
Future Work¶
No measured second phase is recorded. Calibration against known distances and a model-by-model timing breakdown would be necessary before making claims about physical distance or real-time performance.