This project implements lane detection using both classical image processing techniques and a deep learning approach with a U-Net model. The pipeline processes images and videos to detect lanes on roads.
- Classical_utils.py: Contains utility functions for image processing (e.g., grayscale conversion, Gaussian blur, Canny edge detection, Hough transform).
- Classical.py: Implements a classical lane detection pipeline using the functions in
classical_utils.py
. - Draw_lanes.py: Applies the trained U-Net model to detect lanes in a video file.
- predict.py: Uses a trained U-Net model to predict lanes on a given image and calculates Intersection over Union (IoU).
- training.py: Trains the U-Net model on a dataset of images and their corresponding lane masks.
- unet.py: Defines the U-Net model architecture.
- Visualize.py: Visualizes training and test images for inspection.
- Clone the repository:
git clone https://github.com/Bhargavi-Joshi/Self-Driving-Car-Lane-Detection-using-UNet-Model.git
- Install the required packages:
pip install -r Requirements.txt
python Classical.py <image_index>
python training.py
python predict.py <image_index>
python Draw_lanes.py <path_to_video>
python Visualize.py <number_of_images> <start_index>
The training and labelled dataset used for the lane detection models can be downloaded from the following link:
Developed by:
- Pranjal Gautam - pranjalgautam1103@gmail.com
- Bhargavi Joshi - bhargavijoshi86@gmail.com