Views
No views yet
bv variant of R2-V2, the winning method of the
Generalized Analysis of Vessels in Eye (GAVE) Challenge at MICCAI 2025,
for blood vessel segmentation and artery/vein classification in retinal
fundus images.bv model is more balanced than the av variant, and performs
particularly well for vessel segmentation.bv weights
together with the (unmodified except for .safetensors loading support) code
needed to run them, so it works standalone without cloning anything else.
For the full training/reproducibility code, see the
R2-V2 GitHub repo.bv.safetensors: model weights (RRWNet state dict).bv_config.json: configuration used to produce these weights.model.py, infer.py, preprocessing.py, transformations.py: inference
pipeline code (image preprocessing, artery/vein post-processing, CLI).requirements.txt: pinned dependencies (Python 3.12.8, PyTorch 2.8, CUDA 12.8).1python -m venv venv/ && source venv/bin/activate
2pip install -r requirements.txt
3
4python infer.py -i <path_to_images> -t bv -w . -s <output_path>-w . tells infer.py to look for bv.safetensors and bv_config.json in
the current directory. Run python infer.py -h for all options (test-time
augmentation, masks, GAVE output format, etc.).1import json
2from safetensors.torch import load_model
3from model import RRWNet
4
5config = json.load(open("bv_config.json"))
6model = RRWNet(
7 input_ch=config["in_channels"],
8 output_ch=config["out_channels"],
9 base_ch=config["base_channels"],
10 num_iterations=config["num_iterations"],
11)
12load_model(model, "bv.safetensors")
13model.eval()