github链接:https://github.com/JianqiangRen/FlowBasedBodyReshaping
![](http://43.138.69.59/wp-content/uploads/2023/10/0deb0f51ae8681fbf360fe9ec93e70ad.jpeg)
一、介绍:
我们提出了一种用于人体重塑 (FBBR) 的端到端结构感知流生成框架,可以有效地为高分辨率图像取得有利且可控的结果。BR-5K 是第一个用于身体重塑的大规模数据集,它由从Unsplash收集的 5,000 张 2K 分辨率的高质量个人肖像照片组成
二、下载模型
文章百度链接提供
https://pan.baidu.com/share/init?surl=hxlh5jipyaEi1R6NLm8KFg&pwd=17e6
(key:17e6)
下载模型放入models目录
三、配置环境
conda create -n FlowBasedBodyReshaping python=3.8
conda activate FlowBasedBodyReshaping
pip install "torch-1.11.0+cu113-cp38-cp38-win_amd64.whl"
pip install "torchvision-0.12.0+cu113-cp38-cp38-win_amd64.whl"
pip install opencv-python -i https://mirror.baidu.com/pypi/simple/
pip install numba -i https://mirror.baidu.com/pypi/simple/
pip install easydict -i https://mirror.baidu.com/pypi/simple/
pip install scipy -i https://mirror.baidu.com/pypi/simple/
pip install matplotlib -i https://mirror.baidu.com/pypi/simple/
pip install tqdm -i https://mirror.baidu.com/pypi/simple/
pip install lpips -i https://mirror.baidu.com/pypi/simple/
pip install toml -i https://mirror.baidu.com/pypi/simple/
四、运行
1、配置文件解释,打开test_demo_setting.toml
degree = 3.0
suppress_bg = false
flow_scales = ['upper_2']
divider = 20
reshape_ckpt_path = 'models/body_reshape_model.pth'
src_dir = './test_cases'
gt_dir = 'null'
save_dir = 'output'
2、运行命令
python test.py --config config/test_demo_setting.toml
五、瘦身效果
![](http://43.138.69.59/wp-content/uploads/2023/04/2c1bbb1425f481c8f-682x1024.jpg)
![](http://43.138.69.59/wp-content/uploads/2023/04/2c1bbb1425f481c8f_warp_body_reshape_model-682x1024.jpg)
![](http://43.138.69.59/wp-content/uploads/2023/04/7a77deff1888c3b08-1-1024x682.jpg)
![](http://43.138.69.59/wp-content/uploads/2023/04/7a77deff1888c3b08_warp_body_reshape_model-1-1024x682.jpg)