Leveraging sensor technology & computer vision, our project creates a real-time alert system to alert drivers, pedestrians, and cyclists of hazardous situations at traffic lights & intersections. This was built on top of a repository named Car-Speed_detection. This repository proviuded us with classification of a car as well as the coordinates of the car in the frame. https://github.com/creativekids11/Car-Speed-Detection-Python
From this, we used mathematics to estimate direction and speed in the frame, then we added an algorithm to detect if estimated paths crossed, then added support so that it works with hardware, as well as building the stand-alone device.
Clone the repository
cd 'working model'
pip install requirements.txt
python main.py
Clone the repository
cd 'working model'
Edit file alarm.py
Go into alarm.py
Replace the import statements and soundAlarm function with the following
import winsound
def soundAlarm():
duration = 3000
freq = 440
winsound.Beep(freq,duration)
...Keep the rest of the code in alarm.py the same pip install requirements.txt python main.py