Skip to content

Commit

Permalink
Merge pull request #150 from ototadana/add-example-mask-images
Browse files Browse the repository at this point in the history
add example mask images
  • Loading branch information
ototadana authored Aug 13, 2023
2 parents 0ecfa42 + 7f339e7 commit fffa3b7
Show file tree
Hide file tree
Showing 19 changed files with 31 additions and 0 deletions.
Binary file added images/inferencers/anime_segmentation/mask.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/bisenet-face-hair-hat-neck.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/bisenet-face-hair-hat.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/bisenet-face-hair.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/bisenet-face.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/blur.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/ellipse.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/face-area-rect.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/insightface/mask.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/mediapipe/mask.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/no-mask.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/openmmlab/mask.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/vignette-default.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/inferencers/vignette-use-minimal-area.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions scripts/inferencers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ This is the implementation used for enhancing enlarged face images in the defaul
### 2.2 Blur
This face processor applies a Gaussian blur to the detected face region. The intensity of the blur can be specified using the `radius` parameter in the 'params' of the JSON configuration. The larger the radius, the more intense the blur effect.

![Blur](../../images/inferencers/blur.jpg)

#### Name
- Blur

Expand Down Expand Up @@ -127,6 +129,19 @@ This operates as the Mask Generator in the default workflow. Similar to RetinaFa

This component is implemented using [facexlib/parsing](https://github.com/xinntao/facexlib/blob/master/facexlib/parsing/__init__.py).

#### Affected areas - Face
![Face](../../images/inferencers/bisenet-face.jpg)

#### Affected areas - Face, Hair
![Face, Hair](../../images/inferencers/bisenet-face-hair.jpg)

#### Affected areas - Face, Hair, Hat
![Face, Hair, Hat](../../images/inferencers/bisenet-face-hair-hat.jpg)

#### Affected areas - Face, Hair, Hat, Neck
![Face, Hair, Hat, Neck](../../images/inferencers/bisenet-face-hair-hat-neck.jpg)


#### Name
- BiSeNet

Expand All @@ -149,6 +164,8 @@ This component is implemented using [facexlib/parsing](https://github.com/xinnta
### 3.2 Vignette
This mask generator creates a mask by applying a Gaussian (circular fade-out effect) to the face area. It is less computationally demanding than deep-learning-based mask generators and can consistently produce a mask under conditions where deep-learning-based mask generators such as BiSeNet or YOLO may struggle, such as with unusual face orientations or expressions. It serves as the fallback mask generator for the BiSeNet Mask Generator when it fails to generate an appropriate mask.

![Vignette](../../images/inferencers/vignette-default.jpg)

#### Name
- Vignette

Expand All @@ -167,6 +184,8 @@ This mask generator creates a mask by applying a Gaussian (circular fade-out eff
### 3.3 Ellipse
This option draws an ellipse around the detected face region to generate a mask.

![Ellipse](../../images/inferencers/ellipse.jpg)

#### Name
- Ellipse

Expand All @@ -184,6 +203,8 @@ This option draws an ellipse around the detected face region to generate a mask.
### 3.4 Rect
This is a simplistic implementation that uses the detected face region as a direct mask.

![Rect](../../images/inferencers/face-area-rect.jpg)

#### Name
- Rect

Expand All @@ -201,6 +222,8 @@ This is a simplistic implementation that uses the detected face region as a dire
### 3.5 NoMask
This option generates a "mask" that is simply an all-white image of the same size as the input face image. It essentially does not mask any part of the image and can be used in scenarios where no masking is desired.

![NoMask](../../images/inferencers/no-mask.jpg)

#### Implementation
- [NoMaskGenerator](no_mask_generator.py)

Expand Down
2 changes: 2 additions & 0 deletions scripts/inferencers/anime_segmentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ To use the following components, please enable 'anime_segmentation' option under
## 1. Mask Generator
This utilizes the [Anime Segmentation](https://github.com/SkyTNT/anime-segmentation) model to generate masks specifically designed for anime images.

![Example](../../../images//inferencers/anime_segmentation/mask.jpg)

#### Name
- AnimeSegmentation

Expand Down
2 changes: 2 additions & 0 deletions scripts/inferencers/insightface/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Please be aware that the accuracy of gender and age detection with the InsightFa
## 2. Mask Generator
This component utilizes the facial landmark detection feature of InsightFace to generate masks. It identifies the 106 facial landmarks provided by the InsightFace's 'landmark_2d_106' model and uses them to construct the mask.

![Example](../../../images/inferencers/insightface/mask.jpg)

#### Name
- InsightFace

Expand Down
2 changes: 2 additions & 0 deletions scripts/inferencers/mediapipe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ A Face Detector implemented using [the face detection feature of MediaPipe](http
## 2. Mask Generator
This mask generator uses the MediaPipe Face Mesh model to generate masks. It identifies a set of facial landmarks and interpolates these to create a mask.

![Example](../../../images/inferencers/mediapipe/mask.jpg)

#### Name
- MediaPipe

Expand Down
2 changes: 2 additions & 0 deletions scripts/inferencers/openmmlab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ To use this, please enable 'openmmlab' option under "Additional components" in t
## 1. Mask Generator
This component utilizes a [Occlusion-aware face segmentation model](https://huggingface.co/ototadana/occlusion-aware-face-segmentation) for mask generation. Because the model is trained by [High-Quality Synthetic Face Occlusion Segmentation Datasets](https://github.com/kennyvoo/face-occlusion-generation), if a face is covered by another object, such as a hand or mask, it can be excluded and the facial segment can be extracted.

![Example](../../../images/inferencers/openmmlab/mask.jpg)

#### Name
- MMSeg

Expand Down

0 comments on commit fffa3b7

Please sign in to comment.