4444def _cfg (url = '' , ** kwargs ):
4545 return {
4646 'url' : url ,
47- 'num_classes' : 1000 , 'input_size' : (3 , 480 , 480 ), 'pool_size' : (7 , 7 ),
48- 'crop_pct' : 1.0 , 'interpolation' : 'bilinear' ,
47+ 'num_classes' : 1000 , 'input_size' : (3 , 224 , 224 ), 'pool_size' : (7 , 7 ),
48+ 'crop_pct' : 0.875 , 'interpolation' : 'bilinear' ,
4949 'mean' : IMAGENET_INCEPTION_MEAN , 'std' : IMAGENET_INCEPTION_STD ,
5050 'first_conv' : 'stem.conv' , 'classifier' : 'head.fc' ,
5151 ** kwargs
@@ -55,17 +55,23 @@ def _cfg(url='', **kwargs):
5555default_cfgs = {
5656 # pretrained on imagenet21k, finetuned on imagenet1k
5757 'resnetv2_50x1_bitm' : _cfg (
58- url = 'https://storage.googleapis.com/bit_models/BiT-M-R50x1-ILSVRC2012.npz' ),
58+ url = 'https://storage.googleapis.com/bit_models/BiT-M-R50x1-ILSVRC2012.npz' ,
59+ input_size = (3 , 448 , 448 ), pool_size = (14 , 14 ), crop_pct = 1.0 ),
5960 'resnetv2_50x3_bitm' : _cfg (
60- url = 'https://storage.googleapis.com/bit_models/BiT-M-R50x3-ILSVRC2012.npz' ),
61+ url = 'https://storage.googleapis.com/bit_models/BiT-M-R50x3-ILSVRC2012.npz' ,
62+ input_size = (3 , 448 , 448 ), pool_size = (14 , 14 ), crop_pct = 1.0 ),
6163 'resnetv2_101x1_bitm' : _cfg (
62- url = 'https://storage.googleapis.com/bit_models/BiT-M-R101x1-ILSVRC2012.npz' ),
64+ url = 'https://storage.googleapis.com/bit_models/BiT-M-R101x1-ILSVRC2012.npz' ,
65+ input_size = (3 , 448 , 448 ), pool_size = (14 , 14 ), crop_pct = 1.0 ),
6366 'resnetv2_101x3_bitm' : _cfg (
64- url = 'https://storage.googleapis.com/bit_models/BiT-M-R101x3-ILSVRC2012.npz' ),
67+ url = 'https://storage.googleapis.com/bit_models/BiT-M-R101x3-ILSVRC2012.npz' ,
68+ input_size = (3 , 448 , 448 ), pool_size = (14 , 14 ), crop_pct = 1.0 ),
6569 'resnetv2_152x2_bitm' : _cfg (
66- url = 'https://storage.googleapis.com/bit_models/BiT-M-R152x2-ILSVRC2012.npz' ),
70+ url = 'https://storage.googleapis.com/bit_models/BiT-M-R152x2-ILSVRC2012.npz' ,
71+ input_size = (3 , 448 , 448 ), pool_size = (14 , 14 ), crop_pct = 1.0 ),
6772 'resnetv2_152x4_bitm' : _cfg (
68- url = 'https://storage.googleapis.com/bit_models/BiT-M-R152x4-ILSVRC2012.npz' ),
73+ url = 'https://storage.googleapis.com/bit_models/BiT-M-R152x4-ILSVRC2012.npz' ,
74+ input_size = (3 , 480 , 480 ), pool_size = (15 , 15 ), crop_pct = 1.0 ), # only one at 480x480?
6975
7076 # trained on imagenet-21k
7177 'resnetv2_50x1_bitm_in21k' : _cfg (
@@ -89,18 +95,18 @@ def _cfg(url='', **kwargs):
8995
9096 'resnetv2_50x1_bit_distilled' : _cfg (
9197 url = 'https://storage.googleapis.com/bit_models/distill/R50x1_224.npz' ,
92- input_size = ( 3 , 224 , 224 ), crop_pct = 0.875 , interpolation = 'bicubic' ),
98+ interpolation = 'bicubic' ),
9399 'resnetv2_152x2_bit_teacher' : _cfg (
94100 url = 'https://storage.googleapis.com/bit_models/distill/R152x2_T_224.npz' ,
95- input_size = ( 3 , 224 , 224 ), crop_pct = 0.875 , interpolation = 'bicubic' ),
101+ interpolation = 'bicubic' ),
96102 'resnetv2_152x2_bit_teacher_384' : _cfg (
97103 url = 'https://storage.googleapis.com/bit_models/distill/R152x2_T_384.npz' ,
98- input_size = (3 , 384 , 384 ), crop_pct = 1.0 , interpolation = 'bicubic' ),
104+ input_size = (3 , 384 , 384 ), pool_size = ( 12 , 12 ), crop_pct = 1.0 , interpolation = 'bicubic' ),
99105
100106 'resnetv2_50' : _cfg (
101- input_size = ( 3 , 224 , 224 ), crop_pct = 0.875 , interpolation = 'bicubic' ),
107+ interpolation = 'bicubic' ),
102108 'resnetv2_50d' : _cfg (
103- input_size = ( 3 , 224 , 224 ), crop_pct = 0.875 , interpolation = 'bicubic' , first_conv = 'stem.conv1' ),
109+ interpolation = 'bicubic' , first_conv = 'stem.conv1' ),
104110}
105111
106112
0 commit comments