## 3 Application of the Proposed Method to the Fruit Variety Classification
### Results and Discussion  
#### 3.4.1 Original contra Region of Interest Images  
The CNN model architecture (presented in Section 3.2.1) was tested with various testing and validation images (with only original images, only ROI images, and both). Our goal was to determine the image types necessary to estimate appropriate values of weights in the CNN model to classify the varieties of the fruit correctly. Despite different training and validation files, the model was tested using the same testing dataset. The test results are given in Table 4. \begin{table}
\begin{tabular}{c c c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Type of Data**} & \multicolumn{8}{c}{**Apple Variety**} & \multirow{2}{*}{**ALL**} \\ \cline{2-2} \cline{5-10}  & & **A** & **B** & **C** & **D** & **E** & **F** & \\ \hline \multicolumn{10}{c}{Training data} \\ \hline Number of images with apple & 1359 & 1862 & 1992 & 2290 & 1698 & 3088 & 12,289 \\ \hline Number of original images & 484 & 518 & 701 & 723 & 464 & 1421 & 4311 \\ \hline Total number of images & 1843 & 2380 & 2693 & 3013 & 2162 & 4509 & 16,600 \\ \hline \multicolumn{10}{c}{Validation data} \\ \hline Number of images with apple & 351 & 382 & 411 & 502 & 332 & 609 & 2587 \\ \hline Number of original images & 104 & 111 & 150 & 155 & 100 & 304 & 924 \\ \hline Total number of images & 455 & 493 & 561 & 657 & 432 & 913 & 3511 \\ \hline \multicolumn{10}{c}{Testing data} \\ \hline Number of images with apple & 307 & 416 & 413 & 494 & 351 & 644 & 2625 \\ \hline Number of original images & 104 & 111 & 151 & 155 & 100 & 305 & 926 \\ \hline Total number of images & 411 & 527 & 564 & 649 & 451 & 949 & 3551 \\ \hline \multicolumn{10}{c}{Total number of images} \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Dataset structure considered in the research. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**Type of Data**} & \multicolumn{8}{c}{**Apple Variety**} & \multirow{2}{*}{**ALL**} \\ \cline{2-2} \cline{5-10}  & **A** & **B** & **C** & **D** & **E** & **F** \\ \hline \multicolumn{10}{c}{Training data} \\ \hline Number of images with apple & 1359 & 1862 & 1992 & 2290 & 1698 & 3088 & 12,289 \\ \hline Number of original images & 484 & 518 & 701 & 723 & 464 & 1421 & 4311 \\ \hline Total number of images & 1843 & 2380 & 2693 & 3013 & 2162 & 4509 & 16,600 \\ \hline \multicolumn{10}{c}{Validation data} \\ \hline Number of images with apple & 351 & 382 & 411 & 502 & 332 & 609 & 2587 \\ \hline Number of original images & 104 & 111 & 150 & 155 & 100 & 304 & 924 \\ \hline Total number of images & 455 & 493 & 561 & 657 & 432 & 913 & 3511 \\ \hline \multicolumn{10}{c}{Testing data} \\ \hline Number of images with apple & 307 & 416 & 413 & 494 & 351 & 644 & 2625 \\ \hline Number of original images & 104 & 111 & 151 & 155 & 100 & 305 & 926 \\ \hline Total number of images & 411 & 527 & 564 & 649 & 451 & 949 & 3551 \\ \hline \multicolumn{10}{c}{Total number of images} \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Dataset structure considered in the research. According to the accuracy values presented in Table 4, the CNN should be trained with only image types that will be recognized by this network. Training the network with additional images of different scales (many objects or one object) did not improve the accuracy of the classification. The results may also indicate that the size of the ROI in the image is diametrically significant. It can be also concluded that the best classification possibilities are for the proposed CNN trained and tested with the original images; these models only produced two incorrect classifications (accuracy: 99.78%). However, it should be noted that the number of testing images in this case was much smaller (about 35%) than in the case of testing with ROI images. The misclassifications referring to these cases are described in Table 5. Unfortunately, despite the high values of probabilities that samples belonged to the varieties obtained, the results were incorrect.