cd /root/Magic-TryOn
激活虚拟环境py312:
conda activate py312
执行命令之后输出的结果在这里看到:
/root/Magic-TryOn/samples
【图片】运行下面指令:分别是 换上衣,换下衣:
CUDA_VISIBLE_DEVICES=0 python inference/image_tryon/predict_image_tryon_up.py
CUDA_VISIBLE_DEVICES=1 python inference/image_tryon/predict_image_tryon_low.py
【视频】运行下面指令:分别是 换上衣,换下衣:
CUDA_VISIBLE_DEVICES=0 python inference/video_tryon/predict_video_tryon_up.py
CUDA_VISIBLE_DEVICES=1 python inference/video_tryon/predict_video_tryon_low.py
python inference/customize/get_garment_caption.py
python inference/customize/AniLines/infer.py --dir_in datasets/garment/vivo/vivo_garment --dir_out datasets/garment/vivo/vivo_garment_anilines --mode detail --binarize -1 --fp16 True --device cuda:1
│ ├── person
| | ├── customize
│ │ │ ├── video
│ │ │ │ ├── 00001
│ │ │ │ │ ├── video.mp4
| | | | ├── 00002 ...
│ │ │ ├── image
│ │ │ │ ├── 00001
│ │ │ │ │ │ ├── images
│ │ │ │ │ │ │ ├── 0000.png
| | | | ├── 00002 ...
python inference/customize/gen_mask/app_mask.py
if extract the mask for lower_body or dresses, please modify line 65.
if lower_body:
mask, _ = get_mask_location('dc', "lower_body", model_parse, keypoints)
if dresses:
mask, _ = get_mask_location('dc', "dresses", model_parse, keypoints)
if extract the mask for lower_body or dresses, please modify line 65.
if lower_body:
mask, _ = get_mask_location('dc', "lower_body", model_parse, keypoints)
if dresses:
mask, _ = get_mask_location('dc', "dresses", model_parse, keypoints)
python inference/customize/gen_mask/app_mask.py
After completing the above steps, you will obtain the agnostic masks for all video frames in the datasets/person/customize/video/00001/masks folder.
bash inference/customize/detectron2/projects/DensePose/run.sh
官方更新源码在这里: https://github.com/vivoCameraResearch/Magic-TryOn