• Stars
    star
    237
  • Rank 169,885 (Top 4 %)
  • Language
    Python
  • Created almost 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

EasyPortrait - Face Parsing and Portrait Segmentation Dataset

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 26GB, and it contains 20 000 RGB images (~17.5K 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 14000 images, the validation set includes 2000 images, and the test set includes 4000 images.

For more information see our paper EasyPortrait – Face Parsing and Portrait Segmentation Dataset.

Downloads

Link Size
images 26G
annotations 235M
train set 18.1G
validation set 2.6G
test set 5.2G

Also, you can download EasyPortrait dataset from Kaggle.

Structure

.
├── images.zip
│   ├── train/         # Train set: 14k
│   ├── val/           # Validation set: 2k
│   ├── test/          # Test set: 4k
├── annotations.zip
│   ├── meta.zip       # Meta-information (width, height, brightness, imhash, user_id)
│   ├── train/     
│   ├── val/       
│   ├── test/      
...

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.

Model Name Parameters (M) Input shape mIOU
LR-ASPP + MobileNet-V3 1.14 1024 × 1024 77.55
FCN + MobileNet-V2 9.71 384 × 384 74.3
FCN + MobileNet-V2 9.71 512 × 512 77.01
FCN + MobileNet-V2 9.71 1024 × 1024 81.23
FPN + ResNet-50 28.5 512 × 512 83.13
FPN + ResNet-50 28.5 1024 × 1024 85.97
BiSeNet-V2 14.79 512 × 512 77.93
BiSeNet-V2 14.79 1024 × 1024 83.53
SegFormer-B0 3.72 384 × 384 79.82
SegFormer-B0 3.72 1024 × 1024 84.27
SegFormer-B2 24.73 384 × 384 81.59
SegFormer-B2 24.73 512 × 512 83.03
SegFormer-B2 24.73 1024 × 1024 85.72
SegFormer-B5 81.97 384 × 384 81.66
SegFormer-B5 81.97 1024 × 1024 85.80
SegNeXt + MSCAN-T 4.23 384 × 384 75.01
SegNeXt + MSCAN-T 4.23 512 × 512 78.59

Annotations

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

Index Class
0 BACKGROUND
1 PERSON
2 SKIN
3 LEFT BROW
4 RIGHT_BROW
5 LEFT_EYE
6 RIGHT_EYE
7 LIPS
8 TEETH

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

attachment_id user_id data_hash width height brightness train test valid
0 de81cc1c-... 1b... e8f... 1440 1920 136 True False False
1 3c0cec5a-... 64... df5... 1440 1920 148 False False True
2 d17ca986-... cf... a69... 1920 1080 140 False True False

where:

  • attachment_id - image file name without extension
  • user_id - unique anonymized user ID
  • data_hash - image hash by using Perceptual hashing
  • width - image width
  • height - image height
  • brightness - image brightness
  • train, test, valid are the binary columns for train / test / val subsets respectively

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.

Training

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>
Evaluation

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
Run demo
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>

Authors and Credits

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

Creative Commons License
This work is licensed under a variant of Creative Commons Attribution-ShareAlike 4.0 International License.

Please see the specific license.

More Repositories

1

dsp-theory

Theory of digital signal processing (DSP): signals, filtration (IIR, FIR, CIC, MAF), transforms (FFT, DFT, Hilbert, Z-transform) etc.
Jupyter Notebook
981
star
2

hagrid

HAnd Gesture Recognition Image Dataset
Python
582
star
3

coursera_ml_da_specialization

Coursera Specialization: Machine Learning and Data Analysis (Yandex & MIPT)
Jupyter Notebook
183
star
4

chaospy

Chaotic attractors with python (Lorenz, Rossler, Rikitake etc.)
Python
93
star
5

hh_research

Автоматизация поиска и исследования вакансий с сайта hh.ru (Headhunter) с помощью методов Python. Классификация данных, поиск статистических параметров.
Jupyter Notebook
86
star
6

intfftk

Fully pipelined Integer Scaled / Unscaled Radix-2 Forward/Inverse Fast Fourier Transform (FFT) IP-core for newest Xilinx FPGAs (Source language - VHDL / Verilog). GNU GPL 3.0.
VHDL
76
star
7

slovo

Slovo: Russian Sign Language Dataset and Models
Python
61
star
8

fp23fftk

Floating point Forward/Inverse Fast Fourier Transform (FFT) IP-core for newest Xilinx FPGAs (Source lang. - VHDL).
VHDL
54
star
9

tcl_for_fpga

TCL scripts for FPGA (Xilinx)
Tcl
31
star
10

math

Useful m-scripts for DSP (CIC, FIR, FFT, Fast convolution, Partial Filters etc.)
MATLAB
26
star
11

github_backup

GitHub saver for stargazers, forks, repos
Python
26
star
12

dsppy

Python Digital signal processing (DSP) modules
Python
19
star
13

adc_configurator

ADC configurator to 7-series Xilinx FPGA (has parameters: NCHAN, SERDES MODE, SDR/DDR, DATA WIDTH, DEPTH and so on)
VHDL
12
star
14

coursera_deep_learning_ai

Coursera Specialization: Deep Learning (Andrew Ng, deeplearning.ai)
Jupyter Notebook
12
star
15

blackman_harris_win

Blackman-Harris Window functions (3-, 5-, 7-term etc.) from 1K to 64M points based only on LUTs and DSP48s FPGA resources. Main core - CORDIC like as DDS (sine / cosine generator)
VHDL
9
star
16

fp23_logic

Floating point FP23 core on VHDL. For Xilinx FPGAs. Include base converters and some math functions.
VHDL
8
star
17

fp32_logic

Floating point FP32 core HDL. For Xilinx FPGAs. Include base converters and some math functions.
VHDL
8
star
18

kapitanov.github.io

CV. Kapitanov Alexander. Deep Learning Engineer, Ex. Lead FPGA developer.
6
star
19

intfft_spdf

Integer (Scaled / Unscaled) Radix-2 Single Path Delay Feedback (SPDF) FFT / IFFT cores
VHDL
5
star
20

Stupid_watch

LCD1602 and timer (DS1302) on Xilinx FPGA
VHDL
5
star
21

Chaotic_Attractors

Four Chaotic Attractors in MATLAB (Lorenz, Rossler, Nose-Hoover, Rikitake)
4
star
22

pre_commit_hooks

Simple Python project for testing pre-commit hooks
Shell
3
star
23

hagrid-models

Hand classifiers & detectors for HaGRID
Python
2
star
24

dspbash

Useful bash scripts for saving time while using your repositories
Shell
2
star
25

MinesweeperFPGA

Minesweeper project for FPGA
VHDL
2
star
26

fpga_heart

Simple project on Xilinx FPGA (Spartan3e) and LED8x8. Gift to my wife on Women's Day. 8/3/17.
VHDL
1
star