A deep desire to change the world by attempting to help solve the most problematic issues of our generation.

What it does

Our program receives a video of a pedestrian sidewalk and generates a traffic heatmap. The heatmap is composed of gradients of green to red. The green squares represent a low frequency of people and red squares shows a high frequency of people. The program also generates a map overlay of white squares that represents all the safe squares. This white map is generated using recursion and starts from the safest person, represented with a blue square. the program also takes all the coordinates of the white squares and forms a regression line, represented in yellow, that estimates the ideal path one should take.

How we built it

The social distancing is based off of YoloV3, a real-time object detection system. The people that are present within the frame are first detected, then the distances between each of them is calculated. The people are finally split into two categories: those that follow social distancing, and those that don't. The heatmap is built with Numpy; iterating over every square every time it updates and determining the average heat of each spot from the pedestrians. The flowmap (the trail behind every person) is created by associating past positions of the recognized people with current positions, this will thus create a trail, updating with each frame. The pathfinding feature is based of a recursive algorithm. It fills the spots that are considered safe from the heatmap, these points are then compiled by the linear regression algorithm to get the ideal direct path.

Challenges we ran into

The challenges we ran into related more to the mathematical and algorithmic side of our project, it was difficult to properly understand and use different functions of Math libraries. As for the coding we obviously encountered lots of problems but due to our cumulative experience, it was relatively easy to surmount these problems.

Accomplishments that we're proud of

Although to a certain degree we are especially proud of every aspect of our project, we are especially content of the results of our pathfinding algorithm. It was during this final phase of our project that we encountered the most problems and with enough persistence we managed to make it happen. It was with a sigh of relief that, when debugging the program for the 100th time, there was no error.

What we learned

Due to the different natures of our contributions to the pathfinder project, we have all learnt and improved on different things. Eric mainly worked on the website and contributed a lot to the idea, he has improved his skills in HTML. Tian Yi worked on using the various openCV features and learnt more about its libraries and refined his python skills to make use of openCV. William worked on the pathfinding algorithm and improved in his problem solving skills, and teamwork. One thing that everyone learnt and that was crucial to our success is the ability to collaborate using GitHub and version control.

What's next for Social Distance Pathfinder

The first thing would be to fix a few problems that were nuisance, they didn't affect the overall data but contribute negatively to the aesthetics of our project. For example, there are several frames that the pathfinding doesn't display anything or is completely out of context (One frame generates a path that is in a building). The next thing would be to improve the algorithm to make everything faster. This will allow us to generate a heatmap that has more accuracy and smaller squares. We could also improve the path by using non-linear regression methods.

Built With

Share this project: