# Deep Learning-Based Method for Classification and Ripeness Assessment of Fruits and Vegetables
## 5 Discussion  
The results show that good training is performed, as indicated by the reported metrics such as accuracy and loss, but there is room for improvement that can be generated from the input data. Solutions include increasing the number of images per class, which can help the model better understand the different variations in each category and be more resilient to noise and outliers. It may also be useful to have a more diverse dataset consisting of images from a wider range of sources with different backgrounds, lighting conditions, and other factors. Another alternative would be to use data augmentation, where new training samples can be generated by transformations such as cropping, flipping, or rotating. The graphs shown do not show undertraining or overtraining, as the curves were generated from the training and validation samples. The data was split 80-10-10, with 80% for training, 10% for validation, and 10% for testing. It should be noted that given the architecture related to the classification of objects, the algorithm is not able to identify more than one object for each inference; this can be solved by modifying the architecture of the network by a network of type object detection. In addition, more variables can be added to detect, such as a wider range in the spectrum of ripening identification and ripening states to fruits and vegetables that do not contain them, among others. Table 6 shows comparisons related to the classification of fruits and vegetables as well as the determination of ripeness. According to the table, there is a better performance compared to the authors mentioned. It should be noted that the system in general consists of two algorithms, but they were trained separately and therefore two different metrics are reported. As can be seen, the reference [38] shows better accuracy than ours, reporting 99.79%. The reason for this is that our model has 32 classes and the input images for the model have a size of 512 \(\times\) 512 pixels. In the reference mentioned above, the input images are 100 \(\times\) 100 pixels in size, and this helps to increase the accuracy, but probably does not do a good job of making inferences. According to the results and comparison with other methods, the proposed system could be applied in various fields, such as agriculture, where farmers can use this system to identify the ideal harvesting time, which can improve yields and minimize waste. Similarly, food processors can use this system to ensure that their products are processed at the optimal ripening time. In the retail sector, the system has the potential to improve quality and safety by identifying and discarding overripe produce and allowing customers to select \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Reference** & **Target** & **Classes** & **Model** & **Acc.** \\ \hline
[30] & Ripeness & Jonagold Apples & SVM & 90.30\% \\
[31] & Ripeness & Golden Apples & PCA & 90.60\% \\
[32] & Classification & 10 & CNN & 93.00\% \\
[33] & Classification & 18 & CNN & 94.94\% \\
[34] & Ripeness & Apples & Multiclass SVM & 95.94\% \\
[35] & Ripeness & Grapes & Discriminant Analysis & 96.00\% \\
[36] & Ripeness & Tomatoes & ANN & 96.47\% \\
[37] & Classification & Lemons & CNN & 97.30\% \\
[38] & Classification & 25 & CNN & 99.79\% \\
[39] & Classification & 33 & CNN & 99.75\% \\
**Own** & **Classification** & **32** & **CNN** & **97.86\%** \\
**Own** & **Ripeness** & **12** & **CNN** & **100\%** \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Comparative analysis of different methodologies applied for classification and ripeness of fruits and vegetables. the best-conditioned fruits and vegetables from store shelves, thereby reducing food waste.