Maturity Classification of “Hupingzao” Jujubes with an Imbalanced Dataset Based on Improved MobileNet V2
Abstract
:1. Introduction
2. Materials and Methods
2.1. Image Acquisition and Dataset Distributions
2.2. Model Selection
2.3. CB-MobileNet V2
2.3.1. Class Balance Loss
2.3.2. MobileNet V2
2.4. Experimental Environment Settings and Model Evaluation Indicators
3. Results and Discussion
3.1. Influence of Learning Rate and Optimizer on Models
3.2. Comparison of Model Performance
3.2.1. Ablation Study
3.2.2. Model Comparison
3.3. Test of Model Performance
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Feng, Z.; Gao, Z.; Jiao, X.; Shi, J.; Wang, R. Widely targeted metabolomic analysis of active compounds at different maturity stages of ‘Hupingzao’ jujube. J. Food Compos. Anal. 2020, 88, 103417. [Google Scholar] [CrossRef]
- Mukama, M.; Ambaw, A.; Berry, T.M.; Opara, U.L. Analysing the dynamics of quality loss during precooling and ambient storage of pomegranate fruit. J. Food Eng. 2019, 245, 166–173. [Google Scholar] [CrossRef]
- Zhao, Y.; Zhu, X.; Hou, Y.; Pan, Y.; Shi, L.; Li, X. Effects of harvest maturity stage on postharvest quality of winter jujube (Zizyphus jujuba Mill. cv. Dongzao) fruit during cold storage. Sci. Hortic. 2021, 277, 109778. [Google Scholar] [CrossRef]
- Wang, B.; Huang, Q.; Venkitasamy, C.; Chai, H.; Gao, H.; Cheng, N.; Cao, W.; Lv, X.; Pan, Z. Changes in phenolic compounds and their antioxidant capacities in jujube (Ziziphus jujuba Miller) during three edible maturity stages. LWT-Food Sci. Technol. 2016, 66, 56–62. [Google Scholar] [CrossRef]
- Shi, Q.; Zhang, Z.; Su, J.; Zhou, J.; Li, X. Comparative Analysis of Pigments, Phenolics, and Antioxidant Activity of Chinese Jujube (Ziziphus jujuba Mill.) during Fruit Development. Molecules 2018, 23, 1917. [Google Scholar] [CrossRef]
- Fan, S.; Li, J.; Zhang, Y.; Tian, X.; Wang, Q.; He, X.; Zhang, C.; Huang, W. On line detection of defective apples using computer vision system combined with deep learning methods. J. Food Eng. 2020, 286, 110102. [Google Scholar] [CrossRef]
- Dhakshina Kumar, S.; Esakkirajan, S.; Bama, S.; Keerthiveena, B. A microcontroller based machine vision approach for tomato grading and sorting using SVM classifier. Microprocess. Microsyst. 2020, 76, 103090. [Google Scholar] [CrossRef]
- Khojastehnazhand, M.; Mohammadi, V.; Minaei, S. Maturity detection and volume estimation of apricot using image processing technique. Sci. Hortic. 2019, 251, 247–251. [Google Scholar] [CrossRef]
- Wan, P.; Toudeshki, A.; Tan, H.; Ehsani, R. A methodology for fresh tomato maturity detection using computer vision. Comput. Electron. Agric. 2018, 146, 43–50. [Google Scholar] [CrossRef]
- Septiarini, A.; Sunyoto, A.; Hamdani, H.; Kasim, A.A.; Utaminingrum, F.; Hatta, H.R. Machine vision for the maturity classification of oil palm fresh fruit bunches based on color and texture features. Sci. Hortic. 2021, 286, 110245. [Google Scholar] [CrossRef]
- Azarmdel, H.; Jahanbakhshi, A.; Mohtasebi, S.S.; Muñoz, A.R. Evaluation of image processing technique as an expert system in mulberry fruit grading based on ripeness level using artificial neural networks (ANNs) and support vector machine (SVM). Postharvest Biol. Technol. 2020, 166, 111201. [Google Scholar] [CrossRef]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. ImageNet classification with deep convolutional neural networks. Commun. ACM 2017, 60, 84–90. [Google Scholar] [CrossRef]
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale. In Proceedings of the Image Recognition. IEEE Conference on Learning Representations, San Diego, CA, USA, 10 April 2015. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
- Szegedy, C.; Vanhoucke, V.; Ioffe, S.; Shlens, J.; Wojna, Z. Rethinking the Inception Architecture for Computer Vision. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 2818–2826. [Google Scholar] [CrossRef]
- Szegedy, C.; Liu, W.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7 June 2015. [Google Scholar]
- Gulzar, Y.; Hamid, Y.; Soomro, A.B.; Alwan, A.A.; Journaux, L. A Convolution Neural Network-Based Seed Classification System. Symmetry 2020, 12, 2018. [Google Scholar] [CrossRef]
- Loddo, A.; Loddo, M.; Di Ruberto, C. A novel deep learning based approach for seed image classification and retrieval. Comput. Electron. Agric. 2021, 187, 106269. [Google Scholar] [CrossRef]
- Taner, A.; Öztekin, Y.B.; Duran, H. Performance Analysis of Deep Learning CNN Models for Variety Classification in Hazelnut. Sustainability 2021, 13, 6527. [Google Scholar] [CrossRef]
- Hamid, Y.; Wani, S.; Soomro, A.; Alwan, A.; Gulzar, Y. Smart Seed Classification System based on MobileNetV2 Architecture. In Proceedings of the International Conference on Computing and Information Technology, Tabuk, Saudi Arabia, 25–27 January 2022; pp. 217–222. [Google Scholar]
- Zhang, Y.-D.; Dong, Z.; Chen, X.; Jia, W.; Du, S.; Muhammad, K.; Wang, S.-H. Image based fruit category classification by 13-layer deep convolutional neural network and data augmentation. Multimed. Tools Appl. 2019, 78, 3613–3632. [Google Scholar] [CrossRef]
- Wang, S.; Chen, Y. Fruit category classification via an eight-layer convolutional neural network with parametric rectified linear unit and dropout technique. Multimed. Tools Appl. 2020, 79, 15117–15133. [Google Scholar] [CrossRef]
- Albarrak, K.; Gulzar, Y.; Hamid, Y.; Mehmood, A.; Soomro, A.B. A Deep Learning-Based Model for Date Fruit Classification. Sustainability 2022, 14, 6339. [Google Scholar] [CrossRef]
- Zhang, W.; Tan, A.; Zhou, G.; Chen, A.; Li, M.; Chen, X.; He, M.; Hu, Y. A method for classifying citrus surface defects based on machine vision. J. Food Meas. Charact. 2021, 15, 2877–2888. [Google Scholar] [CrossRef]
- Ananthanarayana, T.; Ptucha, R.; Kelly, S.C. Deep Learning based Fruit Freshness Classification and Detection with CMOS Image sensors and Edge processors. Electron. Imaging 2020, 2020, 172. [Google Scholar] [CrossRef]
- Kang, J.; Gwak, J. Ensemble of multi-task deep convolutional neural networks using transfer learning for fruit freshness classification. Multimed. Tools Appl. 2021, 81, 22355–22377. [Google Scholar] [CrossRef]
- Parvathi, S.; Tamil Selvi, S. Detection of maturity stages of coconuts in complex background using Faster R-CNN model. Biosyst. Eng. 2021, 202, 119–132. [Google Scholar] [CrossRef]
- Saranya, N.; Srinivasan, K.; Kumar, S.K.P. Banana ripeness stage identification: A deep learning approach. J. Ambient. Intell. Humaniz. Comput. 2021, 13, 4033–4039. [Google Scholar] [CrossRef]
- Pan, S.; Yang, Q. A Survey on Transfer Learning. IEEE Trans. Knowl. Data Eng. 2010, 22, 1345–1359. [Google Scholar] [CrossRef]
- Rismiyati, R.; Luthfiarta, A. VGG16 Transfer Learning Architecture for Salak Fruit Quality Classification. Telematika 2021, 18, 37–48. [Google Scholar] [CrossRef]
- Xiang, Y.; Lin, J.; Li, Y.; Hu, Z.; Xiong, Y. Mango double-sided maturity online detection and classification system. Trans. Chin. Soc. Agric. Eng. 2019, 35, 259–266. [Google Scholar] [CrossRef]
- Behera, S.K.; Rath, A.K.; Sethy, P.K. Maturity status classification of papaya fruits based on machine learning and transfer learning approach. Inform. Process. Agric. 2021, 8, 244–250. [Google Scholar] [CrossRef]
- Junos, M.H.; Khairuddin, A.S.M.; Dahari, M. Automated object detection on aerial images for limited capacity embedded device using a lightweight CNN model. AEJ 2022, 61, 6023–6041. [Google Scholar] [CrossRef]
- Bao, W.; Yang, X.; Liang, D.; Hu, G.; Yang, X. Lightweight Convolutional Neural Network model for field wheat ear disease identification. Comput. Electron. Agric. 2021, 189, 106367. [Google Scholar] [CrossRef]
- Zhang, X.; Zhou, X.; Lin, M.; Sun, J. ShuffleNet: An extremely efficient Convolutional Neural Network for mobile devices. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 6848–6856. [Google Scholar] [CrossRef]
- Howard, A.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Weyand, T.; Andreetto, M.; Adam, H. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. In Proceedings of the Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 17 April 2017. [Google Scholar]
- Son, M.; Jung, S.; Moon, J.; Hwang, E. BCGAN-Based Over-Sampling Scheme for Imbalanced Data. In Proceedings of the 2020 IEEE International Conference on Big Data and Smart Computing (BigComp), Busan, South Korea, 19–22 February 2020; pp. 155–160. [Google Scholar]
- Xu, X.; Li, W.; Duan, Q. Transfer learning and SE-ResNet152 networks-based for small-scale unbalanced fish species identification. Comput. Electron. Agric. 2021, 180, 105878. [Google Scholar] [CrossRef]
- Johnson, J.M.; Khoshgoftaar, T.M. The Effects of Data Sampling with Deep Learning and Highly Imbalanced Big Data. Inf. Syst. Front. 2020, 22, 1113–1131. [Google Scholar] [CrossRef]
- Li, X.; Zhang, L. Unbalanced data processing using deep sparse learning technique. Future Gener. Comp. Syst. 2021, 125, 480–484. [Google Scholar] [CrossRef]
- Cui, Y.; Jia, M.; Lin, T.; Song, Y.; Belongie, S. Class-Balanced loss based on effective number of samples. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 16–20 June 2019; pp. 9260–9269. [Google Scholar] [CrossRef]
- Lin, T.; Goyal, P.; Girshick, R.; He, K.; Dollár, P. Focal loss for dense object detection. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 42, 318–327. [Google Scholar] [CrossRef]
- Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.C. MobilenetV2: Inverted residuals and linear bottlenecks. In Proceedings of the 2018 IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–22 June 2018. [Google Scholar]
- Wang, Y.; Kan, J.; Li, W.; Zhan, C. Image segmentation and maturity recognition algorithm based on color features of lingwu long jujube. Adv. J. Food Sci. Technol. 2013, 5, 1625–1631. [Google Scholar] [CrossRef]
- Liu, K.; Li, W.; Chen, F. The simulation of image grading test of lingwu long jujube mature fruit. Comput. Simul. 2017, 34, 273–276. [Google Scholar]
- Pourdarbani, R.; Ghassemzadeh, H.R.; Seyedarabi, H.; Nahandi, F.Z.; Vahed, M.M. Study on an automatic sorting system for Date fruits. J. Saudi Soc. Agric. Sci. 2015, 14, 83–90. [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]
- 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. [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]
Maturity | Dataset | Training Set | Valid Set | Prediction Set |
---|---|---|---|---|
Immaturity | 618 | 432 | 124 | 62 |
White maturity | 483 | 338 | 96 | 49 |
Early-red maturity | 506 | 354 | 101 | 51 |
Half-red maturity | 1268 | 888 | 254 | 126 |
Full maturity | 1368 | 957 | 274 | 137 |
Total | 4243 | 2969 | 849 | 425 |
Optimizer | Learning Rate | Loss Value of Train | Accuracy of Train | Loss Value of Validation | Accuracy of Validation |
---|---|---|---|---|---|
Adam | 0.001 | 0.016 | 99.630% | 0.055 | 98.704% |
0.0001 | 0.005 | 99.966% | 0.018 | 98.822% | |
0.00001 | 0.004 | 99.966% | 0.015 | 98.587% | |
AdamW | 0.001 | 0.037 | 99.394% | 0.131 | 98.469% |
0.0001 | 0.016 | 99.630% | 0.055 | 99.058% | |
0.00001 | 0.062 | 99.293% | 0.217 | 98.587% | |
ASGD | 0.001 | 0.127 | 98.585% | 0.444 | 98.351% |
0.0001 | 0.079 | 99.394% | 0.276 | 98.704% | |
0.00001 | 0.486 | 95.386% | 1.704 | 97.880% | |
SGD | 0.001 | 0.123 | 98.080% | 0.432 | 98.822% |
0.0001 | 0.023 | 99.798% | 0.082 | 98.940% | |
0.00001 | 0.123 | 99.023% | 0.431 | 98.469% |
Class Balance | Transfer Learning | Loss Value of Train | Accuracy of Train | Loss Value of Validation | Accuracy of Validation |
---|---|---|---|---|---|
1.202 | 55.040% | 1.152 | 57.597% | ||
With | 0.107 | 96.362% | 0.064 | 98.233% | |
With | 0.025 | 99.630% | 0.0873 | 97.880% | |
With | With | 0.016 | 99.630% | 0.055 | 99.058% |
Category | Class Balance | Precision | Recall | F1 Score |
---|---|---|---|---|
Immaturity | Without | 92.366% | 97.581% | 0.949 |
With | 96.800% | 97.581% | 0.972 | |
White maturity | Without | 96.629% | 89.583% | 0.930 |
With | 96.842% | 95.833% | 0.963 | |
Early-red maturity | Without | 100.000% | 100.000% | 1.000 |
With | 100.000% | 100.000% | 1.000 | |
Half-red maturity | Without | 100.000% | 99.213% | 0.996 |
With | 99.608% | 100.000% | 0.998 | |
Full maturity | Without | 99.275% | 100.000% | 0.996 |
With | 100.000% | 99.635% | 0.998 |
Model | Loss Value of Train | Accuracy of Train | Loss Value of Validation | Accuracy of Validation |
---|---|---|---|---|
CB-AlexNet | 0.047 | 98.787% | 0.165 | 98.587% |
CB-MobileNet V2 | 0.016 | 99.630% | 0.055 | 99.058% |
CB-GoogLeNet | 0.001 | 100.000% | 0.004 | 98.940% |
CB-VGG 16 | 0.001 | 100.000% | 0.001 | 98.704% |
CB-Inception V3 | 0.001 | 100.000% | 0.067 | 98.704% |
CB-Resnet 50 | 0.002 | 100.000% | 0.015 | 98.940% |
CB-ShuffleNet | 0.010 | 99.798% | 0.035 | 98.587% |
Category | Precision | Recall | F1 Score |
---|---|---|---|
Immaturity | 98.387% | 98.387% | 0.984 |
White maturity | 97.917% | 95.918% | 0.969 |
Early-red maturity | 98.077% | 100.000% | 0.990 |
Half-red maturity | 100.000% | 100.000% | 1.000 |
Full maturity | 100.000% | 100.000% | 1.000 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Sun, H.; Zhang, S.; Ren, R.; Su, L. Maturity Classification of “Hupingzao” Jujubes with an Imbalanced Dataset Based on Improved MobileNet V2. Agriculture 2022, 12, 1305. https://doi.org/10.3390/agriculture12091305
Sun H, Zhang S, Ren R, Su L. Maturity Classification of “Hupingzao” Jujubes with an Imbalanced Dataset Based on Improved MobileNet V2. Agriculture. 2022; 12(9):1305. https://doi.org/10.3390/agriculture12091305
Chicago/Turabian StyleSun, Haixia, Shujuan Zhang, Rui Ren, and Liyang Su. 2022. "Maturity Classification of “Hupingzao” Jujubes with an Imbalanced Dataset Based on Improved MobileNet V2" Agriculture 12, no. 9: 1305. https://doi.org/10.3390/agriculture12091305
APA StyleSun, H., Zhang, S., Ren, R., & Su, L. (2022). Maturity Classification of “Hupingzao” Jujubes with an Imbalanced Dataset Based on Improved MobileNet V2. Agriculture, 12(9), 1305. https://doi.org/10.3390/agriculture12091305