## 5 Discussion and Conclusions  
In this paper, we proposed a method of localizing the optic nerve head and segmenting the optic disc and optic cup, which are used to calculate the vertical cup to disc ratio for glaucoma diagnosis. The method is based on a two-stage Mask R-CNN. The localization network is trained using the original and cropped fundus images and tested on the task of localizing the ONH in the full image, which gives detection accuracy between 98.04% and 100% on the test datasets which came from different acquisition devices and have different resolutions. The segmentation Mask R-CNN network is trained using different weights for the loss function components which help in improving the performance of the segmentation on different datasets from different acquisition devices and having different distributions. The network was trained in the REFUGE training dataset and tested on REFUGE validation/test sets as well as MESSIDOR and Magrabi. The proposed method achieved a state-of-the-art performance without the computational complexity used to get the state-of-the-art results in the REFUGE challenge. The top-performing team ([PERSON] team) at the REFUGE challenge in terms of vCDR (which is used for the diagnosis) used ORIGA dataset as well as REFUGE training set to train their networks. They first used one Mask-RCNN network for the initial localization. After localization, they used bagging to create 14 subsets, each trained using Mask-RCNN, U-Net, and Mnet [28]. They did not provide details on whether they modified the architecture of these networks, or they used the original architecture. Mask-RCNN backbone can be ResNet50 with 44,668,324 parameters or ResNet101 with 63,738,788 parameters. Since the backbone used is not clear from the description in the paper, we will do the calculation based on the backbone with the least number of parameters, i.e., ResNet50. The original U-Net network has 31,031,685 parameters but with modifications to the network, this number can increase. With few details on their implementation, we will calculate based on the vanilla U-Net, which usually has a smaller number of parameters compared to a modified one. The Mnet network has 8,547,720 parameters. The whole solution by the [PERSON] team consists of 44,668,324 + 14 \(\times\) (44,668,324 + 31,031,685 + 8,547,720) = 1,224,136,530 parameters in total. That is one Mask-RCNN for localization and 42 networks of Mask-RCNN, U-Net, and Mnet combined (14 of each network). Our solution consists of two Mask-RCNN networks with ResNet101 backbone with a total of 2 \(\times\) 63,738,788 = 127,477,576 parameters which is far less than the 1,224,136,530 parameters in team [PERSON]'s solution. The optic cup/disc segmentation and vCDR calculation based on the solution provided in this paper can be used to triage patients to get proper treatment by ophthalmology specialists, especially in places where specialists are scarce. Such systems can be deployed in eye exam centers which most often have technicians but not specialists. For future work, many interesting ideas can be explored such \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Method** & **Optic Cup** & **Optic Disc** & **vCDR** \\ \hline Team CUHKMED [15] & 0.8826 & 0.9602 & 0.0450 \\ Team Masker [15] & 0.8837 & 0.9464 & 0.0414 \\ Team BUCT [15] & 0.8728 & 0.9525 & 0.0456 \\ Proposed method (same loss weight) & 0.8546 & 0.9477 & 0.0425 \\ Proposed method (different loss weight) & 0.7182 & 0.9334 & 0.0430 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparing segmentation accuracy. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Dataset** & **Proposed Localization Network** & **Interval Type-II Fuzzy Entropy Based Thresholding [24]** \\ \hline MESSIDOR & 0.9804 & 0.967 \\ Magrabi & 1.0000 & 0.936 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Comparing the localization accuracy. as removing (inpainting) the blood vessels before the training and doing heavy color transformation augmentation to improve the robustness of the solution in all the test datasets.