## 3 Results
### MobileNet Lemon Bruising Classifier Results: Confusion Matrix and Precision-Recall Curves  
The confusion matrix for MobileNet model is shown in Table 6. This model cannot predict Class 2 as it is shown inside this matrix. Most of these samples are misclassified as Class 0 or Class 1 and the model is only an expert in classifying Class 1 samples. The Average Precision for this model is 0.75. It is a little better than the ShuffleNet model but still far behind from those in ResNet and MobileNet. This tells us about the sacrifice (tradeoff) of generalization power for efficiency in the MobileNet model. As it is shown in Figure 16, this model cannot distinguish the Class 2 samples correctly. \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & & **Class 0** & **Class 1** & **Class 2** \\ \hline \multirow{3}{*}{MobileNet} & Class 0 & 6 & 1 & 0 \\  & Class 1 & 0 & 7 & 0 \\  & Class 2 & 2 & 2 & 3 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Confusion matrix for MobileNet (test set): Class 0, 1 and 2 refer to healthy, 8 and 16 h after induction of bruising, respectively. Figure 16: Precision-Recall curve for MobileNet model. (**a**): for the trained model, (**b**): for model separated by each class. By checking all these four precision-recall curves, we can also conclude that the most difficult class of lemon hyperspectral images is Class 2, as most of the models cannot distinguish them from other samples. In contrast, Class 1 samples are easier to distinguish. They can be distinguished easier even with human eyes but the difference between Class 2 and other classes is not easily determined. Finally, the ResNet model has the best generalization capability and Average Precision either on each class or overall. Comparison of Lemon Bruising Classification Performance over the Four Deep Learning Architectures Considered: Accuracy (%), F1-Score, and AP  
The overall results of these models are presented in Table 7, including the classification Accuracy, F1-score [32; 33; 34], area under the ROC curve (AROC), and the calculated AP per each label as well as the micro-averaged AP, computed over all three lemon classes. Figure 17 shows the classification Receiver Operation Characteristic (ROC) curves. These ROC curves illustrate the performance of each classifier by considering various threshold settings for each label versus the others. Consequently, it measures the success of the model in distinguishing each class from other two classes in a ternary classification. Based on the results, it is shown that the best accuracy is achieved by leveraging residual connections in the neural network, i.e., using ResNet. Although this model has larger parameter sizes, it can be trained faster rather than other models with fewer parameters. For instance, ResNet takes only 24 s in each training iteration, while DenseNet takes more than 40 s with number of parameters less than half of those in ResNet. This shows us that using the Residual Connections helps us achieve larger models in case of their generalization power and parameter size but still has better accuracy compared to the DenseNet model which takes longer to train and has also less robustness in the training phase. As it has been seen, when using 3D-CNN layers in the models, it could be more difficult to train compared to standard CNN baseline models for 2D images. In addition, 3D-CNN models consume larger values of GPU memory because of larger parameters size and their training complexities. Thus, smaller batch sizes were used to overcome this limitation. Using smaller batch sizes alongside the difficulty of training 3D-CNN models results in lower accuracy for architectures with complex training paths like DenseNet. Similarly, this results in higher accuracy for the models that overcome this difficulty by leveraging Residual Connections.