SeqSeg: Sequential Vessel Segmentation and Tracking
Automatic tracking and segmentation of blood vessels in CT and MR images using deep learning and geometric tracking.
News: SeqSeg writes a full SimVascular project in the
simvascular/subdirectory — open it directly in SimVascular with pathlines and contours for every segmented branch.
Why SeqSeg?
SeqSeg segments vessels sequentially, taking steps along vessel centerlines and detecting bifurcations to grow complete vascular trees from just 1–2 seed points. By combining local deep-learning predictions (nnU-Net) with geometric tracking, it stays robust across vessel scales — from small coronaries to large aortas.
- 🌱 Minimal supervision — only 1–2 seed points to initialize
- 🌿 Robust bifurcation detection — automatically follows every branch
- 🩻 Multi-modal — works with CT and MR 3D medical images
- 📏 Scalable — vessels from ~1mm coronaries to ~30mm aortas
- ✅ Clinically validated — coronary, aortic, cerebral, and pulmonary anatomies (pre-trained weights for aorta CT/MR and coronary CT)
- ⚡ Fast — on CPU, about 2–5 minutes for an aorta, 5–15 for a coronary tree, and 10–30 for a cerebral tree. GPU is faster. Details in Benchmarks.
Real-time demonstration: automatic segmentation of an abdominal aorta in a 3D MR scan.
What's new in 2.x
SeqSeg 2.0 uses subcommands. A command from 1.x that starts with a flag, such as seqseg -data_dir ..., still runs: it is rewritten to seqseg run batch automatically.
Commands
| Command | Description |
|---|---|
seqseg run batch |
Dataset batch tracing |
seqseg run single |
One volume and seeds. Stages files under <outdir>/_seqseg_single_staging/, then traces |
seqseg run plus batch |
Global nnU-Net sweep, then SeqSeg |
seqseg init dataset |
Create images/, centerlines/, truths/, and a template seeds.json |
seqseg paths init / set / show |
Save default nnU-Net, data, and output directories in ~/.seqseg/paths.yaml |
seqseg train prepare |
Extract patches or whole volumes and build an nnU-Net dataset |
seqseg train nnunet |
Run nnU-Net planning, preprocessing, and training |
seqseg doctor |
Check imports (SimpleITK, vtk, nnunetv2, scipy, vascular-segment-sampler) and paths |
seqseg config dump / fingerprint |
Print a packaged YAML config, or list keys that differ from another |
seqseg post global-centerline |
Build global centerlines from existing segmentations |
seqseg simvascular init |
Create or refresh a SimVascular project under a case directory |
seqseg --version |
Print the installed version |
seqseg run batch flags use underscores (-outdir / --outdir). The data folder is -data_dir or --data_directory. seqseg run single, seqseg train, and seqseg paths use hyphens (--image, --data-dir).
Migrating from 1.x
- Prefer
seqseg run batch. The old flag-only form still works. - Use
seqseg run plus batchin place ofpython -m seqseg.seqseg_plus. The nnU-Net path flags are unchanged. - Check the install with
seqseg --versionafterpip install -U seqseg.
Quick Start
Python 3.9 or newer. 3.11 is the version used in the tutorial and conda example.
pip install seqseg
# Aorta and femoral weights (MR and CT). Coronary weights are a separate zip; see Installation.
curl -L -o nnUNet_results.zip https://zenodo.org/records/15020477/files/nnUNet_results.zip
unzip nnUNet_results.zip
-nnunet_results_path is the folder that contains Dataset005_SEQAORTANDFEMOMR (and the other dataset folders in that zip).
First run: follow the step-by-step tutorial. It includes an abdominal-aorta MR scan, seed points, and Windows notes. The tutorial caps the number of steps so the example finishes in a few minutes; a real case should use the defaults.
Your own data needs images/ and seeds.json (see Usage). This command is an aorta MR case. Change -train_dataset, -config_name, and -img_ext to match your images and weights:
seqseg run batch \
-data_dir your_data/ \
-nnunet_results_path nnUNet_results/ \
-train_dataset Dataset005_SEQAORTANDFEMOMR \
-config_name global_aorta \
-img_ext .mha \
-outdir results/
| Anatomy | -train_dataset |
-config_name |
|---|---|---|
| Aorta / femoral MR | Dataset005_SEQAORTANDFEMOMR |
global_aorta |
| Aorta / femoral CT | Dataset006_SEQAORTANDFEMOCT |
global_aorta |
| Coronary CT | Dataset010_SEQCOROASOCACT |
global_coro |
The tutorial uses -config_name aorta_tutorial for its sample scan. Download links and the trainer-folder layout are in Installation.
Documentation
| Guide | Description |
|---|---|
| Installation | Setup, dependencies, and pre-trained model weights |
| Tutorial | End-to-end aorta example with sample data |
| Usage | Data layout, seeds, CLI arguments, and output files |
| Configuration | YAML configs and tracking parameters |
| Algorithm Overview | Methodology, workflow, and training strategy |
| Training | Train nnU-Net models on a new dataset |
| Performance & Benchmarks | Accuracy, timing, and qualitative comparisons |
| API | Call tracing from Python |
| Research & Development | SimVascular, 3D Slicer, and repository layout |
Citation
When using SeqSeg, please cite the following paper:
@Article{SveinssonCepero2024,
author={Sveinsson Cepero, Numi
and Shadden, Shawn C.},
title={SeqSeg: Learning Local Segments for Automatic Vascular Model Construction},
journal={Annals of Biomedical Engineering},
year={2024},
month={Sep},
day={18},
issn={1573-9686},
doi={10.1007/s10439-024-03611-z},
url={https://doi.org/10.1007/s10439-024-03611-z},
}
Metadata
Release files for seqseg 2.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| seqseg-2.1.7.tar.gz | 191.8 kB | Without provenance | Details for seqseg-2.1.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seqseg-2.1.7-py3-none-any.whl | Python 3 | none | any | Details for seqseg-2.1.7-py3-none-any.whl |
Total release size: 430.5 kB
Release files / seqseg-2.1.7.tar.gz
| Download URL | seqseg-2.1.7.tar.gz |
|---|---|
| Size | 191.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
136c0c6e3c7100e472bd2079d90497cdbcc0e3188a328e2feb20de21d83489c0
|
|
BLAKE2b-256 checksum How to use checksums |
c437d553e62ba3adf486eed97a2acebb1bbacb609cd868ac8489c5df819044c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / seqseg-2.1.7-py3-none-any.whl
| Download URL | seqseg-2.1.7-py3-none-any.whl |
|---|---|
| Size | 238.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eddaa478907e73f279c9ce38320a2b7946f0c4c216c911571c209e0608f62684
|
|
BLAKE2b-256 checksum How to use checksums |
b0e50967e6f9feddc0efd6d8a203e022533a488ed28eebe5650560656d052957
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for seqseg 2.1.7
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.