Computer Vision System for Mango Fruit Defect Detection Using Deep Convolutional Neural Network
Abstract
:1. Introduction
2. Related Work
3. Methodology
3.1. Dataset
3.2. Preprocessing
3.2.1. Histogram Equalization
3.2.2. Adaptive Wiener Filter
3.3. Data Augmentation
3.4. Convolutional Neural Network
3.4.1. Convolution Layer
3.4.2. Pooling Layer
3.4.3. Fully Connected Layer
3.4.4. Rectified Linear Units (ReLU)
3.4.5. CNN Architecture
4. Performance Measures
- TP—Mango images are classified as defective.
- FP—Mango images are misclassified as good.
- TN—Mango images are classified as good.
- FN—Mango images are misclassified as defective.
5. Experimental Results
6. Discussion
7. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Zhen, O.P.; Hashim, N.; Maringgal, B. Quality evaluation of mango using non-destructive approaches: A review. J. Agric. Food Eng. 2020, 1, 0003. [Google Scholar]
- Verma, M.K.; Srivastav, M.; Usha, K. Calender of Operations for Mango Cultivation. Division of Fruits and Horticultural Technology; ICAR-Indian Agricultural Research Institute: New Delhi, India, 2015. [Google Scholar]
- Sadegaonkar, V.D.; Wagh, K.H. Quality inspection and grading of mangoes by computer vision & Image Analysis. Int. J. Eng. Res. Appl. 2013, 3, 1208–1212. [Google Scholar]
- Bhargava, A.; Bansal, A. Fruits and vegetables quality evaluation using computer vision: A review. J. King Saud Univ.-Comput. Inf. Sci. 2021, 33, 243–257. [Google Scholar] [CrossRef]
- Nagle, M.; Intani, K.; Romano, G.; Mahayothee, B.; Sardsud, V.; Müller, J. Determination of surface color of ‘all yellow’mango cultivars using computer vision. Int. J. Agric. Biol. Eng. 2016, 9, 42–50. [Google Scholar]
- 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]
- Vélez-Rivera, N.; Blasco, J.; Chanona-Pérez, J.; Calderón-Domínguez, G.; de Jesús Perea-Flores, M.; Arzate-Vázquez, I.; Farrera-Rebollo, R. Computer vision system applied to classification of “Manila” mangoes during ripening process. Food Bioprocess Technol. 2014, 7, 1183–1194. [Google Scholar] [CrossRef]
- Patel, K.K.; Kar, A.; Khan, M.A. Development and an application of computer vision system for nondestructive physical characterization of mangoes. Agric. Res. 2020, 9, 109–124. [Google Scholar] [CrossRef]
- Patel, K.K.; Kar, A.; Khan, M.A. Potential of reflected UV imaging technique for detection of defects on the surface area of mango. J. Food Sci. Technol. 2019, 56, 1295–1301. [Google Scholar] [CrossRef]
- Nandi, C.S.; Tudu, B.; Koley, C. A machine vision technique for grading of harvested mangoes based on maturity and quality. IEEE Sens. J. 2016, 16, 6387–6396. [Google Scholar] [CrossRef]
- Nandi, C.S.; Tudu, B.; Koley, C. A machine vision-based maturity prediction system for sorting of harvested mangoes. IEEE Trans. Instrum. Meas. 2014, 63, 1722–1730. [Google Scholar] [CrossRef]
- Huang, X.; Lv, R.; Wang, S.; Aheto, J.H.; Dai, C. Integration of computer vision and colorimetric sensor array for nondestructive detection of mango quality. J. Food Process Eng. 2018, 41, e12873. [Google Scholar] [CrossRef]
- Guojin, L.; Diyong, D.; Shuang, C. Research on Mango Detection and Classification by Computer Vision. J. Agric. Mech. Res. 2015, 10, 4. [Google Scholar]
- Sahu, D.; Potdar, R.M. Defect identification and maturity detection of mango fruits using image analysis. Am. J. Artif. Intell. 2017, 1, 5–14. [Google Scholar]
- Andrushia, A.D.; Trephena, P.A. Artificial bee colony based feature selection for automatic skin disease identification of mango fruit. In Nature Inspired Optimization Techniques for Image Processing Applications; Springer: Cham, Switzerland, 2019; pp. 215–233. [Google Scholar]
- Momin, M.A.; Rahman, M.T.; Sultana, M.S.; Igathinathane, C.; Ziauddin, A.T.M.; Grift, T.E. Geometry-based mass grading of mango fruits using image processing. Inf. Process. Agric. 2017, 4, 150–160. [Google Scholar] [CrossRef]
- Raghavendra, A.; Guru, D.S.; 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]
- Kumari, N.; Belwal, R. Hybridized approach of image segmentation in classification of fruit mango using BPNN and discriminant analyzer. Multimed. Tools Appl. 2021, 80, 4943–4973. [Google Scholar] [CrossRef]
- Patel, K.K.; Kar, A.; Khan, M.A. Monochrome computer vision for detecting common external defects of mango. J. Food Sci. Technol. 2021, 58, 4550–4557. [Google Scholar] [CrossRef]
- Xie, Y.; Ning, L.; Wang, M.; Li, C. Image enhancement based on histogram equalization. J. Phys. Conf. Ser. 2019, 1314, 012161. [Google Scholar] [CrossRef] [Green Version]
- Shorten, C.; Khoshgoftaar, T.M. A survey on image data augmentation for deep learning. J. Big Data 2019, 6, 60. [Google Scholar] [CrossRef]
- Acharya, U.R.; Oh, S.L.; Hagiwara, Y.; Tan, J.H.; Adam, M.; Gertych, A.; San Tan, R. A deep convolutional neural network model to classify heartbeats. Comput. Biol. Med. 2017, 89, 389–396. [Google Scholar] [CrossRef]
- Acharya, U.R.; Fujita, H.; Oh, S.L.; Hagiwara, Y.; Tan, J.H.; Adam, M.; Tan, R.S. Deep convolutional neural network for the automated diagnosis of congestive heart failure using ECG signals. Appl. Intell. 2019, 49, 16–27. [Google Scholar] [CrossRef]
- Paoletti, M.E.; Haut, J.M.; Plaza, J.; Plaza, A. A new deep convolutional neural network for fast hyperspectral image classification. ISPRS J. Photogramm. Remote Sens. 2018, 145, 120–147. [Google Scholar] [CrossRef]
- Schmidt-Hieber, J. Nonparametric regression using deep neural networks with ReLU activation function. Ann. Stat. 2020, 48, 1875–1897. [Google Scholar]
- Gebrehiwot, A.; Hashemi-Beni, L.; Thompson, G.; Kordjamshidi, P.; Langan, T.E. Deep convolutional neural network for flood extent mapping using unmanned aerial vehicles data. Sensors 2019, 19, 1486. [Google Scholar] [CrossRef] [Green Version]
- Ruuska, S.; Hämäläinen, W.; Kajava, S.; Mughal, M.; Matilainen, P.; Mononen, J. Evaluation of the confusion matrix method in the validation of an automated system for measuring feeding behaviour of cattle. Behav. Process. 2018, 148, 56–62. [Google Scholar] [CrossRef]
Layers | Type | Number of Feature Maps | Number of Neurons in the Layer | Size of the Kernel Involves to form Each Feature Map | Stride |
---|---|---|---|---|---|
0 | Input | 3 | 224 × 224 × 3 | - | - |
1 | Convolution | 16 | 222 × 222 × 16 | 3 × 3 × 3 | 1 |
2 | Max-pooling | 16 | 111 × 111 × 16 | 2 × 2 | 2 |
3 | Convolution | 32 | 109 × 109 × 32 | 3 × 3 × 16 | 1 |
4 | Max-pooling | 32 | 55 × 55 × 32 | 2 × 2 | 2 |
5 | Convolution | 32 | 53 × 53 × 32 | 3 × 3 × 32 | 1 |
6 | Max-pooling | 32 | 27 × 27 × 32 | 2 × 2 | 2 |
7 | Convolution | 64 | 25 × 25 × 64 | 3 × 3 × 32 | 1 |
8 | Max-pooling | 64 | 23 × 23 × 64 | 3 × 3 × 64 | 1 |
9 | Convolution | 64 | 12 × 12 × 64 | 2 × 2 | 2 |
10 | Convolution | 128 | 10 × 10 × 128 | 3 × 3 × 64 | 1 |
11 | Max-pooling | 128 | 8 × 8 × 128 | 3 × 3 × 128 | 1 |
12 | Fully Connected | - | 128 | - | - |
13 | Fully Connected | - | 64 | - | - |
14 | Output | - | 2 | - | - |
k-Fold | Test Result | Actual | Sensitivity (%) | Specificity (%) | Accuracy (%) | |
---|---|---|---|---|---|---|
Good | Defect | |||||
1 | Good | 39 | 1 | 97.5 | 97.5 | 97.5 |
Defect | 1 | 39 | ||||
2 | Good | 40 | 1 | 97.5 | 100 | 98.75 |
Defect | 0 | 39 | ||||
3 | Good | 40 | 1 | 97.5 | 100 | 98.75 |
Defect | 0 | 39 | ||||
4 | Good | 38 | 0 | 100 | 95 | 97.5 |
Defect | 2 | 40 | ||||
5 | Good | 40 | 0 | 100 | 100 | 100 |
Defect | 0 | 40 | ||||
6 | Good | 40 | 1 | 97.5 | 100 | 98.75 |
Defect | 0 | 39 | ||||
7 | Good | 40 | 1 | 97.5 | 100 | 98.75 |
Defect | 0 | 39 | ||||
8 | Good | 39 | 0 | 100 | 97.5 | 98.75 |
Defect | 1 | 40 | ||||
9 | Good | 40 | 1 | 97.5 | 100 | 98.75 |
Defect | 0 | 39 | ||||
10 | Good | 39 | 0 | 100 | 100 | 97.5 |
Defect | 0 | 39 |
References | Features | Classifier | Accuracy (%) |
---|---|---|---|
Proposed model | CNN | 98.5 | |
Patel et al. [19] | Morphological | Multi-linear regression models | 88.75 and 97.88 |
Nandi et al. [10] | Color-based | Fuzzy incremental learning | 87 |
Nandi et al. [11] | Color-based | Support vector machine | 96 |
Huang et al. [12] | Colormetric sensor array and principal component analysis | Support vector classification | 97.5 |
Momin et al. [16] | Geometry and shape features | Global thresholding, median filter color binarization, and morphological processing | 97 |
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
Nithya, R.; Santhi, B.; Manikandan, R.; Rahimi, M.; Gandomi, A.H. Computer Vision System for Mango Fruit Defect Detection Using Deep Convolutional Neural Network. Foods 2022, 11, 3483. https://doi.org/10.3390/foods11213483
Nithya R, Santhi B, Manikandan R, Rahimi M, Gandomi AH. Computer Vision System for Mango Fruit Defect Detection Using Deep Convolutional Neural Network. Foods. 2022; 11(21):3483. https://doi.org/10.3390/foods11213483
Chicago/Turabian StyleNithya, R., B. Santhi, R. Manikandan, Masoumeh Rahimi, and Amir H. Gandomi. 2022. "Computer Vision System for Mango Fruit Defect Detection Using Deep Convolutional Neural Network" Foods 11, no. 21: 3483. https://doi.org/10.3390/foods11213483
APA StyleNithya, R., Santhi, B., Manikandan, R., Rahimi, M., & Gandomi, A. H. (2022). Computer Vision System for Mango Fruit Defect Detection Using Deep Convolutional Neural Network. Foods, 11(21), 3483. https://doi.org/10.3390/foods11213483