
In this time when COVID-19 is spreading rapidly, it is essential to maintain social distance and avoid large public gatherings at one place to break the chain of corona infection.But maintaining this is not easy. Many people, knowingly or unknowingly, gather and roam on the streets. Keeping an eye on all these activities is not an easy job. The authorities need reliable technology that can survey such places to prevent any unnecessary movement. Our COVID-19 Crowd Detection Camera can help in isolating the poeple
So, today we have decided to make a Smart COVID-19 Crowd Detection Camera that will keep a watchful eye on all illegal activities and detect any crowd/person/vehicle on the road. The device also can alert the authorities regarding unnecessary gatherings.
However, this camera is not just limited to this. It can be used to:
- Detect high traffic on roads.
- Identify any unauthorised human entry in a restricted area.
- Observe the number of people in a hall/auditorium.
- Maintain and monitor the flow of the crowd in a protest demonstration.
How it works?
We are going to use an RPi with a camera for capturing live video. The video is then processed frame-by-frame.
By using image processing with the help of TensorFlow, people and vehicles in the video are identified. When that happens, the device gives an alert by speaking and/or by triggering the lights/bulb.
Bill Of Materials
Let’s start our project by collecting the following components.
Prerequisites
Assuming that you already have the RPi ready with Raspbian Image and Python environment setup, we can install the required libraries and modules.
Firstly, install the following libraries in Python.
- Espeak
- Numpy
- Scipy
- Opencv
- Dlib
- Keras
- TensorFlow/TensorFlow Lite
To install the above libraries, open the LX terminal and then type the following commands:
sudo apt-get update
sudo apt-get upgrade
sudo nano /etc/dphys-swapfile
Then change the line CONF_SWAPSIZE=100 to CONF_SWAPSIZE=1024
sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start
sudo pip3 install opencv
sudo pip3 install numpy
wget https://bootstrap.pypa.io/get-pip.py
pip3 install dlib
pip3 install tensorflow
After the installation you can now proceed with the cloning of TF modules and examples and files using the following command:
git clone https://github.com/tensorflow/tensorflow.git
After successfully cloning, go to the directory → research folder → create a new Python file and paste the code attached with the article.
Coding
In the first part of the code, we have to initialize the required library. Then we will have the code that uses the camera module to take live video and then process it frame-by-frame to detect the desired objects such as:
- Bike
- Bicycle
- People
- Bus
- Car
Now using the if() condition, we will check whether any desired objects have been detected. If nothing is detected, then no action will be taken. But if detected, the code will trigger the speaker to give an alert. You can also attach a bulb/buzzer to pin 17 to get the alert notification.




Connection
Now connect the camera to the RPi4 board using a ribbon cable and power the Raspberry Pi using an adaptor. To get a live video output from the camera, you can either use an RCA Cable with RCA Input of TV or use HDMI cable with TV.
You can also use a VNC. Just connect RPi and PC/Laptop with your network/hotspot and then mirror its screen using VNC. Now, connect a speaker to the audio port of RPI and power it. If you want any alert using bulb/buzzer, then connect the buzzer to GPIO pin 17 of Raspberry Pi.

Testing


After making all the connections and setup, now let’s test our project. Open the folder and then run the code. Wait for a few seconds to let the Python initialize all the modules. Then run the code. After a few seconds, a new window opens up and shows the results of the cam. The detected people are shown in the window and an alert is given about their presence on the road.
Not a bad idea, I’m working on prototypes for jamming signals and surveillance systems. Not everyone likes their privacy exposed.
Good
After successfully cloning, go to the directory → research folder → create a new Python file and paste the code attached with the article.
I can’t find where is research folder? please helps.
I want to order this project can you please send me a purchasing link of how to buy this project am from Nagpur
bhai block diagram daal yaar iski
The project does not require a circuit diagram or block diagram.It works on following way:-
RPI camera takes video—> video is sliced into frames—–>frame is resized For processing—>Tensor flow process the frames and detect people
Sir, I am doing this project for semester . So can I get complete details of the project(circuit diagram, code and libraries) .Can you send me the details to my mail i.e. [email protected] is urgent so kindly send the details as quickly as possible sir