Metadata-Version: 2.5
Name: swin-unetr-mlx
Version: 0.2.3
Summary: Native FP32 MLX SwinUNETR for macOS Apple Silicon with Metal
Project-URL: Homepage, https://huggingface.co/MedMLX/swin-unetr-mlx
Author: Joseph Sandoval, Alfredo Sandoval Jr.
License-Expression: Apache-2.0
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.md
Classifier: Operating System :: MacOS :: MacOS X
Requires-Python: <3.15,>=3.13
Requires-Dist: medmlx-core==0.2.5
Requires-Dist: nibabel<6,>=5.3
Requires-Dist: numpy<3,>=2.0
Requires-Dist: simpleitk<3,>=2.4
Provides-Extra: dev
Requires-Dist: hypothesis<7,>=6.140; extra == 'dev'
Requires-Dist: pyright==1.1.414; extra == 'dev'
Requires-Dist: pytest<10,>=8.4; extra == 'dev'
Requires-Dist: ruff<1,>=0.13; extra == 'dev'
Requires-Dist: torch<2.14,>=2.13; extra == 'dev'
Description-Content-Type: text/markdown

# swin-unetr-mlx

Segment 13 abdominal organs in CT with MONAI SwinUNETR and native MLX.

[Model weights](https://huggingface.co/MedMLX/swin-unetr-mlx)

| Input | Output |
| :--- | :--- |
| 3D abdominal CT · NIfTI | Organ mask on the input grid |

**Apple Silicon · Metal · Python 3.13 / 3.14** · [uv](https://docs.astral.sh/uv/)

## Quick start

```bash
uv venv --python 3.13
source .venv/bin/activate
uv pip install "swin-unetr-mlx>=0.2.3"
```

```python
from swin_unetr_mlx.medmlx import run

result = run(image_path="ct.nii.gz", output_dir="out")
print(result["outputs"]["mask"])
```

Omitting `weights_path` downloads `MedMLX/swin-unetr-mlx` once and reuses its local cache.
An explicit model folder contains `swinunetr.safetensors`; standalone checkpoint-file
paths are still accepted.

Downloaded commits are returned in `details.weights_revision`; explicit local
weights report `null` unless the folder carries a MedMLX download revision.

## License

Apache-2.0; license and third-party notices are included in the distribution. Model weights retain their publisher terms.

For research and education. Outputs require human review.
