Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

swin-unetr-mlx

Latest version: v0.4.1

Overview

Last scanned
27 Nov 2026
Published
27 Nov 2026
PyPI package Publisher: AlfredoSandoval, org:MedMLX
0 Stars
0 Forks
10 Versions
1.0K Downloads
Python Repo language

Scan summary

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.

  • Releases: 10 versions; the latest 2 were published within 5 days (23–27 Nov 2026).
  • Findings: No rules fired in version 0.4.1.
  • Downloads: 1,026 downloads.

Versions

10 versions published
Versions and the rules that fired in each
VersionPublishedStatus
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

No rules fired in 0.4.1

Findings

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.

README

The publisher’s own README, as collected from the registry.

swin-unetr-mlx

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

PyPI Python License Apple Silicon Hugging Face MedMLX

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

Install

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

Run

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.

Inputs
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.

Outputs

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
Python API
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.
  • Both default to 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 with MedMLX

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.

License

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

OX Radar and Response Center

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.

Where it’s listed

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).

  • pypi-releases swin-unetr-mlx

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

PolinRider Returns
Research

PolinRider Returns: Hijacked npm Packages Use Ethereum Blockchain to Conceal Malware Infrastructure

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229