Evaluation of Convolutional Neural Networks’ Hyperparameters with Transfer Learning to Determine Sorting of Ripe Medjool Dates
Abstract
:1. Introduction
2. Materials and Methods
2.1. Image Acquisition
2.2. Image Data Set
2.3. Convolutional Neural Networks
2.3.1. VGG-16 and VGG-19 Architectures
2.3.2. Inception V3 Architecture (GoogLeNet V3)
2.3.3. ResNet-50, ResNet-101, and ResNet-152 Architectures (Residual Neural Network)
2.3.4. AlexNet
2.3.5. CNN from Scratch
2.3.6. CNNs’ Optimization Techniques and Hyperparameters
Techniques
Hyperparameters
2.4. Experimental Framework
2.5. Performance Evaluation
3. Results
4. Discussion
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Salomon-Torres, R.; Sol-Uribe, J.A.; Salasab, B.; García, C.; Krueger, R.; Hernández-Balbuena, D.; Norzagaray-Plasencia, S.; García-Vázquez, J.P.; Ortiz-Uribe, N. Effect of Four Pollinating Sources on Nutritional Properties of Medjool Date (Phoenix dactylifera L.) Seeds. Agriculture 2020, 10, 45. [Google Scholar] [CrossRef] [Green Version]
- Chao, C.T.; Krueger, R.R. The Date Palm (Phoenix dactylifera L.): Overview of Biology, Uses, and Cultivation. HortScience 2007, 42, 1077–1082. [Google Scholar] [CrossRef] [Green Version]
- Radwan, E.; Radwan, E. The current status of the date palm (Phoenix dactylifera) and its uses in the Gaza Strip, Palestine. Biodiversitas J. Biol. Divers. 2017, 18, 1047–1061. [Google Scholar] [CrossRef]
- Aleid, S.M. Dates. In Tropical and Subtropical Fruits: Postharvest Physiology, Processing and Packaging; Siddid, M., Ahmed, J., Lobo, M.G., Ozadali, F., Eds.; Wiley: New York, NY, USA, 2012; pp. 179–202. [Google Scholar]
- Food and Agriculture Organization. FAOSTAT. Available online: http://www.fao.org/faostat/en/#data/QL (accessed on 11 December 2020).
- Ortiz-Uribe, N.; Salomon-Torres, R.; Krueger, R. Date Palm Status and Perspective in Mexico. Agriculture 2019, 9, 46. [Google Scholar] [CrossRef] [Green Version]
- Altaheri, H.; Alsulaiman, M.; Muhammad, G.; Amin, S.U.; Bencherif, M.; Mekhtiche, M. Date fruit dataset for intelligent harvesting. Data Brief 2019, 26, 104514. [Google Scholar] [CrossRef] [PubMed]
- Altaheri, H.; Alsulaiman, M.; Muhammad, G. Date Fruit Classification for Robotic Harvesting in a Natural Environment Using Deep Learning. IEEE Access 2019, 7, 117115–117133. [Google Scholar] [CrossRef]
- Nasiri, A.; Taheri-Garavand, A.; Zhang, Y.-D. Image-based deep learning automated sorting of date fruit. Postharvest Biol. Technol. 2019, 153, 133–141. [Google Scholar] [CrossRef]
- Guo, Z.; Zhang, M.; Lee, D.-J.; Simons, T. Smart Camera for Quality Inspection and Grading of Food Products. Electronics 2020, 9, 505. [Google Scholar] [CrossRef] [Green Version]
- Sa, I.; Ge, Z.; Dayoub, F.; Upcroft, B.; Perez, T.; McCool, C. DeepFruits: A Fruit Detection System Using Deep Neural Networks. Sensors 2016, 16, 1222. [Google Scholar] [CrossRef] [Green Version]
- Steinbrener, J.; Posch, K.; Leitner, R. Hyperspectral fruit and vegetable classification using convolutional neural networks. Comput. Electron. Agric. 2019, 162, 364–372. [Google Scholar] [CrossRef]
- Zeng, G. Fruit and vegetables classification system using image saliency and convolutional neural network. In Proceedings of the 2017 IEEE 3rd Information Technology and Mechatronics Engineering Conference (ITOEC), Chongqing, China, 3–5 October 2017; IEEE: Piscataway, NJ, USA, 2017; pp. 613–617. [Google Scholar]
- Rudnik, K.; Michalski, P. A Vision-Based Method Utilizing Deep Convolutional Neural Networks for Fruit Variety Classification in Uncertainty Conditions of Retail Sales. Appl. Sci. 2019, 9, 3971. [Google Scholar] [CrossRef] [Green Version]
- Muhammad, G. Date fruits classification using texture descriptors and shape-size features. Eng. Appl. Artif. Intell. 2015, 37, 361–367. [Google Scholar] [CrossRef]
- Haidar, A.; Dong, H.; Mavridis, N. Image-based date fruit classification. In Proceedings of the 2012 IV International Congress on Ultra Modern Telecommunications and Control Systems, St. Petersburg, Russia, 3–5 October 2012; IEEE: Piscataway, NJ, USA, 2012; pp. 357–363. [Google Scholar]
- Manickavasagan, A.; Al-Mezeini, N.; Al-Shekaili, H. RGB color imaging technique for grading of dates. Sci. Hortic. 2014, 175, 87–94. [Google Scholar] [CrossRef]
- Faisal, M.; Albogamy, F.; ElGibreen, H.; Algabri, M.; AlQershi, F.A. Deep Learning and Computer Vision for Estimating Date Fruits Type, Maturity Level, and Weight. IEEE Access 2020, 8, 206770–206782. [Google Scholar] [CrossRef]
- Dodge, S.; Karam, L. Understanding how image quality affects deep neural networks. In Proceedings of the 2016 Eighth International Conference on Quality of Multimedia Experience (QoMEX), Lisbon, Portugal, 6–8 June 2016; IEEE: Piscataway, NJ, USA, 2016; pp. 1–6. [Google Scholar]
- Geirhos, R.; Janssen, D.H.; Schütt, H.H.; Rauber, J.; Bethge, M.; Wichmann, F.A. Comparing deep neural networks against humans: Object recognition when the signal gets weaker. arXiv 2017, arXiv:1706.06969. [Google Scholar]
- Feng, J.; Darrell, T. Learning the Structure of Deep Convolutional Networks. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), Santiago, Chile, 7–13 December 2015; IEEE: Piscataway, NJ, USA, 2015; pp. 2749–2757. [Google Scholar]
- Zaccone, G.; Karim, M.R. Deep Learning with TensorFlow: Explore Neural Networks and Build Intelligent Systems with Python; Packt Publishing Ltd.: Birmingham, UK, 2018. [Google Scholar]
- Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv 2014, arXiv:1409.1556. [Google Scholar]
- Szegedy, C.; Vanhoucke, V.; Ioffe, S.; Shlens, J.; Wojna, Z. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 2818–2826. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems; Curran Associates, Inc.: New York, NY, USA, 2012; pp. 1097–1105. [Google Scholar]
- Zhu, Q.; He, Z.; Zhang, T.; Cui, W. Improving Classification Performance of Softmax Loss Function Based on Scalable Batch-Normalization. Appl. Sci. 2020, 10, 2950. [Google Scholar] [CrossRef]
- Pan, S.J.; Yang, Q. A Survey on Transfer Learning. IEEE Trans. Knowl. Data Eng. 2009, 22, 1345–1359. [Google Scholar] [CrossRef]
- Han, J.-H.; Choi, D.-J.; Park, S.-U.; Hong, S.-K. Hyperparameter Optimization Using a Genetic Algorithm Considering Verification Time in a Convolutional Neural Network. J. Electr. Eng. Technol. 2020, 15, 721–726. [Google Scholar] [CrossRef]
- Bera, S.; Shrivastava, V.K. Analysis of various optimizers on deep convolutional neural network model in the application of hyperspectral remote sensing image classification. Int. J. Remote. Sens. 2019, 41, 2664–2683. [Google Scholar] [CrossRef]
- Bisong, E. Google Colaboratory. In Building Machine Learning and Deep Learning Models on Google Cloud Platform; Apress: Berkeley, CA, USA, 2019; pp. 59–64. [Google Scholar]
- Kamilaris, A.; Prenafeta-Boldú, F.X. A review of the use of convolutional neural networks in agriculture. J. Agric. Sci. 2018, 156, 312–322. [Google Scholar] [CrossRef] [Green Version]
- Kamilaris, A.; Prenafeta-Boldú, F.X. Deep learning in agriculture: A survey. Comput. Electron. Agric. 2018, 147, 70–90. [Google Scholar] [CrossRef] [Green Version]
- Mohanty, S.P.; Hughes, D.P.; Salathé, M. Using Deep Learning for Image-Based Plant Disease Detection. Front. Plant. Sci. 2016, 7, 1419. [Google Scholar] [CrossRef] [Green Version]
- Rahnemoonfar, M.; Sheppard, C. Deep Count: Fruit Counting Based on Deep Simulated Learning. Sensors 2017, 17, 905. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Ashraf, S.; Kadery, I.; Chowdhury, A.A.; Mahbub, T.Z.; Rahman, R.M. Fruit Image Classification Using Convolutional Neural Networks. Int. J. Softw. Innov. 2019, 7, 51–70. [Google Scholar] [CrossRef]
- Kandel, I.; Castelli, M. The effect of batch size on the generalizability of the convolutional neural networks on a histopathology dataset. ICT Express 2020, 6, 312–315. [Google Scholar] [CrossRef]
- Motta, D.; Santos, A.; Álisson, B.; Machado, B.A.S.; Ribeiro-Filho, O.G.V.; Camargo, L.O.A.; Valdenegro-Toro, M.A.; Kirchner, F.; Badaró, R. Optimization of convolutional neural network hyperparameters for automatic classification of adult mosquitoes. PLoS ONE 2020, 15, e0234959. [Google Scholar] [CrossRef]
Network | Depth (Hidden Layers) | Image Size | Parameters |
---|---|---|---|
CNN from scratch | 24 | 224 × 224 | 1,209,058 |
VGG-16 | 16 | 224 × 224 | 134,268,738 |
VGG-19 | 19 | 224 × 224 | 143,667,240 |
ResNet-50 | 50 | 224 × 224 | 23,591,810 |
ResNet-101 | 101 | 224 × 224 | 42,662,274 |
ResNet-152 | 152 | 224 × 224 | 58,375,042 |
Inception v3 | 48 | 299 × 299 | 21,806,882 |
AlexNet | 8 | 227 × 227 | 56,328,962 |
Parameters | CNN from Scratch | VGG-16 | VGG-19 | ResNet-50 | ResNet-101 | ResNet-152 | AlexNet | Inception V3 |
---|---|---|---|---|---|---|---|---|
Epochs | 25 | 25 | 25 | 25 | 25 | 25 | 25 | 25 |
400 | 400 | 400 | 400 | 400 | 400 | 400 | 400 | |
Batch = 64, Optimizer = Adam, Learning Rate = 0.001 | ||||||||
Accuracy | 93.24 | 96.63 | 90.54 | 68.92 | 71.62 | 74.32 | 64.19 | 96.62 |
(%) | 94.59 | 96.62 | 95.95 | 81.08 | 80.41 | 80.41 | 88.51 | 98.65 |
Time | 9 | 24 | 14 | 11 | 14 | 25 | 11 | 12 |
(min) | 16 | 40 | 43 | 33 | 41 | 61 | 19 | 131 |
Batch = 128, Optimizer = Adam, Learning Rate = 0.001 | ||||||||
Accuracy | 85.13 | 95.27 | 87.84 | 70.95 | 70.27 | 64.17 | 75.00 | 93.24 |
(%) | 93.92 | 97.29 | 98.65 | 83.11 | 75.67 | 81.08 | 85.81 | 95.27 |
Time | 11 | 12 | 5 | 13 | 7 | 9 | 11 | 13 |
(min) | 12 | 34 | 46 | 45 | 16 | 54 | 19 | 48 |
Batch = 64, Optimizer = Adam, Learning Rate = 0.01 | ||||||||
Accuracy | 46.62 | 85.81 | 93.92 | 83.78 | 65.54 | 75.68 | 85.81 | 95.95 |
(%) | 95.27 | 95.95 | 96.62 | 86.49 | 79.05 | 84.46 | 67.57 | 98.65 |
Time | 10 | 12 | 12 | 10 | 11 | 16 | 16 | 11 |
(min) | 14 | 43 | 45 | 34 | 45 | 65 | 18 | 47 |
Batch = 128, Optimizer = Adam, Learning Rate = 0.01 | ||||||||
Accuracy | 53.38 | 97.29 | 97.30 | 84.46 | 76.35 | 66.89 | 89.19 | 93.92 |
(%) | 43.24 | 96.62 | 99.32 | 84.46 | 79.73 | 81.76 | 87.16 | 95.95 |
Time | 11 | 12 | 13 | 12 | 11 | 15 | 11 | 13 |
(min) | 16 | 38 | 43 | 33 | 46 | 60 | 18 | 44 |
Parameters | CNN from Scratch | VGG-16 | VGG-19 | ResNet-50 | ResNet-101 | ResNet-152 | AlexNet | Inception V3 |
---|---|---|---|---|---|---|---|---|
Epochs | 25 | 25 | 25 | 25 | 25 | 25 | 25 | 25 |
400 | 400 | 400 | 400 | 400 | 400 | 400 | 400 | |
Batch = 64, Optimizer = SGD, Learning Rate = 0.001 | ||||||||
Accuracy | 54.05 | 86.49 | 87.16 | 66.89 | 53.38 | 54.05 | 52.70 | 86.50 |
(%) | 93.24 | 93.24 | 91.21 | 75.68 | 75.00 | 64.19 | 56.08 | 95.94 |
Time | 12 | 14 | 13 | 11 | 12 | 13 | 11 | 13 |
(min) | 16 | 41 | 46 | 36 | 47 | 58 | 19 | 42 |
Batch = 128, Optimizer = SGD, Learning Rate = 0.001 | ||||||||
Accuracy | 51.35 | 87.16 | 85.81 | 68.92 | 53.37 | 53.37 | 53.38 | 79.05 |
(%) | 94.59 | 90.54 | 92.57 | 71.62 | 74.32 | 64.87 | 60.81 | 93.24 |
Time | 10 | 23 | 13 | 12 | 12 | 13 | 11 | 14 |
(min) | 28 | 50 | 48 | 32 | 44 | 115 | 18 | 43 |
Batch = 64, Optimizer = SGD, Learning Rate = 0.01 | ||||||||
Accuracy | 83.11 | 88.51 | 77.10 | 45.94 | 46.62 | 45.94 | 53.38 | 92.56 |
(%) | 89.86 | 92.57 | 94.59 | 50.00 | 66.89 | 65.54 | 83.78 | 93.92 |
Time | 10 | 12 | 12 | 11 | 8 | 14 | 11 | 12 |
(min) | 15 | 45 | 45 | 32 | 44 | 58 | 31 | 44 |
Batch = 128, Optimizer = SGD, Learning Rate = 0.01 | ||||||||
Accuracy | 79.72 | 78.37 | 79.73 | 45.94 | 46.62 | 53.37 | 54.05 | 91.89 |
(%) | 91.26 | 90.54 | 88.51 | 52.03 | 56.08 | 64.19 | 80.41 | 95.27 |
Time | 11 | 11 | 12 | 11 | 69 | 13 | 34 | 12 |
(min) | 16 | 41 | 44 | 53 | 44 | 54 | 21 | 42 |
Reference | Date Palm Cultivar | Maturity Stages | Number of Images (Dataset) | CNN Architectures | Hyperparameters | Best Accuracy |
---|---|---|---|---|---|---|
Nasiri et al., 2019 [9] | Shahani | Khalal, Rutab, Tamar, and defective date | +1300 images | VGG-16 | Epochs = 15 Batch = 32 | VGG-16 96.98% |
Altaheri et al., 2019 [8] | Barhi, Khalas, Meneifi, Naboot Saif and Sullaj | Immature-1, Immature-2, pre-Khalal, Khalal, Khalal-with-Rutab, pre-Tamar, and Tamar. | 8072 images | AlexNet, VGG-16, Transfer learning and Fine-Tuning | Epochs = 50 and 200 Batch = 32 and 128 Learning rate = 0.0001, 0.0002 | VGG-16 97.25% |
Faisal et al., 2020 [18] | Barhi, Khalas, Meneifi, Naboot Saif, and Sullaj | Immature, Khalal, Khalal with Rutab, Pre-Tamar, and Tamar | 8079 images | ResNet, VGG-19, Inception V3, NASNet and support vector machine (SVM) (regression and linear) | Epochs = 50 Batch = 16 Optimizer = Adam Learning rate = 0.0001 | ResNet 99.01% |
This Study | Medjool | Ripe and unripe | 1002 images | VGG-16, VGG-19, Inception V3, ResNet-50, ResNet-101, ResNet-152, AlexNet, CNN from scratch | Epochs = 25 and 400 Batch = 64 and 128 Optimizers = Adam, Stochastic Gradient Descent Learning rate = 0.001, 0.01 | VGG-19 99.32% |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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/).
Share and Cite
Pérez-Pérez, B.D.; García Vázquez, J.P.; Salomón-Torres, R. Evaluation of Convolutional Neural Networks’ Hyperparameters with Transfer Learning to Determine Sorting of Ripe Medjool Dates. Agriculture 2021, 11, 115. https://doi.org/10.3390/agriculture11020115
Pérez-Pérez BD, García Vázquez JP, Salomón-Torres R. Evaluation of Convolutional Neural Networks’ Hyperparameters with Transfer Learning to Determine Sorting of Ripe Medjool Dates. Agriculture. 2021; 11(2):115. https://doi.org/10.3390/agriculture11020115
Chicago/Turabian StylePérez-Pérez, Blanca Dalila, Juan Pablo García Vázquez, and Ricardo Salomón-Torres. 2021. "Evaluation of Convolutional Neural Networks’ Hyperparameters with Transfer Learning to Determine Sorting of Ripe Medjool Dates" Agriculture 11, no. 2: 115. https://doi.org/10.3390/agriculture11020115
APA StylePérez-Pérez, B. D., García Vázquez, J. P., & Salomón-Torres, R. (2021). Evaluation of Convolutional Neural Networks’ Hyperparameters with Transfer Learning to Determine Sorting of Ripe Medjool Dates. Agriculture, 11(2), 115. https://doi.org/10.3390/agriculture11020115