Skip to main content

lung-nodule-mlx

Detect lung nodule candidates in 3D chest CT with MONAI RetinaNet and native MLX.

Docs · MedMLX

A 3D nodule candidate localized in axial, coronal and sagittal CT views.

A 3D nodule candidate localized in axial, coronal and sagittal CT views.

Input Output
3D chest CT · NIfTI Candidate boxes and scores in RAS mm

Apple Silicon · Metal · Python 3.13 / 3.14 · uv

Quick start

uv venv --python 3.13
source .venv/bin/activate
uv pip install "lung-nodule-mlx[conversion]" huggingface-hub

Download and convert the checkpoint once, then run:

python -c 'from pathlib import Path; from huggingface_hub import hf_hub_download; import lung_nodule_mlx as m; m.convert_weights(Path(hf_hub_download("MONAI/lung_nodule_ct_detection", "models/model.pt")), Path("network.safetensors"))'

c++ -std=c++17 -O2 -dynamiclib \
  "$(python -c 'import lung_nodule_mlx, pathlib; print(pathlib.Path(lung_nodule_mlx.__file__).with_name("selection.cpp"))')" \
  -o selection.dylib
from lung_nodule_mlx.medmlx import run

result = run(
    image_path="ct.nii.gz",
    weights_path="network.safetensors",
    selector_path="selection.dylib",
    output_dir="out",
    resample_raw_input=True,
)
print(result["outputs"]["detections"])

Requires Apple’s command-line developer tools for box selection. Keep resample_raw_input=True for ordinary CT.

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 lung-nodule-mlx 0.2.2

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

Source distribution (sdist)

Source distribution for lung-nodule-mlx 0.2.2
File Size Uploaded Provenance Actions
lung_nodule_mlx-0.2.2.tar.gz 27.1 kB Without provenance Details for lung_nodule_mlx-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lung-nodule-mlx 0.2.2
File Interpreter ABI Platform Actions
lung_nodule_mlx-0.2.2-py3-none-any.whl Python 3 none any Details for lung_nodule_mlx-0.2.2-py3-none-any.whl

Total release size: 68.6 kB

Release files / lung_nodule_mlx-0.2.2.tar.gz

Download URL lung_nodule_mlx-0.2.2.tar.gz
Size 27.1 kB
Tags Source
SHA-256 checksum
How to use checksums
48077617086c62631db3ce809a21d2e2fa8aeceea4e2f9646772e846197dc587
BLAKE2b-256 checksum
How to use checksums
30753b9dfd3651877d670cdd72e65335be9d3f7968dd1ebfa1bfc0b7c01418dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / lung_nodule_mlx-0.2.2-py3-none-any.whl

Download URL lung_nodule_mlx-0.2.2-py3-none-any.whl
Size 41.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48862bfb59ad9a43f072f190bf148fb681c9e4e998150fec17284f077dd6bcd0
BLAKE2b-256 checksum
How to use checksums
137eb029a07858d3a0791265a6ab66cdb1048ff0ce7c67e5e76265fe2ecc0162
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for lung-nodule-mlx 0.2.2

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