Skip to content

Commit d5e7d6b

Browse files
committed
Merge remote-tracking branch 'origin/main' into refactor-imports
2 parents cda39b3 + 0fe9044 commit d5e7d6b

File tree

8 files changed

+207
-112
lines changed

8 files changed

+207
-112
lines changed

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,37 @@ And a big thanks to all GitHub sponsors who helped with some of my costs before
2121

2222
## What's New
2323

24-
# Dec 5, 2022
24+
### 🤗 Survey: Feedback Appreciated 🤗
25+
26+
For a few months now, `timm` has been part of the Hugging Face ecosystem. Yearly, we survey users of our tools to see what we could do better, what we need to continue doing, or what we need to stop doing.
27+
28+
If you have a couple of minutes and want to participate in shaping the future of the ecosystem, please share your thoughts:
29+
[**hf.co/oss-survey**](https://hf.co/oss-survey) 🙏
30+
31+
### Dec 8, 2022
32+
* Add 'EVA l' to `vision_transformer.py`, MAE style ViT-L/14 MIM pretrain w/ EVA-CLIP targets, FT on ImageNet-1k (w/ ImageNet-22k intermediate for some)
33+
* original source: https://github.com/baaivision/EVA
34+
35+
| model | top1 | param_count | gmac | macts | hub |
36+
|:------------------------------------------|-----:|------------:|------:|------:|:----------------------------------------|
37+
| eva_large_patch14_336.in22k_ft_in22k_in1k | 89.2 | 304.5 | 191.1 | 270.2 | [link](https://huggingface.co/BAAI/EVA) |
38+
| eva_large_patch14_336.in22k_ft_in1k | 88.7 | 304.5 | 191.1 | 270.2 | [link](https://huggingface.co/BAAI/EVA) |
39+
| eva_large_patch14_196.in22k_ft_in22k_in1k | 88.6 | 304.1 | 61.6 | 63.5 | [link](https://huggingface.co/BAAI/EVA) |
40+
| eva_large_patch14_196.in22k_ft_in1k | 87.9 | 304.1 | 61.6 | 63.5 | [link](https://huggingface.co/BAAI/EVA) |
41+
42+
### Dec 6, 2022
43+
* Add 'EVA g', BEiT style ViT-g/14 model weights w/ both MIM pretrain and CLIP pretrain to `beit.py`.
44+
* original source: https://github.com/baaivision/EVA
45+
* paper: https://arxiv.org/abs/2211.07636
46+
47+
| model | top1 | param_count | gmac | macts | hub |
48+
|:-----------------------------------------|-------:|--------------:|-------:|--------:|:----------------------------------------|
49+
| eva_giant_patch14_560.m30m_ft_in22k_in1k | 89.8 | 1014.4 | 1906.8 | 2577.2 | [link](https://huggingface.co/BAAI/EVA) |
50+
| eva_giant_patch14_336.m30m_ft_in22k_in1k | 89.6 | 1013 | 620.6 | 550.7 | [link](https://huggingface.co/BAAI/EVA) |
51+
| eva_giant_patch14_336.clip_ft_in1k | 89.4 | 1013 | 620.6 | 550.7 | [link](https://huggingface.co/BAAI/EVA) |
52+
| eva_giant_patch14_224.clip_ft_in1k | 89.1 | 1012.6 | 267.2 | 192.6 | [link](https://huggingface.co/BAAI/EVA) |
53+
54+
### Dec 5, 2022
2555

2656
* Pre-release (`0.8.0dev0`) of multi-weight support (`model_arch.pretrained_tag`). Install with `pip install --pre timm`
2757
* vision_transformer, maxvit, convnext are the first three model impl w/ support
@@ -376,6 +406,7 @@ A full version of the list below with source links can be found in the [document
376406
* MobileNet-V2 - https://arxiv.org/abs/1801.04381
377407
* Single-Path NAS - https://arxiv.org/abs/1904.02877
378408
* TinyNet - https://arxiv.org/abs/2010.14819
409+
* EVA - https://arxiv.org/abs/2211.07636
379410
* GCViT (Global Context Vision Transformer) - https://arxiv.org/abs/2206.09959
380411
* GhostNet - https://arxiv.org/abs/1911.11907
381412
* gMLP - https://arxiv.org/abs/2105.08050

benchmark.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,11 @@
8181
parser.add_argument('--results-format', default='csv', type=str,
8282
help='Format for results file one of (csv, json) (default: csv).')
8383
parser.add_argument('--num-warm-iter', default=10, type=int,
84-
metavar='N', help='Number of warmup iterations (default: 10)')
84+
help='Number of warmup iterations (default: 10)')
8585
parser.add_argument('--num-bench-iter', default=40, type=int,
86-
metavar='N', help='Number of benchmark iterations (default: 40)')
86+
help='Number of benchmark iterations (default: 40)')
87+
parser.add_argument('--device', default='cuda', type=str,
88+
help="device to run benchmark on")
8789

8890
# common inference / train args
8991
parser.add_argument('--model', '-m', metavar='NAME', default='resnet50',

tests/test_models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
'vit_*', 'tnt_*', 'pit_*', 'swin_*', 'coat_*', 'cait_*', '*mixer_*', 'gmlp_*', 'resmlp_*', 'twins_*',
2828
'convit_*', 'levit*', 'visformer*', 'deit*', 'jx_nest_*', 'nest_*', 'xcit_*', 'crossvit_*', 'beit*',
2929
'poolformer_*', 'volo_*', 'sequencer2d_*', 'swinv2_*', 'pvt_v2*', 'mvitv2*', 'gcvit*', 'efficientformer*',
30-
'coatnet*', 'coatnext*', 'maxvit*', 'maxxvit*',
30+
'coatnet*', 'coatnext*', 'maxvit*', 'maxxvit*', 'eva_*'
3131
]
3232
NUM_NON_STD = len(NON_STD_FILTERS)
3333

@@ -39,7 +39,7 @@
3939
'*nfnet_f3*', '*nfnet_f4*', '*nfnet_f5*', '*nfnet_f6*', '*nfnet_f7*', '*efficientnetv2_xl*',
4040
'*resnetrs350*', '*resnetrs420*', 'xcit_large_24_p8*', 'vit_huge*', 'vit_gi*', 'swin*huge*',
4141
'swin*giant*']
42-
NON_STD_EXCLUDE_FILTERS = ['vit_huge*', 'vit_gi*', 'swin*giant*']
42+
NON_STD_EXCLUDE_FILTERS = ['vit_huge*', 'vit_gi*', 'swin*giant*', 'eva_giant*']
4343
else:
4444
EXCLUDE_FILTERS = []
4545
NON_STD_EXCLUDE_FILTERS = ['vit_gi*']

timm/models/_pretrained.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,11 @@ def to_dict(self, remove_source=False, remove_null=True):
6262

6363
def filter_pretrained_cfg(cfg, remove_source=False, remove_null=True):
6464
filtered_cfg = {}
65+
keep_none = {'pool_size', 'first_conv', 'classifier'} # always keep these keys, even if none
6566
for k, v in cfg.items():
6667
if remove_source and k in {'url', 'file', 'hf_hub_id', 'hf_hub_id', 'hf_hub_filename', 'source'}:
6768
continue
68-
if remove_null and v is None:
69+
if remove_null and v is None and k not in keep_none:
6970
continue
7071
filtered_cfg[k] = v
7172
return filtered_cfg

0 commit comments

Comments
 (0)