-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathdatasets.py
107 lines (106 loc) · 4.15 KB
/
datasets.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import numpy as np
# configuration for different datasets
CONFIG = {
'cityscapes': {
'classes': 19,
'weights_file': 'dilation_cityscapes.h5',
'weights_url': 'http://imagelab.ing.unimore.it/files/dilation_keras/cityscapes.h5',
'input_shape': (3, 1396, 1396),
'test_image': 'imgs_test/cityscapes.png',
'mean_pixel': (72.39, 82.91, 73.16),
'palette': np.array([[128, 64, 128],
[244, 35, 232],
[70, 70, 70],
[102, 102, 156],
[190, 153, 153],
[153, 153, 153],
[250, 170, 30],
[220, 220, 0],
[107, 142, 35],
[152, 251, 152],
[70, 130, 180],
[220, 20, 60],
[255, 0, 0],
[0, 0, 142],
[0, 0, 70],
[0, 60, 100],
[0, 80, 100],
[0, 0, 230],
[119, 11, 32]], dtype='uint8'),
'zoom': 1,
'conv_margin': 186
},
'voc12': {
'classes': 21,
'weights_file': 'dilation_voc12.h5',
'weights_url': 'http://imagelab.ing.unimore.it/files/dilation_keras/voc12.h5',
'input_shape': (3, 900, 900),
'test_image': 'imgs_test/voc.jpg',
'mean_pixel': (102.93, 111.36, 116.52),
'palette': np.array([[0, 0, 0],
[128, 0, 0],
[0, 128, 0],
[128, 128, 0],
[0, 0, 128],
[128, 0, 128],
[0, 128, 128],
[128, 128, 128],
[64, 0, 0],
[192, 0, 0],
[64, 128, 0],
[192, 128, 0],
[64, 0, 128],
[192, 0, 128],
[64, 128, 128],
[192, 128, 128],
[0, 64, 0],
[128, 64, 0],
[0, 192, 0],
[128, 192, 0],
[0, 64, 128]], dtype='uint8'),
'zoom': 8,
'conv_margin': 186
},
'kitti': {
'classes': 11,
'weights_file': 'dilation_kitti.h5',
'weights_url': 'http://imagelab.ing.unimore.it/files/dilation_keras/kitti.h5',
'input_shape': (3, 852, 1640),
'test_image': 'imgs_test/kitti.png',
'mean_pixel': (96.19, 95.55, 91.34),
'palette': np.array([[128, 0, 0],
[128, 128, 0],
[128, 128, 128],
[64, 0, 128],
[192, 128, 128],
[128, 64, 128],
[64, 64, 0],
[64, 64, 128],
[192, 192, 128],
[0, 0, 192],
[0, 128, 192]], dtype='uint8'),
'zoom': 8,
'conv_margin': 186
},
'camvid': {
'classes': 11,
'weights_file': 'dilation_camvid.h5',
'weights_url': 'http://imagelab.ing.unimore.it/files/dilation_keras/camvid.h5',
'input_shape': (3, 900, 1100),
'test_image': 'imgs_test/camvid.png',
'mean_pixel': (110.70, 108.77, 105.41),
'palette': np.array([[128, 0, 0],
[128, 128, 0],
[128, 128, 128],
[64, 0, 128],
[192, 128, 128],
[128, 64, 128],
[64, 64, 0],
[64, 64, 128],
[192, 192, 128],
[0, 0, 192],
[0, 128, 192]], dtype='uint8'),
'zoom': 8,
'conv_margin': 186
}
}