Skip to content

linklist2/facemask_detect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 中文

Latest

  1. Created an Android version of this project:facemask_detect_Android

Facemask_Detect

This project uses yolov5n to detect mask wearing.

yolov5n is the smallest model in the yolov5 series, and its inference latency is acceptable.

Login and Detect:

img.png

Simple function introduction:

  • Get real-time weather information by calling qweather API.

  • Use the dnn module in cv2 to load the yolov5n model in onnx format.

  • Call the local camera and pass each frame into the model for inference mask wearing detection.

  • Flask builds the front end of the web page and displays various information in real time.

1. Installation environment

pip install -r requirements.txt

2. Code usage

2.1 Start the project

2.1.1 Start from Windows terminal

set FLASK_APP=main.py
flask run

After executing the above commands in sequence, a link will be output, just enter the link in the browser.

2.1.2 Start from Pycharm

I am using the professional version of pycharm. If you do not find the following operations, please start from windows terminal.

The following operations only need to be configured when the project is started for the first time. After the configuration is successful, simply click the green triangle to run the project.

  1. Select this position in the upper left corner and click Edit Configurations

img.png

  1. Click the + sign to add a flask server

img.png

  1. Set parameters according to my interface

img.png

  1. After clicking ok, click the green triangle here

img.png

2.2 Enter the system

After entering the link, the account and password are both admin.

TODO

This project is based on facemask-detection-RaspberryPi Development, replace the SSD-like model with the more popular yolov5 series model. Thanks to the author for the open source project!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published