roadsafe

Road Lane Line Detection using CNN

https://pjahanavi.github.io/roadsafe/

Overview

This project implements a Road Lane Line Detection system using a Convolutional Neural Network (CNN). The goal is to detect lane lines in road images or video streams, which is a crucial component in autonomous driving and advanced driver assistance systems (ADAS).

Features

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/road-lane-detection-cnn.git
    cd road-lane-detection-cnn
    
  2. Create a virtual environment (optional but recommended):
    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install dependencies:
    pip install -r requirements.txt
    

Dataset

The model is trained on road images with lane markings. You can use publicly available datasets such as:

Model Architecture

The CNN model consists of:

Training

  1. Prepare your dataset and organize it into train and test folders.
  2. Run the training script:
    python train.py --epochs 10 --batch_size 32
    

Testing

To test the trained model on an image or video:

python test.py --input path/to/image_or_video

Results

The model outputs lane boundaries on the given input images or video frames. You can visualize the predictions using OpenCV.

Example Usage

from model import LaneDetector

detector = LaneDetector("model.h5")
result = detector.detect_lanes("test_image.jpg")

Future Improvements

Contact

For any questions or suggestions, contact pjahanavi2811@example.com or open an issue on GitHub.