2022-02-16 10:14:52 +01:00
|
|
|
# Face Mask Detection
|
|
|
|
|
2022-02-16 10:52:16 +01:00
|
|
|
Clone the repository and run project (it uses saved model 'face_mask_detection2.hp') or:
|
|
|
|
|
|
|
|
1. Download dataset from: https://www.kaggle.com/andrewmvd/face-mask-detection
|
|
|
|
2. In the project create folder 'data'
|
|
|
|
3. Put downloaded 'annotations' and 'images' folders into 'data' folder
|
|
|
|
4. Train model yourself:
|
2022-02-16 10:14:52 +01:00
|
|
|
- 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
|
|
|
|
```
|