Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Prodesire/face-mask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

9 Commits

Repository files navigation

face-mask

Wear face masks in the given picture.

Install

Install by pip:

pip install face-mask

Or install locally (cd project root directory first):

python3 setup.py install

Usage

Specify face picture path and then auto save to face with mask picture path (whose name with "-with-mask" suffix).

face-mask /path/to/face/picture

If you want to see the new picture with default viewer, please specify --show option.

face-mask /path/to/face/picture --show

If you want to wear different mask to face, then specify one of the options below:

  • --black for black mask
  • --blue for blue mask
  • --red for red mask

For instance:

face-mask /path/to/face/picture --blue

In addition, you can specify different detection models by --model option:

  • hog is less accurate but faster on CPUs.
  • cnn is a more accurate deep-learning model which is GPU/CUDA accelerated (if available).
face-mask /path/to/face/picture --model cnn

Effects

One person wears a mask

Many persons wear masks

Comic persons wear masks

Attention: Face recognition for comic face is not accurate enough.

About

Wear face masks in the given picture.

Resources

License

Stars

Watchers

Forks

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /