Skip to content

linnyh/Masked-Face-Detection-by-Pytorch

Repository files navigation

Masked Face Detection

Preparation

 Please make sure the following packages are included in your environment.

  • python 3.7.4
  • pytorch 1.4.0
  • tqdm 4.36.1
  • tensorboardX 2.1
  • Pillow 7.0.0
  • opencv 3.4.2

Or you can execute the following commands to install all libs

pip install -r requirements.txt

How To setup and run the project

Train

Execute the following commands in the project root directory

python train_model.py --epoch <the epoch number you want to train>

You can also execute the following command to view the help

python train_model.py -h

Test

We provide three test modes, including getting images from the camera, getting images from files, and simply running from the test set to get the accuracy.

video

python test_model.py --mode video

Image File

python test_model.py --mode image --filepath <your_filepath>

Image DataSet

python t4st_model.py --mode imageset

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages