Upload 4 files
Browse files- .gitattributes +3 -0
- assets/highlight.jpg +3 -0
- assets/seg.jpg +3 -0
- assets/teaser.jpg +3 -0
- data_preparation/README.md +82 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
assets/highlight.jpg filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
assets/seg.jpg filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
assets/teaser.jpg filter=lfs diff=lfs merge=lfs -text
|
assets/highlight.jpg
ADDED
|
Git LFS Details
|
assets/seg.jpg
ADDED
|
Git LFS Details
|
assets/teaser.jpg
ADDED
|
Git LFS Details
|
data_preparation/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Segmentation Map
|
| 2 |
+

|
| 3 |
+
|
| 4 |
+
The code is located in `vitonhd_seg.py`, and the parameters include
|
| 5 |
+
|
| 6 |
+
```python
|
| 7 |
+
## Dataset storage location
|
| 8 |
+
parser.add_argument('--dataset_dir', type=str, default='/data/extern/vition-HD')
|
| 9 |
+
# The required data includes:"densepose"、"image-parse-agnostic-v3.2"、"warped_mask"
|
| 10 |
+
# Among them, warped_mask can be downloaded, with the file name sample and structure as follows:
|
| 11 |
+
"sample/{test_paired/test_unpaired/train_paired}/mask"
|
| 12 |
+
# Download the warped_mask to the dataset_dir directory
|
| 13 |
+
"""
|
| 14 |
+
The content that dataset_dir needs to include is as follows:
|
| 15 |
+
dataset_dir
|
| 16 |
+
|-- sample
|
| 17 |
+
|-- train
|
| 18 |
+
|-- test
|
| 19 |
+
Among them, both train and test contain:
|
| 20 |
+
|-- image-parse-agnostic-v3.2
|
| 21 |
+
|-- densepose
|
| 22 |
+
The sample directory contains:
|
| 23 |
+
sample
|
| 24 |
+
|-- test_paired
|
| 25 |
+
| `-- mask
|
| 26 |
+
|-- test_unpaired
|
| 27 |
+
| `-- mask
|
| 28 |
+
`-- train_paired
|
| 29 |
+
`-- mask
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
## Splitting dataset txt name
|
| 33 |
+
parser.add_argument('--dataset_list', type=str, default='train_pairs_1018new.txt')
|
| 34 |
+
# Save the position of the dataset sequence txt for train and test, where the internal content format of txt is: img cloth mode, for example:
|
| 35 |
+
"""
|
| 36 |
+
12999_00.jpg 12999_00.jpg
|
| 37 |
+
"""
|
| 38 |
+
# Dataset splitting txt needs to be saved in the dataset_dir directory
|
| 39 |
+
|
| 40 |
+
## dataset_mode
|
| 41 |
+
parser.add_argument('--dataset_mode', type=str, default='test')
|
| 42 |
+
## paired
|
| 43 |
+
parser.add_argument('--paired', type=str, default='unpaired')
|
| 44 |
+
## Save location
|
| 45 |
+
parser.add_argument('--save_dir', type=str, default='./results/')
|
| 46 |
+
"""
|
| 47 |
+
The file structure after saving all file outputs is:
|
| 48 |
+
results/
|
| 49 |
+
|-- train
|
| 50 |
+
| `-- warped_paired
|
| 51 |
+
|-- test
|
| 52 |
+
| `-- warped_paired
|
| 53 |
+
| `-- warped_unpaired
|
| 54 |
+
"""
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
The densepose images can be downloaded at: [Baidu Cloud](https://pan.baidu.com/s/13sRu-KVUdUUwwG-FfnSrBQ?pwd=kf0a). The warped mask is generated from the [GP-VTON](https://github.com/xiezhy6/GP-VTON.git). The other data sources is based on the [VITON-HD](https://github.com/shadow2496/VITON-HD) dataset.
|
| 58 |
+
|
| 59 |
+
Data processing can run the script `vitonhd_seg.sh`, which requires three parameters. The first parameter is **dataset_list**, the second parameter is train/test, and the third parameter is **paid/unpaired**. For example:
|
| 60 |
+
|
| 61 |
+
```bash
|
| 62 |
+
bash vitonhd_seg.sh test_pairs.txt test unpaired
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
Before running the script, it is necessary to modify the path corresponding to the script `vitonhd_seg.sh` to the path of one's own computer based on the local directory.
|
| 66 |
+
|
| 67 |
+
# Highlighting Map
|
| 68 |
+

|
| 69 |
+
|
| 70 |
+
The code is located in `vitonhd_highlight.py`, and the parameters include
|
| 71 |
+
```python
|
| 72 |
+
## warped clothes dir
|
| 73 |
+
parser.add_argument('--warped_path', type=str, default='/home/ock/aigc/GP-VTON-main/sample/viton_hd/train_paired/warped')
|
| 74 |
+
## warped masks dir
|
| 75 |
+
parser.add_argument('--mask_path', type=str, default='/home/ock/aigc/GP-VTON-main/sample/viton_hd/train_paired/mask')
|
| 76 |
+
## output dir
|
| 77 |
+
parser.add_argument('--output_folder', type=str, default='/home/ock/aigc/Try-On-old/highlight/train')
|
| 78 |
+
```
|
| 79 |
+
The warped cloth and mask pair is generated from the [GP-VTON](https://github.com/xiezhy6/GP-VTON.git). Data processing can run the file `vitonhd_highlight.py` . For example:
|
| 80 |
+
```
|
| 81 |
+
python data_preparation/vitonhd_highlight.py --warped_path A --mask_path B --output_folder C
|
| 82 |
+
```
|