Skip to content

Commit e4a9dd7

Browse files
committed
formatting
1 parent 69b49cd commit e4a9dd7

File tree

2 files changed

+37
-25
lines changed

2 files changed

+37
-25
lines changed

configs/_base_/datasets/occlude_face.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555
split='train.txt',
5656
pipeline=train_pipeline)
5757

58-
5958
dataset_train_C = dict(
6059
type=dataset_type,
6160
data_root=data_root,
@@ -65,17 +64,15 @@
6564
pipeline=train_pipeline)
6665

6766
dataset_valid = dict(
68-
type=dataset_type,
69-
data_root=data_root,
70-
img_dir='RealOcc/image',
71-
ann_dir='RealOcc/mask',
72-
split='RealOcc/split/val.txt',
73-
pipeline=test_pipeline)
67+
type=dataset_type,
68+
data_root=data_root,
69+
img_dir='RealOcc/image',
70+
ann_dir='RealOcc/mask',
71+
split='RealOcc/split/val.txt',
72+
pipeline=test_pipeline)
7473

7574
data = dict(
7675
samples_per_gpu=2,
7776
workers_per_gpu=2,
78-
train=[
79-
dataset_train_A, dataset_train_B, dataset_train_C
80-
],
81-
val= dataset_valid)
77+
train=[dataset_train_A, dataset_train_B, dataset_train_C],
78+
val=dataset_valid)

docs/en/dataset_prepare.md

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<!-- #region -->
2+
23
## Prepare datasets
34

45
It is recommended to symlink the dataset root to `$MMSEGMENTATION/data`.
@@ -139,6 +140,21 @@ mmsegmentation
139140
│ │ ├── ann_dir
140141
│ │ │ ├── train
141142
│ │ │ ├── val
143+
│ ├── occlusion-aware-face-dataset
144+
│ │ ├── train.txt
145+
│ │ ├── NatOcc_hand_sot
146+
│ │ │ ├── img
147+
│ │ │ ├── mask
148+
│ │ ├── NatOcc_object
149+
│ │ │ ├── img
150+
│ │ │ ├── mask
151+
│ │ ├── RandOcc
152+
│ │ │ ├── img
153+
│ │ │ ├── mask
154+
│ │ ├── RealOcc
155+
│ │ │ ├── img
156+
│ │ │ ├── mask
157+
│ │ │ ├── split
142158
```
143159

144160
### Cityscapes
@@ -378,21 +394,20 @@ python tools/convert_datasets/isaid.py /path/to/iSAID
378394

379395
In our default setting (`patch_width`=896, `patch_height`=896, `overlap_area`=384), it will generate 33978 images for training and 11644 images for validation.
380396

381-
382397
### Delving into High-Quality Synthetic Face Occlusion Segmentation Datasets
383398

384399
The dataset is generated by two techniques, Naturalistic occlusion generation, Random occlusion generation. you must install face-occlusion-generation and dataset. see more guide in https://github.com/kennyvoo/face-occlusion-generation.git
385400

386-
387401
## Dataset Preparation
388402

389-
Please download the masks from this [drive](https://drive.google.com/drive/folders/15nZETWlGMdcKY6aHbchRsWkUI42KTNs5?usp=sharing) and the images from [CelebAMask-HQ](https://github.com/switchablenorms/CelebAMask-HQ), [11k Hands](https://sites.google.com/view/11khands) and [DTD](https://www.robots.ox.ac.uk/~vgg/data/dtd/).
403+
Please download the masks from this [drive](https://drive.google.com/drive/folders/15nZETWlGMdcKY6aHbchRsWkUI42KTNs5?usp=sharing) and the images from [CelebAMask-HQ](https://github.com/switchablenorms/CelebAMask-HQ), [11k Hands](https://sites.google.com/view/11khands) and [DTD](https://www.robots.ox.ac.uk/~vgg/data/dtd/).
390404

391405
The extracted and upsampled COCO objects images and masks can be found in this [drive](https://drive.google.com/drive/folders/15nZETWlGMdcKY6aHbchRsWkUI42KTNs5?usp=sharing).
392406

393-
Please extract CelebAMask-HQ and 11k Hands images based on the splits found in [drive](https://drive.google.com/drive/folders/15nZETWlGMdcKY6aHbchRsWkUI42KTNs5?usp=sharing).
407+
Please extract CelebAMask-HQ and 11k Hands images based on the splits found in [drive](https://drive.google.com/drive/folders/15nZETWlGMdcKY6aHbchRsWkUI42KTNs5?usp=sharing).
394408

395409
download file to ./data_materials
410+
396411
```none
397412
CelebAMask-HQ.zip
398413
CelebAMask-HQ-masks_corrected.7z
@@ -403,7 +418,8 @@ RealOcc-Wild.7z
403418
coco_object.7z
404419
dtd-r1.0.1.tar.gz
405420
```
406-
---
421+
422+
______________________________________________________________________
407423

408424
```bash
409425
apt-get install p7zip-full
@@ -420,7 +436,7 @@ xargs -n 1 -i echo {}.png < train.txt > mask_train.txt
420436
rsync -a ./CelebAMask-HQ/CelebAMask-HQ-masks_corrected/ --files-from=./mask_train.txt ./CelebAMask-HQ-WO-Train_mask
421437
mv train.txt ../data/occlusion-aware-face-dataset
422438

423-
#extact DTD
439+
#extract DTD
424440
tar -zxvf dtd-r1.0.1.tar.gz
425441
mv dtd DTD
426442

@@ -438,7 +454,6 @@ mv coco_object/* .
438454

439455
```
440456

441-
442457
**Dataset Organization:**
443458

444459
```none
@@ -481,7 +496,7 @@ mv coco_object/* .
481496
│ │ │ │ ├── {image}.jpg
482497
│ │ │ ├── mask
483498
│ │ │ │ ├── {mask}.png
484-
│ │ ├── RandOcc
499+
│ │ ├── RealOcc
485500
│ │ │ ├── img
486501
│ │ │ │ ├── {image}.jpg
487502
│ │ │ ├── mask
@@ -496,7 +511,8 @@ mv coco_object/* .
496511
git clone https://github.com/jinwonkim93/face-occlusion-generation.git
497512
cd face_occlusion-generation
498513
```
499-
Example script to generate NatOcc hand dataset
514+
515+
Example script to generate NatOcc hand dataset
500516

501517
```bash
502518
CUDA_VISIBLE_DEVICES=0 NUM_WORKERS=4 python main.py \
@@ -508,7 +524,8 @@ SOURCE_DATASET.MASK_DIR "path/to/mmsegmentation/data_materials/CelebAMask-HQ-WO-
508524
OCCLUDER_DATASET.IMG_DIR "path/to/mmsegmentation/data_materials/11k-hands_img" \
509525
OCCLUDER_DATASET.MASK_DIR "path/to/mmsegmentation/data_materials/11k-hands_masks"
510526
```
511-
Example script to generate NatOcc object dataset
527+
528+
Example script to generate NatOcc object dataset
512529

513530
```bash
514531
CUDA_VISIBLE_DEVICES=0 NUM_WORKERS=4 python main.py \
@@ -519,6 +536,7 @@ SOURCE_DATASET.MASK_DIR "path/to/mmsegmentation/data_materials/CelebAMask-HQ-WO-
519536
OCCLUDER_DATASET.IMG_DIR "path/to/mmsegmentation/data_materials/object_image_sr" \
520537
OCCLUDER_DATASET.MASK_DIR "path/to/mmsegmentation/data_materials/object_mask_x4"
521538
```
539+
522540
Example script to generate RandOcc dataset
523541

524542
```bash
@@ -529,8 +547,5 @@ SOURCE_DATASET.IMG_DIR "path/to/mmsegmentation/data_materials/CelebAMask-HQ-WO-T
529547
SOURCE_DATASET.MASK_DIR "path/to/mmsegmentation/data_materials/CelebAMask-HQ-WO-Train_mask" \
530548
OCCLUDER_DATASET.IMG_DIR "path/to/jw93/mmsegmentation/data_materials/DTD/images"
531549
```
532-
<!-- #endregion -->
533550

534-
```python
535-
536-
```
551+
<!-- #endregion -->

0 commit comments

Comments
 (0)