Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prodesire/face-mask
Wear face masks in the given picture.
https://github.com/prodesire/face-mask
Last synced: 8 days ago
JSON representation
Wear face masks in the given picture.
- Host: GitHub
- URL: https://github.com/prodesire/face-mask
- Owner: Prodesire
- License: mit
- Created: 2020-01-30T09:05:08.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-03T21:45:24.000Z (about 1 year ago)
- Last Synced: 2024-12-10T04:10:14.141Z (18 days ago)
- Language: Python
- Homepage:
- Size: 2.46 MB
- Stars: 73
- Watchers: 2
- Forks: 22
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# face-mask
Wear face masks in the given picture.## Install
Install by pip:
```bash
pip install face-mask
```Or install locally (`cd` project root directory first):
```bash
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).
```bash
face-mask /path/to/face/picture
```If you want to see the new picture with default viewer, please specify `--show` option.
```bash
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 maskFor instance:
```bash
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).```bash
face-mask /path/to/face/picture --model cnn
```## Effects
### One person wears a mask
![](images/face-mask-single.jpg)### Many persons wear masks
![](images/face-mask-multi.jpg)### Comic persons wear masks
> Attention: Face recognition for comic face is not accurate enough.![](images/face-mask-comic.jpg)