## 4 Dataset Description
### Hand-Crafted Feature Generation  
After RoI localization and cropping, a set of spatially articulated features are generated. Before generation, the cropped part of the image is resized to 64 x 64. Then, HOG and DAISY feature descriptors were generated.  
HOG descriptors are calculated by normalizing colors then dividing the image into blocks and each block is divided into smaller units called cells. Each cell contains number of pixels (pixel intensities). First, the gradient magnitude and direction of each cell's pixel intensities is calculated. If (\(x\), \(y\)) is  
Figure 8: Pipeline of segmentation. (**a**) CNV class (**b**) DME class (**c**) DRUSEN class (**d**) NORMAL class.  
Figure 9: Mask Generation from heat map (generated from Norm-VGG16 (kernel regularized)).  
assumed as a pixel intensity, then gradient magnitude is calculated from Equation (7) and gradient angle is calculated using Equation (8) [40; 41].  
\[G(x,y)=\sqrt{\left(G_{x}(x,y)^{2}+G_{y}(x,y)^{2}\right)} \tag{7}\]  
\[\theta(x,y)=\arctan\left(\frac{G_{y(x,y)}}{G_{x(x,y)}}\right) \tag{8}\]  
After calculating magnitude and angle, the HOG is calculated for each cell by calculating the histogram. Q bins for angles are chosen with unsigned orientation angles between 0 and 180. Afterwards, normalization is applied since different images may have different contrasts [40]. The pipeline of HOG can be shown in Figure 10. In our implementation, a \([4\times 4]\) cell size, \([2\times 2]\) cells per block and 9 orientation histogram bins creating 8100 features were used.  
DAISY feature descriptor is an algorithm that generates low dimensional invariant descriptors that convert local image regions into low dimensional invariant descriptors, which can be used for matching and classification. DAISY feature descriptor is faster than GLOH and SIFT feature descriptors [42]. It can be computed efficiently at every pixel unlike SURF. For DAISY descriptors generation, eight orientation maps, \(G\), are computed for each image. one for each quantized direction, where \(G\) (\(u,v\)) equals the image gradient at location \((u,v)\)[42]. Gaussian kernels of different \(\sum\) values convolve each orientation map several times to obtain convolved orientation maps for different sized regions [42]. If \(h_{\sum}\) (\(u,v\)) is the vector made of the values at location (\(u,v\)) in the orientation maps after convolution by a Gaussian kernel of standard deviation \(\Sigma\) as shown in Equation (9), after that, the If \(h_{\sum}\) (\(u,v\)) is normalized  
\[h_{\sum}\ (u,v)=\left[G_{1}^{\sum}\ (u,v),\ \ldots\ldots\ldots,\ G_{8}^{\sum}\ (u,v)\ \ \right]^{T} \tag{9}\]  
where \(G_{1}{}^{\sum}\), \(G_{2}{}^{\sum}\)\(\ldots\)\(\ldots\)\(G_{8}{}^{\sum}\) denote the \(\Sigma\)-_convolved orientation maps_. The vector is normalized and denoted by \(\hat{h}_{\sum}\) (\(u,v\)). To correctly represent the pixels near occlusions, the normalization is performed in each histogram independently because normalizing the descriptor as a whole would lead to the same point, which is close to occlusions, appearing different in two images. A complete explanation of calculating Full DAISY descriptor is given by [PERSON] et al. [42].