This project aims to provide a comprehensive lane detection system for dashcam videos, along with additional features such as crosswalk detection, proximity-based vehicle detection for collision avoidance, and night-time lane detection. The system processes real-world dashcam footage, annotating each frame with accurate lane markings and relevant annotations.
-
LanesDetectionOnFrame: This class is responsible for detecting and annotating lane markings on each frame of the input video. It utilizes techniques such as Hough transform, and Canny edge detection to accurately identify lane boundaries.
-
CrosswalkDetectionOnFrame: Implements algorithms to detect and highlight crosswalks in the video footage. It utilizes pattern recognition and line detection techniques to differentiate crosswalks from other road markings.
-
DistanceDetectionOnFrame: Provides functionality for proximity-based vehicle detection to aid in collision avoidance. The class identifies nearby vehicles in the video frames and calculates their relative distance from the driver's vehicle.
-
Main Class: The main class serves as the entry point for the program. It loads the input videos, applies the annotations generated by the above classes, and generates output videos with the annotations overlayed.
- Clone the repository to your local machine.
- Ensure you have the necessary dependencies installed. You may use the requirements.txt file to install them using pip.
- Run the main class, providing the path to the input video(s) as arguments.
- The program will process the videos, apply the annotations, and generate output videos with annotated features.
[The gifs may take a few seconds to load]
-
Lane detection and lane change detection:
-
Proximity-Based Vehicle Detection:
-
Crosswalk Detection:
-
Night-Time Lane Detection:
- OpenCV
- NumPy