Skip to content

offoabhii/Lane_detection_using_U-Net

Repository files navigation

🚘 Lane Detection using U-Net

This project implements road lane detection using a U-Net deep learning architecture.
It provides training code, prediction outputs, and an interactive Gradio UI for real-time testing on images, videos, and webcam feeds.


📂 Project Structure

lane_detection_using_unet/
│── app.py                     # Gradio app for demo
│── final_project.ipynb         # Training & evaluation notebook
│── requirements.txt            # Dependencies
│── README.md                   # Project documentation
│── new_dataset/                # Training & prediction samples
│   ├── training/
│   ├── prediction/
│   └── prediction_refined/
│── old_dataset/                # Tu Simple lane prediction dataset
│   ├── TUSimple/
├         ├── train_set
├         ├── test_set
├         ├── test_label
│── .gitignore                  # Keeps repo clean

🔧 Installation

1️⃣ Clone the repository

git clone https://github.com/your-username/lane_detection_using_unet.git
cd lane_detection_using_unet

2️⃣ Install dependencies

pip install -r requirements.txt

🚀 Run the App

python app.py

This launches a Gradio web app with three modes:

  • 🖼️ Image Detection → Upload an image
  • 🎬 Video Detection → Upload a video
  • 📹 Live Webcam → Real-time lane detection

🖥️ User Interface

Here’s the Gradio-based UI of the project:

User Interface Screenshot


🖼️ Prediction

Sample output of lane detection (green overlay = detected lanes):

Prediction Example


📊 Results

  • Model: U-Net with skip connections
  • Input size: 128x256
  • Framework: TensorFlow / Keras
  • Accuracy: Achieved stable lane segmentation on road datasets

🎥 Demo Video

👉 Watch Demo Video


📌 Notes

  • The model is trained on a TUSimple lane detection dataset.
  • You can retrain the model using the final_project.ipynb notebook.

📜 License

This project is released under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published