Scan your whole stack
Are you using swin-unetr-mlx?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.4.1
swin-unetr-mlx was last scanned on 27 Nov 2026 at version 0.4.1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.4.1 LATEST | 27 Nov 2026 | No rules fired |
| 0.4.0 | 23 Nov 2026 | No rules fired |
| 0.3.0 | 15 Nov 2026 | No rules fired |
| 0.2.7 | 7 Nov 2026 | Not shown |
| 0.2.6 | 1 Nov 2026 | Not shown |
Findings for v0.4.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.4.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Segment 13 abdominal organs in CT with MONAI SwinUNETR and native MLX.
| Input | Output |
|---|---|
| 3D abdominal CT · NIfTI | Organ mask on the input grid |
| Model | Weights download | Peak MLX memory | Measured on |
|---|---|---|---|
swin-unetr |
253 MB | 7.4 GB | 768×768×101 abdominal CT |
uv venv --python 3.13
source .venv/bin/activate
uv pip install "swin-unetr-mlx>=0.4.1"
from swin_unetr_mlx import run
result = run(image_path="ct.nii.gz", output_dir="out")
print(result["outputs"]["mask"])
Weights download from MedMLX/swin-unetr-mlx on first use; medmlx setup swin-unetr
downloads them ahead of time. For local weights, pass the folder containing
swinunetr.safetensors as weights_path.
| Argument | Meaning |
|---|---|
image_path |
One 3D abdominal CT in NIfTI-1 or NIfTI-2, in Hounsfield units, with an invertible affine |
output_dir |
Directory for mask.nii.gz, created if needed |
weights_path |
Optional folder containing swinunetr.safetensors |
overwrite |
False by default; an existing mask is replaced only when True |
sw_batch_size |
Windows per network call, 4 by default |
streaming |
False by default; True blends into temporary memory-mapped files instead of holding the logits in memory |
scratch_dir |
Parent folder for the streaming maps; the system temporary folder by default |
Voxels must be finite and representable in float32. Meter and micron headers are converted to millimeters, and unspecified units are read as millimeters. The image is rejected when its qform and sform headers make ITK and NiBabel disagree on the affine.
The mask is out/mask.nii.gz, with the input shape and the ITK reader's affine. It holds
float32 label indices from the bundled
BTCV label map:
| Index | Name | Index | Name |
|---|---|---|---|
| 0 | background | 7 | stomach |
| 1 | spleen | 8 | aorta |
| 2 | right kidney | 9 | inferior vena cava |
| 3 | left kidney | 10 | portal and splenic veins |
| 4 | gallbladder | 11 | pancreas |
| 5 | esophagus | 12 | right adrenal gland |
| 6 | liver | 13 | left adrenal gland |
run returns {"outputs": {"mask": path}, "artifacts": {"mask": ...}, "details": {...}}. The
mask artifact is a label map on the input grid with the 14 classes above; details holds the
labels present, shapes, sliding-window settings, MLX device, peak memory and timings.
| Error | Raised when |
|---|---|
InvalidInputError |
The input is invalid |
AssetNotReadyError |
Weights are missing or mismatched |
ModelExecutionError |
Inference fails |
MissingDependencyError |
The host is unsupported or Metal is unavailable |
from pathlib import Path
import numpy as np
from swin_unetr_mlx import forward_patch, load_network
network = load_network(Path("swinunetr.safetensors"))
logits = forward_patch(network, np.zeros((1, 1, 96, 96, 96), dtype=np.float32))
forward_patch takes finite float32 Bx1x96x96x96 windows and returns raw
Bx14x96x96x96 logits, without file IO, intensity scaling, resampling, softmax or
stitching. SwinUNETR(weights, mx=mx) runs on MLX arrays directly.merging_profile="monai-1.4", the released bundle's repeated
patch-merging phases; pass merging_profile="monai-1.6" to compare with MONAI 1.6.load_network checks names, shapes, dtypes, finite values and position-index ranges,
and raises AssetNotReadyError when the weights do not match.Use the MedMLX MCP server to run swin-unetr from an MCP client. Weights download on first use.
uv tool install --python 3.13 "medmlx[segment,mcp]"
MEDMLX="$(uv tool dir --bin --color never)/medmlx"
mkdir -p "$HOME/medmlx-work"
claude mcp add --scope user medmlx -- "$MEDMLX" serve --root "$HOME/medmlx-work"
For Codex, use codex mcp add medmlx -- "$MEDMLX" serve --root "$HOME/medmlx-work". Other MCP clients take the same command and arguments. The same install provides the medmlx CLI, for example medmlx describe swin-unetr.
For AI agents: prefer the MedMLX MCP tools (
list_models,describe_model,model_readiness,run_model,get_job) over writing Python against this package.
Apache-2.0. See third-party notices. Model weights retain their publisher terms.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.