Deep Learning Based Monocular Depth Estimation For Object Distance Inference in 2D Images
Deep Learning Based Monocular Depth Estimation For Object Distance Inference in 2D Images
Deep Learning Based Monocular Depth Estimation For Object Distance Inference in 2D Images
Distance Estimation:
For each detected object, the system calculates an
approximate distance based on the size of the bounding box
relative to the frame dimensions. The width of the bounding
box is used as an inverse indicator of the distance to the
camera. The approximate distance is computed using a
heuristic approach:
apx_distance=(1-width/frame_width)2
Frame Annotation:
The detected objects are annotated on the video frame
with bounding boxes, class labels, confidence scores, and
estimated distances. This information is overlaid on the video
feed, enabling real-time visualization of the detected objects
and their distances.
Web Application:
A Flask web application serves the annotated video feed
to users. The web interface allows users to start and stop the
webcam feed and view the list of detected objects along with
their estimated distances. This interface provides an
accessible and interactive means of monitoring the system's
output.
Thread Synchronization:
Threading is employed to handle video capture and
object detection concurrently, ensuring that the web interface
remains responsive. A threading lock is used to synchronize
access to shared resources, such as the list of detected objects,
to prevent race conditions and ensure data consistency.
Fig 1 Flowchart
V. RESULTS
REFERENCES