Skip to content

"🚦 Smart Traffic Signal: An innovative project implementing intelligent traffic management using sensors and algorithms to optimize traffic flow and reduce congestion. A step towards smarter cities! 🌟🌍"

License

Notifications You must be signed in to change notification settings

amanantuley/Smart_Traffic_Signal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

🚦 Smart Traffic Signal – Python Project

This repository contains my Smart Traffic Signal System, a Python-based project aimed at optimizing traffic flow using real-time/simulated data. It intelligently adjusts signal durations based on vehicle density to reduce congestion and improve city traffic management.


πŸ“ Folder Structure

πŸ“ static/                         # Static files (e.g., CSS, JS, images for UI if any)
πŸ“ templates/                      # HTML templates (for Flask app interface)
πŸ“„ app.py                          # Main Flask application
πŸ“„ database.py                     # Handles database connections and schema
πŸ“„ database.db                     # SQLite database for user data/logs
πŸ“„ generate_verification_codes.py  # Utility script for creating codes (e.g., OTPs)
πŸ“„ temp.py                         # Temporary test script or experimental code
πŸ“„ test.py                         # Testing or unit test file
πŸ“„ test_time.py                    # Simulates signal timing behavior
πŸ“„ user_activity.xlsx              # Dataset or logs of simulated user activity
πŸ“„ LICENSE.md                      # License file (MIT or other)
πŸ“„ Project-Report.pdf              # Final project documentation/report
πŸ“„ SmartTrafficSignal_Aman_USC_UCT.pdf # Formal college submission document
πŸ“„ Smart_Traffic_Signal_SEM-4.pdf  # Academic report for SEM-4
πŸ“„ README.md                       # This file

🎯 Project Objective

To build an intelligent traffic light control system that uses real-time or simulated input to:

  • Count vehicle density at intersections
  • Dynamically alter traffic signal timings
  • Reduce waiting time and congestion
  • Log user/traffic activity for analysis

βš™οΈ Technologies & Libraries Used

  • Python 3.x – Core language
  • Flask – Backend web framework
  • SQLite – Lightweight database
  • OpenCV (optional) – For real-time camera-based vehicle detection
  • time, random, threading – Used in simulation logic
  • Excel (XLSX) – For logging and exporting user/traffic data

🚦 Key Features

βœ… Dynamic Signal Timing – Signal times change based on traffic volume βœ… Web-Based Dashboard – UI built using Flask with HTML templates βœ… User Activity Log – All actions and durations are stored in a DB/XLSX βœ… Traffic Simulation – test_time.py mimics real-world traffic flow βœ… Extensible Design – Can be scaled for multiple intersections


πŸ§ͺ Setup Instructions

  1. Clone the repository

    git clone https://github.com/amanantuley/smart-traffic-signal.git
    cd smart-traffic-signal
  2. Install dependencies (Create a requirements.txt if needed; otherwise manually install)

    pip install flask pandas openpyxl
  3. Run the application

    python app.py
  4. Access the web interface Navigate to http://localhost:5000 in your browser.


πŸ“Έ Screenshots

Place screenshots in a screenshots/ folder and reference here once available.


πŸ“„ Project Reports

  • πŸ“˜ Project-Report.pdf – Final project documentation
  • πŸ“— SmartTrafficSignal_Aman_USC_UCT.pdf – Official college submission
  • πŸ“™ Smart_Traffic_Signal_SEM-4.pdf – Academic report for semester-4

πŸ“¬ Contact


πŸ“œ License

This project is licensed under the MIT License. Feel free to use, modify, and distribute with attribution.

About

"🚦 Smart Traffic Signal: An innovative project implementing intelligent traffic management using sensors and algorithms to optimize traffic flow and reduce congestion. A step towards smarter cities! 🌟🌍"

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published