TW-GAN: Topology and width aware GAN for retinal artery/vein classification

Wenting Chen, Shuang Yu, Kai Ma, Wei Ji, Cheng Bian, Chunyan Chu, Linlin Shen, Yefeng Zheng

Research output: Journal PublicationArticlepeer-review

10 Citations (Scopus)


Automatic artery/vein (A/V) classification, as the basic prerequisite for the quantitative analysis of retinal vascular network, has been actively investigated in recent years using both conventional and deep learning based methods. The topological connection relationship and vessel width information, which have been proved effective in improving the A/V classification performance for the conventional methods, however, have not yet been exploited by the deep learning based methods. In this paper, we propose a novel Topology and Width Aware Generative Adversarial Network (named as TW-GAN), which, for the first time, integrates the topology connectivity and vessel width information into the deep learning framework for A/V classification. To improve the topology connectivity, a topology-aware module is proposed, which contains a topology ranking discriminator based on ordinal classification to rank the topological connectivity level of the ground-truth mask, the generated A/V mask and the intentionally shuffled mask. In addition, a topology preserving triplet loss is also proposed to extract the high-level topological features and further to narrow the feature distance between the predicted A/V mask and the ground-truth mask. Moreover, to enhance the model's perception of vessel width, a width-aware module is proposed to predict the width maps for the dilated/non-dilated ground-truth masks. Extensive empirical experiments demonstrate that the proposed framework effectively increases the topological connectivity of the segmented A/V masks and achieves state-of-the-art A/V classification performance on the publicly available AV-DRIVE and HRF datasets. Source code and data annotations are available at

Original languageEnglish
Article number102340
JournalMedical Image Analysis
Publication statusPublished - Apr 2022
Externally publishedYes


  • Artery/vein classification
  • Deep learning
  • Generative adversarial network
  • Retinal images
  • Topological connectivity

ASJC Scopus subject areas

  • Radiological and Ultrasound Technology
  • Radiology Nuclear Medicine and imaging
  • Computer Vision and Pattern Recognition
  • Health Informatics
  • Computer Graphics and Computer-Aided Design


Dive into the research topics of 'TW-GAN: Topology and width aware GAN for retinal artery/vein classification'. Together they form a unique fingerprint.

Cite this