Review of Segmentation and Skeletonization Methods for Large-Scale Microvascular Networks
This repository contains code and resources associated with the paper
"Segmentation and Modeling of Large-Scale Microvascular Networks: A Survey" by Goharbavang et al.
If you use this code or the paper, please cite:
@article{goharbavang2025segmentation,
title={Segmentation and modeling of large-scale microvascular networks: a survey},
author={Goharbavang, Helya and Ashitkov, Artem T and Pillai, Athira and Wythe, Joshua D and Chen, Guoning and Mayerich, David},
journal={Frontiers in Bioinformatics},
volume={5},
pages={1645520},
year={2025},
publisher={Frontiers Media SA}
}The paper covers the following methods:
- Binarization: Otsu’s thresholding; Frangi vesselness; Beyond Frangi; Optimally Oriented Flux; U‑Net; nnU‑Net
- Skeletonization: Lee thinning; Palágyi thinning; Surface normal accumulation (Kerautret); Fast Marching (Kline); Mean curvature flow (Tagliasacchi); Voronoi‑based (Antiga)
This repository includes two CLI modules under 'implementations/' for a subset of these methods. For the rest, please see the External Resources section below for links to community or official implementations.
-
Binarize.py
Providesotsu2d,otsu3d,frangi, andbfrangi. -
Skeleton.py
Provideslee,palagyi,kerautret, andklinesubcommands.
Other directories:
-
manage_data/Scripts for preprocessing and converting raw imaging data (e.g., Numpy → NWT). -
metrics/Tools to compute quantitative evaluation metrics:- Segmentation: Jaccard index, Dice coefficient, precision, recall
- Skeletonization: NetMets precision and recall
-
optimization/Parameter-tuning and sensitivity-analysis scripts (grid search for scale, shape, and threshold parameters). -
LICENSEMIT License.
-
Clone the repo
git clone https://github.com/helia77/MicroVasc-Review.git cd MicroVasc-Review -
Install dependencies (e.g., via Conda environment)
# conda create --name microvasc # conda activate microvasc pip install -e .
-
Verify CLI tools
binarize --help skeleton --help
-
Run an algorithm
binarize frangi \ --input path/to/volume.npy \ --output path/to/out.npy \ --background white \ --params 0.5 0.5 3 \ --scale 1 2 3 4 --th otsu3d
- Beyond Frangi: https://github.com/timjerman/JermanEnhancementFilter
- Optimally Oriented Flux: https://matlab.mathworks.com/open/fileexchange/v1?id=41612
- U-Net: https://github.com/MrMras/CNN
- nnU-Net: https://github.com/MIC-DKFZ/nnunet
- Lee Thinning: https://github.com/scikit-image/scikit-image/blob/main/skimage/morphology/_skeletonize.py
- Palagyi Thinning: https://github.com/ClearAnatomics/ClearMap
- Kerautret Centerline: https://github.com/kerautret/CDCVAM
- Kline Centerline: https://github.com/TLKline/poreture
- Starlab MCF Skeletonization: https://github.com/taiya/starlab-mcfskel
- 3D Slicer: https://www.slicer.org
Refer to the paper for detailed methodology, evaluation results, and discussions.
-
Installation:
# Requirements # Python 3.12+ # PyTorch, NumPy, OpenCV, tqdm, scipy, matplotlib git clone https://github.com/MrMras/CNN.git cd CNN conda env create -n cnn -f environment.yml conda activate cnn
-
Usage:
# Upload .npy files under ./unprocessed_data/{name_of_dataset} # Change the path to these files in ./create_volume_from_npy.py python ./create_volume_from_npy.py # Should create a folder ./data/{name_of_dataset} and add 2 files in there. cd ./model/ # change the paths in ./model.py to ./data/{name_of_dataset}/{files} python ./model.py EPOCHS -c # Model will save the model under ./saved_models/{name_of_dataset}/model_for_vasc3d{random id}.pth. cd ../ # specify the path for the trained model and the path to the target volume (line 64) python ./run_model.py # Binary and probability maps will be generated in ./processed_npy/ and ./probability_npy/
-
Installation:
conda create -n nnunet python=3.9.* pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128 pip install nnunetv2 set nnUNet_raw = path/to/nnUNet_raw set nnUNet_preprocessed = path/to/nnUNet_preprocessed set nnUNet_results = path/to/nnUNet_results
-
Usage:
# Use the new presets nnUNetv2_plan_experiment -d DATASET_ID -pl nnUNetPlannerResEncL # Extract fingerprint nnUNetv2_plan_and_preprocess -d DATASET_ID --verify_dataset_integrity # Train nnUNetv2_train DATASET__ID 3d_fullres 0/1/2/3/4 -p nnUNetResEncUNetLPlans # Predict nnUNetv2_predict -i INPUT_FOLDER -o OUTPUT_FOLDER -d DATASET_ID -c 3d_fullres -p nnUNetResEncUNetLPlans --save_probabilities nnUNetv2_apply_postprocessing -i FOLDER_WITH_PREDICTIONS -o OUTPUT_FOLDER --pp_pkl_file POSTPROCESSING_FILE -plans_json PLANS_FILE -dataset_json DATASET_JSON_FILE
