From ec3700843208ac89a1cbd0ed5d6f13d1ed8d6095 Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Mon, 27 Jul 2020 11:13:21 -0700 Subject: [PATCH] Add pretrained weight links to CSPNet for cspdarknet53, cspresnext50 --- timm/models/csp.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/timm/models/csp.py b/timm/models/csp.py index 98f0dceb..5b39513d 100644 --- a/timm/models/csp.py +++ b/timm/models/csp.py @@ -28,8 +28,8 @@ __all__ = ['CspNet'] # model_registry will add each entrypoint fn to this def _cfg(url='', **kwargs): return { 'url': url, - 'num_classes': 1000, 'input_size': (3, 224, 224), 'pool_size': (7, 7), - 'crop_pct': 0.875, 'interpolation': 'bilinear', + 'num_classes': 1000, 'input_size': (3, 256, 256), 'pool_size': (7, 7), + 'crop_pct': 0.887, 'interpolation': 'bilinear', 'mean': IMAGENET_DEFAULT_MEAN, 'std': IMAGENET_DEFAULT_STD, 'first_conv': 'stem.conv1.conv', 'classifier': 'head.fc', **kwargs @@ -40,9 +40,13 @@ default_cfgs = { 'cspresnet50': _cfg(url=''), 'cspresnet50d': _cfg(url=''), 'cspresnet50w': _cfg(url=''), - 'cspresnext50': _cfg(url=''), + 'cspresnext50': _cfg( + url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/cspresnext50_ra_224-648b4713.pth', + input_size=(3, 224, 224), crop_pct=0.875 # FIXME I trained this at 224x224, not 256 like ref impl + ), 'cspresnext50_iabn': _cfg(url=''), - 'cspdarknet53': _cfg(url=''), + 'cspdarknet53': _cfg( + url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/cspdarknet53_ra_256-d05c7c21.pth'), 'cspdarknet53_iabn': _cfg(url=''), 'darknet53': _cfg(url=''), }