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 |
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。