Downloads · 30 days
21
26% of all-time downloads
zeromodels/tf_efficientnet_b2_in1k
tf_efficientnet_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/efficientnet-6a8eae835b72b040c1fb77b3)
Downloads · 30 days
21
26% of all-time downloads
All-time downloads
82
Public
Repo size
37.6 MB
Likes
0
Public
Click a slice to open those files.
.h537.6 MB · 100%
From the Hugging Face model README
Paper: EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks (arXiv:1905.11946) · HF Papers
EfficientNet compound-scales depth/width/resolution for strong accuracy/efficiency. Classifier or multi-scale MBConv backbone.
For more details on the model, please go to the upstream model card.
Pure-Keras 3 conversion of timm/tf_efficientnet_b2.in1k for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX.
This is an image-classification / backbone checkpoint (EfficientNetImageClassify / EfficientNetModel).
import os
os.environ["KERAS_BACKEND"] = "torch" # or "jax" / "tensorflow"
from PIL import Image
from zeromodels.models.efficientnet import EfficientNetImageClassify, EfficientNetModel, EfficientNetImageProcessor
model = EfficientNetImageClassify.from_weights("zeromodels/tf_efficientnet_b2_in1k")
processor = EfficientNetImageProcessor.from_weights("zeromodels/tf_efficientnet_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 = EfficientNetModel.from_weights("zeromodels/tf_efficientnet_b2_in1k", as_backbone=True)
features = backbone(pixels, training=False)
Load any EfficientNet variant the same way with from_weights("zeromodels/<variant>"):
KERAS_BACKEND before importing Keras / zeromodels.EfficientNetImageClassify returns class logits; EfficientNetModel returns features (as_backbone=True for multi-scale stages).EfficientNetImageClassify.from_weights("hf:timm/tf_efficientnet_b2.in1k").A huge thank you to the EfficientNet authors and the timm / Hub communities for creating and releasing these models.
License: see YAML license (usually matches the upstream checkpoint).