Skip to content

Commit 4f3b37e

Browse files
committed
Move pretrained settings
1 parent d25dd47 commit 4f3b37e

File tree

1 file changed

+69
-1
lines changed
  • segmentation_models_pytorch/encoders

1 file changed

+69
-1
lines changed

segmentation_models_pytorch/encoders/dpn.py

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
from typing import List, Dict, Sequence
2929

3030
from pretrainedmodels.models.dpn import DPN
31-
from pretrainedmodels.models.dpn import pretrained_settings
3231

3332
from ._base import EncoderMixin
3433

@@ -97,6 +96,75 @@ def load_state_dict(self, state_dict, **kwargs):
9796
super().load_state_dict(state_dict, **kwargs)
9897

9998

99+
pretrained_settings = {
100+
"dpn68": {
101+
"imagenet": {
102+
"url": "http://data.lip6.fr/cadene/pretrainedmodels/dpn68-4af7d88d2.pth",
103+
"input_space": "RGB",
104+
"input_size": [3, 224, 224],
105+
"input_range": [0, 1],
106+
"mean": [124 / 255, 117 / 255, 104 / 255],
107+
"std": [1 / (0.0167 * 255)] * 3,
108+
"num_classes": 1000,
109+
}
110+
},
111+
"dpn68b": {
112+
"imagenet+5k": {
113+
"url": "http://data.lip6.fr/cadene/pretrainedmodels/dpn68b_extra-363ab9c19.pth",
114+
"input_space": "RGB",
115+
"input_size": [3, 224, 224],
116+
"input_range": [0, 1],
117+
"mean": [124 / 255, 117 / 255, 104 / 255],
118+
"std": [1 / (0.0167 * 255)] * 3,
119+
"num_classes": 1000,
120+
}
121+
},
122+
"dpn92": {
123+
"imagenet+5k": {
124+
"url": "http://data.lip6.fr/cadene/pretrainedmodels/dpn92_extra-fda993c95.pth",
125+
"input_space": "RGB",
126+
"input_size": [3, 224, 224],
127+
"input_range": [0, 1],
128+
"mean": [124 / 255, 117 / 255, 104 / 255],
129+
"std": [1 / (0.0167 * 255)] * 3,
130+
"num_classes": 1000,
131+
}
132+
},
133+
"dpn98": {
134+
"imagenet": {
135+
"url": "http://data.lip6.fr/cadene/pretrainedmodels/dpn98-722954780.pth",
136+
"input_space": "RGB",
137+
"input_size": [3, 224, 224],
138+
"input_range": [0, 1],
139+
"mean": [124 / 255, 117 / 255, 104 / 255],
140+
"std": [1 / (0.0167 * 255)] * 3,
141+
"num_classes": 1000,
142+
}
143+
},
144+
"dpn131": {
145+
"imagenet": {
146+
"url": "http://data.lip6.fr/cadene/pretrainedmodels/dpn131-7af84be88.pth",
147+
"input_space": "RGB",
148+
"input_size": [3, 224, 224],
149+
"input_range": [0, 1],
150+
"mean": [124 / 255, 117 / 255, 104 / 255],
151+
"std": [1 / (0.0167 * 255)] * 3,
152+
"num_classes": 1000,
153+
}
154+
},
155+
"dpn107": {
156+
"imagenet+5k": {
157+
"url": "http://data.lip6.fr/cadene/pretrainedmodels/dpn107_extra-b7f9f4cc9.pth",
158+
"input_space": "RGB",
159+
"input_size": [3, 224, 224],
160+
"input_range": [0, 1],
161+
"mean": [124 / 255, 117 / 255, 104 / 255],
162+
"std": [1 / (0.0167 * 255)] * 3,
163+
"num_classes": 1000,
164+
}
165+
},
166+
}
167+
100168
dpn_encoders = {
101169
"dpn68": {
102170
"encoder": DPNEncoder,

0 commit comments

Comments
 (0)