Qiwen Deng1*, Yangcen Liu2* (Equal contribution, order decided by coin toss)
- Affiliations:
- University of Electronic Science and Technology of China
- Georgia Institute of Technology
This repository provides the implementation for Adaptive Affinity-Graph Network (AAGN), a novel approach for automatic human body reshaping. The automatic human body reshaping task focuses on transforming a given portrait into an aesthetically enhanced body shape. AAGN enhances global consistency and aesthetic quality. Adaptive Affinity-Graph (AAG) Block: Captures global affinities between body parts for consistent reshaping. Body Shape Discriminator (BSD): Focuses on high-frequency details for improved aesthetics.
Here are visual results showcasing the transformations achieved by AAGN:
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
We utilize the BR-5K dataset, the largest dataset for human body reshaping tasks. Obtain the dataset according to the instructions from FBBR repository.
• python >= 3.7 • torch >= 1.2.0
After obtaining the BR-5K dataset, move the src folder and gt folder inside it to the data folder of this repository. The directory structure will look like this (if you want to use customized dataset, you can also organize files in this form):
./data/gt/
├── 09084aeda464bfc66.jpg
├── 9a3737d2ddbedfbb2.jpg
└── ...
./data/src/
├── 09084aeda464bfc66.jpg
├── 9a3737d2ddbedfbb2.jpg
└── ...
Then download the detection model and the pose model and put them into the mmpose folder.
Generate skeleton maps:
python mmpose/generate_skeleton.py
Run the optical flow estimation script: (this step requires the cupy package, but directly installing it via pip may encounter some issues. We recommend downloading its wheel file for installation instead)
python pwcnet/create_data.py
python train.py
To evaluate:
python evaluate.py --
| Method | SSIM ↑ | PSNR ↑ | LPIPS ↓ |
|---|---|---|---|
| GFLA | 0.6649 | 21.4796 | 0.6136 |
| pix2pixHD | 0.7271 | 21.8381 | 0.2800 |
| FAL | 0.8261 | 24.1841 | 0.0837 |
| ATW | 0.8316 | 24.6332 | 0.0805 |
| FBBR | 0.8354 | 24.7924 | 0.0777 |
| Ours | 0.8427 | 26.4100 | 0.0643 |
If you find our work helpful in your research, please consider citing us:
@misc{deng2024structureawarehumanbodyreshaping,
title={Structure-Aware Human Body Reshaping with Adaptive Affinity-Graph Network},
author={Qiwen Deng and Yangcen Liu and Wen Li and Guoqing Wang},
year={2024},
eprint={2404.13983},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2404.13983}
}We express our gratitude to FBBR as we benefited greatly from their paper and code.








