Skip to content

Mehtab161/Smart_Light_AI

Repository files navigation

🚦 Smart_Light_AI

🧠 AI-Based Smart Traffic Management System

Smart_Light_AI is an intelligent traffic management system that uses YOLOv8 vehicle detection and adaptive signal control to optimize traffic flow in real-time. The system also prioritizes emergency vehicles to reduce response time and improve urban mobility efficiency.


🔥 Key Features

  • 🚗 Real-time vehicle detection using YOLOv8
  • 🚦 Adaptive traffic signal timing based on vehicle density
  • 🚑 Emergency vehicle priority system
  • 📊 Admin Dashboard for traffic monitoring and control
  • 🌐 Public Dashboard for live traffic visualization
  • ⚡ FastAPI backend for API services
  • ⚛️ React-based frontend (Admin + Public UI)

🛠️ Tech Stack

Backend

  • Python
  • FastAPI
  • Uvicorn
  • YOLOv8
  • OpenCV

Frontend

  • React.js
  • JavaScript
  • HTML/CSS

Deployment

  • Render (Backend)
  • Vercel (Frontend)

📂 Project Structure

Smart_Light_AI/
│
├── backend/              # FastAPI backend & AI logic
├── smartlight-ui/        # Admin dashboard
├── smartlight-public/    # Public dashboard
├── images/               # Project assets
├── videos/               # Simulation videos
├── models/               # YOLO model files
├── requirements.txt      # Python dependencies
├── runtime.txt           # Python version
└── simulation.py         # Traffic simulation logic

🚀 How to Run Locally

1️⃣ Clone the repository

git clone https://github.com/YOUR_USERNAME/Smart_Light_AI.git
cd Smart_Light_AI

2️⃣ Create Virtual Environment (Optional but Recommended)

python -m venv venv
venv\\Scripts\\activate   # Windows

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Run Backend Server

uvicorn backend.app.main:app --reload

Server will start at:

http://127.0.0.1:8000

📊 System Overview

Smart_Light_AI dynamically adjusts traffic signals based on real-time vehicle detection using computer vision. It helps:

  • Reduce traffic congestion
  • Improve emergency response time
  • Optimize traffic signal efficiency
  • Enable smarter urban traffic management

🎓 Project Purpose

This project is developed as a final-year AI-based smart city solution aimed at improving traffic flow using intelligent automation and real-time vehicle detection.


📌 Future Improvements

  • Cloud-based real-time camera integration
  • AI-based traffic prediction
  • Multi-intersection coordination
  • Analytics dashboard with historical insights

⭐ If you found this project helpful, consider giving it a star!

About

Smart_Light_AI is an AI-powered smart traffic management system using YOLOv8 for real-time vehicle detection and adaptive signal control. It dynamically optimizes traffic signals and prioritizes emergency vehicles. Built with FastAPI backend and React-based Admin & Public dashboards.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors