Skip to main content

ncLVMass-Net

An AI model for left ventricular (LV) myocardium segmentation and mass quantification from non-contrast cardiac CT (NCCT) images. The model was trained with the nnU-Net framework on 2,021 patients, all from Taiwan. It achieved an overall Dice score of 0.8827. To use it, provide an input image in NIfTI format (.nii.gz) and the model will output the myocardium mask, along with estimated LV mass.

Quick Install

We recommend first installing PyTorch in a Python environment (version 3.10 or later), and then installing ncLVMass-Net.

pip install nclvmass-net

Usage

nclvmnet -i ct.nii.gz -o output_dir
nclvmnet -i input_dir -o output_dir

Change pretrained model

The ncLVMass-Net pretrained model weights are automatically downloaded from Hugging Face and stored in the local Hugging Face cache. If you would like to use a different pretrained model, specify the model directory name with the --dataset argument and the parent directory containing the model with --mdl-local-dir.

For example, if you have previously downloaded the TotalSegmentator heartchambers_highres model (make sure you have obtained the appropriate license), you can switch to this model for comparison.

nclvmnet -i ct.nii.gz -o output_dir_TS --mdl-local-dir $HOME/.totalsegmentator/nnunet/results --dataset Dataset301_heart_highres_1559subj

For non-commercial purposes, you may download the pretrained model weights directly from Hugging Face and fine-tune them on your own data.

hf download --local-dir $HOME/path/to/ncLVMass-Net/model NTU-AI2Lab/ncLVMass-Net

Further development

The package directly invokes nnUNetv2_predict and nnUNetv2_apply_postprocessing with the specified input (-i), output (-o), and pretrained model (--mdl-local-dir and --dataset) paths, without modifying the original nnU-Net workflow. Note that the custom trainer used for other pretrained model (e.g., one with a non-default number of epochs) may not be available in the original nnU-Net codebase. For further customization or development, install the package in editable mode.

git clone https://github.com/MIC-DKFZ/nnUNet.git
git clone https://github.com/AI-Application-and-Integration-Lab/ncLVMass-Net.git
pip install -e ./nnUNet
pip install -e ./ncLVMass-Net

Metadata

Release files for nclvmass-net 1.0

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

Source distribution (sdist)

Source distribution for nclvmass-net 1.0
File Size Uploaded Provenance Actions
nclvmass_net-1.0.tar.gz 7.9 kB Without provenance Details for nclvmass_net-1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nclvmass-net 1.0
File Interpreter ABI Platform Actions
nclvmass_net-1.0-py3-none-any.whl Python 3 none any Details for nclvmass_net-1.0-py3-none-any.whl

Total release size: 16.0 kB

Release files / nclvmass_net-1.0.tar.gz

Download URL nclvmass_net-1.0.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
354a4ce85c18eb8f5f41fb71859fd6c75b495bb1349d27a8f53d1826e0859680
BLAKE2b-256 checksum
How to use checksums
f03f486eee15f13c69db1c6d9b963e6ea5c0e1f211120853916a6620935dfac7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / nclvmass_net-1.0-py3-none-any.whl

Download URL nclvmass_net-1.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a5789536c3fcbef6b80258fd8a5e35d5c3ed68d62615e9ee0764aee77f0cac6
BLAKE2b-256 checksum
How to use checksums
8d91ff5b150477d91b16a875cd9895fd243cc9c7fdeb8525d44fa8efd2d0664b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Security for nclvmass-net 1.0

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.

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