Downloads · 30 days
0
j-morano/R2-V2
R2-V2 is a image segmentation model from j-morano. Use it for the image segmentation task on the model card, and read the license before you ship it in a product. It is set up for pytorch. The card lists the license as cc-by-4.0.
Weights for the 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 ima…
Downloads · 30 days
0
Access
Public
Updated Aug 4, 2026
Repo size
248 MB
Likes
1
Public
Click a slice to open those files.
.safetensors248 MB · 100%
From the Hugging Face model README
Weights for the 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.
R2-V2 is based on the RRWNet architecture.
The bv model is more balanced than the av variant, and performs
particularly well for vessel segmentation.
This repo is meant for easy inference: it bundles the 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).python -m venv venv/ && source venv/bin/activate
pip install -r requirements.txt
python 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.).
To load the weights manually instead:
import json
from safetensors.torch import load_model
from model import RRWNet
config = json.load(open("bv_config.json"))
model = RRWNet(
input_ch=config["in_channels"],
output_ch=config["out_channels"],
base_ch=config["base_channels"],
num_iterations=config["num_iterations"],
)
load_model(model, "bv.safetensors")
model.eval()