Traffic congestion is already the most painful part of city life, and it's only going to worsen as cities grow. We need clever solutions, and those solutions need data. But that data is sorely lacking: even today, traffic counting is often done by hand, making it prohibitively expensive to deploy on a large scale.
Thankfully, machine vision has improved by leaps and bounds in the last couple of years, meaning that the problem can now be solved in 24 hours by four college students in a basement.
GoWithTheFlow is an open source app that lets government workers quickly and easily analyze the traffic flow at an intersection. The user inputs a video, and the software counts the number of cars moving between different exit points. The user can also manually select intersections for additional information, or export the collected data to a spreadsheet.
For privacy reasons, the system stores no information about individual cars.
How we built it
The user interface was written using PyQT. The input video is split into frames, then each frame is fed into the YOLO-9000 image classifier. The classifier returns the positions of interesting objects in each frame. This data is then linked and analyzed using an unsupervised machine learning algorithm to determine the location of entrance/exit points. The image overlays are drawn using OpenCV.