gwu-cs-iot / 20_ambulance-route

0 stars 2 forks source link

Smart traffic light

Check our Youtube demo video

While emergency vehicles speed up to save lives, they put themselves in a dangerous condition. We developed a smart traffic light system to guarantee the safety of the emergency vehicles. When emergency vehicles pass a crossroad, the sensors of traffic light know and send the message to the cloud so that the cloud controls the traffic lights to let emergency vehicles pass the traffic light at a higher speed.

Setup. Each camera detect the emergency vehicle in one direction.

Hardware Requirements

Installation and setup

Client and Server

Use a laptop as the server to communicate with the Pis (Python code). On the server side, the server determines the mode of the current situation.

Connection and sequence diagram.

Emergency Vehicle Detection

Trained YoloV4 model use self annotated emergency vehicle dataset.

Demo

Camera detect the emergency vehicle using Tensorflow LITE.

When the sound sensor detects the siren, amber light of all directions will be on to warn the pedestrians and other vehicles. The flashing mode will last 10 seconds, if the camera does not detects the emergency vehicle on any direction, the regular mode will be recovered.

When the flashing mode is on and the camera detects the emergency vehicle on one direction, the emergency mode will be on. Green lights is given to the emergency vehicle. When flashing mode is off, the camera cannot turn on emergency mode.