ILSVRC/imagenet-1k
Viewer โข Updated โข 1.43M โข 102k โข 1.2k
Run mlx-vision/regnet_y_1_6gf-mlxim on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/mlx-vision/regnet_y_1_6gf-mlxim. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/mlx-vision/regnet_y_1_6gf-mlxim on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use mlx-vision/regnet_y_1_6gf-mlxim with mlx-image:
from mlxim.model import create_model
model = create_model("regnet_y_1_6gf")How to use mlx-vision/regnet_y_1_6gf-mlxim with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download mlx-vision/regnet_y_1_6gf-mlxim --local-dir regnet_y_1_6gf-mlxim
A RegNetY-1.6GF image classification model. Pretrained in ImageNet by torchvision contributors (see ImageNet1K-V2 weight details https://github.com/pytorch/vision/issues/3995#new-recipe).
Disclaimer: This is a porting of the torch model weights to Apple MLX Framework.
pip install mlx-image
Here is how to use this model for image classification:
from mlxim.model import create_model
from mlxim.io import read_rgb
from mlxim.transform import ImageNetTransform
transform = ImageNetTransform(train=False, img_size=224)
x = transform(read_rgb("cat.png"))
x = mx.expand_dims(x, 0)
model = create_model("regnet_y_1_6gf")
model.eval()
logits = model(x)
You can also use the embeds from layer before head:
from mlxim.model import create_model
from mlxim.io import read_rgb
from mlxim.transform import ImageNetTransform
transform = ImageNetTransform(train=False, img_size=224)
x = transform(read_rgb("cat.png"))
x = mx.expand_dims(x, 0)
# first option
model = create_model("regnet_y_1_6gf", num_classes=0)
model.eval()
embeds = model(x)
# second option
model = create_model("regnet_y_1_6gf")
model.eval()
embeds = model.get_features(x)
Quantized