Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.6%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: kevinomerkilic
  • License: agpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 15.2 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 1
  • Releases: 0
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme Contributing License Citation

README.md

🚦 AI-Powered Adaptive Traffic Light System

🔥 Overview The AI-Powered Adaptive Traffic Light System is a smart traffic management solution that dynamically adjusts traffic lights based on real-time congestion analysis. By leveraging computer vision, machine learning, and IoT communication, this system enhances urban mobility, reduces congestion, and optimizes traffic flow.

⚡ Key Features

✅ AI-Based Traffic Analysis – Uses a trained YOLOv5 model to detect vehicles and predict congestion patterns. ✅ Dynamic Traffic Light Control – Automatically adjusts signal timings based on live traffic density. ✅ IoT Integration (MQTT) – Uses an MQTT-based communication system to update traffic lights in real-time. ✅ Live Analytics Dashboard – A Flask + AWS dashboard visualizes congestion hotspots and system performance. ✅ Edge Processing on Raspberry Pi – Runs AI inference directly on a Raspberry Pi 5 with the Hailo AI Kit for real-time traffic detection.

📌 System Architecture

1️⃣ Traffic Data Collection

Streams live traffic footage from public cameras (or local webcams). YOLOv5 detects vehicles (cars, buses, trucks) in each frame. 2️⃣ AI-Based Traffic Analysis

Analyzes congestion levels based on vehicle count. A TensorFlow-trained ML model predicts future traffic patterns. 3️⃣ MQTT-Based Traffic Light Control

Traffic light duration adapts dynamically based on congestion. Uses Mosquitto MQTT to communicate with IoT traffic lights. 4️⃣ Live Dashboard & Analytics

A Flask + AWS-hosted web dashboard visualizes traffic conditions. Displays real-time vehicle counts, congestion levels, and traffic trends. 🛠️ Setup & Installation

1️⃣ Clone the Repository git clone https://github.com/kevinomerkilic/smart-traffic-ai.git cd smart-traffic-ai 2️⃣ Set Up Virtual Environment python3 -m venv yolov5-venv source yolov5-venv/bin/activate pip install -r requirements.txt 3️⃣ Download Pretrained Model wget https://github.com/ultralytics/yolov5/releases/download/v7.0/yolov5s.pt 4️⃣ Run YOLOv5 for Traffic Detection python detect.py --weights yolov5s.pt --source "https://your-traffic-camera-url.m3u8" 5️⃣ Set Up MQTT Broker (Mosquitto) Install Mosquitto on the Raspberry Pi:

sudo apt update sudo apt install mosquitto mosquitto-clients Run the broker:

mosquitto -v Test publishing messages:

mosquitto_pub -h localhost -t "traffic/lights" -m "green" 6️⃣ Run Flask Dashboard python app.py Access it in a browser at:

http://localhost:5000 📊 Live Dashboard Preview

The Flask-based dashboard provides: ✔ Real-time congestion updates ✔ Vehicle count graphs ✔ Adaptive traffic signal status ✔ Traffic trend predictions

🤖 How AI Model Works

The system uses a YOLOv5 model trained on a custom dataset of traffic images. It detects vehicles and classifies them into cars, buses, and trucks. A TensorFlow prediction model forecasts traffic congestion trends. The system dynamically adjusts signal timing to optimize flow. 🚀 Future Improvements

🔹 Edge AI Optimization: Improve inference speed using TensorRT. 🔹 Multi-Camera Support: Integrate multiple street cameras for better accuracy. 🔹 Integration with City Infrastructure: Work with smart city APIs for real-world deployment.

👨‍💻 Developer

💡 Omer Kilic – AI & IoT System Development UI/UX, Backend, Data Science

📜 License

This project is licensed under the AGPL-3.0 License.

This README.md gives a comprehensive and structured overview of your project, including setup instructions, technical details, and future improvements. 🚀 Let me know if you'd like any modifications! 🚦

Owner

  • Name: OMER KILIC
  • Login: kevinomerkilic
  • Kind: user
  • Location: NEW JERSEY

I am a dedicated and hardworking Computer Science student with a passion for innovation and technology. Currently, I’m focusing on building AI-powered web apps.

Citation (CITATION.cff)

cff-version: 1.2.0
preferred-citation:
  type: software
  message: If you use YOLOv5, please cite it as below.
  authors:
  - family-names: Jocher
    given-names: Glenn
    orcid: "https://orcid.org/0000-0001-5950-6979"
  title: "YOLOv5 by Ultralytics"
  version: 7.0
  doi: 10.5281/zenodo.3908559
  date-released: 2020-5-29
  license: AGPL-3.0
  url: "https://github.com/ultralytics/yolov5"

GitHub Events

Total
  • Delete event: 1
  • Issue comment event: 4
  • Push event: 1
  • Pull request event: 3
  • Create event: 4
Last Year
  • Delete event: 1
  • Issue comment event: 4
  • Push event: 1
  • Pull request event: 3
  • Create event: 4

Dependencies

.github/workflows/cla.yml actions
  • contributor-assistant/github-action v2.6.1 composite
.github/workflows/docker.yml actions
  • actions/checkout v4 composite
  • docker/build-push-action v6 composite
  • docker/login-action v3 composite
  • docker/setup-buildx-action v3 composite
  • docker/setup-qemu-action v3 composite
.github/workflows/format.yml actions
  • ultralytics/actions main composite
.github/workflows/links.yml actions
  • actions/checkout v4 composite
  • ultralytics/actions/retry main composite
.github/workflows/merge-main-into-prs.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/stale.yml actions
  • actions/stale v9 composite
utils/docker/Dockerfile docker
  • pytorch/pytorch 2.0.0-cuda11.7-cudnn8-runtime build
utils/google_app_engine/Dockerfile docker
  • gcr.io/google-appengine/python latest build
pyproject.toml pypi
  • matplotlib >=3.3.0
  • numpy >=1.22.2
  • opencv-python >=4.6.0
  • pandas >=1.1.4
  • pillow >=7.1.2
  • psutil *
  • py-cpuinfo *
  • pyyaml >=5.3.1
  • requests >=2.23.0
  • scipy >=1.4.1
  • seaborn >=0.11.0
  • thop >=0.1.1
  • torch >=1.8.0
  • torchvision >=0.9.0
  • tqdm >=4.64.0
  • ultralytics >=8.1.47
requirements-web.txt pypi
  • boto3 >=1.34.0
  • flask >=3.0.0
  • flask-socketio >=5.3.0
  • numpy <=2.1.1
  • opencv-python-headless >=4.8.0
  • pillow >=10.0.0
  • python-dotenv >=1.0.0
  • torch >=1.8.0
  • ultralytics >=8.2.34
requirements.txt pypi
  • PyYAML >=5.3.1
  • boto3 >=1.37.8
  • flask >=3.0.0
  • flask-socketio >=5.3.6
  • gevent-websocket >=0.10.1
  • gitpython >=3.1.30
  • matplotlib >=3.3
  • numpy >=1.23.5
  • opencv-python >=4.1.1
  • pandas >=1.1.4
  • pillow >=10.3.0
  • psutil *
  • python-dotenv >=1.0.1
  • requests >=2.32.2
  • scipy >=1.4.1
  • seaborn >=0.11.0
  • setuptools >=70.0.0
  • thop >=0.1.1
  • torchvision >=0.9.0
  • tqdm >=4.66.3
utils/google_app_engine/additional_requirements.txt pypi
  • Flask ==2.3.2
  • gunicorn ==22.0.0
  • pip ==23.3
  • werkzeug >=3.0.1
  • zipp >=3.19.1