MLX Vision

community

AI & ML interests

Apple ml-explore Computer Vision community

MLX Vision

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.

How to install

pip install mlx-image

Models

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")

ImageNet-1K Results

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.