Skip to content

Latest commit

 

History

History
126 lines (86 loc) · 4.54 KB

README_English.md

File metadata and controls

126 lines (86 loc) · 4.54 KB

Switch back to Hungarian 🇭🇺

Door opening/alarming system with mask-detection (Maszkimum)

A project for the Szabadfogású Számítógép competition of C3

⭐⭐ I won the competitioon!!

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.

⭐ Functions

  • 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

🤖 Installation

All the libraries/modules to install is listed in the requirements.txt file.

  1. Open up a terminal/commandline.

  2. Download/clone this repo.

$ git clone https://github.com/davidfegyver/szabadfogasu-maszk/
  1. Go to the newly downloaded folder:
$ cd szabadfogasu-maszk/
  1. Install the required modules. The download speed may vary, depending on your internet connection.
$ pip3 install -r requirements.txt

Setting up Arduino (Optional)

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: arduino schema

💡 Running

  1. 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.

Using the web API

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

Showcase video

https://www.youtube.com/watch?v=eLyNWEL1Los

🖥️ Used libraries

TODO:

  • Thermometry
  • More ideas can come in a pull request :)

🎉 Thanks for reading

If you have any problem with this program, then contact me in email: [email protected], or open an issue here: Szabadfogasu-maszk

🤝 Contribution

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

📝 License

MIT https://choosealicense.com/licenses/mit/