Skip to main content

VesSkel

Vessel Skeletonization and Graph-Based Phenotype Analysis in Retinal Fundus Images

Installation

uv sync                  # core only
uv sync --extra dev      # + test tools
uv sync --extra napari   # + napari GUI
uv sync --all-extras     # everything

Napari

uv sync --extra napari && napari

Open a manual1 TIFF from the HRF folder, then run Lee94 Thinning from the VesSkel plugin menu to see the skeleton.

Inside the Analyze Vessels widget, tune extraction settings and use Save Config to export a reusable JSON preset.

CLI

Use the same JSON preset exported from napari to batch-process images.

vesskel init config.json
vesskel validate config.json
vesskel run --input HRF/manual1 --config config.json --out outputs

CLI outputs:

  • outputs/summary.csv with one feature row per image
  • Optional per-image skeleton outputs (default: .npy)
  • Optional per-image branch tables when output.write_branch_csv=true
  • Optional per-image node tables when output.write_node_csv=true

Configuration

Extraction and output settings are defined in a JSON config file (e.g. the one exported from napari or written by hand).

{
  "schema_version": 2,
  "extraction": {
    "branches": false,
    "branch_text": false,
    "nodes": false,
    "summary": true,
    "fractal_dimension": false,
    "vessel_radius": false,
    "junction_cleanup": false,
    "cleanup_threshold_factor": 2.5,
    "closing_iterations": 0,
    "fill_holes": false,
    "max_hole_size": 0,
    "show_preprocessed": false
  },
  "output": {
    "write_skeleton_npy": true,
    "write_skeleton_png": false,
    "write_summary_csv": true,
    "write_branch_csv": false,
    "write_node_csv": false,
    "write_radius": false
  }
}
Key Type Default Description
extraction.branches bool false Extract per-branch features for CSV export or napari visualization
extraction.branch_text bool false Display branch ID, length, and tortuosity labels on the napari branch layer
extraction.nodes bool false Extract per-node features for CSV export or napari visualization
extraction.summary bool false Compute summary features
extraction.fractal_dimension bool false Compute fractal dimension of the skeleton
extraction.vessel_radius bool false Estimate vessel radius using EDT from the segmentation
extraction.junction_cleanup bool false Clean up ambiguous junction pixels after thinning
extraction.cleanup_threshold_factor float 2.5 Sensitivity for junction cleanup (higher = larger cycles get collapsed)
extraction.closing_iterations int 0 Morphological closing iterations applied before thinning (0 = disabled)
extraction.fill_holes bool false Fill holes in the binary segmentation before thinning
extraction.max_hole_size int 0 Maximum hole area (px) to fill when fill_holes is true; 0 = fill all
extraction.show_preprocessed bool false Show preprocessed binary layer (after closing and hole filling) in the napari viewer
output.write_skeleton_npy bool true Save skeleton as .npy (NumPy array) per image
output.write_skeleton_png bool false Save binary skeleton mask as .png per image
output.write_summary_csv bool true Write aggregated per-image features to summary.csv
output.write_branch_csv bool false Write per-branch CSV tables (requires extraction.branches)
output.write_node_csv bool false Write per-node CSV tables (requires extraction.nodes)
output.write_radius bool false Write per-pixel radius matrix as .npy (requires extraction.vessel_radius)

Shell completions

# zsh
eval "$(vesskel completions zsh)"

# bash
eval "$(vesskel completions bash)"

# PowerShell
vesskel completions powershell | Out-String | Invoke-Expression

Add the appropriate line to your shell rc for persistent tab-completion.

Tests

uv sync --extra dev && pytest                     # all tests
uv sync --extra dev && pytest -m "not slow"       # skip regression tests
  • 2D regression - thinning + feature extraction on all 45 HRF samples, compared against saved baselines
  • 3D regression - thinning + features on a brain volume (from scikit-image), same baseline approach
  • 3D comparison - vesskel lee94_thin vs skimage.morphology.skeletonize on the brain volume, asserting identical output

First run (or --update-baseline) generates baselines in tests/skeletons/ and tests/features/.

Dataset

This project uses the High-Resolution Fundus (HRF) Image Database, established by a collaborative research group to support comparative studies on automatic segmentation algorithms on retinal fundus images.

The database contains 45 images total:

  • 15 images of healthy patients
  • 15 images of patients with diabetic retinopathy
  • 15 images of glaucomatous patients

Binary gold standard vessel segmentation images and field of view (FOV) masks are available for each image.

License

Budai, Attila; Bock, Rüdiger; Maier, Andreas; Hornegger, Joachim; Michelson, Georg. Robust Vessel Segmentation in Fundus Images. International Journal of Biomedical Imaging, vol. 2013, 2013

The HRF dataset is released under the Creative Commons 4.0 Attribution License.

For more information, visit the HRF Image Database.

Download files

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

Source Distribution

vesskel-4.1.0.tar.gz (44.5 kB view details)

Uploaded Source

Built Distribution

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

vesskel-4.1.0-py3-none-any.whl (36.6 kB view details)

Uploaded Python 3

File details

Details for the file vesskel-4.1.0.tar.gz.

File metadata

  • Download URL: vesskel-4.1.0.tar.gz
  • Upload date:
  • Size: 44.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vesskel-4.1.0.tar.gz
Algorithm Hash digest
SHA256 357578333c7fbf076e2510af5e7c30ab506dd780e25b89fce505be439af82688
MD5 a6bf0c536b5a8df9068d5999c68461c6
BLAKE2b-256 e8a3968a92c44ff5638942759cbbcfc48e120fd55f84bec40b11d6ab86796f28

See more details on using hashes here.

Provenance

The following attestation bundles were made for vesskel-4.1.0.tar.gz:

Publisher: release.yml on 404Simon/VesSkel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vesskel-4.1.0-py3-none-any.whl.

File metadata

  • Download URL: vesskel-4.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vesskel-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd2a385e94c2d259b6c588851a6f606721ea0c8420b1af335c85c157f5dadf75
MD5 b0ed4af4ccbc329dcbf165f29e032560
BLAKE2b-256 9e20be469f08d7058237727fd152fcba3477a2ff661e71d660de515326d83ad9

See more details on using hashes here.

Provenance

The following attestation bundles were made for vesskel-4.1.0-py3-none-any.whl:

Publisher: release.yml on 404Simon/VesSkel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

5.2.0

2 files

5.1.0

2 files

5.0.0

2 files

This release

4.1.0 This release

2 files

4.0.0

2 files

3.6.0

2 files

3.5.0

2 files

3.4.1

2 files

3.4.0

2 files

3.3.0

2 files

3.2.0

2 files

3.1.0

2 files

3.0.0

2 files

2.0.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

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