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

totalsegmentator-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
14 Versions
1.4K Downloads
Python Repo language

Scan summary

totalsegmentator-mlx was last scanned on 27 Nov 2026 at version 0.4.1. Risk score 0 of 100. No malicious behavior was detected.

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

Versions

14 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.0 10 Nov 2026 Not shown
0.1.9 7 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.

totalsegmentator-mlx

Segment 117 CT structures with TotalSegmentator v2 in native MLX. Includes standard, fast and coarse modes.

PyPI Python License Apple Silicon Hugging Face MedMLX

Standard mode (1.5 mm): 3D surfaces from autoPET-III and axial CT from AMOS22. Surfaces and contours are smoothed for display.

Input Output
3D CT · NIfTI Multilabel mask on the input grid
Model Weights download Peak MLX memory Measured on
totalsegmentator 824 MB 5.0 GB Standard mode, 768×768×101 abdominal CT

Install

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

Run

from totalsegmentator_mlx import run

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

Weights download from MedMLX/totalsegmentator-mlx on first use; medmlx setup totalsegmentator downloads them ahead of time. For local weights, pass the downloaded bundle folder as weights_path.

Inputs and outputs
Argument Meaning
image_path One finite 3D CT in NIfTI-1 or NIfTI-2, in Hounsfield units
output_dir Directory for mask.nii.gz (and the probability files)
weights_path Optional root of the model folders below
mode standard (default, five 1.5 mm parts), fast (3 mm model, upstream --fast) or coarse (6 mm model, upstream --fastest)
classes Structure names to keep after inference; label IDs stay global
model_part One standard part: organs, vertebrae, cardiac, muscles or ribs
roi_subset Locate these structures, crop to them plus 20 mm and drop other labels
robust_crop Locate roi_subset with the 3 mm model instead of the 6 mm one
body_seg Crop to the Dataset300 body model plus 3 mm
force_split Use upstream's three overlapping slabs even for smaller volumes
probabilities Also write probabilities.npz and probabilities.pkl for one uncropped model
overwrite False by default; existing outputs are replaced only when True
  • Cropping: with roi_subset, standard mode runs only the parts that contain those structures. roi_subset cannot be combined with classes, model_part or body_seg, and robust_crop requires roi_subset. Cropped regions are restored by zero filling; an empty localization returns an empty mask.
  • Units: spatial units may be millimeters, meters, microns or unspecified.
  • Mask: a uint8 NIfTI-1 with global labels 1–117 (0 background) on the input grid, with the upstream label table as a header extension.
  • Probabilities: float32 local-label probabilities on the model reader's grid, with nnU-Net's geometry and crop properties in the .pkl beside them.
  • Return value: {"outputs": {"mask": path}, "artifacts": {"mask": ...}, "details": {...}}, plus the probabilities and probability_properties roles when requested. The mask artifact is a label map on the input grid whose labels are the structures the run can write; details holds run metadata.
  • Errors: invalid inputs raise InvalidInputError; missing or mismatched weights raise AssetNotReadyError.
Model folders

A local weights_path holds one folder per dataset, each with plans.json, dataset.json and fold_0/checkpoint_final/ containing state.json and weights.safetensors. Only the folders the chosen options use are required, and a single model folder can be passed directly when only that dataset is needed.

Folder Model Used by
291/–295/ five 1.5 mm parts standard
297/ 3 mm total model fast; roi_subset with robust_crop
298/ 6 mm total model coarse; roi_subset
300/ 6 mm body model body_seg
Several CTs

run loads each network for its part and releases it before the next one. To segment several CTs, load the model once; its networks stay loaded until it closes:

from totalsegmentator_mlx import load_model

with load_model() as model:
    for name in ("ct1", "ct2"):
        model.run(image_path=f"{name}.nii.gz", output_dir=name)

model.run takes the same arguments as run except weights_path. Standard mode with crops keeps up to eight networks loaded.

Command line
totalsegmentator-mlx predict --image-path ct.nii.gz --output-dir out

predict takes each argument above as a flag with hyphens (--image-path, --output-dir, --weights-path, --mode, --classes, --model-part, --roi-subset, --robust-crop, --body-seg, --force-split, --probabilities, --overwrite; each switch also has a --no- form) and prints the run result as JSON. totalsegmentator-mlx labels prints the label IDs.

Limits
  • Supports the total CT task: Dataset291–295, 297 and 298 (117 labels), plus Dataset300 for body cropping.
  • Models use 3d_fullres, fold 0, without mirroring.
  • Input and output are NIfTI. Other TotalSegmentator tasks and its extra export, statistics and training options are unsupported.

Use with MedMLX

Use the MedMLX MCP server to run totalsegmentator 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 totalsegmentator.

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 totalsegmentator-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

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Frame 2085668439 (1)
Group 1261154229