Inspiration
We're both bartenders and recently the LGCA came by our workplace. They mentioned they still manually count people to check fire code compliance - that's slow, error-prone, and easy to lose track of during a busy night. We wanted to automate it with a camera and some computer vision.
What it does
The software connects to multiple cameras that are aimed at entrance ways. A virtual tripwire is placed to keep track of when people enter or leave the building. The server keeps track of how many people are in the building and the buildings maximum capacity.
How we built it
We built the webserver as a basic http server that send requests to the camera server.
The webserver api call is split into tokens to route the request to the appropriate function.
Requests are sent to the webserver via the XMLHttprequest javascript function.
The webserver makes requests to the camera server in order to update the count displayed on the web portal, as well as to initiate new camera nodes and to get the video feed from a given camera.
The camera server communicates with the webserver and the camera node. It handles requests that are structured similarly to an http request. The camera server then processes that request and sends an appropriate response.
Challenges we ran into
The majority of our project are new libraries and environments, we weren't familiar with so the biggest challenge was effectively using all our tools to actually accomplish what we set out to do.
Due to the nature of the YOLO library and limited hardware our biggest challenge was making it fast, since it's GPU dependent but we did all of it on CPU dominant computers. We did our best but multiple cameras still tend to make the program quite slow.
When setting up the camera server and the webserver we did have a problem connecting to the webserver and keeping the connection, this was solved later on but was one of those mystery bugs we had to trouble shoot.
We used multiple cameras for testing, with different resolutions, this highlighted that when setting up the tripwire line before the camera to have slight distortions in it's position. this was pretty late on in the timeline so we had to take it on the chin and mention it as a possible issue for scaling.
Accomplishments that we're proud of
We are proud that we developed software that would deliver a meaningful impact to businesses. We were able to use a technology, computer vision, that before yesterday was entirely foreign to both of us, in a meaningful way. We were also able to further our experience with distributed systems through the servers and node we developed.
What we learned
the main learning outcome for this project was that it was first time with computer vision, we learned about YOLO, bytracker, and openCV libraries. This is what allowed us to actually use cameras and track people, we also used MJPEG to display the camera in the web portal but it was a quick learn after reading some documentation. The main take away is Computer vision isn't so hard to get into and play around. if not a little hardware heavy. we also learned how to work in a small team with tight deadlines
What's next for CamCounter
Next we need to implement notifications for when capacity is exceeded or reaches a certain threshold. We also want to implement some simple statistic aggregation such as summarizing a businesses peak hours and days. This will allow our software to make predictions on future days or times where capacity may be an issue.
Built With
- bytetracker
- css
- html5
- javascript
- mjpeg
- opencv
- python
- yolo
Log in or sign up for Devpost to join the conversation.