.idea | ||
face_detector | ||
test_results | ||
.gitignore | ||
data_preprocessing.ipynb | ||
detect_mask.py | ||
face_mask_detection2.h5 | ||
face_mask_detection.h5 | ||
README.md | ||
train_model.ipynb |
Face Mask Detection
Clone the repository and run project (it uses saved model 'face_mask_detection2.hp') or:
- Download dataset from: https://www.kaggle.com/andrewmvd/face-mask-detection
- In the project create folder 'data'
- Put downloaded 'annotations' and 'images' folders into 'data' folder
- Train model yourself:
- execute jupyter notebook 'data_preprocessing.ipynb' - data preprocessing
- execute jupyter notebook 'train_model.ipynb' - it will overwrite face_mask_detection2.hp' file
- run project
To run project:
pip3 install virtualenv
virtualenv venv
source venv/bin/activate
python3 -m pip install -r requirements.txt
python3 detect_mask.py