Home

Awesome

easyportrait

EasyPortrait - Face Parsing and Portrait Segmentation Dataset

We introduce a large-scale image dataset EasyPortrait for portrait segmentation and face parsing. Proposed dataset can be used in several tasks, such as background removal in conference applications, teeth whitening, face skin enhancement, red eye removal or eye colorization, and so on.

EasyPortrait dataset size is about 91.78GB, and it contains 40,000 RGB images (~38.3K FullHD images) with high quality annotated masks. This dataset is divided into training set, validation set and test set by subject user_id. The training set includes 30,000 images, the validation set includes 4,000 images, and the test set includes 6,000 images.

For more information see our paper EasyPortrait ā€“ Face Parsing and Portrait Segmentation Dataset.

šŸ”„ Changelog

Old EasyPortrait dataset is also available into branch EasyPortrait_v1!

Downloads

LinkSize
images91.8 GB
annotations657.1 MB
meta1.9 MB
train set68.3 GB
validation set10.7 GB
test set12.8 GB

Also, you can download EasyPortrait dataset from Kaggle.

Structure

.
ā”œā”€ā”€ images.zip
ā”‚   ā”œā”€ā”€ train/         # Train set: 30k
ā”‚   ā”œā”€ā”€ val/           # Validation set: 4k
ā”‚   ā”œā”€ā”€ test/          # Test set: 6k
ā”œā”€ā”€ annotations.zip
ā”‚   ā”œā”€ā”€ train/
ā”‚   ā”œā”€ā”€ val/
ā”‚   ā”œā”€ā”€ test/
ā”œā”€ā”€ meta.zip       # Meta-information (width, height, brightness, imhash, user_id)
...

Models

We provide some pre-trained models as the baseline for portrait segmentation and face parsing. We use mean Intersection over Union (mIoU) as the main metric.

Portrait segmentation:

Model NameParameters (M)Input shapemIoU
BiSeNet-V256.5384 x 38497.95
DANet190.2384 x 38498.63
DeepLabv3260384 x 38498.63
ExtremeC3Net0.15384 x 38496.54
Fast SCNN6.13384 x 38497.64
FCN + MobileNetv231.17384 x 38498.19
FPN + ResNet50108.911024 Ɨ 102498.54
FPN + ResNet50108.91512 Ɨ 51298.64
FPN + ResNet50108.91384 x 38498.64
FPN + ResNet50108.91224 Ɨ 22498.31
SegFormer-B014.91024 Ɨ 102498.74
SegFormer-B014.9512 Ɨ 51298.66
SegFormer-B014.9384 x 38498.61
SegFormer-B014.9224 Ɨ 22498.17
SINet0.13384 x 38493.32

Face parsing:

Model NameParameters (M)Input shapemIoU
BiSeNet-V256.5384 x 38476.72
DANet190.2384 x 38479.3
DeepLabv3260384 x 38479.11
EHANet44.81384 x 38472.56
Fast SCNN6.13384 x 38467.56
FCN + MobileNetv231.17384 x 38475.23
FPN + ResNet50108.911024 Ɨ 102485.37
FPN + ResNet50108.91512 Ɨ 51283.33
FPN + ResNet50108.91384 x 38481.83
FPN + ResNet50108.91224 Ɨ 22475.6
SegFormer-B014.91024 Ɨ 102485.42
SegFormer-B014.9512 Ɨ 51283.19
SegFormer-B014.9384 x 38481.38
SegFormer-B014.9224 Ɨ 22474.83

Annotations

Annotations are presented as 2D-arrays, images in *.png format with several classes:

IndexClass
0BACKGROUND
1PERSON
2SKIN
3LEFT_BROW
4RIGHT_BROW
5LEFT_EYE
6RIGHT_EYE
7LIPS
8TEETH

Also, we provide some additional meta-information for dataset in annotations/meta.zip file:

image_nameuser_idheightwidthsetbrightness
0a753e021-...56...720960train126
14ff04492-...ba...19201440test173
2e8934c99-...1d...19201440val187

where:

Images

easyportrait

Training, Evaluation and Testing on EasyPortrait

The code is based on MMSegmentation with 0.30.0 version.

Models were trained and evaluated on 8 NVIDIA V100 GPUs with CUDA 11.2.

For installation process follow the instructions here and use the requirements.txt file in our repository.

<details> <summary>Training</summary>

For single GPU mode:

python ./pipelines/tools/train.py ./pipelines/local_configs/easy_portrait_experiments/<model_dir>/<config_file>.py --gpu-id <GPU_ID>

For distributed training mode:

./pipelines/tools/dist_train.sh ./pipelines/local_configs/easy_portrait_experiments/<model_dir>/<config_file>.py <NUM_GPUS>
</details> <details> <summary>Evaluation</summary>

For single GPU mode:

python ./pipelines/tools/test.py <PATH_TO_MODEL_CONFIG>  <PATH_TO_CHECKPOINT> --gpu-id <GPU_ID> --eval mIoU

For distributed evaluation mode:

./pipelines/tools/dist_test.sh <PATH_TO_MODEL_CONFIG>  <PATH_TO_CHECKPOINT> <NUM_GPUS> --eval mIoU
</details> <details> <summary>Run demo</summary>
python ./pipelines/demo/image_demo.py <PATH_TO_IMG> <PATH_TO_MODEL_CONFIG> <PATH_TO_CHECKPOINT> --palette=easy_portrait --out-file=<PATH_TO_OUT_FILE>
</details>

Authors and Credits

Links

Citation

You can cite the paper using the following BibTeX entry:

@article{EasyPortrait,
    title={EasyPortrait - Face Parsing and Portrait Segmentation Dataset},
    author={Kapitanov, Alexander and Kvanchiani, Karina and Kirillova Sofia},
    journal={arXiv preprint arXiv:2304.13509},
    year={2023}
}

License

<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a variant of <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.

Please see the specific license.