Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,34 @@
|
|
1 |
---
|
2 |
license: cc0-1.0
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: cc0-1.0
|
3 |
+
pipeline_tag: image-segmentation
|
4 |
+
tags:
|
5 |
+
- mmsegmentation
|
6 |
---
|
7 |
+
|
8 |
+
# Occlusion-aware face segmentation
|
9 |
+
A model for occlusion-aware face segmentation.
|
10 |
+
|
11 |
+
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).
|
12 |
+
|
13 |
+
For more information, see:
|
14 |
+
- https://github.com/open-mmlab/mmsegmentation/pull/2194/files
|
15 |
+
- https://github.com/kennyvoo/face-occlusion-generation
|
16 |
+
|
17 |
+
### How to use
|
18 |
+
Use with [mmsegmentation](https://mmsegmentation.readthedocs.io/en/latest/get_started.html).
|
19 |
+
|
20 |
+
Example:
|
21 |
+
|
22 |
+
```python
|
23 |
+
from mmseg.apis import inference_model, init_model, show_result_pyplot
|
24 |
+
import mmcv
|
25 |
+
|
26 |
+
config_file = 'deeplabv3plus_r101_512x512_face-occlusion.py'
|
27 |
+
checkpoint_file = 'deeplabv3plus_r101_512x512_face-occlusion-93ec6695.pth'
|
28 |
+
model = init_model(config_file, checkpoint_file, device='cuda:0')
|
29 |
+
|
30 |
+
img = 'face-image.png'
|
31 |
+
result = inference_model(model, img)
|
32 |
+
show_result_pyplot(model, img, result, show=True, out_file='result.jpg', opacity=0.5)
|
33 |
+
```
|
34 |
+
|