Skip to content

Commit b33d433

Browse files
authored
Merge pull request #1956 from QingpingZheng/master
Update README.md
2 parents 5ef9804 + 97a0016 commit b33d433

File tree

1 file changed

+61
-1
lines changed

1 file changed

+61
-1
lines changed

parsing/dml_csr/README.md

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,61 @@
1-
init
1+
# Decoupled Multi-task Learning with Cyclical Self-Regulation for Face Parsing.
2+
3+
The official repository of *[Decoupled Multi-task Learning with Cyclical Self-Regulation for Face Parsing. (CVPR 2022)](https://arxiv.org/abs/2203.14448)*.
4+
5+
## Installation
6+
7+
Our model is based on Pytorch 1.7.1 with Python 3.6.2.
8+
9+
```sh
10+
pip install -r requirements.txt
11+
```
12+
13+
## Data
14+
You can download original datasets:
15+
- **Helen** : [https://www.sifeiliu.net/face-parsing](https://www.sifeiliu.net/face-parsing)
16+
- **LaPa** : [https://github.com/JDAI-CV/lapa-dataset](https://github.com/JDAI-CV/lapa-dataset)
17+
- **CelebAMask-HQ** : [https://github.com/switchablenorms/CelebAMask-HQ](https://github.com/switchablenorms/CelebAMask-HQ)
18+
19+
and put them in ./dataset folder as below
20+
```
21+
dataset/
22+
images/
23+
labels/
24+
edges/
25+
train_list.txt
26+
test_list.txt
27+
each line: 'images/100032540_1.jpg labels/100032540_1.png'
28+
```
29+
Besides, we provide the edge genearation code in the *generate_edge.py*.
30+
31+
## Usage
32+
33+
If you need imagenet pretrained resent-101, please download from [baidu drive]() or [Google drive](https://drive.google.com/open?id=1rzLU-wK6rEorCNJfwrmIu5hY2wRMyKTK), and put it into snapshot folder.
34+
35+
For dstributed(multi-gpu) training. Inplace-abn requires pytorch distributed data parallel.
36+
```
37+
GPU=4,5,6,7
38+
Node=4
39+
dataset=./datasets/CelebAMask-HQ/
40+
snapshot=./work_dirs/
41+
CUDA_VISIBLE_DEVICES="$GPU" python -m torch.distributed.launch --nproc_per_node="$Node" --master_port=295002 train.py --data-dir "$dataset" --random-mirror --random-scale \
42+
--gpu "$GPU" --batch-size 7 --input-size 473,473 --snapshot-dir "$snapshot" --num-classes 19 --epochs 200 --schp-start 150
43+
```
44+
45+
For testing
46+
```
47+
python test.py --data-dir "$dataset" --out-dir "$out_dir" --restore-from "$snapshot" --gpu "$GPU" --batch-size 7 --input-size 473,473 --dataset test --num-classes 19
48+
```
49+
50+
## Reference
51+
52+
If you consider use our code, please cite our paper:
53+
54+
```
55+
@inproceedings{Zheng2022DecoupledML,
56+
title={Decoupled Multi-task Learning with Cyclical Self-Regulation for Face Parsing},
57+
author={Qi Zheng and Jiankang Deng and Zheng Zhu and Ying Li and Stefanos Zafeiriou},
58+
booktitle={Computer Vision and Pattern Recognition},
59+
year={2022}
60+
}
61+
```

0 commit comments

Comments
 (0)