Vessy weights

Model weights for Vessy: blood vessel detection, segmentation and morphometry in H&E whole-slide images and tissue microarrays, from QuPath or the command line.

Vessy downloads these files automatically on first use and checks their SHA-256. You don't need to download them by hand.

File Model Size SHA-256
vessy_rtdetrv2_r50vd_vessel_v1.pth vessel detector: RT-DETRv2 R50vd (1 class), EMA weights, training state removed 146.6 MB 346938b585e4ff6a969933c00ee61ce97c45458adbf0a63bdb6ee9e979ffa4c2
vessy_sam_vit_b_vessel_v1.pth vessel segmenter: Segment Anything ViT-B with a rank-512 vessel LoRA folded into the image encoder's attention weights 375.1 MB 6bec2a442215d0a86233f1176b0dd16cc97c614a3a777ea3a08467669b52b4a6

How they are used

  1. Detection: tiles of 2048 and 1024 px (at about 0.23–0.27 µm/px) are resized to 640 px. Boxes scoring above 0.6 are kept, and overlapping boxes are united.
  2. Segmentation:
    • each box is segmented in a 2048 px tile centred on it, Macenko-normalised to the training reference and resized to SAM's 1024 px input;
    • bright pixels enclosed by the mask become the lumen;
    • only complete cross-sections are kept: a closed wall around a lumen of 3–80 % of the vessel.

Both files are plain PyTorch state dicts for the model definitions vendored in Vessy (vessy/_vendor/rtdetrv2, vessy/_vendor/segment_anything):

import torch
from vessy._vendor.rtdetrv2 import build_rtdetrv2_r50vd_m
from vessy._vendor.segment_anything import build_sam_vit_b

detector = build_rtdetrv2_r50vd_m(num_classes=1)
detector.load_state_dict(torch.load("vessy_rtdetrv2_r50vd_vessel_v1.pth"))
sam = build_sam_vit_b("vessy_sam_vit_b_vessel_v1.pth")

Training data

The detector was fine-tuned on annotated H&E tiles of cardiac tissue (about 2,400 tiles, stain-augmented). The SAM LoRA was fine-tuned on vessel masks from cardiac H&E slides. Both were trained at 40× (about 0.25 µm/px). They work on 20× scans at 0.27 µm/px (Olympus VS200) without retraining.

Performance

On the detector's held-out validation tiles (split by source slide):

AP AP50 best F1
vessel detector 0.775 0.945 0.885

On the same validation set, prompted with ground-truth boxes, the segmenter reaches vessel IoU 0.82, lumen IoU 0.69 and wall Dice 0.86. Two slides of the segmenter's fine-tuning set are also in this validation set, which flatters these numbers somewhat.

Intended use and limitations

  • Intended use: research on H&E-stained tissue, mainly myocardium. On other tissues, or with other stains or scanners, check the results (Vessy's review gallery in QuPath is made for this).
  • Small vessels: capillaries and small vessels without a visible lumen are not counted, because only complete cross-sections with a lumen are kept.
  • Not for clinical use.

License

CC BY-NC 4.0: share and fine-tune with attribution, non-commercial. The base models are Apache-2.0: RT-DETR and Segment Anything. For commercial use, contact the author.

Contact: manandhar.sandeep@gmail.com

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support