## 2 Methodology
### Classification of Normal and Glaucoma Retinal Images Using Deep CNNs
#### 2.2.2 Pretrained CNNs as Features Descriptors and SVM as Classifier (Method P2)  
Method P2 used the same pre-trained CNNs, used in method P1, as the feature descriptors to extract the deep activated features, as shown in Figure 6. As in method P1, cropped OD regions were resized to the input size required by the CNNs, and then propagated in the network. The early convolutional layers of CNNs had a small receptive field and learnt small, low-level features. The deeper layers, towards the end of the CNNs, held larger receptive fields and learnt larger features. Figure 7 displays an example of activations (feature maps) of two convolution layers (the first: 'conv2d-block1-1-conv' and the last: 'conv2d-block32-1-conv') in DenseNet. These activation maps revealed the features that  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Network** & **Depth** & **Size (MB)** & **Parameters (\(\times 10^{6}\))** & **Image Input Size** \\ \hline AlexNet & 8 & 227 & 61.0 & 227 \(\times\) 227 \\ GoogleNet & 22 & 27 & 7.0 & 224 \(\times\) 224 \\ InceptionV3 & 48 & 89 & 23.9 & 299 \(\times\) 299 \\ XceptionNet & 71 & 85 & 22.9 & 299 \(\times\) 299 \\ Resnet-101 & 101 & 167 & 44.6 & 224 \(\times\) 224 \\ ShuffleNet & 50 & 6.3 & 1.4 & 224 \(\times\) 224 \\ SqueezeNet & 18 & 4.6 & 1.24 & 227 \(\times\) 227 \\ MobileNet & 53 & 13 & 3.5 & 224 \(\times\) 224 \\ InceptionResNet & 164 & 209 & 55.9 & 299 \(\times\) 299 \\ DenseNet & 201 & 77 & 20.0 & 224 \(\times\) 224 \\ NasNet-Large & * & 360 & 88.9 & 331 \(\times\) 331 \\ \hline \hline \end{tabular}  
* NasNet—large does not consist of linear sequence of modules.  
\end{table}
Table 2: Pretrained convolutional neural networks (CNNs) and their properties.  
Figure 5: Data flow in method P1.  
the CNN learnt. One can observe that channels in earlier layers learnt simple features, like color and edges, while channels in the deeper layers learnt complex features like blood vessels or the optic cup. Here, following Rokach [42], the fully connected layer and the last layer before classification, was flattened to retrieve the deep activated features. We extracted 1000 deep activated features from each CNNs and input them separately to the SVM classifier to identify a glaucoma. An SVM classifier aims to find an optimal decision hyperplane that maximizes the margin between normal and glaucoma data points. The number of training points is moderate, so an SVM classifier with Gaussian radial basis functions was used. Given the training data, \(\mathrm{D}=\{(\mathrm{x}_{i},\mathrm{y}_{\mathrm{i}}),\ \mathrm{i}=1\dots\mathrm{N}\}\) and \(\mathrm{y}_{\mathrm{i}}\in\{-1,+1\}\), the general form of SVM classifier and the mapping function of the Gaussian kernel are defined in Equations (2) and (3):  
\[\min_{w,b,\xi}\frac{1}{2}\|W\|^{2}+\mathrm{C}\sum_{\mathrm{i}}\xi_{\mathrm{i}}^ {2}\ \mathrm{subject\ to\ y_{\mathrm{i}}(W^{T}X_{\mathrm{i}}+b)\ \geq 1-\xi_{\mathrm{i}},\xi_{\mathrm{i}}\geq 0,\ \forall i} \tag{2}\]  
where \(\mathrm{C}>0\) is the selected parameter and \(\xi\) is a set of slack variables.  
\[\mathrm{K}(\mathrm{X},\mathrm{Y})=\mathrm{e}^{\frac{\mathrm{[X-Y]^{2}}}{\Lambda}} \tag{3}\]  
where K is a kernel function and A is a constant.  
Figure 6: Data flow for method P2.  
Figure 7: Cont.