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
repo="https://github.com/MedMLX/lung-nodule-mlx"
uv pip install \
  "lung-nodule-mlx[conversion] @ git+$repo" \
  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.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 lung-nodule-mlx 0.2.1
File Size Uploaded Provenance Actions
lung_nodule_mlx-0.2.1.tar.gz 27.1 kB Without provenance Details for lung_nodule_mlx-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 68.6 kB

Release files / lung_nodule_mlx-0.2.1.tar.gz

Download URL lung_nodule_mlx-0.2.1.tar.gz
Size 27.1 kB
Tags Source
SHA-256 checksum
How to use checksums
45cb7c887206cf76a0acc7e0dd0f06fb88ca97d63c3e9ea76fdb0d9e85e71f05
BLAKE2b-256 checksum
How to use checksums
a886dbb6430c26e7c96804a27945f8e85c3f782a609d8e1f844be8c2f1bbf757
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.1-py3-none-any.whl

Download URL lung_nodule_mlx-0.2.1-py3-none-any.whl
Size 41.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0822a7514c99e5d1fbd3b2d418b1f4e1555e868660116633cb154309d95cb224
BLAKE2b-256 checksum
How to use checksums
bedb7ebfa8a65a1dd54bc353a3d1c7592a2a4a87e9ad1e557224cff49722d9ad
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.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