The core idea of this project is inspired by Grounded-Segment-Anything. We combine the pose estimation models so as to make use of the point prompt of Segment Anything. And then we can edit any part of the body with inpaintingstable diffusion. A simple but interesting workflow pipeline for combining strong expert models.
HR-SAM:Automatic Labeling Components of the human body
HR-SAM-Stable-Diffusion Inpainting:Editing any Components of the human body
WebUI_DEMO with gradio
First choose the pth of SAM and HRNet, then select the Components you want and click Seg with HR prompt.
Then write your text prompt and diffusion with previous mask to edit it to whatever you want.
1.Check the requirements.txt
pip install -r requirements.txt
2.Download pth of SAM and HRNet
3.Execute demo of HR-SAM of HR-SAM-Diffusion with your own image.
4.Execute appHRSAMDIFF.py Have fun with WebUI and get your own 'Human body modification program'
Yuming Qiao, Fanyi Wang, Yanhao Zhang