See our collection for all versions of RegNet.

Run RegNet with Keras 3: JAX, PyTorch, or TensorFlow

GitHub Docs Collection

zeromodels/regnet-x-320

Paper: Designing Network Design Spaces (arXiv:2003.13678) · HF Papers

RegNet is a family of ConvNets whose per-stage widths and depths follow a simple quantized-linear rule. This is the X variant: a 3x3 stride-2 stem then four stages of 1x1 -> 3x3 grouped -> [SE] -> 1x1 residual blocks. Use as an ImageNet classifier or a 4-stage backbone.

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

Pure-Keras 3 conversion of facebook/regnet-x-320 for zeromodels. One implementation runs unmodified on TensorFlow / Torch / JAX.

This is an image-classification / backbone checkpoint (RegNetImageClassify / RegNetModel).

✨ Quick start

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

from PIL import Image
import numpy as np
from zeromodels.models.regnet import RegNetImageClassify, RegNetModel

model = RegNetImageClassify.from_weights("zeromodels/regnet-x-320")
backbone = RegNetModel.from_weights("zeromodels/regnet-x-320", as_backbone=True)

image = Image.open("your_image.jpg").convert("RGB")
image = image.resize((224, 224))
x = np.asarray(image, dtype="float32")[None]  # (1, H, W, 3)
print(model(x).shape)  # (1, num_classes)
feats = backbone(x)
print(len(feats), [tuple(f.shape) for f in feats])

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

Tips

  • Set KERAS_BACKEND before importing Keras / zeromodels.
  • RegNetImageClassify returns class logits; RegNetModel returns features (as_backbone=True for multi-scale stages at strides 4, 8, 16, 32).
  • Normalization is baked in (include_normalization=True): pass raw [0, 255] pixels.
  • Both channels_last and channels_first are supported (bit-exact); set the format before building.
  • See docs and Loading Weights.
  • Upstream checkpoints: RegNetImageClassify.from_weights("hf:facebook/regnet-x-320").

Special Thanks

A huge thank you to the RegNet authors and the transformers / Hub communities for creating and releasing these models.

License: see YAML license (matches the upstream checkpoint: apache-2.0).

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/regnet-x-320

Finetuned
(1)
this model

Collection including zeromodels/regnet-x-320

Paper for zeromodels/regnet-x-320