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.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 nclvmass-net 1.1
File Size Uploaded Provenance Actions
nclvmass_net-1.1.tar.gz 7.9 kB Without provenance Details for nclvmass_net-1.1.tar.gz

Built distribution (wheel)

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

Total release size: 16.0 kB

Release files / nclvmass_net-1.1.tar.gz

Download URL nclvmass_net-1.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
38fffaaf49d45e46b8efa328117a94bca75e96c4755e9a35f307d5832124ff6d
BLAKE2b-256 checksum
How to use checksums
fa4023965cd2926878b17dbd8aca521131dba87d0e22d01063fd3755eb6f4bed
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.1-py3-none-any.whl

Download URL nclvmass_net-1.1-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9df3c39c5be500a9fe12c1c3c6b663265e75a57c1bffecce1f7f6c41b6b6197a
BLAKE2b-256 checksum
How to use checksums
87ea5fd9b9a668402ee8564b982aff26821778ed88a35b861ad14d7980db0c86
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.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.

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