File size: 1,178 Bytes
a676718 77d6511 a613559 a676718 77d6511 a613559 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
---
license: cc0-1.0
pipeline_tag: image-segmentation
tags:
- mmsegmentation
- face
- occlusion
---
# Occlusion-aware face segmentation
A model for occlusion-aware face segmentation.
This model was created following the procedures in [mmsegmentation](https://mmsegmentation.readthedocs.io/en/latest/)'s PR [[Feature] Support Delving into High-Quality Synthetic Face Occlusion Segmentation Datasets #2194](https://github.com/open-mmlab/mmsegmentation/pull/2194).
For more information, see:
- https://github.com/open-mmlab/mmsegmentation/pull/2194/files
- https://github.com/kennyvoo/face-occlusion-generation
### How to use
Use with [mmsegmentation](https://mmsegmentation.readthedocs.io/en/latest/get_started.html).
Example:
```python
from mmseg.apis import inference_model, init_model, show_result_pyplot
import mmcv
config_file = 'deeplabv3plus_r101_512x512_face-occlusion.py'
checkpoint_file = 'deeplabv3plus_r101_512x512_face-occlusion-93ec6695.pth'
model = init_model(config_file, checkpoint_file, device='cuda:0')
img = 'face-image.png'
result = inference_model(model, img)
show_result_pyplot(model, img, result, show=True, out_file='result.jpg', opacity=0.5)
``` |