Inspiration

The inspiration for this project comes from the need to enhance road safety for pedestrians by incorporating intelligent systems into traffic management. The idea is to automate the process of detecting pedestrians and adjusting traffic lights to ensure pedestrian safety in the future city. This project combines computer vision (YOLO object detection) and real-time processing to monitor pedestrian movement and control traffic lights accordingly.

What it does

The AI Smart Crosswalk system uses a camera feed (either a webcam or a video file) to detect pedestrians in real time using the YOLOv8 model. The system identifies when a pedestrian is detected, tracks how long they’ve been on the crosswalk, and changes the traffic light status accordingly. The light will turn from red to yellow and then green based on pedestrian detection and timing. If no pedestrian is detected for a certain amount of time, the light will reset to red.

How we built it

The system is built using Python with the OpenCV library for video processing and display, YOLO for real-time object detection, and Ultralytics for loading and using the YOLO model. The video feed is captured from either a webcam or a video file, and each frame is processed to detect pedestrians. The pedestrian detection triggers the logic to adjust the traffic light status based on the time the pedestrian is detected. The model runs in a loop, and the light status is updated dynamically using the STM32 microcontroller based on the detection events.

Challenges we ran into

Integrating our Python scripts to the Microcontroller.

Accomplishments that we're proud of

Working model for the real-time pedestrian detection.

What we learned

  • Successfully implemented pedestrian detection with YOLO in real-time video processing.
  • Created a dynamic traffic light control system that reacts to pedestrian detection and adjusts accordingly.
  • Optimized the system to run efficiently with continuous video processing, avoiding performance bottlenecks.

What's next for AI Smart Crosswalk

Fine-tuning the model for better pedestrian detection, especially in challenging environments such as poor lighting or occlusions.

Built With

Share this project:

Updates