Traffic congestion primarily occurs due to unknown factors like bad weather conditions, unexpected vehicular failure or a road accident. Hence, a continuous evaluation of the road traffic needs to be done to determine the congestion free paths. Unlike traditional approaches for determining the traffic flow (e.g., hose counts and manual counts) and the conventional sensors used in road traffic monitoring (e.g., auto scope and loop detectors), cameras provide the best technology to acquire the data in real- time due to their higher sensing range. Cities usually shares their traffic data with the public, so that citizens can be informed of what is happening in their city. Such information also helps officials make smart traffic management decisions, such as when to implement (1) traffic-calming measures, (2) walking and cycling improvements, (3) traffic and parking regulations, and (4) bus stop locations.

What it does

In this project, we designed and developed a camera-based traffic monitoring and prediction application that uses AI to automatically identify and track vehicles, bikes, and pedestrians. The application uses 124 traffic cameras deployed across the City of Calgary and provides near real-time information about vehicles, bikes, and pedestrians traffic flow. It also provides a historical overview that shows the traffic volume in different communities across the City.

How we built it

Traffic Watch is built using free and open source software, open standards, and open data - YOLO, TensorFlow 2.0, NodeJS and Express, VueJS, Vuetify, and Mapbox GL JS are used to create the system components. It collects camera images from the City of Calgary’s open data website every 5 minutes, analyzes them using a machine learning models built by YOLO and TensorFlow 2.0, and displays results on a map. Figure below shows Traffic Watch's overall architecture.


Accomplishments that we're proud of

We built a camera-based road traffic monitoring and prediction application that uses two deep neural network models (object-detection and time-series forecasting with embeddings). It provides convincingly good accuracy compared with the existing approaches. The proposed approach is computationally light and robust which can give good results for variable illumination and weather conditions. Hence, making it suitable for using available traffic camera infrastructure with minimal cost for data-driven decision making.

What we learned

We observed that when network complexity increases, the algorithm accuracy will decrease, for example when using stacked LSTM layers in the model. With simpler NN architecture along with categorical embeddings feature inputs we improved the accuracy and achieved better results.

What's next for traffic-watch:

Using NLP to extract incident reports from tweets and display them on the map. Improved object detection accuracy by fine tuning the model using custom image datasets.


For more information see

Built With

Share this project: