From Harvest to Market: Non-Destructive Bruise Detection in Kiwifruit Using Convolutional Neural Networks and Hyperspectral Imaging
Abstract
:1. Introduction
- Establishing a Robust Detection Method: We establish a robust and accurate method for early bruise detection in Kiwi. Our method has the potential to significantly reduce food waste and improve the overall quality of produce in the market, addressing a significant issue in the food industry.
- Foundation for Future Research: Our work presents a significant advancement in the field of post-harvest bruising detection. It lays a solid foundation for future studies on similar topics and encourages the exploration of hyperspectral imaging and advanced machine learning models in bruise detection across a broader range of fruits and vegetables.
2. Materials and Methods
2.1. Collecting the Samples
2.2. Setup and Hardware Used to Collect the Spectral-Spatial Hyperspectral Imaging (HSI) Data
2.3. The Input Dataset Samples: Train, Test, and Validation Disjoint Sets
2.4. Convolutional Neural Network (CNN) Classifiers: 2D-CNN and 3D-CNN
2.4.1. 2D-Convolutional Neural Network (2D-CNN)
2.4.2. 3D-Convolutional Neural Network (3D-CNN)
2.5. Models of CNN Neural Architectures
2.5.1. PreActResNet Architecture
2.5.2. GoogLeNet Architecture
2.6. Performance Classification Indices: Confusion Matrix, Precision , Recall , Accuracy (CCR), F1-Score, Receiver Operating Characteristic (ROC), and pr Curves
- (a)
- The ROC curve computes the plot over the whole range by slowly varying the classifier output detection threshold. All ROC curves vary from to the points in the plane when varying the output classifier threshold, but the difference between a good and a bad classifier is the area under the ROC curve (AUC) that the classifier is able to accumulate in the plane, called the ROC-AUC.
- (b)
- The precision–recall () curve plots the plot over the whole range, slowly varying the classifier detection threshold. All curves vary from to the points in the plane while varying the output classifier threshold.
3. Results
3.1. Bruised Area Induced in the Hyperspectral Fruit Images
3.2. 3D-CNN Architecture Based on the PreActResNet Model
3.2.1. Classification Performance of the 3D-CNN Architecture Based on the PreActResNet Network
3.2.2. Precision–Recall (pr) and ROC Curves of the 3D-CNN Architecture Based on the PreActResNet Model
3.3. 3D-CNN Architecture Based on the GoogLeNet Model
3.3.1. Classification Performance of the 3D-CNN Architecture Based on the GoogLeNet Model
3.3.2. Precision–Recall and ROC Curves of the 3D-CNN Architecture Based on the GoogLeNet Model
3.4. 2D-CNN Architecture Based on the PreActResNet Model
3.4.1. Classification Performance of the 2D-CNN Architecture Based on the PreActResNet Model
3.4.2. Precision–Recall and ROC Curves of the 3D-CNN Architecture Based on the PreActResNet Model
3.5. 2D-CNN Architecture Based on the GoogLeNet Model
3.5.1. Classifier Performance of the 2D-CNN Architecture with the GoogLeNet Model
3.5.2. Precision–Recall and ROC Curves of the 2D-CNN Architecture Based on the GoogLeNet Classifier Model
3.6. Comparison between the Results of Related Studies and Those of the Proposed Method
3.7. Future Studies
4. Conclusions
- As observed comparing both Vis (RGB) and NIR hyperspectral kiwifruit images, bruised areas are seen slightly darker in the HSI images, which validates the ability of the HSI imaging technology to be used in the early detection of bruised areas in fruit.
- The early, automatic, and non-destructive detection of the bruising area on HSI imaging was more accurate in the case of unripe fruit as compared to the ripe fruit case, with an exception made for the 2D-CNN GoogLeNet classifier which showed the opposite behavior, with a consistent difference and for all three kiwifruit classes. An explanation of this fact might be the higher contrast of the color change after bruising of the fruit flesh in unripe fruit as compared to ripe fruit; despite this, the hypothesis needs to be further investigated for proper validation.
- The accuracy of the 2D and 3D models is higher than 95% for the unripe samples. The reason goes back to the physiological issues of Kiwi. In fact, in the unripe samples, due to the firmness of the fruit, discoloration of the bruise is more obvious than in the ripe ones.
- Another important point is the superiority of the 2D-CNN classifier compared to 3D models, which can be due to the following: (1) the complexity of 2D-CNN is lower because it examines information only in the spatial dimension, and as a result, it achieves more accuracy in the classification of hyperspectral images, and (2) due to the focus of the 2D-CNN on spatial features, the extraction of spatial features from hyperspectral images is better, so the accuracy increases
- According to the comparison with previous research, the correct classification rate (CCR) is comparable, and it can be stated that the proposed methods provide promising results in the early identification of kiwifruit.
- It is common among gardeners to harvest kiwifruit a little too early because it is prone to bruising during transportation. Since the results of the proposed classifiers were more promising in identifying bruise symptoms for hard status than the soft mode, the alignment of the results with gardeners’ actions can therefore be applicable to kiwi grading.
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Li, Z.; Liu, J.; Li, P. Relationship between mechanical property and damage of tomato during robot harvesting. Trans. Chin. Soc. Agric. Eng. 2010, 26, 112–116. [Google Scholar] [CrossRef]
- Li, Z.; Thomas, C. Quantitative evaluation of mechanical damage to fresh fruits. Trends Food Sci. Technol. 2014, 35, 138–150. [Google Scholar] [CrossRef]
- Soleimani, B.; Ahmadi, E. Evaluation and analysis of vibration during fruit transport as a function of road conditions, suspension system and travel speeds. Eng. Agric. Environ. Food 2015, 8, 26–32. [Google Scholar] [CrossRef]
- Al-Dairi, M.; Pathare, P.B.; Al-Yahyai, R.; Opara, U.L. Mechanical damage of fresh produce in postharvest transportation: Current status and future prospects. Trends Food Sci. Technol. 2022, 124, 195–207. [Google Scholar] [CrossRef]
- Sun, Z.; Hu, D.; Xie, L.; Ying, Y. Detection of early stage bruise in apples using optical property mapping. Comput. Electron. Agric. 2022, 194, 106725. [Google Scholar] [CrossRef]
- Lu, Y.; Lu, R.; Zhang, Z. Detection of subsurface bruising in fresh pickling cucumbers using structured-illumination reflectance imaging. Postharvest Biol. Technol. 2021, 180, 111624. [Google Scholar] [CrossRef]
- Opara, U.L.; Pathare, P.B. Bruise damage measurement and analysis of fresh horticultural produce—A review. Postharvest Biol. Technol. 2014, 91, 9–24. [Google Scholar] [CrossRef]
- Ragulskis, K.; Ragulskis, L. Dynamics of a single mass vibrating system impacting into a deformable support. Math. Model. Eng. 2020, 6, 66–78. [Google Scholar] [CrossRef]
- Fu, H.; Karkee, M.; He, L.; Duan, J.; Li, J.; Zhang, Q. Bruise Patterns of Fresh Market Apples Caused by Fruit-to-Fruit Impact. Agronomy 2020, 10, 59. [Google Scholar] [CrossRef]
- Celik, H.K. Determination of bruise susceptibility of pears (Ankara variety) to impact load by means of FEM-based explicit dynamics simulation. Postharvest Biol. Technol. 2017, 128, 83–97. [Google Scholar] [CrossRef]
- Zhang, F.; Ji, S.; Wei, B.; Cheng, S.; Wang, Y.; Hao, J.; Wang, S.; Zhou, Q. Transcriptome analysis of postharvest blueberries (Vaccinium corymbosum ‘Duke’) in response to cold stress. BMC Plant Biol. 2020, 20, 80. [Google Scholar] [CrossRef] [PubMed]
- Li, B.; Yin, H.; Liu, Y.-D.; Zhang, F.; Yang, A.-K.; Su, C.-T.; Ou-Yang, A.-G. Detection storage time of mild bruise’s yellow peaches using the combined hyperspectral imaging and machine learning method. J. Anal. Sci. Technol. 2022, 13, 24. [Google Scholar] [CrossRef]
- Sun, Y.; Wang, Y.; Xiao, H.; Gu, X.; Pan, L.; Tu, K. Hyperspectral imaging detection of decayed honey peaches based on their chlorophyll content. Food Chem. 2017, 235, 194–202. [Google Scholar] [CrossRef] [PubMed]
- Wei, Y.; Wu, F.; Xu, J.; Sha, J.; Zhao, Z.; He, Y.; Li, X. Visual detection of the moisture content of tea leaves with hyperspectral imaging technology. J. Food Eng. 2019, 248, 89–96. [Google Scholar] [CrossRef]
- Zhang, M.; Li, C. Blueberry bruise detection using hyperspectral transmittance imaging. In Proceedings of the 2016 ASABE Annual International Meeting, American Society of Agricultural and Biological Engineers, Orlando, FL, USA, 17–20 July 2016; p. 1. [Google Scholar] [CrossRef]
- Zhang, S.; Zhang, H.; Zhao, Y.; Guo, W.; Zhao, H. A simple identification model for subtle bruises on the fresh jujube based on NIR spectroscopy. Math. Comput. Model. 2013, 58, 545–550. [Google Scholar] [CrossRef]
- Zhu, Q.; Guan, J.; Huang, M.; Lu, R.; Mendoza, F. Predicting bruise susceptibility of ‘Golden Delicious’ apples using hyperspectral scattering technique. Postharvest Biol. Technol. 2016, 114, 86–94. [Google Scholar] [CrossRef]
- Shao, Y.; Xuan, G.; Hu, Z.; Gao, Z.; Liu, L. Determination of the bruise degree for cherry using Vis-NIR reflection spectroscopy coupled with multivariate analysis. PLoS ONE 2019, 14, e0222633. [Google Scholar] [CrossRef]
- Raghavendra, A.; Guru, D.; Rao, M.K. Mango internal defect detection based on optimal wavelength selection method using NIR spectroscopy. Artif. Intell. Agric. 2021, 5, 43–51. [Google Scholar] [CrossRef]
- Pourdarbani, R.; Sabzi, S.; Kalantari, D.; Paliwal, J.; Benmouna, B.; García-Mateos, G.; Molina-Martínez, J.M. Estimation of different ripening stages of Fuji apples using image processing and spectroscopy based on the majority voting method. Comput. Electron. Agric. 2020, 176, 105643. [Google Scholar] [CrossRef]
- Sabzi, S.; Javadikia, H.; Arribas, J.I. A three-variety automatic and non-intrusive computer vision system for the estimation of orange fruit pH value. Measurement 2020, 152, 107298. [Google Scholar] [CrossRef]
- Keresztes, J.C.; Goodarzi, M.; Saeys, W. Real-time pixel based early apple bruise detection using short wave infrared hyperspectral imaging in combination with calibration and glare correction techniques. Food Control 2016, 66, 215–226. [Google Scholar] [CrossRef]
- Pourdarbani, R.; Sabzi, S.; Arribas, J.I. Nondestructive estimation of three apple fruit properties at various ripening levels with optimal Vis-NIR spectral wavelength regression data. Heliyon 2021, 7, e07942. [Google Scholar] [CrossRef] [PubMed]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. Commun. ACM 2017, 60, 84–90. [Google Scholar] [CrossRef]
- Gulzar, Y. Fruit Image Classification Model Based on MobileNetV2 with Deep Transfer Learning Technique. Sustainability 2023, 15, 1906. [Google Scholar] [CrossRef]
- Mamat, N.; Othman, M.F.; Abdulghafor, R.; Alwan, A.A.; Gulzar, Y. Enhancing Image Annotation Technique of Fruit Classification Using a Deep Learning Approach. Sustainability 2023, 15, 901. [Google Scholar] [CrossRef]
- Dhiman, P.; Kaur, A.; Balasaraswathi, V.R.; Gulzar, Y.; Alwan, A.A.; Hamid, Y. Image Acquisition, Preprocessing and Classification of Citrus Fruit Diseases: A Systematic Literature Review. Sustainability 2023, 15, 9643. [Google Scholar] [CrossRef]
- Rizvi, S.M.H.; Syed, T.; Qureshi, J. Real Time Retail Petrol Sales Forecasting Using 1D-Dilated CNNs on IoT Devices. Available online: https://www.researchgate.net/profile/Jalaluddin-Qureshi/publication/337002421_Real_Time_Retail_Petrol_Sales_Forecasting_using_1D-dilated_CNNs_on_IoT_Devices/links/5dbf6bf4299bf1a47b11c8fe/Real-Time-Retail-Petrol-Sales-Forecasting-using-1D-dilated-CNNs-on-IoT-Devices.pdf (accessed on 14 May 2023).
- Yahyaoui, H. 3D Convolution Neural Network Using PyTorch. 2021. Available online: https://pytorch.org/docs/stable/generated/torch.nn.Conv3d.html (accessed on 14 April 2020).
- Kim, J.-H.; Jeong, J.-W. Gaze in the Dark: Gaze Estimation in a Low-Light Environment with Generative Adversarial Networks. Sensors 2020, 20, 4935. [Google Scholar] [CrossRef]
- Siegmund, D.; Tran, V.P.; von Wilmsdorff, J.; Kirchbuchner, F.; Kuijper, A. Piggybacking Detection Based on Coupled Body-Feet Recognition at Entrance Control, Progress in Pattern Recognition, Image Analysis, Computer Vision, and Applications. In Proceedings of the 24th Iberoamerican Congress, CIARP 2019, Havana, Cuba, 28–31 October 2019; Springer: Berlin/Heidelberg, Germany, 2019; pp. 780–789. [Google Scholar]
- Pourdarbani, R.; Sabzi, S.; Nadimi, M.; Paliwal, J. Interpretation of Hyperspectral Images Using Integrated Gradients to Detect Bruising in Lemons. Horticulturae 2023, 9, 750. [Google Scholar] [CrossRef]
- Yang, Y.; Wang, L.; Huang, M.; Zhu, Q.; Wang, R. Polarization imaging based bruise detection of nectarine by using ResNet-18 and ghost bottleneck. Postharvest Biol. Technol. 2022, 189, 111916. [Google Scholar] [CrossRef]
Set | Total Samples (before Augmentation) | Unbruised (Unbruised/Undamaged) | Bruised-1 (8 h after Bruising) | Bruised-2 (16 h after Bruising) | |
Train | 123 | 41 | 41 | 41 | |
3D-CNN | Test | 51 | 17 | 17 | 17 |
Validation | 30 | 10 | 10 | 10 | |
Total | 204 | 68 | 68 | 68 | |
Total Samples | Unbruised (unbruised/undamaged) | Bruised-1 (8 h after bruising) | Bruised-2 (16 h after bruising) | ||
Train | 21,402 | 7134 | 7134 | 7134 | |
2D-CNN | Test | 8874 | 2958 | 2958 | 2958 |
Validation | 5220 | 1740 | 1740 | 1740 | |
Total | 35,496 | 11,832 | 11,832 | 11,832 |
-AP | ROC-AUC | Precision (p,%) | Recall (r,%) | F1-Score (%) | Accuracy (%) | ||
---|---|---|---|---|---|---|---|
Unbruised | 1.00 | 1.00 | 100 | 94 | 97 | ||
Unripe | Bruised-1 | 1.00 | 1.00 | 94 | 100 | 97 | 98 |
Bruised-2 | 1.00 | 1.00 | 100 | 100 | 100 | ||
Unbruised | 0.94 | 0.96 | 79 | 88 | 83 | ||
Ripe | Bruised-1 | 0.95 | 0.96 | 100 | 88 | 94 | 86 |
Bruised-2 | 0.87 | 0.93 | 82 | 82 | 82 |
-AP | ROC-AUC | Precision (p,%) | Recall (r,%) | F1-Score (%) | Accuracy (%) | ||
---|---|---|---|---|---|---|---|
Unbruised | 0.96 | 0.96 | 100 | 88 | 94 | ||
Unripe | Bruised-1 | 0.94 | 0.98 | 89 | 100 | 94 | 96 |
Bruised-2 | 1.00 | 1.00 | 100 | 100 | 100 | ||
Unbruised | 0.84 | 0.89 | 79 | 88 | 83 | ||
Ripe | Bruised-1 | 0.97 | 0.98 | 100 | 88 | 94 | 86 |
Bruised-2 | 0.85 | 0.92 | 82 | 82 | 82 |
-AP | ROC-AUC | Precision (p,%) | Recall (r,%) | F1-Score (%) | Accuracy (%) | ||
---|---|---|---|---|---|---|---|
Unbruised | 0.99 | 1.00 | 99 | 100 | 99 | ||
Unripe | Bruised-1 | 1.00 | 1.00 | 89 | 100 | 94 | 96 |
Bruised-2 | 0.97 | 0.98 | 100 | 87 | 93 | ||
Unbruised | 0.98 | 0.99 | 98 | 86 | 92 | ||
Ripe | Bruised-1 | 0.98 | 0.99 | 90 | 96 | 93 | 91 |
Bruised-2 | 0.96 | 0.98 | 86 | 91 | 89 |
-AP | ROC-AUC | Precision (p,%) | Recall (r,%) | F1-Score (%) | Accuracy (%) | ||
---|---|---|---|---|---|---|---|
Unbruised | 1.00 | 1.00 | 99 | 98 | 98 | ||
Ripe | Bruised-1 | 0.99 | 1.00 | 88 | 99 | 93 | 95 |
Bruised-2 | 0.98 | 0.99 | 99 | 87 | 93 | ||
Unbruised | 1.00 | 1.00 | 98 | 97 | 98 | ||
Unripe | Bruised-1 | 1.00 | 1.00 | 98 | 99 | 98 | 98 |
Bruised-2 | 1.00 | 1.00 | 97 | 97 | 97 |
Paper | Fruits | Method | CCR (%) |
---|---|---|---|
Present paper | Kiwi (Ripe–Unripe) | 2D-CNN-GoogleNet | 95–98% |
Present paper | Kiwi (Ripe–Unripe) | 2D-CNN-PreActResNet | 91–96% |
Present paper | Kiwi (Ripe–Unripe) | 3D-CNN-GoogleNet | 86–96% |
Present paper | Kiwi (Ripe–Unripe) | 3D-CNN-PreActResNet | 86–98% |
Pourdarbani et al. [32] | Lemon | CNN-DenseNet | 85.71% |
Yang et al. [33] | Nectarines | CNN-ResNet | 97.69% |
Zhu et al. [17] | Mango | Fisher Linear Detection (FLD) | 84.00% |
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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Ebrahimi, S.; Pourdarbani, R.; Sabzi, S.; Rohban, M.H.; Arribas, J.I. From Harvest to Market: Non-Destructive Bruise Detection in Kiwifruit Using Convolutional Neural Networks and Hyperspectral Imaging. Horticulturae 2023, 9, 936. https://doi.org/10.3390/horticulturae9080936
Ebrahimi S, Pourdarbani R, Sabzi S, Rohban MH, Arribas JI. From Harvest to Market: Non-Destructive Bruise Detection in Kiwifruit Using Convolutional Neural Networks and Hyperspectral Imaging. Horticulturae. 2023; 9(8):936. https://doi.org/10.3390/horticulturae9080936
Chicago/Turabian StyleEbrahimi, Sajad, Razieh Pourdarbani, Sajad Sabzi, Mohammad H. Rohban, and Juan I. Arribas. 2023. "From Harvest to Market: Non-Destructive Bruise Detection in Kiwifruit Using Convolutional Neural Networks and Hyperspectral Imaging" Horticulturae 9, no. 8: 936. https://doi.org/10.3390/horticulturae9080936
APA StyleEbrahimi, S., Pourdarbani, R., Sabzi, S., Rohban, M. H., & Arribas, J. I. (2023). From Harvest to Market: Non-Destructive Bruise Detection in Kiwifruit Using Convolutional Neural Networks and Hyperspectral Imaging. Horticulturae, 9(8), 936. https://doi.org/10.3390/horticulturae9080936