Submitted:
13 November 2023
Posted:
14 November 2023
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Material and methods
2.1. Data preparation
2.2. Xception Architecture
2.2. Fine-tuning
2.3. Network training
3. Results and Discussion
3.1. Training progress
3.2. Comparison of the candidate models
4. Conclusions
References
- Aguilera Puerto, D., Cáceres Moreno, Ó., Martínez Gila, D. M., Gómez Ortega, J., & Gámez García, J. (2019). Online system for the identification and classification of olive fruits for the olive oil production process. Journal of Food Measurement and Characterization, 13(1), 716–727. [CrossRef]
- Aquino, A., Ponce, J. M., & Andújar, J. M. (2020). Identification of olive fruit, in intensive olive orchards, by means of its morphological structure using convolutional neural networks. Computers and Electronics in Agriculture, 176, 105616. [CrossRef]
- Bellincontro, A., Taticchi, A., Servili, M., Esposto, S., Farinelli, D., & Mencarelli, F. (2012). Feasible Application of a Portable NIR-AOTF Tool for On-Field Prediction of Phenolic Compounds during the Ripening of Olives for Oil Production. Journal of Agricultural and Food Chemistry, 60(10), 2665–2673. [CrossRef]
- Benos, L., Tagarakis, A. C., Dolias, G., Berruto, R., Kateris, D., & Bochtis, D. (2021). Machine Learning in Agriculture: A Comprehensive Updated Review. In Sensors (Vol. 21, Issue 11). [CrossRef]
- Boskou, D. (2006). Olive oil: chemistry and technology. Second Edition (2nd ed.). AOCS Publishing. [CrossRef]
- Chollet, F. (2017). Xception: Deep Learning with Depthwise Separable Convolutions. 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 1800–1807. [CrossRef]
- Fabbri, A., Baldoni, L., Caruso, T., & Famiani, F. (2023). The Olive: Botany and Production. CABI.
- Famiani, F., Proietti, P., Farinelli, D., & Tombesi, A. (2002). Oil Quality in Relation to Olive Ripening. In Acta horticulturae (Vol. 586). [CrossRef]
- Fan, S., Liang, X., Huang, W., Jialong Zhang, V., Pang, Q., He, X., Li, L., & Zhang, C. (2022). Real-time defects detection for apple sorting using NIR cameras with pruning-based YOLOV4 network. Computers and Electronics in Agriculture, 193, 106715. [CrossRef]
- Figorilli, S., Violino, S., Moscovini, L., Ortenzi, L., Salvucci, G., Vasta, S., Tocci, F., Costa, C., Toscano, P., & Pallottino, F. (2022). Olive Fruit Selection through AI Algorithms and RGB Imaging. In Foods (Vol. 11, Issue 21). [CrossRef]
- Furferi, R., Governi, L., & Volpe, Y. (2010). ANN-based method for olive Ripening Index automatic prediction. Journal of Food Engineering, 101(3), 318–328. [CrossRef]
- Gracia, A., & León, L. (2011). Non-destructive assessment of olive fruit ripening by portable near infrared spectroscopy. Grasas y Aceites, 62(3), 268–274. [CrossRef]
- Guzmán, E., Baeten, V., Pierna, J. A. F., & García-Mesa, J. A. (2015). Determination of the olive ripening index of intact fruits using image analysis. Journal of Food Science and Technology, 52(3), 1462–1470. [CrossRef]
- Jiménez, B., Sánchez-Ortiz, A., Lorenzo, M. L., & Rivas, A. (2013). Influence of fruit ripening on agronomic parameters, quality indices, sensory attributes and phenolic compounds of Picudo olive oils. Food Research International, 54(2), 1860–1867. [CrossRef]
- Kamilaris, A., & Prenafeta-Boldú, F. X. (2018). Deep learning in agriculture: A survey. Computers and Electronics in Agriculture, 147, 70–90. [CrossRef]
- Khosravi, H., Saedi, S. I., & Rezaei, M. (2021). Real-time recognition of on-branch olive ripening stages by a deep convolutional neural network. Scientia Horticulturae, 287, 110252. [CrossRef]
- Lazzez, A., Perri, E., Caravita, M. A., Khlif, M., & Cossentini, M. (2008). Influence of Olive Ripening Stage and Geographical Origin on Some Minor Components in Virgin Olive Oil of the Chemlali Variety. Journal of Agricultural and Food Chemistry, 56(3), 982–988. [CrossRef]
- mohamed Diab, amany Ibrahim, & Hadad, G. (2020). B:Review article on chemical constituents and biological activity of Olea europaea. Records of Pharmaceutical and Biomedical Sciences, 4, 36–45. [CrossRef]
- Pereira, J. A. (2013). Special issue on “Olive oil: Quality, composition and health benefits.” Food Research International, 54(2), 1859. [CrossRef]
- Ponce, J. M., Aquino, A., & Andújar, J. M. (2019). Olive-Fruit Variety Classification by Means of Image Processing and Convolutional Neural Networks. IEEE Access, 7, 147629–147641. [CrossRef]
- Puerto, D. A., Gila, D. M., García, J. G., & Ortega, J. G. (2015). Sorting Olive Batches for the Milling Process Using Image Processing. In Sensors (Vol. 15, Issue 7, pp. 15738–15754). [CrossRef]
- Rezaei, M., & Rohani, A. (2023). Estimating Freezing Injury on Olive Trees: A Comparative Study of Computing Models Based on Electrolyte Leakage and Tetrazolium Tests. Agriculture (Switzerland), 13(6). [CrossRef]
- Riquelme, M. T., Barreiro, P., Ruiz-Altisent, M., & Valero, C. (2008). Olive classification according to external damage using image analysis. Journal of Food Engineering, 87(3), 371–379. [CrossRef]
- Saedi, S. I., & Khosravi, H. (2020). A deep neural network approach towards real-time on-branch fruit recognition for precision horticulture. Expert Systems with Applications, 159, 113594. [CrossRef]
- Salguero-Chaparro, L., Baeten, V., Abbas, O., & Peña-Rodríguez, F. (2012). On-line analysis of intact olive fruits by vis–NIR spectroscopy: Optimisation of the acquisition parameters. Journal of Food Engineering, 112(3), 152–157. [CrossRef]
- Salim, F., Saeed, F., Basurra, S., Qasem, S. N., & Al-Hadhrami, T. (2023). DenseNet-201 and Xception Pre-Trained Deep Learning Models for Fruit Recognition. In Electronics (Vol. 12, Issue 14). [CrossRef]
- Violino, S., Moscovini, L., Costa, C., Re, P. D., Giansante, L., Toscano, P., Tocci, F., Vasta, S., Manganiello, R., Ortenzi, L., & Pallottino, F. (2022). Superior EVOO Quality Production: An RGB Sorting Machine for Olive Classification. In Foods (Vol. 11, Issue 18). [CrossRef]
- Wu, X., Liu, R., Yang, H., & Chen, Z. (2020). An Xception Based Convolutional Neural Network for Scene Image Classification with Transfer Learning. 2020 2nd International Conference on Information Technology and Computer Application (ITCA), 262–267. [CrossRef]





| Classes | O1 | O2 | O3 | O4 | O5 |
| Number of Samples | 195 | 161 | 183 | 93 | 129 |
| Average Mass (g) | 4.05 | 2.93 | 3.00 | 3.22 | 3.74 |
| Augmentation Parameters | Value |
| Random Translation (height_factor) | 0.1 |
| Random Translation (width_factor) | 0.1 |
| Random Flip | True |
| Random Contrast | 0.15 |
| Random Rotation | 0.15 |
| Layer (type) | Output Shape (Input Size= 224×224) | Output Shape (Input Size= 299×299) |
| Xception Block | (None, 7, 7, 2048) | (None, 10, 10, 2048) |
| Convolution 2D | (None, 7, 7, 128) | (None, 10, 10, 128) |
| Batch Normalization | (None, 7, 7, 128) | (None, 10, 10, 128) |
| Max Pooling 2D | (None, 4, 4, 128) | (None, 5, 5, 128) |
| Dropout | (None, 4, 4, 128) | (None, 5, 5, 128) |
| Convolution 2D | (None, 4, 4, 64) | (None, 5, 5, 64) |
| Batch Normalization | (None, 4, 4, 64) | (None, 5, 5, 64) |
| Max Pooling 2D | (None, 2, 2, 64) | (None, 3, 3, 64) |
| Dropout | (None, 2, 2, 64) | (None, 3, 3, 64) |
| Convolution 2D | (None, 2, 2, 32) | (None, 3, 3, 32) |
| Batch Normalization | (None, 2, 2, 32) | (None, 3, 3, 32) |
| Max Pooling 2D | (None, 1, 1, 32) | (None, 2, 2, 32) |
| Dropout | (None, 1, 1, 32) | (None, 2, 2, 32) |
| Dense | (None, 1, 1, 254) | (None, 2, 2, 254) |
| Dense | (None, 1, 1, 128) | (None, 2, 2, 128) |
| Dense | (None, 1, 1, 64) | (None, 2, 2, 64) |
| Global Average Pooling 2D | (None, 64) | (None, 64) |
| Dense | (None, 5) | (None, 5) |
| Total Parameters: | 27,721,803 | |
| Trainable Parameters: | 27,577,643 | |
| Non-trainable Parameters: | 144,160 |
| Min Train Loss / Epoch | Min Validation Loss / Epoch | Max Train Accuracy / Epoch | Max Validation Accuracy / Epoch | |
| Model 1 | 0.31 / 99 | 0.32 / 99 | 0.95 / 97 | 0.88 / 96 |
| Model 2 | 0.42 / 73 | 1.23 / 66 | 0.94 / 63 | 0.92 / 56 |
| Model 3 | 0.15 / 56 | 0.35 / 60 | 0.99 / 55 | 0.95 / 60 |
| Model 4 | 1.61 / 79 | 3.60 / 79 | 0.94 / 74 | 0.91 / 75 |
| Test Loss | Test Accuracy | |
| Model 1 | 0.3938 | 0.9346 |
| Model 2 | 1.2338 | 0.8693 |
| Model 3 | 0.5502 | 0.9085 |
| Model 4 | 3.8232 | 0.8693 |
| Precision | Recall | F1-score | Support | ||||||||||
| Model 1 | Model 2 | Model 3 | Model 4 | Model 1 | Model 2 | Model 3 | Model 4 | Model 1 | Model 2 | Model 3 | Model 4 | All | |
| O1 | 1.00 | 0.97 | 1.00 | 1.00 | 0.90 | 1.00 | 1.00 | 1.00 | 0.95 | 0.99 | 1.00 | 1.00 | 39 |
| O2 | 0.91 | 1.00 | 0.91 | 1.00 | 0.94 | 0.59 | 0.91 | 0.81 | 0.92 | 0.75 | 0.91 | 0.90 | 32 |
| O3 | 0.89 | 0.73 | 0.89 | 0.69 | 0.92 | 1.00 | 0.86 | 1.00 | 0.91 | 0.84 | 0.88 | 0.81 | 37 |
| O4 | 0.89 | 0.80 | 0.82 | 0.88 | 0.84 | 0.84 | 0.95 | 0.37 | 0.86 | 0.82 | 0.88 | 0.52 | 19 |
| O5 | 1.00 | 1.00 | 1.00 | 0.96 | 1.00 | 0.85 | 0.77 | 0.92 | 1.00 | 0.92 | 0.87 | 0.94 | 26 |
| Micro Avg. | 0.94 | 0.88 | 0.93 | 0.88 | 0.92 | 0.87 | 0.90 | 0.87 | 0.93 | 0.87 | 0.91 | 0.87 | 153 |
| Macro Avg. | 0.94 | 0.90 | 0.92 | 0.90 | 0.92 | 0.86 | 0.90 | 0.82 | 0.93 | 0.86 | 0.91 | 0.83 | 153 |
| Weighted Avg. | 0.94 | 0.90 | 0.93 | 0.90 | 0.92 | 0.87 | 0.90 | 0.87 | 0.93 | 0.87 | 0.91 | 0.86 | 153 |
| Samples Avg. | 0.92 | 0.87 | 0.90 | 0.87 | 0.92 | 0.87 | 0.90 | 0.87 | 0.92 | 0.87 | 0.90 | 0.87 | 153 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).