mlx-vision/vit_large_patch14_518.dinov2-mlxim
Image Classification
•
Updated
•
47
•
1
Apple ml-explore Computer Vision community
A community org for model weights compatible with mlxim
powered by MLX.
GitHub link: https://github.com/riccardomusmeci/mlx-image
These are weights converted from timm/torchvision and ready to be used.
pip install mlx-image
To load a model with pre-trained weights:
from mlxim.model import create_model
# loading weights from HuggingFace (https://huggingface.co/mlx-vision/resnet18-mlxim)
model = create_model("resnet18") # pretrained weights loaded from HF
# loading weights from another HuggingFace model
model = create_model("resnet18", weights="hf://repo_id/filename")
# loading weights from local file
model = create_model("resnet18", weights="path/to/resnet18/model.npz")
Go to https://github.com/riccardomusmeci/mlx-image/blob/main/results/results-imagenet-1k.csv to check every model converted and its performance on ImageNet-1K with different settings.
TL;DR performance is comparable to the original models from PyTorch implementations.
More models will be uploaded aligned with MLX improvement by the Apple team.