From f18243409b12c09e2dcfa9badcd12f8be2e0ec2c Mon Sep 17 00:00:00 2001 From: Muhammad Maaz Date: Thu, 28 Jul 2022 13:28:35 +0400 Subject: [PATCH 1/2] Adds EdgeNeXt Base model (18.5M params). --- models/model.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/models/model.py b/models/model.py index 33af6bf..7c5e3ee 100644 --- a/models/model.py +++ b/models/model.py @@ -66,6 +66,24 @@ def edgenext_small(pretrained=False, **kwargs): return model +@register_model +def edgenext_base(pretrained=False, **kwargs): + # 18.51M & 3840.93M @ 256 resolution + # 82.5% (normal) 83.7% (USI) Top-1 accuracy + # AA=True, Mixup & Cutmix, DropPath=0.1, BS=4096, lr=0.006, multi-scale-sampler + # Jetson FPS=xx.xx versus xx.xx for MobileViT_S + # For A100: FPS @ BS=1: xxx.xx & @ BS=256: xxxx.xx + model = EdgeNeXt(depths=[3, 3, 9, 3], dims=[80, 160, 288, 584], expan_ratio=4, + global_block=[0, 1, 1, 1], + global_block_type=['None', 'SDTA', 'SDTA', 'SDTA'], + use_pos_embd_xca=[False, True, False, False], + kernel_sizes=[3, 5, 7, 9], + d2_scales=[2, 2, 3, 4], + **kwargs) + + return model + + """ Using BN & HSwish instead of LN & GeLU """ From ad56a89aca8ed5ce2b2d2f169e8e4205a0411301 Mon Sep 17 00:00:00 2001 From: Muhammad Maaz Date: Thu, 28 Jul 2022 14:06:57 +0400 Subject: [PATCH 2/2] Updates README.md --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cccf6d6..95c849c 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,10 @@ and [Fahad Shahbaz Khan](https://scholar.google.es/citations?user=zvaeYnUAAAAJ&h [![slides](https://img.shields.io/badge/Presentation-Slides-B762C1)](https://mbzuaiac-my.sharepoint.com/:b:/g/personal/muhammad_maaz_mbzuai_ac_ae/EaFA4bSPEMBNlJuHMbKDD3UBHmwXrmpijSRqZITk2l1-wQ?e=b7ruLV) ## :rocket: News +* **(Jul 28, 2022)** + * EdgeNeXt-B model is released. It achieves 82.5% top-1 ImageNet-1K accuracy with 18.51M parameters and 3.84G MAdds. + Further, using USI (https://arxiv.org/abs/2204.03475) training recipe, the same model achieves 83.7% accuracy. + * **(Jun 28, 2022)** * EdgeNeXt-S model trained using USI (https://arxiv.org/abs/2204.03475) is released. It achieves 81.1% top-1 ImageNet-1K accuracy with only 5.59M parameters and 1.26G MAdds. @@ -32,6 +36,8 @@ and [Fahad Shahbaz Khan](https://scholar.google.es/citations?user=zvaeYnUAAAAJ&h | Name |Acc@1 | #Params | MAdds | Model | |---|:---:|:---:| :---:|:---:| +| edgenext_base_usi | 83.68 | 18.51M | 3.84G | [model](https://github.com/mmaaz60/EdgeNeXt/releases/download/v1.2/edgenext_base_usi.pth) +| edgenext_base | 82.47 | 18.51M | 3.84G | [model](https://github.com/mmaaz60/EdgeNeXt/releases/download/v1.2/edgenext_base.pth) | edgenext_small_usi | 81.07 | 5.59M | 1.26G | [model](https://github.com/mmaaz60/EdgeNeXt/releases/download/v1.1/edgenext_small_usi.pth) | edgenext_small | 79.41 | 5.59M | 1.26G | [model](https://github.com/mmaaz60/EdgeNeXt/releases/download/v1.0/edgenext_small.pth) | edgenext_x_small | 74.96 | 2.34M | 538M | [model](https://github.com/mmaaz60/EdgeNeXt/releases/download/v1.0/edgenext_x_small.pth) @@ -102,7 +108,7 @@ This should give, Acc@1 79.412 Acc@5 94.512 loss 0.881 ``` -###### Note: For evaluating the USI model, please set `usi_eval True`. +##### Note: For evaluating the USI model, please set `usi_eval True`.