Code Monkey home page Code Monkey logo

earnet's Introduction

EAR-NET: Error Attention Refining Network ForRetinal Vessel Segmentation

PyTorch implementation of

EAR-NET: Error Attention Refining Network ForRetinal Vessel Segmentation" ( DICTA 2021 )

If you use the code in this repo for your work, please cite the following bib entries:

@inproceedings{wang2021ear,
  title={EAR-NET: Error Attention Refining Network For Retinal Vessel Segmentation},
  author={Wang, Jun and Zhao, Yang and Qian, Linglong and Yu, Xiaohan and Gao, Yongsheng},
  booktitle={2021 Digital Image Computing: Techniques and Applications (DICTA)},
  pages={1--7},
  year={2021},
  organization={IEEE}
}

Abstract

The precise detection of blood vessels in retinal images is crucial to the early diagnosis of the retinal vascular diseases, e.g., diabetic, hypertensive and solar retinopathies. Existing works often fail in predicting the abnormal areas, e.g, sudden brighter and darker areas and are inclined to predict a pixel to background due to the significant class imbalance, leading to high accuracy and specificity while low sensitivity. To that end, we propose a novel error attention refining network (ERA-Net) that is capable of learning and predicting the potential false predictions in a two-stage manner for effective retinal vessel segmentation. The proposed ERA-Net in the refine stage drives the model to focus on and refine the segmentation errors produced in the initial training stage. To achieve this, unlike most previous attention approaches that run in an unsupervised manner, we introduce a novel error attention mechanism which considers the differences between the ground truth and the initial segmentation masks as the ground truth to supervise the attention map learning. Experimental results demonstrate that our method achieves state-of-the-art performance on two common retinal blood vessel datasets.

Prerequisites

The following packages are required to run the scripts:

  • [Python >= 3.6]
  • [PyTorch >= 1.0]
  • [Torchvision] For more required packages and instruction, please follow the instruction of Nvidia/semantic-segmentation.

Dataset

Please refer to the SA-UNet to prepare and enrich the datasets.

The datasets also can be downloaded from Google Drive.

Error maps from first-phase model also can be downloaded from above link.

Alternatively, you can train the first-phase model from scratch and then generate the error maps by yourselves.

Training scripts for EARNet on STARE dataset.

Train the model on the STARE dataset. We run our experiments on 4x2080Ti/4x1080Ti.

$ python -m runx.runx scripts/train_stare.yml -i

In this first-stage training, set the "arch" parameter to "ocrnet.HRNet_Mscale", and to "ocrnet_error_attn.HRNet_Mscale" in the second-stage refinement.

Testing scripts for EARNet on STARE dataset.

Test the model on the Soybean dataset:

$ python -m runx.runx scripts/eval_stare.yml -i

Download Models

Trained model Google Drive

Acknowledgment

Thanks for the advice and guidance given by Dr.Xiaohan Yu and Prof. Yongsheng Gao. Our project references the codes in the following repos.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.