Code Monkey home page Code Monkey logo

v-analytics / face-mask-detector-for-jetson-nano Goto Github PK

View Code? Open in Web Editor NEW

This project forked from omegamax10/face-mask-detector-for-jetson-nano

0.0 0.0 0.0 20.93 MB

Because of the COVID-19 pandemic of 2020, more and more people are concerned with protecting themselves using masks, thus the need of software capable of monitoring whether the people are wearing masks or not. That is why I created a Python application using OpenCV (with CUDA support) based on the YOLOv4 algorithm, more precisely the tiny option, capable of monitoring the safety level of a space with video surveillance. This is the Jetson Nano version of the application.

License: MIT License

Python 98.49% Shell 1.51%

face-mask-detector-for-jetson-nano's Introduction

Face Mask Detector for Jetson Nano

Because of the COVID-19 pandemic of 2020, more and more people are concerned with protecting themselves using masks, thus the need of software capable of monitoring whether the people are wearing masks or not. That is why I created a PyQt5 application using OpenCV (with CUDA support) based on the YOLOv4 algorithm, more precisely the tiny option, capable of monitoring the safety level of a space with video surveillance through multiple video cameras, connected either via USB or IP to the system. This is the Jetson Nano version of the application.

Guide for using the Face Mask Detector application:

  1. Run these commands:
foo@bar:~$ sudo chmod +x install_dependencies_jetson_nano.sh    # make the script executable
foo@bar:~$ sudo ./install_dependencies_jetson_nano.sh           # run the script to install the dependencies of the application
  1. Execute the Python Script from command line like this:
foo@bar:~$ python ./face_mask_detection.py

or

foo@bar:~$ python3 ./face_mask_detection.py
  1. From the start menu, you can add or delete a camera from the camera list. When creating a camera, a name and an ID must be provided. The ID must be from one of these categories:

    • integer (e.g.: 0, 1, 2...): A camera with this ID represents a video recording device physically connected to the system which uses the application. For instance, if you want to use the webcam of a laptop, you must create a camera with an ID of 0 (an explanation would be that, in particular for Ubuntu, the integrated camera of a laptop is interpreted as /dev/video0).
    • IP address (e.g.: https://192.168.43.1:8080/video): A camera with this ID represents a video recording device connected to the same network as the system which uses the application. For example, one can connect an Android device as a remote camera using "IP Webcam" Google Playstore app: https://play.google.com/store/apps/details?id=com.pas.webcam&hl=ro&gl=US.
    • Video file location: A camera with this ID represents a locally stored video, on which our application will run the detection. This case is useful whenever we have an already pre-recorded video file, possibly from a camera that was not connected to a system with this application.
  2. When you think that the camera list is ready, you can access the main menu.

  3. In the main menu, you will have the following elements:

    • A main panel where the selected camera will be displayed together with the detections of the masked or unmasked faces from it, as well as real time statistics of their numbers and its status ("Not Connected" - the camera is not connected to the system, "Safe" - all people wear mask, "Warning" - 1 or 2 people do not wear a mask, "Danger" - more than 3 people do not wear a mask);
    • A small selection menu in the upper part of the window from where you can select which camera do you whish to visualize;
    • A camera control panel in the right part of the window where the camera list is displayed together with the status of every camera in real time;
    • A "Take Photo" button placed in the lower part of the window used for taking photos for further analysis in order to identify the persons not wearing a mask.
  4. Despite the fact that you can take photos manually from the main menu, the application makes each of the connected cameras capable of taking photos automatically whenever its state switches to "Warning" or "Danger".

Datasets and weights used by the Face Mask Detector application:

face-mask-detector-for-jetson-nano's People

Contributors

omegamax10 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.