Fuyou Mao · Yifei Chen · Beining Wu · Lixin Lin · Jinnan Dai · Zhiling Li · Yilei Chen · Yaqi Wang · Hao Zhang · Yan Tang · Huiyu Zhou · Feiwei Qin
Official Paper · arXiv · PDF · Code · Citation
Important
🎉 MorVess has been formally published online in Pattern Recognition (2026).
Please cite the journal article rather than the arXiv preprint.
- August 2026: The official Pattern Recognition article page is online.
- June 2026: The MorVess preprint and source code were released.
Pulmonary vessel segmentation is challenging because the vascular tree is sparse, tortuous, highly multi-scale, and topologically complex. Conventional voxel-wise objectives frequently miss distal branches, break vascular connectivity, and produce geometrically inconsistent vessel trees.
MorVess reformulates pulmonary vessel segmentation as a joint semantic and geometric reconstruction problem. It adapts a frozen Segment Anything Model (SAM) encoder to volumetric chest CT and jointly predicts:
- a binary pulmonary vessel mask;
- a Vessel Distance Map (VDM) for boundary-aware geometric supervision;
- a Vessel Thickness Map (VTM) for local-caliber consistency.
A lightweight 2.5D Adapter introduces inter-slice context into the SAM image encoder. A Global–Local Fusion Block (GLFB) combines multi-level semantic features with geometric cues to recover thin branches and preserve global vascular connectivity.
- Explicit geometric priors. VDM and VTM supervise vessel boundaries, centerline continuity, and smooth diameter transitions.
- Parameter-efficient foundation-model adaptation. A lightweight 2.5D adapter connects volumetric CT context with frozen 2D SAM representations.
- Geometry-guided feature fusion. GLFB integrates shallow, deep, decoder, distance, thickness, and gradient features.
- Progressive optimization. Training moves from macro-structural adaptation to micro-topological refinement.
- Strong structural performance. MorVess improves small-vessel recovery and global connectivity on Parse2022 and AIIB2023.
- Parameter-efficient foundation-model adaptation. The article reports approximately 1.0M trainable parameters.
The adapter is inserted into the frozen SAM ViT encoder and processes a five-slice input stack. It injects cross-slice context without fully fine-tuning the foundation-model backbone.
The decoder jointly predicts the vessel mask, VDM, and VTM under a multi-task learning objective, allowing semantic and geometric representations to be optimized together.
GLFB aggregates shallow encoder features, deep encoder features, decoder features, VDM, VTM, and VDM gradients to refine distal branches while preserving the global vessel tree.
VDM converts a discrete vessel boundary into a continuous boundary-aware potential field:
VTM propagates centerline diameter estimates to the complete vessel region:
| Loss | Role |
|---|---|
| Voxel-wise vessel classification | |
| Region-overlap optimization under class imbalance | |
| Centerline and topology preservation | |
| Boundary-aware VDM regression | |
| Scale-normalized VTM regression |
| Dataset | Dice ↑ | clDice ↑ | HD95 (mm) ↓ | AMR ↓ | DBR ↑ | DLR ↑ |
|---|---|---|---|---|---|---|
| Parse2022 | 86.84 ± 4.18 | 83.22 ± 3.17 | 4.53 ± 3.06 | 0.12 ± 0.09 | 0.80 ± 0.08 | 0.83 ± 0.08 |
| AIIB2023 | 94.31 ± 3.52 | 89.34 ± 3.46 | 3.24 ± 4.81 | 0.07 ± 0.04 | 0.86 ± 0.09 | 0.89 ± 0.16 |
| Train Domain | Test Domain | Dice ↑ | clDice ↑ | HD95 ↓ |
|---|---|---|---|---|
| Parse2022 | HiPas | 81.14 ± 3.58 | 78.42 ± 4.20 | 7.18 ± 2.12 |
| AIIB2023 | ATM2022 | 89.25 ± 2.45 | 86.75 ± 3.10 | 4.22 ± 1.30 |
| Method | Trainable Params | Total Params | GMACs / 5-slice stack | Peak VRAM |
|---|---|---|---|---|
| nnU-Net | 32 M | 32 M | 180 | 18 GB |
| Diff-UNet | 64 M | 64 M | 340 | 32 GB |
| MorVess | 1.0 M | 93.6 M | 42 | 4.2 GB |
MorVess better preserves thin terminal branches, reduces vessel discontinuities, and avoids geometrically implausible connections on both normal and pathological pulmonary CT data.
MorVess/
├── README.md
├── CITATION.cff
├── CITATION.bib
├── LICENSE
├── requirements.txt
├── sam_fact_tt_image_encoder_hq.py
├── trainer_hq_parse.py
├── trainer_hq_parse_stage2.py
├── utils.py
├── train_hq_parse_stage1.py
├── train_hq_parse_stage2.py
├── test_parse_stage1.py
├── test_parse_stage2.py
├── generate_distance_map.py
├── generate_distance_process.py
├── generate_batch_distance_map.py
├── generate_thickness.py
├── generate_thickness_process.py
├── datasets/
├── preprocessing/
└── segment_anything/
├── build_sam.py
└── modeling/
- Python 3.8+
- CUDA 11.8+
- PyTorch 2.0+
git clone https://github.com/MaoFuyou/MorVess.git
cd MorVess
# PyTorch with CUDA 11.8
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118
# Remaining dependencies
pip install -r requirements.txtDownload the SAM ViT-B checkpoint sam_vit_b_01ec64.pth and place it at:
pretrained_weights/sam_vit_b_01ec64.pth
| Dataset | Task | Description |
|---|---|---|
| Parse2022 | Pulmonary artery segmentation | 100 high-resolution 3D chest CT volumes |
| AIIB2023 | Pulmonary vessel segmentation | Fibrotic CT data for robustness evaluation |
Please follow the license and data-use requirements of each original dataset.
Raw 3D CT and vessel mask
│
├── HU clipping and intensity normalization
├── Vessel Distance Map generation
├── Vessel Thickness Map generation
├── 2.5D five-slice sample construction
└── CSV index generation
# Generate VDM boundary potentials and internal-distance maps.
# Output is intentionally the same root so every PA* case receives a
# potential_map/ directory beside image/ and label/.
python generate_distance_process.py \
-i /path/to/parse2022/train \
-o /path/to/parse2022/train \
--batch --lambda 0.5
# Generate VTM thickness maps beside each case.
python generate_thickness.py \
-i /path/to/parse2022/train \
-o /path/to/parse2022/train \
--batch --out_subdir thickness_map
# Write five-slice images, masks, VDM, internal-distance, and VTM .pkl files,
# then create training.csv and test.csv.
python preprocessing/util_sript_parse2022_distance.py \
--data_root /path/to/parse2022/train \
--output /path/to/2D_all_5slice \
--build_csvgenerate_distance_process.py writes <case>/potential_map/*_boundary_potential.nii.gz
and <case>/potential_map/*_internal_distance.nii.gz.
preprocessing/util_sript_parse2022_distance.py is the script that converts
those volumes into the five-slice boundary_potential/2Dboundary_*.pkl and
internal_distance/2Dinternal_*.pkl files used by dataset_distance.py.
MorVess uses a progressive two-stage optimization strategy.
python train_hq_parse_stage1.py \
--root_path /path/to/2D_all_5slice \
--output ./res_hq-par-512-stage1 \
--ckpt ./pretrained_weights/sam_vit_b_01ec64.pth \
--img_size 512 \
--batch_size 1 \
--max_epochs 400python train_hq_parse_stage2.py \
--root_path /path/to/2D_all_5slice \
--output ./res_hq-par-512-stage2 \
--ckpt ./pretrained_weights/sam_vit_b_01ec64.pth \
--adapt_ckpt ./res_hq-par-512-stage1/epoch_400.pth \
--img_size 512 \
--batch_size 4 \
--max_epochs 200| Setting | Stage I | Stage II |
|---|---|---|
| Main goal | Spatial and cross-slice adaptation | Fine topology refinement |
| Resolution | 512 × 512 | 512 × 512 |
| Learning rate | ||
| Batch size | 1 | 8 |
python test_parse_stage1.py \
--task parse \
--data_path /path/to/2D_all_5slice \
--adapt_ckpt ./res_hq-par-512-stage2/epoch_200.pth \
--ckpt ./pretrained_weights/sam_vit_b_01ec64.pth \
--num_classes 1 \
--img_size 512 \
--is_saveniiThe evaluation scripts currently require label .pkl files and provide
evaluation, not predict-only clinical inference. They report the implemented
Dice metric and write NIfTI masks when --is_savenii is enabled; geometry from
the original CT is not preserved by this legacy evaluation format.
Please cite the formally published Pattern Recognition article:
@article{MAO2026114550,
title = {MorVess: Morphology-aware pulmonary vessel segmentation network},
journal = {Pattern Recognition},
volume = {180},
pages = {114550},
year = {2026},
issn = {0031-3203},
doi = {https://doi.org/10.1016/j.patcog.2026.114550},
url = {https://www.sciencedirect.com/science/article/pii/S0031320326015141},
author = {Fuyou Mao and Yifei Chen and Beining Wu and Lixin Lin and Jinnan Dai and Zhiling Li and Yilei Chen and Yaqi Wang and Hao Zhang and Yan Tang and Huiyu Zhou and Feiwei Qin},
keywords = {Pulmonary vessel, Geometric priors, Topological integrity, Foundation model adaptation},
abstract = {Accurate pulmonary vessel segmentation remains challenging due to the sparse, tortuous, and multi-scale nature of vascular structures, where small branches are easily lost and topology integrity is difficult to preserve under voxel-wise supervision. Existing deep segmentation models primarily optimize binary masks, lacking explicit geometric constraints, thus struggling to recover continuous tubular morphology and fine vascular connectivity. In this study, we introduce MorVess, a morphology-aware segmentation framework that integrates differentiable geometric priors with large-scale foundation model adaptation to achieve fine-grained vascular parsing. MorVess jointly predicts vessel masks, distance maps, and thickness maps, providing explicit supervision for vascular boundaries, centerline consistency, and smooth diameter transitions. A lightweight 2.5D adapter bridges 3D spatial context and 2D SAM representations, while a global-local fusion block aggregates multi-level semantics and geometric cues for high-fidelity topology reconstruction. Across two challenging pulmonary CT benchmarks, MorVess delivers superior Dice, clDice, and HD95 scores, substantially improving small-vessel recovery and global connectivity. These results demonstrate that embedding geometric intelligence into pretrained vision models offers a principled and scalable pathway toward precise vessel analysis and clinically reliable structural quantification. Our source code is available at https://github.com/MaoFuyou/MorVess.}
}This work was supported by the High-Performance Computing Center of Central South University, the Fundamental Research Funds for the Provincial Universities of Zhejiang (No. GK259909299001-006), the State Key Laboratory of CAD&CG, Zhejiang University (A2510), the Anhui Province Key Laboratory of Intelligent Educational Equipment and Technology (No. IEET202401), and the Postgraduate Scientific Research Innovation Project of Central South University (No. 1053320241117).
This project is released under the MIT License.
For questions about the paper or code, please open an issue in this repository.
Keywords: pulmonary vessel segmentation, medical image segmentation, chest CT, SAM, foundation model adaptation, geometric priors, topology preservation, vessel distance map, vessel thickness map, 2.5D deep learning



