This project implements a modern, real-time perception pipeline for Advanced Driver Assistance Systems (ADAS). It is designed to detect objects (vehicles, pedestrians, potholes), track them across frames, and estimate their relative distance using monocular depth estimation.
The pipeline is built around three core modules:
- Object Detection: Uses
YOLOv8(via Ultralytics) for fast, robust bounding box detection. - Monocular Depth Estimation: Uses
MiDaSto generate a relative depth map from a single 2D camera frame. - Object Tracking: Maintains object identities across frames to stabilize distance calculations (currently a simple IoU tracker, ready to be upgraded to ByteTrack/DeepSORT).
- Clone the repository (if not already done).
- Install dependencies:
pip install -r requirements.txt
- Run the pipeline:
- To run on your default webcam:
python src/pipeline.py --source 0
- To run on a recorded video file:
python src/pipeline.py --source path/to/your/video.mp4
- To run on your default webcam:
To scale this to a "Tesla-grade" or enterprise-level system, the following upgrades are recommended:
- Sensor Fusion: Integrate Stereo Cameras or low-cost LiDAR for absolute millimeter-accurate distance, rather than relative depth.
- Bird's Eye View (BEV): Transform the 2D detections into a top-down vector space for path planning.
- Edge Optimization: Convert the PyTorch models to TensorRT/ONNX to run at 30+ FPS on embedded devices like the NVIDIA Jetson.
- Data Engine (Shadow Mode): Implement an active learning loop that saves edge-case frames (where the model is uncertain) to a cloud bucket for retraining.