From a2c14c20642c464dcd28ebe5cd66b945d8fa47f4 Mon Sep 17 00:00:00 2001 From: Ross Wightman Date: Wed, 11 Jan 2023 14:50:39 -0800 Subject: [PATCH] Add tiny/small in12k pretrained and fine-tuned ConvNeXt models --- README.md | 6 ++++++ timm/models/convnext.py | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/README.md b/README.md index e52996f5..ee07c368 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,12 @@ And a big thanks to all GitHub sponsors who helped with some of my costs before * ❗Updates after Oct 10, 2022 are available in 0.8.x pre-releases (`pip install --pre timm`) or cloning main❗ * Stable releases are 0.6.x and available by normal pip install or clone from [0.6.x](https://github.com/rwightman/pytorch-image-models/tree/0.6.x) branch. +### Jan 11, 2023 +* Update ConvNeXt ImageNet-12k pretrain series w/ two new fine-tuned weights (and pre FT `.in12k` tags) + * `convnext_nano.in12k_ft_in1k` - 82.3 @ 224, 82.9 @ 288 (previously released) + * `convnext_tiny.in12k_ft_in1k` - 84.2 @ 224, 84.5 @ 288 + * `convnext_small.in12k_ft_in1k` - 85.2 @ 224, 85.3 @ 288 + ### Jan 6, 2023 * Finally got around to adding `--model-kwargs` and `--opt-kwargs` to scripts to pass through rare args directly to model classes from cmd line * `train.py /imagenet --model resnet50 --amp --model-kwargs output_stride=16 act_layer=silu` diff --git a/timm/models/convnext.py b/timm/models/convnext.py index 11c061f6..26a3d560 100644 --- a/timm/models/convnext.py +++ b/timm/models/convnext.py @@ -478,10 +478,22 @@ default_cfgs = generate_default_cfgs({ url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-rsb-weights/convnext_tiny_hnf_a2h-ab7e9df2.pth', hf_hub_id='timm/', crop_pct=0.95, test_input_size=(3, 288, 288), test_crop_pct=1.0), + 'convnext_tiny.in12k_ft_in1k': _cfg( + hf_hub_id='timm/', + crop_pct=0.95, test_input_size=(3, 288, 288), test_crop_pct=1.0), + 'convnext_small.in12k_ft_in1k': _cfg( + hf_hub_id='timm/', + crop_pct=0.95, test_input_size=(3, 288, 288), test_crop_pct=1.0), 'convnext_nano.in12k': _cfg( hf_hub_id='timm/', crop_pct=0.95, num_classes=11821), + 'convnext_tiny.in12k': _cfg( + hf_hub_id='timm/', + crop_pct=0.95, num_classes=11821), + 'convnext_small.in12k': _cfg( + hf_hub_id='timm/', + crop_pct=0.95, num_classes=11821), 'convnext_tiny.fb_in1k': _cfg( url="https://dl.fbaipublicfiles.com/convnext/convnext_tiny_1k_224_ema.pth",