README / README.md
riccardomusmeci's picture
Update README.md
4bac1da verified
---
title: README
emoji:
colorFrom: blue
colorTo: green
sdk: static
pinned: false
---
# 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:
```python
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.safetensors")
```
## 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.