mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Remove label offsets and remove old weight url for 1001 class (background + in1k) TF origin weights
This commit is contained in:
parent
a01d8f86f4
commit
960a882510
@ -314,23 +314,19 @@ default_cfgs = generate_default_cfgs({
|
||||
# ported from http://download.tensorflow.org/models/inception_resnet_v2_2016_08_30.tar.gz
|
||||
'inception_resnet_v2.tf_in1k': {
|
||||
'hf_hub_id': 'timm/',
|
||||
'url': 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/inception_resnet_v2-940b1cd6.pth',
|
||||
'num_classes': 1000, 'input_size': (3, 299, 299), 'pool_size': (8, 8),
|
||||
'crop_pct': 0.8975, 'interpolation': 'bicubic',
|
||||
'mean': IMAGENET_INCEPTION_MEAN, 'std': IMAGENET_INCEPTION_STD,
|
||||
'first_conv': 'conv2d_1a.conv', 'classifier': 'classif',
|
||||
'label_offset': 1, # 1001 classes in pretrained weights
|
||||
},
|
||||
# As per https://arxiv.org/abs/1705.07204 and
|
||||
# ported from http://download.tensorflow.org/models/ens_adv_inception_resnet_v2_2017_08_18.tar.gz
|
||||
'inception_resnet_v2.tf_ens_adv_in1k': {
|
||||
'hf_hub_id': 'timm/',
|
||||
'url': 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/ens_adv_inception_resnet_v2-2592a550.pth',
|
||||
'num_classes': 1000, 'input_size': (3, 299, 299), 'pool_size': (8, 8),
|
||||
'crop_pct': 0.8975, 'interpolation': 'bicubic',
|
||||
'mean': IMAGENET_INCEPTION_MEAN, 'std': IMAGENET_INCEPTION_STD,
|
||||
'first_conv': 'conv2d_1a.conv', 'classifier': 'classif',
|
||||
'label_offset': 1, # 1001 classes in pretrained weights
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -428,21 +428,14 @@ default_cfgs = generate_default_cfgs({
|
||||
hf_hub_id='timm/',
|
||||
url='https://download.pytorch.org/models/inception_v3_google-1a9a5a14.pth'),
|
||||
# my port of Tensorflow SLIM weights (http://download.tensorflow.org/models/inception_v3_2016_08_28.tar.gz)
|
||||
'inception_v3.tf_in1k': _cfg(
|
||||
hf_hub_id='timm/',
|
||||
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/tf_inception_v3-e0069de4.pth',
|
||||
num_classes=1000, label_offset=1),
|
||||
'inception_v3.tf_in1k': _cfg(hf_hub_id='timm/'),
|
||||
# my port of Tensorflow adversarially trained Inception V3 from
|
||||
# http://download.tensorflow.org/models/adv_inception_v3_2017_08_18.tar.gz
|
||||
'inception_v3.tf_adv_in1k': _cfg(
|
||||
hf_hub_id='timm/',
|
||||
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/adv_inception_v3-9e27bd63.pth',
|
||||
num_classes=1000, label_offset=1),
|
||||
'inception_v3.tf_adv_in1k': _cfg(hf_hub_id='timm/'),
|
||||
# from gluon pretrained models, best performing in terms of accuracy/loss metrics
|
||||
# https://gluon-cv.mxnet.io/model_zoo/classification.html
|
||||
'inception_v3.gluon_in1k': _cfg(
|
||||
hf_hub_id='timm/',
|
||||
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/gluon_inception_v3-9f746940.pth',
|
||||
mean=IMAGENET_DEFAULT_MEAN, # also works well with inception defaults
|
||||
std=IMAGENET_DEFAULT_STD, # also works well with inception defaults
|
||||
)
|
||||
|
@ -312,12 +312,10 @@ def _create_inception_v4(variant, pretrained=False, **kwargs) -> InceptionV4:
|
||||
default_cfgs = generate_default_cfgs({
|
||||
'inception_v4.tf_in1k': {
|
||||
'hf_hub_id': 'timm/',
|
||||
'url': 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-cadene/inceptionv4-8e4777a0.pth',
|
||||
'num_classes': 1000, 'input_size': (3, 299, 299), 'pool_size': (8, 8),
|
||||
'crop_pct': 0.875, 'interpolation': 'bicubic',
|
||||
'mean': IMAGENET_INCEPTION_MEAN, 'std': IMAGENET_INCEPTION_STD,
|
||||
'first_conv': 'features.0.conv', 'classifier': 'last_linear',
|
||||
'label_offset': 1, # 1001 classes in pretrained weights
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -588,7 +588,6 @@ default_cfgs = generate_default_cfgs({
|
||||
'num_classes': 1000,
|
||||
'first_conv': 'conv0.conv',
|
||||
'classifier': 'last_linear',
|
||||
'label_offset': 1, # 1001 classes in pretrained weights
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -355,7 +355,6 @@ def _create_pnasnet(variant, pretrained=False, **kwargs):
|
||||
default_cfgs = generate_default_cfgs({
|
||||
'pnasnet5large.tf_in1k': {
|
||||
'hf_hub_id': 'timm/',
|
||||
'url': 'https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-cadene/pnasnet5large-bf079911.pth',
|
||||
'input_size': (3, 331, 331),
|
||||
'pool_size': (11, 11),
|
||||
'crop_pct': 0.911,
|
||||
@ -365,7 +364,6 @@ default_cfgs = generate_default_cfgs({
|
||||
'num_classes': 1000,
|
||||
'first_conv': 'conv_0.conv',
|
||||
'classifier': 'last_linear',
|
||||
'label_offset': 1, # 1001 classes in pretrained weights
|
||||
},
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user