Thanks to the C3 foundation and the IT leader of Számlázz.hu for choosing me! You can find the competition's description of my project here.
The second wave of COVID is coming... The government made regulations... It is mandatory to wear a mask on public transport, in stores, in the cinema, and in a lot of cases, in school.
This mask-detection door blocks people, who don't care about Coronavirus from entering the library, the shopping mall, and other closed places. So security guards don't have to deal with these people. This makes our life safer.
- Automatic mask detection
- Web API to check maskwearing status
- Arduino-based door opening (with relay)
- Arduino-based leds (Red - no mask; Green - wearing mask (in case, the door is opening))
- Arduino-based alarm, which turns on if you don't have a mask on
This projects can also be used in many other project, you can even upload it to Raspberry Pi or to Nvidia Jetson
All the libraries/modules to install is listed in the requirements.txt
file.
-
Open up a terminal/commandline.
-
Download/clone this repo.
$ git clone https://github.com/davidfegyver/szabadfogasu-maszk/
- Go to the newly downloaded folder:
$ cd szabadfogasu-maszk/
- Install the required modules. The download speed may vary, depending on your internet connection.
$ pip3 install -r requirements.txt
Download the source code for your Arduino: maszk.ino
($ wget https://github.com/davidfegyver/szabadfogasu-maszk/blob/main/arduino/maszk.ino
or curl -o ./maszk.ino https://github.com/davidfegyver/szabadfogasu-maszk/blob/main/arduino/maszk.ino
)
And build a circuit like that:
- Open up the terminal, navigate to the git folder, you just cloned, and run the following command:
$ python3 maskdetector.py
If you would like to use your Arduino, then append this flag: -a COM4 (number of comport)
$ python3 maskdetector.py -a COM4
If you would like to specify the port of the webserver, then append this flag: -p 8080 (number of port)
$ python3 maskdetector.py -p 8080
Wait for the program to start. If everything was successful, then you will see the preview of your webcam, and the program will display your mask-wearing-status.
You can obtain JSON code from the web API at the port 5000
(if it was not overwritten with the -p
argument). The web API supports two different styling method: prettyStatus
, and shortStatus
.
Examples with the JSON processor called JQ
in a GNU/Linux-based system:
$ curl -s http://localhost:5000 | jq .prettyStatus
Output:
Not wearing mask
$ curl -s http://localhost:5000 | jq .shortStatus
Output:
False
https://www.youtube.com/watch?v=eLyNWEL1Los
- Thermometry
- More ideas can come in a pull request :)
If you have any problem with this program, then contact me in email: [email protected]
, or open an issue here: Szabadfogasu-maszk
If you got any idea, or you want to fix a bug, then please open a Pull request.
Contributors:
If you liked the project, give me a star :D