🚀 RRWNet RITE
This repository offers the official weights of the RRWNet model trained on the RITE dataset. The model is introduced in the paper "RRWNet: Recursive Refinement Network for Effective Retinal Artery/Vein Segmentation and Classification", authored by José Morano, Guilherme Aresta, and Hrvoje Bogunović, and published in Expert Systems with Applications (2024).
[arXiv
] [ESWA
] [GitHub
] [BibTeX
]

🚀 Quick Start
This section provides a quick guide on how to get started with the RRWNet model, including model loading and basic usage.
✨ Features
- Multiple Datasets Support: The RRWNet model is trained on different datasets, such as RITE and HRF, providing flexibility for various applications.
- Preprocessing Script: A preprocessing script is available to enhance images and masks, which is crucial for model training and prediction.
📦 Installation
No specific installation steps are provided in the original README. However, you need to ensure that the necessary packages, such as huggingface_hub
and PyTorch
, are installed. You can install them using pip
:
pip install huggingface_hub torch
💻 Usage Examples
Basic Usage
The model can be loaded using the PyTorchModelHubMixin
from the huggingface_hub
package and the code from the model.py
file in our repo (https://github.com/j-morano/rrwnet), which can be downloaded from here.
from huggingface_hub import PyTorchModelHubMixin
from model import RRWNet as RRWNetModel
class RRWNet(RRWNetModel, PyTorchModelHubMixin):
def __init__(self, input_ch=3, output_ch=3, base_ch=64, iterations=5):
super().__init__(input_ch, output_ch, base_ch, iterations)
model = RRWNet.from_pretrained("j-morano/rrwnet-rite")
Advanced Usage
There is no advanced usage example in the original README. You can refer to the official GitHub repository for more advanced usage and customization.
📚 Documentation
RRWNet models
Property |
Details |
Model Type |
RRWNet |
Training Data |
RITE, HRF |
Resolution (RITE) |
584x565 (original) |
Resolution (HRF) |
1024 width (resized) |
Weights (RITE) |
Download |
Weights (HRF) |
Download |
Please note that the size of the images used for training is important when using the weights for predictions.
Preprocessing
Models are trained using enhanced images and masks. You can preprocess the images offline using the preprocessing.py
script in the repo. The script will enhance the images and masks and save them in the specified directory.
python3 preprocessing.py --images-path data/images/ --masks-path data/masks/ --save-path data/enhanced
📄 License
This project is licensed under the CC BY-NC 4.0 license.
📄 Citation
If you use this code, the weights, the preprocessed data, or the predictions in your research, we would greatly appreciate it if you give a star to the repo and cite our work:
@article{morano2024rrwnet,
title={RRWNet: Recursive Refinement Network for Effective Retinal Artery/Vein Segmentation and Classification},
author={Morano, Jos{\'e} and Aresta, Guilherme and Bogunovi{\'c}, Hrvoje},
journal={Expert Systems with Applications},
year={2024},
doi={10.1016/j.eswa.2024.124970}
}