-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathhuman_parsing_resnet50.py
56 lines (46 loc) · 1.47 KB
/
human_parsing_resnet50.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
"""Module providing configuration for training on human parsing with resnet50
backbone"""
from glob import glob
import tensorflow as tf
CONFIG = {
'project_name': 'deeplabv3-plus',
'experiment_name': 'human-parsing-resnet-50-backbone',
'train_dataset_config': {
'images': sorted(
glob(
'./dataset/instance-level_human_parsing/'
'instance-level_human_parsing/Training/Images/*'
)
),
'labels': sorted(
glob(
'./dataset/instance-level_human_parsing/'
'instance-level_human_parsing/Training/Category_ids/*'
)
),
'height': 512, 'width': 512, 'batch_size': 8
},
'val_dataset_config': {
'images': sorted(
glob(
'./dataset/instance-level_human_parsing/'
'instance-level_human_parsing/Validation/Images/*'
)
),
'labels': sorted(
glob(
'./dataset/instance-level_human_parsing/'
'instance-level_human_parsing/Validation/Category_ids/*'
)
),
'height': 512, 'width': 512, 'batch_size': 8
},
'strategy': tf.distribute.OneDeviceStrategy(device="/gpu:0"),
'num_classes': 20,
'backbone': 'resnet50',
'learning_rate': 0.0001,
'checkpoint_dir': "./checkpoints/",
'checkpoint_file_prefix':
'deeplabv3-plus-human-parsing-resnet-50-backbone_',
'epochs': 100
}