Collect the people’s’ information while they get into/out a place e.g. convenience store, school, etc. And then we can do some analysis. People’s’ information contains
- Wearing mask or not
- Age
- Gender
- Timestamp
Install Openvino first.
numpy
tensorflow>=1.12.1
opencv
keras
dlib
pandas
pyqt5
$ cd mask_detection
$ {your path to openvino directory}\bin\setupvars.bat
$ python .\main.py
argument | default | description |
---|---|---|
face_threshold | 0.5 | IR face-detection model will give each face a confidence, this threshold can restrict the face to display |
input_file | '' | test_video path (*.mp4, *.avi), if it's not specified, we will read webcam. |
save_video | '' | save_video path(*.mp4, *.avi) |
save_data | '' | save_collected_data path(*.csv) |
-
Train a MaskFaceClassifier
- In mask_classifier_model_training
-
Use openvino pretrained model to detect face and classify face age and gender
-
Add Tracker to speed up
-
Add crossline and build a gui (while a person crossing the line, right side will pop up the classify result)
-
Add DataCollector to collect data from classifier
Pros:
- Have higher speed.
- Detection is more computation expensive than tracker. (And we only have cpu.)
Cons:
- Have lower accuracy.
- Tracker track the face by correlation of image