This repository consists of the implementation of a VGG16 convolutional model for the detection of people with masks
First at all, you must clone the repository.
git clone https://github.com/richardesp/Masked-Face-DetectionRight now, you must go into the root directory. After, you must create a new virtual environment.
virtualenv venvOnce created, you must activate it.
root_path=$(pwd)
. venv/bin/activate
export PYTHONPATH=$PYTHONPATH:$root_pathFinally, you must install all dependencies from requirements file.
pip install -r requirements.txtFor use the trained model, you must download the model in the following link to google drive here. Once downloaded, you must unzip the file and put it in the root directory of the project (Masked Face Detection folder).
You must activate the virtual environment of python, to later be able to deploy the application. To start the environment, copy and paste the following code into your terminal at the root of the project.
root_path=$(pwd)
. venv/bin/activate
export PYTHONPATH=$PYTHONPATH:$root_pathOnce activated, you must go to app directory and run deploy.sh. Below I show how the project file hierarchy should be.
├── README.md
├── app
│ ├── __init__.py
│ ├── deploy_app.sh # ❗Execute this script.
│ └── main.py
├── base
│ ├── __init__.py
│ ├── __pycache__
│ ├── base_data_loader.py
│ ├── base_model.py
│ └── base_trainer.py
├── code_tests
│ ├── load_callbacks.py
│ ├── model_creation.py
│ └── training_test.py
├── configs
│ └── maskedfacepeople_vgg16_exp_004.json
├── data_loader
│ ├── __init__.py
│ ├── __pycache__
│ └── data_loader_01.py
├── execute_train.sh
├── experiments # ❗Experiments directory must be unzipped.
│ ├── 2022-01-27
├── models
│ ├── __init__.py
│ ├── __pycache__
│ └── model_01.py
├── optimizers
│ ├── __init__.py
│ ├── __pycache__
│ └── learning_rate_schedules.py
├── real_time_detection
│ ├── haarcascade_frontalface_default.xml
│ ├── image_detection.py
│ ├── real_time_detection.py
├── requirements.txt
├── start_venv.sh
├── train.py
├── trainers
│ ├── __init__.py
│ ├── __pycache__
│ └── vgg_trainer.py
├── utils
│ ├── __init__.py
│ ├── __pycache__
│ ├── config.py
│ ├── factory.py
│ ├── get_learning_rate.py
│ ├── get_model_size.py
│ └── process_args.py
└── venv