Instructions to use MedMLX/radimagenet-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use MedMLX/radimagenet-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download MedMLX/radimagenet-mlx --local-dir radimagenet-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
RadImageNet encoders for MLX
Four RadImageNet pretrained image encoders in native MLX safetensors format for Apple Silicon:
| Architecture | File |
|---|---|
| ResNet50 | RadImageNet-ResNet50_notop.safetensors |
| DenseNet121 | RadImageNet-DenseNet121_notop.safetensors |
| InceptionV3 | RadImageNet-InceptionV3_notop.safetensors |
| InceptionResNetV2 | RadImageNet-IRV2_notop.safetensors |
The files contain float32 weights and declarative graph configuration. They omit classification heads and provide spatial and pooled features. Use them with radimagenet-mlx.
Quick start
uv venv --python 3.13
source .venv/bin/activate
uv pip install "radimagenet-mlx>=0.3.3"
uv tool install huggingface-hub
hf download MedMLX/radimagenet-mlx --revision 5ac989a6807e07d7be5638ba830f4aa5d6cf2ff3 --local-dir models
Replace the example input paths with your own files.
from radimagenet_mlx.medmlx import resnet50
result = resnet50(
image_path='image.png',
weights_path='models',
output_dir='outputs',
)
print(result["outputs"])
densenet121, inceptionv3 and inceptionresnetv2 take the same arguments.
Provenance and terms
These are conversions of the four pretrained Keras models distributed by the official RadImageNet project in its linked model archive. RadImageNet is by Xueyan Mei and colleagues at the BioMedical Engineering and Imaging Institute, Icahn School of Medicine at Mount Sinai, and collaborators. The converted weights follow the upstream project's MIT license. The license and BMEII-AI copyright notice are reproduced in SOURCE_LICENSE. Retain these notices when redistributing the weights.
Validation and intended use
On synthetic 224 ร 224 inputs, all four converted models were compared with their corresponding original Keras models. Spatial and pooled outputs passed the recorded numerical tolerances; the converted MLX outputs were identical to the original HDF5-loaded MLX outputs. These checks do not establish clinical accuracy or fitness for clinical use. Intended for research and education.
Citation
If you use MedMLX, please cite the MedMLX paper:
@article{sandoval2026medmlx,
title = {MedMLX: On-Device Medical Imaging AI for Apple Silicon},
author = {Sandoval, A. and Sandoval, J. and Saleem, A.},
journal = {medRxiv},
year = {2026},
doi = {10.64898/2026.10.28.26366762}
}
Quantized