Final Project-Person Counter and Display Device (Co-creator: Ritika C.)
Slide and Project Video
Since the last proposal we have tweaked our problem statement a little bit where we were building a device for counting people using a camera and microprocessor. Now, in addition to counting people our project also displays whether social distancing is being followed or not keeping in mind the covid scenario across the world
Components required
- Microprocessor : Beagle bone black (BBB)
- High resoution webcam
- MicroSD card (for storage in BBB)
What are we building ?
Our aim was to build a proof of concept about a person counting and display device which would help people make decisions whether to board a crowded metro or not. As a part of testing, we wished to test this in a classroom and count students to display its accuracy. However, with lockdown and situation, that is not clearly possible but it also presented an opportunity to tweak our device a little bit and use it for checking social distancing
How are we building ?
- Connect beagle bone black to system. Root into beagle bone black using ssh
- Configure beagle bone with the webcam chosen. The reason why we chose beagle bone as our primary microprocessor board was due to its high processing power, USB, extra storage and ethernet ports and finally because it is a mobile Linux CPU with latest distribution of linux installed. Configuration is easy- just connect and check for USB devices in the terminal
- Once the device is configured, install openCV (a python based image processing library in beagle bone) using pip -install opencv. (Before doing this ensure python is installed on beagle bone system).
- For purpose of this project we will be using openCV libraries to detect human faces. In order to use them we have written customised programs for detection of face, profile and shoulders. (Code is attached below).
- After codes are tested on laptop/computer using webcam and are showing no errors, copy these codes to beagle bone black using sftp (SSH file transfer protocol)
- Write a script for running the code on beagle bone black. This script calls all codes in different languages, compiles them and updates the result on interface.
- Basic scheme of how social distancing is measured and people are counted is attached below-
- Script is run after every 10s and in a semi-continuous process, the number of people measured are updated in real time and the length of the latest array + Social distancing indicator is sent to the receiver email ID directly with encoded image.
Codes
For ease of viewing and browsing, codes are on github page here
Why are we building this ?
Broad use cases of person counter and display device include-
- Real time attendance (training data base required)
- Social distancing check in queues, marketplaces and offices. (Anywhere where positions can be calibrated)
- Space availability in any place (Measure crowdedness)
- Person analysis (training data base required)
Work Division
Sannat was responsible for microcontroller programming, scripting and live tests whereas Ritika worked on all programming of image detection codes in python. (A lot of troubleshooting to look for errors was there which is still unaccounted for and both were involved in doing that)
References