Regression and Learning with Pixel-wise Attention for Retinal Fundus Glaucoma Segmentation and Detection

01/06/2020 ∙ by Peng Liu, et al. ∙ 34

Observing retinal fundus images by an ophthalmologist is a major diagnosis approach for glaucoma. However, it is still difficult to distinguish the features of the lesion solely through manual observations, especially, in glaucoma early phase. In this paper, we present two deep learning-based automated algorithms for glaucoma detection and optic disc and cup segmentation. We utilize the attention mechanism to learn pixel-wise features for accurate prediction. In particular, we present two convolutional neural networks that can focus on learning various pixel-wise level features. In addition, we develop several attention strategies to guide the networks to learn the important features that have a major impact on prediction accuracy. We evaluate our methods on the validation dataset and The proposed both tasks' solutions can achieve impressive results and outperform current state-of-the-art methods. The code is available at <>.



There are no comments yet.


page 3

page 5

Code Repositories


Regression and Learning with Pixel-wise Attention for Retinal Fundus Glaucoma Segmentation and Detection

view repo
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

This work is a workshop challenge- Retinal Fundus Glaucoma Challenge (REFUGE). The goal of the challenge is to evaluate and compare automated algorithms for glaucoma detection and optic disc/cup segmentation on a common dataset of retinal fundus images. We proposed two solutions that achieved the top performance for both segmentation and classification tasks. The solutions have the potential to be extended to either a novel methodology or an application. The details can be found from or the paper [7] published on TMI2019.

2 Method

2.1 Segmentation

We employ a u-net [8] like architecture to learn the different pixel-level features. We modify the u-net to have multiple inputs (3 in our case) so that the network can receive more original raw pixel information during training. This strategy can reduce the risk of overfitting and enhance the network’s learning capability. We refer to this architecture as X-Unet. Moreover, we embed the squeeze-and-excitation blocks [6] into our X-Unet to weight the features from different convolutional layers’ channels. In particular, we utilize a mechanism that allows the network to selectively amplify the valuable channel-wise features and suppress the useless feature from global information. In addition, we use deconvolution in the network decoder part to refine the decoding capability by refusing the features between different level encoded features and the corresponding level decoded features. The figure 1 shows our X-Unet’s architecture.

Figure 1: X-Unet’s architecture includes squeeze-and-excitation blocks.

2.1.1 Regression

We consider the segmentation task as an image regression instead of pixel classification problem, which in deep learning usually needs to transform the low-level pixel information to high-level features. However, for the disc and cup binary segmentation tasks, low-level pixel-wise features are more important. In contrast to learning to classify the pixels, mapping a retinal image to its corresponding label directly can keep more low-level pixel-wise features.

Figure 2: Consider the segmentation as an image regression instead of pixel-classification problem.

2.1.2 Loss function

The major pixel-wise similarities in training images allow us to adopt mean absolute error (MAE) as our loss function to calculate the pixel-wise difference between label and prediction.


where n is the number of pixels; is the predicted pixels; is the actual pixels.

2.2 Classification

The region and around-area of optic cup/disc contain the key pixel-wise features, such as vertical disc diameter, the oval shape of disc/cup, ISNT rule [4], and yellow-orange rim, that are mainly used for distinguishing glaucoma. The various scale pixel-wise features, including pixel color and location, are more important than high-level features, which can be learned by very deep convolutional neural networks (e.g., Resnet [5]). Atrous (dilated) convolution [9] is a key method that can extract different scale features and keep locations information simultaneously.

Figure 3: Deeplab+3 variant architecture for glaucoma classification. We replace the last upsample layer with an average pooling layer and a fully connected layer.

We modify DeepLab+3 [2] to be a classifier by replacing the last layer with a global average pooling layer followed by a fully connected layer for predicting the risk possibility of glaucoma. DeepLab+3 includes one encoder and one decoder. The encoder embeds atrous spatial pyramid pooling (ASPP)  [1] and convolutions in cascade to extract various scale context pixel-wise information. The decoder refuses the low- level features learned by atrous convolutions with the various scale context features of the encoder.

2.2.1 Loss function

We utilize binary entropy function to calculate the difference between the predicated class (possibility) and actual class.


where BE presents the value of binary entropy loss; is the binary indicator (0 or 1);

is the predicted probability.

3 Implementation details

3.0.1 Data prepossessing

We reduce the variance between training and validation images by cropping

size of region of interest (ROI) patches with the pre-trained model: Disc-aware Ensemble Network (DE-Net) [3]. This data processing also can allow the model to focus on learning the most important pixel-wise information.

Figure 4: The steps of data prepossessing for both segmentation and classification training and testing data.

We use data augmentation skills, such as image Rotation -90/180/270 various angles and image flipping, to increase the number of training images. In total, 3,200 ROI images are generated for segmentation and classification training.

In order to ensure the network’s receptive field is sufficient, we resize the training patches to be smaller size as the segmentation task training inputs.

Figure 5: The steps of data prepossessing for classification training data.

For classification task, we use the same method (Fig.4) in segmentation to crop out the ROIs for training and testing. We resize the original cropped region images to be various sizes, such as , , , , and , for multiple deep networks training. We average the models outputs as the final prediction result.

In addition, we need to handle with the image size difference between training and validation images. Hence, in testing stage on validation images, we crop out (not the in training) ROIs for segmentation task and (not the in training) ROIs for classification task. This can make sure the inputs to the network are similar to training images as much as possible.

3.0.2 Others

For training platform, we use Keras + tensorflow + python2.7. The Adam optimizer is used and Learning rate is 0.0001.

4 Results

For segmentation, on training set, mean Optic Cup Dice is 0.9626, mean Optic Disc Dice is 0.9876, and MAE CDR is 0.0161. On validation set, mean Optic Cup Dice = 0.8498, mean Optic Disc Dice = 0.9433, and MAE CDR is 0.0444. Best rank (results-online): 8th.

For classification, on training set AUC: 1.0 and Sensitivity: 1.0. Potential Overfitting is occured. On validation set AUC is 0.9708 and Sensitivity: 0.95. The latest (results-online) Rank: 2nd.

5 Conclusion

In this work, we proposed two deep learning networks for retinal fundus glaucoma segmentation and detection. To overcome the major challenge, such as the variance (color and size due to different acquisition equipment) between training and testing images, we adopted pixel-wise learning and attention strategy, which can allow the networks focuses on learning the key features directly for the pixel-wise accurate predication. In particular, we proposed a multiple-input U-Net, named as X-Unet, to enlarge the raw image pixel information for low-level feature regression and prediction. For classification, we proposed how to learn pixel-wise features for classification problems. In detailed, a dilated (Atrous) convolution based network can extract different scale features and keep locations information simultaneously. Atrous spatial pyramid pooling (ASPP) and convolution can extract various scale context pixel-wise information. The encoder part learns various pixel-wise features and the decoder part refuses the low- level features learned by dilated convolutions with the various scale context features of the encoder.

Our proposed methods can overcome the variance issue between training and testing data. However, we believe the best way to have a robust model is to standardize the image quality for any deep learning based model. This may need more efforts from both deep learning theorem and data acquisition community.


  • [1] L. Chen, G. Papandreou, I. Kokkinos, K. Murphy, and A. L. Yuille (2018) Deeplab: semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE transactions on pattern analysis and machine intelligence 40 (4), pp. 834–848. Cited by: §2.2.
  • [2] L. Chen, G. Papandreou, F. Schroff, and H. Adam (2017) Rethinking atrous convolution for semantic image segmentation. arXiv preprint arXiv:1706.05587. Cited by: §2.2.
  • [3] H. Fu, J. Cheng, Y. Xu, C. Zhang, D. W. K. Wong, J. Liu, and X. Cao (2018) Disc-aware ensemble network for glaucoma screening from fundus image. IEEE Transactions on Medical Imaging. Cited by: §3.0.1.
  • [4] N. Harizman, C. Oliveira, A. Chiang, C. Tello, M. Marmor, R. Ritch, and J. M. Liebmann (2006) The isnt rule and differentiation of normal from glaucomatous eyes. Archives of ophthalmology 124 (11), pp. 1579–1583. Cited by: §2.2.
  • [5] K. He, X. Zhang, S. Ren, and J. Sun (2015) Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385. Cited by: §2.2.
  • [6] J. Hu, L. Shen, and G. Sun (2017) Squeeze-and-excitation networks. arXiv preprint arXiv:1709.01507 7. Cited by: §2.1.
  • [7] J. I. Orlando, H. Fu, J. B. Breda, K. van Keer, D. R. Bathula, A. Diaz-Pinto, R. Fang, P. Heng, J. Kim, J. Lee, et al. (2020) REFUGE challenge: a unified framework for evaluating automated methods for glaucoma assessment from fundus photographs. Medical image analysis 59, pp. 101570. Cited by: §1.
  • [8] O. Ronneberger, P. Fischer, and T. Brox (2015) U-net: convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pp. 234–241. Cited by: §2.1.
  • [9] F. Yu and V. Koltun (2015) Multi-scale context aggregation by dilated convolutions. arXiv preprint arXiv:1511.07122. Cited by: §2.2.