Real-time road perception
Road video in, and at 29 frames per second: every vehicle and pedestrian detected and tracked, plus the drivable road and the lane lines. Built to move to edge hardware later.
Test video: city driving in Montreal by German Korb, Pexels.
What it does
- Detects cars, trucks, buses, bikes and pedestrians, and tracks each one with an ID and a trail.
- Finds the drivable area and the lane lines in every frame.
- Shows FPS and the time of each stage live, and saves a speed report after each run.
- Modular Python: detection, road, drawing and metrics are separate, so a model can be swapped in one file.
Measured speed (1280×720 video)
| Hardware | Lane model input | Time per frame | FPS |
|---|---|---|---|
| Laptop GPU (RTX 4000 Ada) | 640 | 34 ms | 29 |
| Laptop GPU (RTX 4000 Ada) | 320 | 26 ms | 39 |
| CPU only (Core i7-13850HX) | 640 | 127 ms | 8 |
| CPU only (Core i7-13850HX) | 320 | 68 ms | 15 |
Path to edge hardware
- Jetson Orin: both models exported to TensorRT (FP16, then INT8), video decoded on the GPU.
- Raspberry Pi 5: too slow for both models alone, so it needs a Hailo accelerator.
- Lanes change slowly, so they can run every second frame to free time for detection.
YOLO11n, ByteTrack, YOLOP, ONNX Runtime, OpenCV, PyTorch