How to use from the
Use from the
Keras library
# Available backend options are: "jax", "torch", "tensorflow".
import os
os.environ["KERAS_BACKEND"] = "jax"

import keras

model = keras.saving.load_model("hf://zeromodels/convnextv2_tiny_fcmae_ft_in22k_in1k")

See our collection for all versions of ConvNeXt-V2.

Run ConvNeXt-V2 with Keras 3: JAX, PyTorch, or TensorFlow

GitHub Docs Collection

zeromodels/convnextv2_tiny_fcmae_ft_in22k_in1k

Paper: ConvNeXt V2: Co-designing and Scaling ConvNets with Masked Autoencoders (arXiv:2301.00808) · HF Papers

ConvNeXt V2 adds Global Response Normalization and FCMAE pretraining. Same classifier / backbone split as ConvNeXt.

For more details on the model, please go to the upstream model card.

Pure-Keras 3 conversion of timm/convnextv2_tiny.fcmae_ft_in22k_in1k for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX.

This is an image-classification / backbone checkpoint (ConvNeXtV2ImageClassify / ConvNeXtV2Model).

✨ Quick start

import os

os.environ["KERAS_BACKEND"] = "torch"  # or "jax" / "tensorflow"

from PIL import Image
from zeromodels.models.convnextv2 import ConvNeXtV2ImageClassify, ConvNeXtV2Model, ConvNeXtV2ImageProcessor

model = ConvNeXtV2ImageClassify.from_weights("zeromodels/convnextv2_tiny_fcmae_ft_in22k_in1k")
processor = ConvNeXtV2ImageProcessor.from_weights("zeromodels/convnextv2_tiny_fcmae_ft_in22k_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 = ConvNeXtV2Model.from_weights("zeromodels/convnextv2_tiny_fcmae_ft_in22k_in1k", as_backbone=True)
features = backbone(pixels, training=False)

Load any ConvNeXt-V2 variant the same way with from_weights("zeromodels/<variant>"):

Variant Hub
convnextv2_atto_fcmae_ft_in1k zeromodels/convnextv2_atto_fcmae_ft_in1k
convnextv2_base_fcmae_ft_in1k zeromodels/convnextv2_base_fcmae_ft_in1k
convnextv2_base_fcmae_ft_in22k_in1k zeromodels/convnextv2_base_fcmae_ft_in22k_in1k
convnextv2_base_fcmae_ft_in22k_in1k_384 zeromodels/convnextv2_base_fcmae_ft_in22k_in1k_384
convnextv2_femto_fcmae_ft_in1k zeromodels/convnextv2_femto_fcmae_ft_in1k
convnextv2_huge_fcmae_ft_in1k zeromodels/convnextv2_huge_fcmae_ft_in1k
convnextv2_huge_fcmae_ft_in22k_in1k_384 zeromodels/convnextv2_huge_fcmae_ft_in22k_in1k_384
convnextv2_huge_fcmae_ft_in22k_in1k_512 zeromodels/convnextv2_huge_fcmae_ft_in22k_in1k_512
convnextv2_large_fcmae_ft_in1k zeromodels/convnextv2_large_fcmae_ft_in1k
convnextv2_large_fcmae_ft_in22k_in1k zeromodels/convnextv2_large_fcmae_ft_in22k_in1k
convnextv2_large_fcmae_ft_in22k_in1k_384 zeromodels/convnextv2_large_fcmae_ft_in22k_in1k_384
convnextv2_nano_fcmae_ft_in1k zeromodels/convnextv2_nano_fcmae_ft_in1k
convnextv2_nano_fcmae_ft_in22k_in1k zeromodels/convnextv2_nano_fcmae_ft_in22k_in1k
convnextv2_nano_fcmae_ft_in22k_in1k_384 zeromodels/convnextv2_nano_fcmae_ft_in22k_in1k_384
convnextv2_pico_fcmae_ft_in1k zeromodels/convnextv2_pico_fcmae_ft_in1k
convnextv2_tiny_fcmae_ft_in1k zeromodels/convnextv2_tiny_fcmae_ft_in1k
convnextv2_tiny_fcmae_ft_in22k_in1k zeromodels/convnextv2_tiny_fcmae_ft_in22k_in1k
convnextv2_tiny_fcmae_ft_in22k_in1k_384 zeromodels/convnextv2_tiny_fcmae_ft_in22k_in1k_384

Tips

  • Set KERAS_BACKEND before importing Keras / zeromodels.
  • ConvNeXtV2ImageClassify returns class logits; ConvNeXtV2Model returns features (as_backbone=True for multi-scale stages).
  • See docs and Loading Weights.
  • Upstream / timm checkpoints: ConvNeXtV2ImageClassify.from_weights("hf:timm/convnextv2_tiny.fcmae_ft_in22k_in1k").

Special Thanks

A huge thank you to the ConvNeXt-V2 authors and the timm / Hub communities for creating and releasing these models.

License: see YAML license (usually matches the upstream checkpoint).

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for zeromodels/convnextv2_tiny_fcmae_ft_in22k_in1k

Finetuned
(2)
this model

Collection including zeromodels/convnextv2_tiny_fcmae_ft_in22k_in1k

Paper for zeromodels/convnextv2_tiny_fcmae_ft_in22k_in1k