# 생성
conda create -n [가상환경 이름] python=3.7
# 가상환경 접속
conda activate [가상환경 이름]
git clone <https://github.com/cuiaiyu/dressing-in-order.git> && cd dressing-in-order/
python3 -m pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f <https://download.pytorch.org/whl/torch_stable.html>
requirements.txt
내용 수정하기
# 아래 버전들로 수정
dominate==2.6.0
imageio
ipython
lpips==0.1.3
matplotlib
numpy>=1.21
opencv-python
pandas
Pillow<7.0.0
scikit-image==0.14.3
tensorboard
tensorboardX
tifffile==2020.9.3
tqdm
rich
python3 -m pip install -r requirements.txt
Dataset Download : Google Drive
데이터셋 폴더 구조
**$DATA_ROOT**
├── **train**
│ ├── xxx.jpg
│ │ ...
│ ├── **trainM_lip**
│ │ ├── xxx.jpg
│ │ │ ...
├── **test**
│ ├── xxx.jpg
│ │ ...
│ ├── testM_lip
│ │ ├── xxx.jpg
│ │ │ ...
├── fasion-annotation-test.csv (openpose body-25 keypoint)
├── fasion-annotation-train.csv (openpose body-25 keypoint)
├── fasion-pairs-test.csv (paired poses)
├── fasion-pairs-train.csv (paired poses)
├── train.lst
├── test.lst
└── standard_test_anns.txt
├── img_highres (deep-fashion raw dataset)
프로젝트 폴더 구조
latest_net_G.pth
를 프로젝트 폴더에 넣고 아래 코드로 latest_net_G.pth
를 flownet.pt
로 변환한다.import torch
weights = torch.load("latest_net_G.pth")
flownet_weights = {w.replace("flow_net.",""): weights[w] for w in weights if w.startswith("flow_net")}
torch.save(flownet_weights, "flownet.pt")
flownet.pt
를 해당 폴더에 넣는다..
├── **checkpoints**
│ ├── **DIOR_32
│ │ ├── latest_net_E_attr.pth
│ ├── latest_net_Flow.pth
│ └── latest_net_G.pth**
│ ├── **DIOR_64**
│ └── **DIORv1_64**
├── **pretrained_models**
│ └── flownet.pth
├── latest_net_G.pth
├── **pretrained_models**
│ └── flownet.pth