Back to Trending
Modelimage-classification
timm

timm/efficientnetv2_rw_s.ra2_in1k

Model card for efficientnetv2rws.ra2in1k A EfficientNet-v2 image classification model. This is a timm specific variation of the architecture. Trained on ImageNet-1k in timm using recipe template described below. Recipe details: RandAugment RA2 recip...

1likes
1.4Mdownloads
5views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: timm

#1 Repository of the day

1
TINIX TRENDING·Topic: arxiv:2104.00298

#1 Repository of the day

1
TINIX TRENDING·Topic: dataset:imagenet-1k

#1 Repository of the day

Model card for efficientnetv2_rw_s.ra2_in1k

A EfficientNet-v2 image classification model. This is a timm specific variation of the architecture. Trained on ImageNet-1k in timm using recipe template described below.

Recipe details:

  • RandAugment RA2 recipe. Inspired by and evolved from EfficientNet RandAugment recipes. Published as B recipe in ResNet Strikes Back.
  • RMSProp (TF 1.0 behaviour) optimizer, EMA weight averaging
  • Step (exponential decay w/ staircase) LR schedule with warmup

Model Details

Model Usage

Image Classification

from urllib.request import urlopen
from PIL import Image
import timm

img = Image.open(urlopen(
    'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))

model = timm.create_model('efficientnetv2_rw_s.ra2_in1k', pretrained=True)
model = model.eval()

# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)

output = model(transforms(img).unsqueeze(0))  # unsqueeze single image into batch of 1

top5_probabilities, top5_class_indices = torch.topk(output.softmax(dim=1) * 100, k=5)

Feature Map Extraction

from urllib.request import urlopen
from PIL import Image
import timm

img = Image.open(urlopen(
    'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))

model = timm.create_model(
    'efficientnetv2_rw_s.ra2_in1k',
    pretrained=True,
    features_only=True,
)
model = model.eval()

# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)

output = model(transforms(img).unsqueeze(0))  # unsqueeze single image into batch of 1

for o in output:
    # print shape of each feature map in output
    # e.g.:
    #  torch.Size([1, 24, 144, 144])
    #  torch.Size([1, 48, 72, 72])
    #  torch.Size([1, 64, 36, 36])
    #  torch.Size([1, 160, 18, 18])
    #  torch.Size([1, 272, 9, 9])

    print(o.shape)

Image Embeddings

from urllib.request import urlopen
from PIL import Image
import timm

img = Image.open(urlopen(
    'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/beignets-task-guide.png'
))

model = timm.create_model(
    'efficientnetv2_rw_s.ra2_in1k',
    pretrained=True,
    num_classes=0,  # remove classifier nn.Linear
)
model = model.eval()

# get model specific transforms (normalization, resize)
data_config = timm.data.resolve_model_data_config(model)
transforms = timm.data.create_transform(**data_config, is_training=False)

output = model(transforms(img).unsqueeze(0))  # output is (batch_size, num_features) shaped tensor

# or equivalently (without needing to set num_classes=0)

output = model.forward_features(transforms(img).unsqueeze(0))
# output is unpooled, a (1, 1792, 9, 9) shaped tensor

output = model.forward_head(output, pre_logits=True)
# output is a (1, num_features) shaped tensor

Model Comparison

Explore the dataset and runtime metrics of this model in timm model results.

Citation

@inproceedings{tan2021efficientnetv2,
  title={Efficientnetv2: Smaller models and faster training},
  author={Tan, Mingxing and Le, Quoc},
  booktitle={International conference on machine learning},
  pages={10096--10106},
  year={2021},
  organization={PMLR}
}
@misc{rw2019timm,
  author = {Ross Wightman},
  title = {PyTorch Image Models},
  year = {2019},
  publisher = {GitHub},
  journal = {GitHub repository},
  doi = {10.5281/zenodo.4414861},
  howpublished = {\url{https://github.com/huggingface/pytorch-image-models}}
}
@inproceedings{wightman2021resnet,
  title={ResNet strikes back: An improved training procedure in timm},
  author={Wightman, Ross and Touvron, Hugo and Jegou, Herve},
  booktitle={NeurIPS 2021 Workshop on ImageNet: Past, Present, and Future}
}

Similar Projects

Discover other similar projects and AI models.

Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026
Modelimage-classification
timm/mobilenetv3_small_100.lamb_in1k

Model card for mobilenetv3small100.lambin1k A MobileNet-v3 image classification model. Trained on ImageNet-1k in timm using recipe template described below. Recipe details: A LAMB optimizer based recipe that is similar to ResNet Strikes Back(https:/...

♥0
4.0M
Oct 30, 2026
Modelimage-classification
timm/tf_efficientnetv2_s.in21k_ft_in1k

Model card for tfefficientnetv2s.in21kftin1k A EfficientNet-v2 image classification model. Trained on ImageNet-21k and fine-tuned on ImageNet-1k in Tensorflow by paper authors, ported to PyTorch by Ross Wightman. Model Details - Model Type: Image cl...

♥0
2.8M
Jan 21, 2025
Modelimage-classification
google/vit-base-patch16-224

Vision Transformer (base-sized model) Vision Transformer (ViT) model pre-trained on ImageNet-21k (14 million images, 21,843 classes) at resolution 224x224, and fine-tuned on ImageNet 2012 (1 million images, 1,000 classes) at resolution 224x224. It w...

♥0
11.8M
Sep 5, 2023
Modelimage-classification
timm/resnet18.a1_in1k

Model card for resnet18.a1in1k A ResNet-B image classification model. This model features: ReLU activations single layer 7x7 convolution with pooling 1x1 convolution shortcut downsample Trained on ImageNet-1k in timm using recipe template described...

♥0
1.8M
Jan 21, 2025
Modelimage-classification
timm/resnet50.a1_in1k

Model card for resnet50.a1in1k A ResNet-B image classification model. This model features: ReLU activations single layer 7x7 convolution with pooling 1x1 convolution shortcut downsample Trained on ImageNet-1k in timm using recipe template described...

♥0
1.5M
Jul 11, 2025
Modeltext-ranking
cross-encoder/ms-marco-MiniLM-L6-v2

Cross-Encoder for MS Marco This model was trained on the MS Marco Passage Ranking(https://github.com/microsoft/MSMARCO-Passage-Ranking) task. The model can be used for Information Retrieval: Given a query, encode the query will all possible passages...

♥0
52.2M
Aug 9, 2026
Modelfill-mask
google-bert/bert-base-uncased

BERT base model (uncased) Pretrained model on English language using a masked language modeling (MLM) objective. It was introduced in this paper(https://arxiv.org/abs/1810.04805) and first released in this repository(https://github.com/google-resear...

♥0
32.4M
Feb 19, 2024
Modelsentence-similarity
sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2

sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic se...

♥0
24.4M
Jan 28, 2026