Skip to main content

Unified cardiac + vascular mesh pipeline (nnU-Net, LinFlo-Net, SeqSeg)

Project description

MeshGrow

Unified pipeline for patient-specific cardiac + vascular simulation mesh construction:

  1. nnU-Net — binary cardiac localization
  2. Crop — subvolume around the heart
  3. LinFlo-Net — whole-heart mesh and segmentation
  4. SeqSeg — aortic/vascular tracing (seeded from cardiac mesh)
  5. Combine — merged simulation-ready model ({case_id}_LV_aorta.vtp)

Quick start

python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate

pip install -e .

# Pipeline tools (nnU-Net, SeqSeg, LinFlo-Net)
pip install seqseg linflonet nnunetv2

# PyTorch — install before pytorch3d; use a CUDA wheel on Linux if you have a GPU
pip install torch

# pytorch3d (required by LinFlo-Net; not on PyPI for all platforms)
pip install --no-build-isolation \
  "git+https://github.com/facebookresearch/pytorch3d.git@stable"

meshgrow download-weights --dest models/
meshgrow doctor

meshgrow run \
  --input /path/to/images \
  --output /path/to/results \
  --modality ct

Install torch before pytorch3d. On macOS, use the default CPU torch build; MeshGrow runs nnU-Net on CPU automatically (runtime.device: auto). GPU builds are strongly recommended on Linux for nnU-Net and SeqSeg.

meshgrow doctor checks nnU-Net, SeqSeg, and LinFlo-Net CLIs but not pytorch3d — verify with:

python -c "import torch; import pytorch3d; print(torch.__version__, pytorch3d.__version__)"

No config file is required — built-in defaults are used after weights are downloaded.

Optional project scaffold:

meshgrow init --dest ./my_project
meshgrow run --config ./my_project/pipeline.yaml \
  --input ./my_project/images \
  --output ./results \
  --modality mr

Model weights

Step Zenodo Path after download
Cardiac binary seg 10.5281/zenodo.20804513 models/cardiac/nnUNet_cardiac_weights/
LinFlo-Net 10.5281/zenodo.20802633 models/linflonet/best_model.pth
SeqSeg aorta 10.5281/zenodo.15020477 models/seqseg/nnUNet_results/

Optional: use --cardiac-path ./nnUNet_cardiac_weights instead of downloading from Zenodo.

CLI

Command Description
meshgrow download-weights Fetch weights from Zenodo
meshgrow doctor Check dependencies and model paths
meshgrow init --dest DIR Create pipeline.yaml + images/
meshgrow run Run full or partial pipeline

Resume from a step:

meshgrow run --output results/ --input images/ --modality ct \
  --case case_001 --from-step seqseg

Documentation

Citation

When using this workflow, please cite SeqSeg, LinFlo-Net, and the underlying nnU-Net models. See the respective project pages for BibTeX entries.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

meshgrow-0.3.0.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

meshgrow-0.3.0-py3-none-any.whl (32.1 kB view details)

Uploaded Python 3

File details

Details for the file meshgrow-0.3.0.tar.gz.

File metadata

  • Download URL: meshgrow-0.3.0.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for meshgrow-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5f2a3e813cbc12118f74762b4485b6c1262e13091a0c05a4760e14fcd142e711
MD5 3f9caff2a537e134d11a4e73d468d777
BLAKE2b-256 1b2b89e41b7d701766356bfcb1f3300cf687f7f2a82e5cbf9cf6fa12a1f6f118

See more details on using hashes here.

File details

Details for the file meshgrow-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: meshgrow-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 32.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for meshgrow-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d46c58c3e1581088b753e2372b978ba3b7fcdedcc7ffe2bbe45d656c360ca404
MD5 7d3de5326ce8f5d419f89e82354688b1
BLAKE2b-256 4858ee01609e18c47bc834461139629ab8c58dba332a767ef6bfa6d286137035

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page