18 Star 77 Fork 49

DeepSpark / DeepSparkHub

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 2.86 KB
一键复制 编辑 原始数据 按行查看 历史

PP-HumanSegV2

Model description

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.

Step 1: Installation

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

Step 2: Preparing datasets

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

Step 3: Training

# 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

Results

MODEL mIoU Acc Kappa Dice
pp_humansegv2 0.798 0.9860 0.9642 0.9821
GPUS FPS
BI-V100x 8 34.0294

Reference

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/deep-spark/deepsparkhub.git
git@gitee.com:deep-spark/deepsparkhub.git
deep-spark
deepsparkhub
DeepSparkHub
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891