# A Real-Time Nut-Type Classifier Application Using Transfer Learning
## 3 Results and Discussion
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Model** & **Loss** & **Accuracy** & **Validation Loss** & **Validation Accuracy** & **F1-Score** & **Best Epoch** & **Last Epoch** \\ \hline CNN & 0.92 & 0.62 & 1.14 & 0.54 & 0.398 & 23 & 30 \\ Inception-V3 & 0.08 & 0.99 & 0.38 & 0.84 & 0.781 & 45 & 50 \\ MobileNet-V3 & 0.04 & 0.99 & 0.27 & 0.90 & 0.823 & 31 & 40 \\ EfficientNet-B3 & 0.02 & 0.99 & 0.12 & 0.96 & 0.843 & 30 & 39 \\ ResNet-50 & 0.01 & 1.00 & 0.10 & 0.96 & 0.852 & 23 & 32 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Evaluation results of different learning models. be far from the successful benchmarks, where accuracy of 90% or more has been achieved in similar studies in the literature. Therefore, it can be claimed that it is an effortful process to find suitable hyperparameters, datasets, etc., in order to achieve satisfactory performance results when custom CNN models are applied. The evaluation of four different TL models with respect to the different number of epochs is shown in Figure 6. According to the evaluation results, it is clearly seen that all TL approaches produce lower loss values and lower validation loss values than the custom CNN model. They also produce higher accuracy values and higher validation accuracy values. In particular, Inception-V3 stops learning at epoch 50 and produces the best validation loss value of 0.38 at epoch 45. The values of loss, accuracy, and validation accuracy at epoch 45 are 0.08, 0.99, and 0.84, respectively. Thus, the apparent superiority of Inception-V3 over the custom CNN model is clear. The model obtained using MobileNet-V3 stops learning at epoch 40 owing to the early stop strategy applied. The lowest validation loss value is obtained as 0.27 at epoch 31, where loss, accuracy, and validation accuracy values correspond to 0.04, 0.99, and 0.90, respectively. When the validation accuracy is considered, it can be said that MobileNet-V3 is more successful for detecting the test data than not only the custom CNN model but also the Inception-V3 model. Another model trained using EfficientNet-B3 stops learning at epoch 39 and produces the lowest validation loss of 0.12 at epoch 30. The values for loss, accuracy, and validation accuracy are equal to 0.02, 0.99, and 0.96, respectively. Therefore, it can be said that EfficientNet-B3 shows a better performance than the custom CNN, Inception-V3, and MobileNet-V3 for detecting different type of nuts. Similarly, ResNet-50 stops learning at epoch 32 and produces the best validation loss value of 0.10 when the epoch number is equal to 23. The loss, accuracy, and validation accuracy correspond to 0.01, 0.99, and 0.96, respectively, when the number of epochs is 23. The ResNet-50 model produces the same accuracy and validation accuracy compared to the EfficientNet-B3. However, it has a lower validation loss value and learns the knowledge with a smaller number of epochs than the EfficientNet-B3. Therefore, ResNet-50 can be regarded as the most successful model among the TL models evaluated in this study. The best validation lost and the best validation accuracy parameters are also compared with respect to different TL models in Figure 7. These evaluation metrics are important, as they show the performances of different models for detecting nut types in the test data. In addition, the corresponding F1-score values are calculated and shown in the figure. From the figure, it is clear that the custom CNN model gives very ineffective results compared to the TL models. Even though the performance of the TL models is close, EfficientNet-B3 and ResNet-50 are different from the others because they produce lower validation loss values, higher validation accuracy values, and higher F1-score values. Moreover, ResNet-50 can  
Figure 5: The change in the evaluation metrics with respect to the number of epochs when the custom CNN model is used. be regarded as the best TL model among the others, as it produces the lowest validation loss value and one of the highest validation accuracy values.