mirror of
https://github.com/huggingface/pytorch-image-models.git
synced 2025-06-03 15:01:08 +08:00
Some fixes
This commit is contained in:
parent
3386af8c86
commit
528faa0e04
@ -961,10 +961,10 @@ default_cfgs = generate_default_cfgs({
|
|||||||
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/efficientnet_b4_ra2_320-7eb33cd5.pth',
|
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/efficientnet_b4_ra2_320-7eb33cd5.pth',
|
||||||
hf_hub_id='timm/',
|
hf_hub_id='timm/',
|
||||||
input_size=(3, 320, 320), pool_size=(10, 10), test_input_size=(3, 384, 384), crop_pct=1.0),
|
input_size=(3, 320, 320), pool_size=(10, 10), test_input_size=(3, 384, 384), crop_pct=1.0),
|
||||||
'efficientnet_b5.in12k_ft_in1k': _cfg(
|
'efficientnet_b5.sw_in12k_ft_in1k': _cfg(
|
||||||
hf_hub_id='timm/',
|
hf_hub_id='timm/',
|
||||||
input_size=(3, 448, 448), pool_size=(14, 14), crop_pct=1.0, crop_mode='squash'),
|
input_size=(3, 448, 448), pool_size=(14, 14), crop_pct=1.0, crop_mode='squash'),
|
||||||
'efficientnet_b5.in12k': _cfg(
|
'efficientnet_b5.sw_in12k': _cfg(
|
||||||
hf_hub_id='timm/',
|
hf_hub_id='timm/',
|
||||||
input_size=(3, 416, 416), pool_size=(13, 13), crop_pct=0.95, num_classes=11821),
|
input_size=(3, 416, 416), pool_size=(13, 13), crop_pct=0.95, num_classes=11821),
|
||||||
'efficientnet_b6.untrained': _cfg(
|
'efficientnet_b6.untrained': _cfg(
|
||||||
@ -1197,27 +1197,27 @@ default_cfgs = generate_default_cfgs({
|
|||||||
|
|
||||||
'tf_efficientnet_b0.in1k': _cfg(
|
'tf_efficientnet_b0.in1k': _cfg(
|
||||||
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b0-0af12548.pth',
|
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b0-0af12548.pth',
|
||||||
hf_hub_id='timm/',
|
#hf_hub_id='timm/',
|
||||||
input_size=(3, 224, 224)),
|
input_size=(3, 224, 224)),
|
||||||
'tf_efficientnet_b1.in1k': _cfg(
|
'tf_efficientnet_b1.in1k': _cfg(
|
||||||
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b1-5c1377c4.pth',
|
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b1-5c1377c4.pth',
|
||||||
hf_hub_id='timm/',
|
#hf_hub_id='timm/',
|
||||||
input_size=(3, 240, 240), pool_size=(8, 8), crop_pct=0.882),
|
input_size=(3, 240, 240), pool_size=(8, 8), crop_pct=0.882),
|
||||||
'tf_efficientnet_b2.in1k': _cfg(
|
'tf_efficientnet_b2.in1k': _cfg(
|
||||||
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b2-e393ef04.pth',
|
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b2-e393ef04.pth',
|
||||||
hf_hub_id='timm/',
|
#hf_hub_id='timm/',
|
||||||
input_size=(3, 260, 260), pool_size=(9, 9), crop_pct=0.890),
|
input_size=(3, 260, 260), pool_size=(9, 9), crop_pct=0.890),
|
||||||
'tf_efficientnet_b3.in1k': _cfg(
|
'tf_efficientnet_b3.in1k': _cfg(
|
||||||
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b3-e3bd6955.pth',
|
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b3-e3bd6955.pth',
|
||||||
hf_hub_id='timm/',
|
#hf_hub_id='timm/',
|
||||||
input_size=(3, 300, 300), pool_size=(10, 10), crop_pct=0.904),
|
input_size=(3, 300, 300), pool_size=(10, 10), crop_pct=0.904),
|
||||||
'tf_efficientnet_b4.in1k': _cfg(
|
'tf_efficientnet_b4.in1k': _cfg(
|
||||||
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b4-74ee3bed.pth',
|
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b4-74ee3bed.pth',
|
||||||
hf_hub_id='timm/',
|
#hf_hub_id='timm/',
|
||||||
input_size=(3, 380, 380), pool_size=(12, 12), crop_pct=0.922),
|
input_size=(3, 380, 380), pool_size=(12, 12), crop_pct=0.922),
|
||||||
'tf_efficientnet_b5.in1k': _cfg(
|
'tf_efficientnet_b5.in1k': _cfg(
|
||||||
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b5-c6949ce9.pth',
|
url='https://github.com/huggingface/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b5-c6949ce9.pth',
|
||||||
hf_hub_id='timm/',
|
#hf_hub_id='timm/',
|
||||||
input_size=(3, 456, 456), pool_size=(15, 15), crop_pct=0.934),
|
input_size=(3, 456, 456), pool_size=(15, 15), crop_pct=0.934),
|
||||||
|
|
||||||
|
|
||||||
|
@ -815,6 +815,7 @@ class HighResolutionNetFeatures(HighResolutionNet):
|
|||||||
drop_rate=0.0,
|
drop_rate=0.0,
|
||||||
feature_location='incre',
|
feature_location='incre',
|
||||||
out_indices=(0, 1, 2, 3, 4),
|
out_indices=(0, 1, 2, 3, 4),
|
||||||
|
**kwargs,
|
||||||
):
|
):
|
||||||
assert feature_location in ('incre', '')
|
assert feature_location in ('incre', '')
|
||||||
super(HighResolutionNetFeatures, self).__init__(
|
super(HighResolutionNetFeatures, self).__init__(
|
||||||
@ -825,6 +826,7 @@ class HighResolutionNetFeatures(HighResolutionNet):
|
|||||||
global_pool=global_pool,
|
global_pool=global_pool,
|
||||||
drop_rate=drop_rate,
|
drop_rate=drop_rate,
|
||||||
head=feature_location,
|
head=feature_location,
|
||||||
|
**kwargs,
|
||||||
)
|
)
|
||||||
self.feature_info = FeatureInfo(self.feature_info, out_indices)
|
self.feature_info = FeatureInfo(self.feature_info, out_indices)
|
||||||
self._out_idx = {i for i in out_indices}
|
self._out_idx = {i for i in out_indices}
|
||||||
|
@ -139,8 +139,8 @@ default_cfgs = generate_default_cfgs({
|
|||||||
'res2net50_26w_8s.in1k': _cfg(hf_hub_id='timm/'),
|
'res2net50_26w_8s.in1k': _cfg(hf_hub_id='timm/'),
|
||||||
'res2net101_26w_4s.in1k': _cfg(hf_hub_id='timm/'),
|
'res2net101_26w_4s.in1k': _cfg(hf_hub_id='timm/'),
|
||||||
'res2next50.in1k': _cfg(hf_hub_id='timm/'),
|
'res2next50.in1k': _cfg(hf_hub_id='timm/'),
|
||||||
'res2net50d.in1k': _cfg(hf_hub_id='timm/'),
|
'res2net50d.in1k': _cfg(hf_hub_id='timm/', first_conv='conv1.0'),
|
||||||
'res2net101d.in1k': _cfg(hf_hub_id='timm/'),
|
'res2net101d.in1k': _cfg(hf_hub_id='timm/', first_conv='conv1.0'),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -477,7 +477,7 @@ def _cfg(url='', **kwargs):
|
|||||||
'num_classes': 1000, 'input_size': (3, 224, 224), 'pool_size': None,
|
'num_classes': 1000, 'input_size': (3, 224, 224), 'pool_size': None,
|
||||||
'crop_pct': DEFAULT_CROP_PCT, 'interpolation': 'bicubic', 'fixed_input_size': True,
|
'crop_pct': DEFAULT_CROP_PCT, 'interpolation': 'bicubic', 'fixed_input_size': True,
|
||||||
'mean': IMAGENET_DEFAULT_MEAN, 'std': IMAGENET_DEFAULT_STD,
|
'mean': IMAGENET_DEFAULT_MEAN, 'std': IMAGENET_DEFAULT_STD,
|
||||||
'first_conv': 'stem.proj', 'classifier': 'head',
|
'first_conv': 'stem.proj', 'classifier': 'head.fc',
|
||||||
**kwargs
|
**kwargs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,7 +248,7 @@ default_cfgs = generate_default_cfgs({
|
|||||||
|
|
||||||
@register_model
|
@register_model
|
||||||
def legacy_xception(pretrained=False, **kwargs):
|
def legacy_xception(pretrained=False, **kwargs):
|
||||||
return _xception('xception', pretrained=pretrained, **kwargs)
|
return _xception('legacy_xception', pretrained=pretrained, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
register_model_deprecations(__name__, {
|
register_model_deprecations(__name__, {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user