# A Deep Learning Ensemble Method to Visual Acuity Measurement Using Fundus Images
## 2 Related Work
### Data Augmentation  
Table 4 shows the size of datasets of each VA level for our machine learning. For Classes 3 and 4, we do not augment or pre-process the datasets of Classes 3 and 4. The datasets of Classes 1 and 2 are much less than those of Classes 3 and 4. For the reason, we augment them in the following ways: first, we randomly select around 2500 from the dataset of Class 2 to make it balanced with the dataset of Class 1. Then, the two datasets of Classes 1 and 2 are augmented in the following way: the images of Classes 1 and 2 at the rate of 45% to 50% are randomly selected and rotated at \(-10^{\circ}\) to \(10^{\circ}\). Then, 25% to 30% images of the rotated images of Classes 1 and 2 are applied for the filtering methods in Section 3.2. Then, the datasets of Classes 1 and 2 are augmented the following way: the images of Classes 1 and 2 are selected from the original datasets randomly at the rate of 45% to 50% and rotated at \(-10^{\circ}\) to \(10^{\circ}\). Then, the filtering methods in Section 3.2 are applied for 25% to 30% images from the rotated images of Classes 1 and 2.  
For all images of Classes 1 to 4, each image is cropped so that the main part of the macula and optic nerve papilla remains wholly highlighted, as shown in Figure 3, by completely removing the black part of each image. The original size of each image may not be identical to the others since they are captured in different fundus cameras. Thus, all images are resized in the size of 300 \(\times\) 300.  
Fundus images in all classes may be resized again for their individual methods when they are fed to CNN and SVM models for machine learning. For CNN models, the fundus images are resized into 244 \(\times\) 244 fitting to the input image size of CNNs for transfer learning. For the SVM model, fundus images are resized into 32 \(\times\) 32.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Class 1** & **Class 2** & **Class 3** & **Class 4** \\ \hline Initial Number of fundus images & 2501 & 3972 & 16,104 & 32,575 \\ \hline The number of augmented datasets & 7109 & 7115 & 16,104 & 32,575 \\ \hline \hline \end{tabular}
\end{table}
Table 4: The number of augmented datasets.  
Figure 3: Before and after cropping fundus images. (**a**) before cropping; (**b**) after cropping.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Pre-Processing** & **Features** \\ \hline Salt \& Pepper & It changes the pixel of an image to 0 or 255 with a certain probability. Instead of adding or reducing the value to the pixel value of the original image, the pixel exists in white or black with a specific probability. \\ \hline Gamma correction & It corrects brightness by changing pixel values if the image is too dark or bright. The parameter is the gamma value \(\gamma\). If \(0<\gamma<1\), the image darkens; If \(\gamma=1\), the image changes the same as the original image; if \(\gamma<1\), the image brightens. \\ \hline Remove noise & The median filter, one of the ways to remove noise, sorts the values of surrounding pixels and changes the pixel value to the median value. It is mainly used to remove salt and pepper.