Downloads · 30 days
19
20% of all-time downloads
zeromodels/tf_efficientnetv2_b2_in1k
tf_efficientnetv2_b2_in1k is a image classification model from zeromodels. Use it when you need a label for an image. It is set up for zeromodels. The card lists the license as apache-2.0.
[](https://github.com/IMvision12/ZeroModels) [](https://imvision12.github.io/ZeroModels/classificationbackbones/) [](https://huggingface.co/collections/zeromodels/efficientnetv2-6a8eae77918224be1104752f)
Downloads · 30 days
19
20% of all-time downloads
All-time downloads
94
Public
Repo size
41.6 MB
Likes
0
Public
Click a slice to open those files.
.h541.6 MB · 100%
From the Hugging Face model README
Paper: EfficientNetV2: Smaller Models and Faster Training (arXiv:2104.00298) · HF Papers
EfficientNetV2 trains faster with Fused-MBConv and progressive learning. Same ImageClassify / Model API as EfficientNet.
For more details on the model, please go to the upstream model card.
Pure-Keras 3 conversion of timm/tf_efficientnetv2_b2.in1k for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX.
This is an image-classification / backbone checkpoint (EfficientNetV2ImageClassify / EfficientNetV2Model).
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
from PIL import Image
from zeromodels.models.efficientnetv2 import EfficientNetV2ImageClassify, EfficientNetV2Model, EfficientNetV2ImageProcessor
model = EfficientNetV2ImageClassify.from_weights("zeromodels/tf_efficientnetv2_b2_in1k")
processor = EfficientNetV2ImageProcessor.from_weights("zeromodels/tf_efficientnetv2_b2_in1k")
image = Image.open("your_image.jpg").convert("RGB")
pixels = processor(image) # resize + normalize (normalization lives in the processor)
logits = model(pixels, training=False)
print(logits.shape) # (1, num_classes)
# Feature extraction: the backbone without the classifier head
backbone = EfficientNetV2Model.from_weights("zeromodels/tf_efficientnetv2_b2_in1k", as_backbone=True)
features = backbone(pixels, training=False)
Load any EfficientNetV2 variant the same way with from_weights("zeromodels/<variant>"):
KERAS_BACKEND before importing Keras / zeromodels.EfficientNetV2ImageClassify returns class logits; EfficientNetV2Model returns features (as_backbone=True for multi-scale stages).EfficientNetV2ImageClassify.from_weights("hf:timm/tf_efficientnetv2_b2.in1k").A huge thank you to the EfficientNetV2 authors and the timm / Hub communities for creating and releasing these models.
License: see YAML license (usually matches the upstream checkpoint).