Human segmentation is a high-frequency application in the field of image segmentation.
Generally, human segentation can be classified as portrait segmentation and general human segmentation.
For portrait segmentation and general human segmentation, PaddleSeg releases the PP-HumanSeg models, which has good performance in accuracy, inference speed and robustness. Besides, we can deploy PP-HumanSeg models to products without training
Besides, PP-HumanSeg models can be deployed to products at zero cost, and it also support fine-tuning to achieve better performance.
The following is demonstration videos (due to the video is large, the loading will be slightly slow) .We provide full-process application guides from training to deployment, as well as video streaming segmentation and background replacement tutorials. Based on Paddle.js, you can experience the effects of Portrait Snapshot, Video Background Replacement and Barrage Penetration.
git clone -b develop https://github.com/PaddlePaddle/PaddleSeg.git
cd PaddleSeg
pip3 install -r requirements.txt
pip3 install protobuf==3.20.3
pip3 install urllib3==1.26.6
yum install mesa-libGL
python3 setup.py develop
Go to visit PP-HumanSeg14K official website, then download the PP-HumanSeg14K dataset, or you can download via Baidu Netdisk password: vui7 , Google Cloud Disk
The dataset path structure sholud look like:
PP-HumanSeg14K/
├── annotations
│ ├── train
│ └── val
└── images
│ ├── train
│ └── val
│ └── test
└──train.txt
└──val.txt
└──test.txt
└──LICENSE
└──README.txt
# Change ./contrib/PP-HumanSeg/configs/portrait_pp_humansegv2_lite.yml dataset path as your dateset path
# One GPU
CUDA_VISIBLE_DEVICES=0 python3 tools/train.py --config contrib/PP-HumanSeg/configs/portrait_pp_humansegv2_lite.yml --save_dir output/human_pp_humansegv2_lite --save_interval 500 --do_eval --use_vdl
# Eight GPUs
python3 -m paddle.distributed.launch --gpus 0,1,2,3,4,5,6,7 tools/train.py \
--config contrib/PP-HumanSeg/configs/portrait_pp_humansegv2_lite.yml \
--do_eval \
--use_vdl \
--save_interval 500
MODEL | mIoU | Acc | Kappa | Dice |
---|---|---|---|---|
pp_humansegv2 | 0.798 | 0.9860 | 0.9642 | 0.9821 |
GPUS | FPS |
---|---|
BI-V100x 8 | 34.0294 |
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》