Skip to main content

swin-unetr-mlx

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

Docs · MedMLX

Abdominal CT → multi-organ segmentation.

Abdominal CT → multi-organ segmentation.

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

Apple Silicon · Metal · Python 3.13 / 3.14 · uv

Quick start

uv venv --python 3.13
source .venv/bin/activate
repo="https://github.com/MedMLX/swin-unetr-mlx"
uv pip install \
  "swin-unetr-mlx[conversion] @ git+$repo" \
  huggingface-hub

Download and convert the checkpoint once, then run:

from pathlib import Path

from huggingface_hub import hf_hub_download
from swin_unetr_mlx import convert_checkpoint
from swin_unetr_mlx.medmlx import run

checkpoint = hf_hub_download("MONAI/swin_unetr_btcv_segmentation", "models/model.pt")
convert_checkpoint(Path(checkpoint), Path("model.safetensors"))

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

License

Apache-2.0. See third-party notices. Model weights retain their publisher terms.

For research and education. Outputs require human review.

Metadata

Release files for swin-unetr-mlx 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swin-unetr-mlx 0.2.1
File Size Uploaded Provenance Actions
swin_unetr_mlx-0.2.1.tar.gz 27.2 kB Without provenance Details for swin_unetr_mlx-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for swin-unetr-mlx 0.2.1
File Interpreter ABI Platform Actions
swin_unetr_mlx-0.2.1-py3-none-any.whl Python 3 none any Details for swin_unetr_mlx-0.2.1-py3-none-any.whl

Total release size: 63.9 kB

Release files / swin_unetr_mlx-0.2.1.tar.gz

Download URL swin_unetr_mlx-0.2.1.tar.gz
Size 27.2 kB
Tags Source
SHA-256 checksum
How to use checksums
69ae305006d7064f1fec597a1b55be2da43aba12b09081f736584db80e47aa42
BLAKE2b-256 checksum
How to use checksums
b97f95ff8f9b68112a427a6a1d1309aa48d93920c858c0fb1f25942a1b60b848
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / swin_unetr_mlx-0.2.1-py3-none-any.whl

Download URL swin_unetr_mlx-0.2.1-py3-none-any.whl
Size 36.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e16a573accc085c2cbbc00128deed8a522090cd6cd765a23badad273ce04ec59
BLAKE2b-256 checksum
How to use checksums
5cd9f27daf66d4635bd6e782a553a371fc211b7d8a59721cd9529d30104c06f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for swin-unetr-mlx 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page