Skip to content

Bhargavi-Joshi/Self-Driving-Car-Lane-Detection-using-UNet-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Self-Driving-Car-Lane-Detection-using-UNet-Model

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.

Project Structure

  • 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.

Installation

  1. Clone the repository:
    git clone https://github.com/Bhargavi-Joshi/Self-Driving-Car-Lane-Detection-using-UNet-Model.git
  2. Install the required packages:
    pip install -r Requirements.txt

Usage

Classical Lane Detection

python Classical.py <image_index>

U-Net Model Training

python training.py

Predict Lanes

python predict.py <image_index>

Draw Lanes on Video

python Draw_lanes.py <path_to_video>

Visualize Dataset

python Visualize.py <number_of_images> <start_index>

Dataset

The training and labelled dataset used for the lane detection models can be downloaded from the following link:

Download Dataset

Authors

Developed by:

Releases

No releases published

Packages

No packages published