Next Article in Journal
Design Strategies to Minimize Mobile Usability Issues in Navigation Design Patterns
Previous Article in Journal
Innovative Transitions: Exploring Demand for Smart City Development in Novi Sad as a European Capital of Culture
Previous Article in Special Issue
Evaluating Feature Impact Prior to Phylogenetic Analysis Using Machine Learning Techniques
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Accurately Identifying Sound vs. Rotten Cranberries Using Convolutional Neural Network

by
Sayed Mehedi Azim
1,
Austin Spadaro
1,
Joseph Kawash
2,
James Polashock
2,* and
Iman Dehzangi
1,3,4,*
1
Center for Computational and Integrative Biology, Rutgers University, Camden, NJ 08102, USA
2
Genetic Improvement of Fruit and Vegetables Laboratory, Agricultural Research Service, USDA, Chatsworth, NJ 08019, USA
3
Department of Computer Science, Rutgers University, Camden, NJ 08102, USA
4
Rutgers Cancer Institute, Rutgers University, New Brunswick, NJ 08901, USA
*
Authors to whom correspondence should be addressed.
Information 2024, 15(11), 731; https://doi.org/10.3390/info15110731
Submission received: 7 October 2024 / Revised: 8 November 2024 / Accepted: 13 November 2024 / Published: 15 November 2024
(This article belongs to the Special Issue Feature Papers in Artificial Intelligence 2024)

Abstract

:
Cranberries, native to North America, are known for their nutritional value and human health benefits. One hurdle to commercial production is losses due to fruit rot. Cranberry fruit rot results from a complex of more than ten filamentous fungi, challenging breeding for resistance. Nonetheless, our collaborative breeding program has fruit rot resistance as a significant target. This program currently relies heavily on manual sorting of sound vs. rotten cranberries. This process is labor-intensive and time-consuming, prompting the need for an automated classification (sound vs. rotten) system. Although many studies have focused on classifying different fruits and vegetables, no such approach has been developed for cranberries yet, partly because datasets are lacking for conducting the necessary image analyses. This research addresses this gap by introducing a novel image dataset comprising sound and rotten cranberries to facilitate computational analysis. In addition, we developed CARP (Cranberry Assessment for Rot Prediction), a convolutional neural network (CNN)-based model to distinguish sound cranberries from rotten ones. With an accuracy of 97.4%, a sensitivity of 97.2%, and a specificity of 97.2% on the training dataset and 94.8%, 95.4%, and 92.7% on the independent dataset, respectively, our proposed CNN model shows its effectiveness in accurately differentiating between sound and rotten cranberries.

1. Introduction

Fruits significantly impact human health due to their high fiber content, vitamins, minerals, and antioxidants [1]. Indigenous to North America, the American cranberry (Vaccinium macrocarpon Aiton) is a healthy fruit that contributes nutritional value. Previous research indicates that cranberry nutrients help prevent various cancers, including oral cancer, liver cancer, and stomach cancer, cardiovascular diseases, infections involving urinary tract disorders, and Helicobacter pylori-induced stomach ulcers [2,3,4,5]. Furthermore, cranberries are valued for their bioactive functional properties, making them popular for consumers seeking a well-balanced diet.
Breeding for superior cranberry varieties is in its infancy relative to most other crops. The first cranberry breeding program was started in the U.S. in 1929 in response to a disease outbreak [6]. The first selections from this breeding program were made available in 1950 [7]. Until this time, the commercial industry relied entirely on wild varieties. Public breeding programs established in Wisconsin and New Jersey have released several improved varieties since 2003. These programs are still active today.
Cranberry fruit rot, caused by a complex of 10 to 15 filamentous fungi, is economically the most important disease of cranberries [8]. Without protection by fungicides, rot can potentially destroy 50% to 100% of the fruit in the field [8]. Storage rot is less of a concern since most of the cranberries harvested are processed and not sold fresh. The cranberry industry in New Jersey ranked fruit rot resistance as the most vital trait to develop in cranberry, while Wisconsin listed fruit rot resistance as second in priority [9]. Climate change may exacerbate cranberry fruit rot, especially in Wisconsin and the Pacific Northwest, where it is less of an issue [10]. Finally, there is pressure to reduce pesticide use for human and environmental health reasons. Additionally, banning many effective fungicides has greatly limited the chemical control options [11].
In the face of the issues noted above, a sustainable approach to reducing fruit rot in cranberries is through breeding for resistance. A critical component of the breeding process is phenotyping traits of interest. Cranberries are woody perennials, requiring multi-year analyses. Thousands of plots are typically planted in the field and evaluated over 3–5 years [12]. Fruits are collected from a specified plot size and manually assessed to determine the amount afflicted by rot. This process is very time-consuming and labor-intensive. We propose a new machine learning model that automatically identifies sound vs. rotten cranberries from image data to speed up this process and reduce the hands-on labor requirements. Such a system (i.e., a system that can determine sound vs. rotted fruit) will significantly improve the efficiency of the sorting process, reduce the need for manual labor, and streamline cranberry breeding programs.
Over the past decades, advancements in image analysis and data-centric methods have shown tremendous success in agriculture [13,14,15,16,17,18,19]. Due to its quick and reproducible information processing for a specific product, red–green–blue (RGB) image analysis is becoming more and more popular in industrial applications. The flexibility of performing a detailed analysis of each pixel in an image gives information about a sample’s local and global color features, making it suitable for evaluating color-related aspects of highly heterogeneous matrices like those of most food products [20,21,22].
Thus, a substantial amount of research has been conducted on the classification of various fruits and vegetables using RGB images. Giraudo et al. developed an automated method to detect defective hazelnuts from RGB images using a tree-structure hierarchical classification approach [16]. Linag et al. proposed a grading method for defective apples using BiSeNet v2 and a pruned YOLO v4 network, which was further applied to a separate fruit tray machine to sort the apples based on the area of defects in the images [17]. Foong et al. used a convolutional-neural-network-based model, ResNet50, to detect rotten fruits, specifically bananas, apples, and oranges [18]. Parashar et al. developed a VGG-16 architecture to classify sound and rotten bananas, apples, and oranges with an accuracy of 93.52% [19].
In addition, researchers have studied the filtering of various fruits and vegetables using images of different visible spectra. El-Bendary et al. used a support vector machine (SVM) to examine tomato ripeness using 250 visible spectrum photos and achieved 90.8% accuracy [13]. Elhariri et al. experimented with 175 visible spectrum images and applied SVM to determine tomato ripeness with an accuracy of 92.72% [14]. Nguyen et al. developed a deep-learning-based tool for detecting viral diseases of grapevines using hyperspectral images captured by a SPECIM IQ 400–1000 nm hyperspectral sensor [15].
However, as no such datasets are available for cranberries, filtering rotten cranberries using machine learning (ML) techniques from images has yet to be investigated. This research presents first-of-their-kind image datasets from rotten and sound cranberry images. The main purpose of this research is to develop CARP (Cranberry Assessment for Rot Prediction), a convolutional-neural-network-based model, as a proof of concept to accurately and efficiently distinguish between sound and rotten cranberries, thereby supporting cranberry breeding and quality control efforts. Our generated dataset and standalone tool, CARP, are publicly available at: https://mlbclab.camden.rutgers.edu/usda-collaboration/ (accessed on 1 November 2024).

2. Materials and Methods

In this section, we will introduce our newly generated benchmark dataset and explain the data collection, classification, and evaluation techniques used in this study.

2.1. Data Collection

The cranberries used in this study were collected from commercial farms in and around Chatsworth, NJ. We captured the images of cranberry samples using a Micro-Hyperspec Extended VNIR device in the visible light range (manufacturer: Headwall Photonics, Inc., Bolton, MA, USA). The camera specifications used in the study are Micro-Hyperspec XVNIR R640 (Headwall Photonics, Bolton, MA, USA), wavelength ranging from 600 nm to 1700 nm with up to 267 spectral bands and up to 640 spatial bands, a pixel pitch of 15 μm, which refers to the center-to-center distance between two pixels, and frame rates up to 120 Hz.
This device collects full hyperspectral data for every pixel. The dataset is collected in a light spectrum and later converted to RGB images. This wavelength is significant for detecting specific biochemical characteristics and assessing the health of plant tissues and fruits. Additionally, images taken in this wavelength can be useful for identifying pigments present in fruits and vegetables, such as carotenoids, which play a crucial role in coloration and are associated with ripeness and decay processes [23,24]. To capture the images, the camera was positioned perpendicularly above the tray containing the cranberries. A total of 40 trays containing cranberries were captured to create the dataset.

2.2. Benchmark Dataset

We first segmented the original images to classify rotten vs. sound cranberries from the scanned RGB images to segregate individual cranberries. To do this, we used Otsu’s thresholding method to find the best threshold value to distinguish between our region of interest and the background in the image [25,26,27]. This approach is a nonparametric and unsupervised method for automatic threshold selection, which selects an optimal threshold based on the different discriminant criteria [28]. The primary criterion is to maximize the discriminant measure η. After processing, this method generates an image histogram containing the distribution of pixels. This method obtains the threshold value by maximizing the between-class variance, where a class means a set of pixels in a region. This technique produces satisfactory results in bimodal images, as the histogram of such images has two clearly expressed peaks with different intensity values [29,30,31]. After calculating the threshold value, we segment the cranberries in the image by obtaining the contours using OpenCV (Version 3.4) [32].
From a total of 40 scanned images (an image sample is available in Figure 1), a total of 1140 images consisting of 874 sound cranberries and 266 rotten cranberries were extracted. We created a training set consisting of 910 samples, of which 699 were sound and 211 were rotten. Consequently, the testing set contains 230 images with 175 sound and 55 rotten samples. The higher ratio of sound images reflects the actual harvest results.
To feed the data into our model for the classification task and ensure consistency across different models, we utilized the original images for model training. For the CNN model, the images are used directly as input, enabling convolution operations. For the other machine learning methods (such as SVM, RF, and KNN), the images are flattened into one-dimensional vectors. This process involves reshaping each image into a one-dimensional element vector. This standardized representation ensures that the same data are used across all models, allowing for a fair performance comparison.

2.3. Classifier

Convolutional neural network is a commonly used technique in image classification problems [33]. From high-complexity images such as histopathology images to biological sequence data, using CNN has provided tremendous success [34,35,36]. CNN extracts features (automatic feature extraction) by convolution operations and has shown superior results in image classification tasks compared to other machine learning and deep learning (DL) techniques. Previous studies have demonstrated that deeper CNN models commonly provide better results [37]. However, different studies have shown that increasing the convolutional layer’s depth does not necessarily improve prediction accuracy, especially for smaller datasets like ours [38]. Additionally, using a small CNN architecture reduces the chance of overfitting and requires fewer samples for training [39,40].
The CNN architecture we use is depicted in Figure 2. Our CNN classifier consists of three Conv2D layers with the number of filters and kernel sizes of [16, (3,3)], [32, (3,3)], and [16, (3,3)], respectively. After each of these layers, we added the Maxpooling2D layer. The output from the flattening layer is passed directly to a fully connected layer and then to the prediction layer. We used the rectified linear unit (ReLU) as an activation function for each intermediate layer, as it is widely used in machine learning for its simplicity and effectiveness [41,42]. In the output layer, sigmoid was used as an activation function.
To optimize the model during the training process, we use Adam optimizer with a learning rate of 0.001 [43]. We also use binary cross-entropy as the loss function [44], a standard formula of which is illustrated in Equation (1).
B C E   l o s s = 1 n i = 1 n y ( i ) l o g y ^   ( i ) 1 y ( i ) l o g 1 y ^   ( i )

2.4. Evaluation Methods

We use two different evaluation methods to ensure the effectiveness and generality of our proposed model. One of the most commonly used techniques to evaluate the machine learning pipeline is k-fold cross-validation, where we split the data into k subsets and use the k-1 subsets to train the model and the remaining subset to evaluate the model. We repeat this process until all k subsets are used once and only once for evaluation. This way, we test on all the subsets, so the model is not biased toward a particular batch of samples [45]. In this study, we used 5-fold cross-validation to report the model’s performance on the training dataset.
Additionally, the most widely used technique for testing computer vision models is to test the model on unseen data [46,47]. Here, we evaluate our model’s performance on the independent test set we prepared, which the model did not use during training.

2.5. Evaluation Metrix

Here we use accuracy, sensitivity, specificity, and the Matthews correlation coefficient (MCC) evaluation metrics, which are widely used in the literature [48] and are calculated as follows:
A c c u r a c y = T P + T N T P + T N + F P + F N × 100
S e n s i t i v i t y = T P T P + F N × 100
S p e c i f i c i t y = T N T N + F P × 100
M C C = ( T P × T N ) ( F P × F N ) ( T P + F P ) ( T P + F N ) ( T N + F P ) ( T N + F N )
where TP represents the number of true positives, TN is the number of true negatives, FP represents the number of false positives, and FN denotes the number of false negatives.

3. Results

Comparison with Different Machine Learning Models

To the best of our knowledge, this study is the first to use machine learning methods to identify rotten and sound cranberries from image data. The lack of a viable dataset is one of the main reasons for this purpose, which we address in this study by generating such a dataset. Since CARP is the first predictive model, comparing its performance with other studies is impossible. Hence, to investigate the efficacy of our proposed approach, we applied traditional machine learning algorithms to our dataset and compared the performance of our proposed model with them.
Here, we use several of the most popular conventional machine learning models, such as support vector machine (SVM), naive Bayes (NB), logistic regression (LR), decision tree (DT), and K-nearest neighbor (KNN). The results achieved using these methods compared to CARP, for five-fold cross-validation and an independent test set, are presented in Table 1.
As shown in Table 1, CARP outperforms all the other traditional machine learning methods for five-fold cross-validation and independent test sets by a significant margin. CARP achieves an accuracy of 97.4%, a sensitivity of 97.9%, a specificity of 97.2%, and an MCC of 0.92 in the five-fold cross-validation. For our independent test set, CARP achieves 94.8%, 95.4%, 92.7%, and 0.86 in terms of accuracy, sensitivity, specificity, and MCC, respectively. This demonstrates the strength of our proposed model in distinguishing between sound and rotten cranberries. Higher sensitivity and specificity in five-fold cross-validation (imbalance data) and independent test (balance data) sets show the proposed method’s capability to provide generalizable prediction performance.
Achieving 94.8% prediction accuracy on the independent test set demonstrates the effectiveness of CARP in predicting sound vs. rotten cranberries. In Figure 3, the receiver operating characteristic curves (ROC curves) clearly depict the capability of CARP in distinguishing between the rotten and sound cranberries. Such promising results demonstrate the possibility of further improvement using more complex models in the future. However, using more complex models requires larger datasets to avoid overfitting. Hence, our future direction is to add more samples to our current dataset and generate a more extensive benchmark. In addition, sharing our dataset paves the way for future studies to tackle this problem.

4. Discussion

Indigenous to North America, cranberries are known for their nutritional value and significant human health benefits due to their high fiber content, vitamins, minerals, and antioxidants. Previous studies indicate that cranberry nutrients help prevent various diseases, and the bioactive functional properties in cranberries make them popular among consumers seeking a well-balanced diet, making it a billion-dollar industry. One major hurdle to commercial production is losses due to fruit rot. Cranberry fruit rot, caused by a complex of 10 to 15 filamentous fungi, is economically the most important disease of cranberries. To resolve this issue, a sustainable approach to breeding for resistance is taken by the United States Department of Agriculture. However, this process requires a multi-year analysis (typically 3–5 years) wherein the cranberries are manually assessed to determine the amount afflicted by rot. This process is very time-consuming and labor-intensive.
In this research, we propose a new machine learning model that automatically identifies sound vs. rotten cranberries from image data to speed up this process and reduce the hands-on labor requirements to streamline cranberry breeding programs. For this study, we created an RGB image dataset of sound and rotten cranberries taken using a hyperspectral camera to automatically sort sound and rotten cranberries. Since the dataset is too small, we focused on building a simple yet effective CNN-based method to classify the sound and rotten cranberries. Our proposed method (CARP) showed significant performance even with a limited number of samples in both the training dataset and the independent test set. CARP achieves an accuracy of 97.4% on the training dataset and 94.8% on the independent dataset, with a balanced performance in predicting both rotten and sound samples. This performance indicates the feasibility of building an automated system for rotten cranberry filtration in the field. As a result of this study, we present the first machine learning method for this task, which is publicly available as a standalone tool. We also have generated a publicly available benchmark to use in future studies. In our future work, we aim to incorporate more samples into the dataset and build more complex deep learning models to identify sound vs. rotten cranberries with a better prediction performance.
Even though our model provides noteworthy performance in sorting rotten and sound cranberries utilizing RGB images, RGB imaging has several limitations. The RGB cameras can only provide phenotypic information. Thus, detecting fruit rot related to fungal infections that are internal and still do not have any external phenotype using RGB is not possible. As a result, we are utilizing the hyperspectral camera as it provides access to spectral and spatial information [48]. Hyperspectral imaging has shown tremendous success in tasks where the focus is to obtain information related to the structural damage inside fruits or objects [49,50]. Our aim for the future is to work on much more complex images, for which hyperspectral data will be of great help. In the next phase, we aim to work on long trays where cranberries are adjacent and difficult to detect and segment (a large number of adjacent cranberries on a long tray). Later, we aim to identify rotten cranberries due to fungal infection with no external phenotype. Finally, we aim to identify sound vs. rotten cranberries from the filed images. For all these cases, having hyperspectral information is necessary and important. Considering this direction, we use the hyperspectral camera for imaging.
The overall goal of this work is to provide a proof of concept, demonstrating the feasibility of sorting rotten and sound cranberries. This approach will significantly aid the cranberry breeding program by reducing the labor required for sorting. In the future, we aim to advance this technology to production applications in the field, optimizing the sorting process by leveraging the strengths of machine learning and hyperspectral imaging techniques.

5. Practical Applications

In this study, we examine the feasibility of sorting rotten and sound cranberries from tray images, with the ultimate goal of deploying this technology in the field for practical use. The next phase of our research is designed to filter out rotten cranberries from a conveyor belt, which will play a crucial role in enhancing the efficiency of the cranberry breeding program. To achieve this, we will employ hyperspectral imaging technology, which allows us to capture detailed spectral information that can identify the quality of the cranberries. The system will be configured to scan the conveyor belt beneath the camera, enabling real-time detection and sorting of the cranberries as they move along the belt.
Furthermore, we plan to integrate the developed deep learning models into this process to enhance the accuracy and speed of sorting cranberries directly from field images. These models will be trained to recognize specific visual indicators of quality, leveraging the strengths of hyperspectral imaging to detect structural damages caused by fungal infections in the cranberries. By utilizing this advanced technology, our integrated system aims to significantly reduce the need for manual labor and the time required for sorting, thereby streamlining operations in the cranberry breeding program.

6. Conclusions

In this study, we addressed the pressing challenge of cranberry fruit rot by proposing a novel approach to filtering rotten cranberries by harnessing the power of machine learning and image recognition technology. We presented an image dataset consisting of rotten and sound cranberries captured using a Micro-Hyperspec Extended VNIR device in the visible light range. Additionally, we developed CARP, a convolutional-neural-network-based tool for distinguishing between rotten and sound cranberries.
Results achieved by our proposed model demonstrate that CARP can be adapted to filter rotten cranberries from the field. Furthermore, we can leverage its ability to distinguish rotten cranberries to filter other rotten fruits, saving harvesters time and money. Despite CARP’s significant performance on RGB data, it still lacks the ability to classify internal rot in cranberries. In future iterations of our work, we aim to use hyperspectral images with all the bands available to predict fruit rot more accurately, even when the rot is not visible.

Author Contributions

I.D., J.K. and J.P. formulated the problem; J.K. and J.P. collected the data; S.M.A. and A.S. conducted the experiments; S.M.A. prepared the data; I.D. and J.P. supervised the study; and S.M.A., A.S. and I.D. wrote the manuscript. All authors have read and agreed to the published version of the manuscript.

Funding

This study is partially funded by a seed grant from the Agricultural Genome to Phenome Initiative of USDA-SCRI under Grant 2008-51180-04878.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Our generated dataset and standalone tool, CARP, are publicly available at https://mlbclab.camden.rutgers.edu/usda-collaboration/ (accessed on 1 November 2024).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Joanne, L. Slavin, Beate Lloyd, Health Benefits of Fruits and Vegetables. Adv. Nutr. 2012, 3, 506–516. [Google Scholar] [CrossRef]
  2. Pappas, E.; Schaich, K.M. Phytochemicals of cranberries and cranberry products: Characterization, potential health effects, and processing stability. Crit. Rev. Food Sci. Nutr. 2009, 49, 741–781. [Google Scholar] [CrossRef] [PubMed]
  3. Côté, J.; Caillet, S.; Doyon, G.; Sylvain, J.-F.; Lacroix, M. Bioactive compounds in cranberries and their biological properties. Crit. Rev. Food Sci. Nutr. 2010, 50, 666–679. [Google Scholar] [CrossRef] [PubMed]
  4. Esquivel-Chirino, C.; Bolaños-Carrillo, M.A.; Carmona-Ruiz, D.; Lopéz-Macay, A.; Hernández-Sánchez, F.; Montés-Sánchez, D.; Escuadra-Landeros, M.; Gaitán-Cepeda, L.A.; Maldonado-Frías, S.; Yáñez-Ocampo, B.R.; et al. The protective role of cranberries and blueberries in oral cancer. Plants 2023, 12, 2330. [Google Scholar] [CrossRef]
  5. Avula, B.; Katragunta, K.; Osman, A.G.; Ali, Z.; John Adams, S.; Chittiboyina, A.G.; Khan, I.A. Advances in the chemistry, analysis and adulteration of anthocyanin rich-berries and fruits: 2000–2022. Molecules 2023, 28, 560. [Google Scholar] [CrossRef]
  6. Chandler, F.B.; Wilcox, R.B.; Bain, H.F.; Bergman, H.F.; Dermen, H. Cranberry breeding investigation of the US Dept. of Agriculture. Cranberries 1947, 12, 6–9. [Google Scholar]
  7. Chandler, F.B.; Bain, H.F.; Bergman, H.F. The Beckwith, the Stevens and the Wilcox cranberry varieties. Cranberries 1950, 14, 6–7. [Google Scholar]
  8. Oudemans, P.V.; Caruso, F.L.; Stretch, A.W. Cranberry fruit rot in the Northeast: A complex disease. Plant Dis. 1998, 82, 1176–1184. [Google Scholar] [CrossRef]
  9. Gallardo, R.K.; Klingthong, P.; Zhang, Q.; Polashock, J.; Atucha, A.; Zalapa, J.; Rodriguez-Saona, C.; Vorsa, N.; Iorizzo, M. Breeding trait priorities of the cranberry industry in the United States and Canada. HortScience 2018, 53, 1467–1474. [Google Scholar] [CrossRef]
  10. Johnson-Cicalese, J.; Polashock, J.J.; Honig, J.A.; Vaiciunas, J.; Ward, D.L.; Vorsa, N. Heritability of fruit rot resistance in American cranberry. J. Am. Soc. Hortic. Sci. 2015, 140, 233–242. [Google Scholar] [CrossRef]
  11. National Archives and Records Administration. Code of Federal Regulations. Federal Register. Available online: https://www.ecfr.gov/current/title-7/subtitle-B/chapter-I/subchapter-M/part-205/subpart-G (accessed on 1 November 2024).
  12. Christina. New England Cranberry Bog. Daydream Tourist. 2012. Available online: https://daydreamtourist.com/2012/11/20/new-england-cranberry-bog/ (accessed on 1 November 2024).
  13. El-Bendary, N.; El Hariri, E.; Hassanien, A.E.; Badr, A. Using machine learning techniques for evaluating tomato ripeness. Expert Syst. Appl. 2015, 42, 1892–1905. [Google Scholar] [CrossRef]
  14. Elhariri, E.; El-Bendary, N.; Fouad, M.M.; Platoš, J.; Hassanien, A.E.; Hussein, A.M. Multi-class svm based classification approach for tomato ripeness. In Innovations in Bio-Inspired Computing and Applications; Springer: Berlin/Heidelberg, Germany, 2014; pp. 175–186. [Google Scholar]
  15. Nguyen, C.; Sagan, V.; Maimaitiyiming, M.; Maimaitijiang, M.; Bhadra, S.; Kwasniewski, M.T. Early detection of plant viral disease using hyperspectral imaging and deep learning. Sensors 2021, 21, 742. [Google Scholar] [CrossRef] [PubMed]
  16. Giraudo, A.; Calvini, R.; Orlandi, G.; Ulrici, A.; Geobaldo, F.; Savorani, F. Development of an automated method for the identification of defective hazelnuts based on RGB image analysis and colourgrams. Food Control 2018, 94, 233–240. [Google Scholar] [CrossRef]
  17. Liang, X.; Jia, X.; Huang, W.; He, X.; Li, L.; Fan, S.; Li, J.; Zhao, C.; Zhang, C. Real-Time grading of defect apples using semantic segmentation combination with a pruned YOLO V4 network. Foods 2022, 11, 3150. [Google Scholar] [CrossRef]
  18. Foong, C.C.; Meng, G.K.; Tze, L.L. Convolutional neural network based rotten fruit detection using ResNet50. In Proceedings of the 2021 IEEE 12th Control and System Graduate Research Colloquium (ICSGRC), Shah Alam, Malaysia, 7 August 2021; pp. 75–80. [Google Scholar] [CrossRef]
  19. Parashar, N.; Mishra, A.; Mishra, Y. Fruits classification and grading using VGG-16 Approach. In Proceedings of International Conference on Communication and Artificial Intelligence; Lecture Notes in Networks and Systems; Goyal, V., Gupta, M., Mirjalili, S., Trivedi, A., Eds.; Springer: Singapore, 2022; Volume 435. [Google Scholar] [CrossRef]
  20. Cubero, S.; Aleixos, N.; Moltó, E.; Gómez-Sanchis, J.; Blasco, J. Advances in machine vision applications for automatic inspection and quality evaluation of fruits and vegetables. Food Bioprocess Technol. 2011, 4, 487–504. [Google Scholar] [CrossRef]
  21. Wu, D.; Sun, D.-W. Colour measurements by computer vision for food quality control—A review. Trends Food Sci. Technol. 2013, 29, 5–20. [Google Scholar] [CrossRef]
  22. Prats-Montalbán, J.M.; de Juan, A.; Ferrer, A. Multivariate image analysis: A review with applications. Chemom. Intell. Lab. Syst. 2011, 107, 1–23. [Google Scholar] [CrossRef]
  23. Merzlyak, M.N.; Gitelson, A.A.; Chivkunova, O.B.; Rakitin, V.Y. Non-destructive optical detection of pigment changes during leaf senescence and fruit ripening. Physiol. Plant. 1999, 106, 135–141. [Google Scholar] [CrossRef]
  24. Tyagi, D.; Duraisamy, P.; Sandhan, T. Non-destructive method for assessing fruit quality using modified depthwise separable convolutions on hyperspectral images. In Sensing for Agriculture and Food Quality and Safety XVI; SPIE: Bellingham, WA, USA, 2024; Volume 13060, pp. 37–43. [Google Scholar]
  25. Kurita, T.; Otsu, N.; Abdelmalek, N. Maximum likelihood thresholding based on population mixture models. Pattern Recognit. 1992, 25, 1231–1240. [Google Scholar] [CrossRef]
  26. Xue, J.-H.; Titterington, D.M. t-Tests, F-Tests and Otsu’s Methods for Image Thresholding. IEEE Trans. Image Process. 2011, 20, 2392–2396. [Google Scholar] [CrossRef] [PubMed]
  27. Liao, P.-S. A fast algorithm for multilevel thresholding. J. Inf. Sci. Eng. 2001, 17, 713–727. [Google Scholar] [CrossRef]
  28. Sirisha, P.; Raju, C.N.; Reddy, R.P.K. An efficient fuzzy technique for detection of brain tumor. Int. J. Comput. Technol. 2013, 8, 813–819. [Google Scholar] [CrossRef]
  29. Bindu, C.H.; Prasad, K.S. An efficient medical image segmentation using conventional OTSU method. Int. J. Adv. Sci. Technol. 2012, 38, 67–74. [Google Scholar]
  30. Gupta, P.; Malik, V.; Gandhi, M. Implementation of multilevel threshold method for digital images used in medical image processing. Int. J. Adv. Res. Comput. Sci. Softw. Eng. 2012, 2, 2. [Google Scholar]
  31. Sezgin, M.; Sankur, B. Survey over image thresholding techniques and quantitative performance evaluation. J. Electron. Imaging 2004, 13, 146–165. [Google Scholar] [CrossRef]
  32. Pulli, K.; Baksheev, A.; Kornyakov, K.; Eruhimov, V. Realtime Computer Vision with OpenCV. Queue 2012, 10, 40–56. [Google Scholar] [CrossRef]
  33. Valueva, M.V.; Nagornov, N.N.; Lyakhov, P.A.; Valuev, G.V.; Chervyakov, N.I. Application of the residue number system to reduce hardware costs of the convolutional neural network implementation. Math. Comput. Simul. 2020, 177, 232–243. [Google Scholar] [CrossRef]
  34. Wallach, I.; Dzamba, M.; Heifets, A. AtomNet: A deep convolutional neural network for bioactivity prediction in structure-based drug discovery. arXiv 2015, arXiv:1510.02855. [Google Scholar]
  35. Manavi, F.; Sharma, A.; Sharma, R.; Tsunoda, T.; Shatabda, S.; Dehzangi, I. CNN-Pred: Prediction of single-stranded and double-stranded DNA-binding protein using convolutional neural networks. Gene 2023, 853, 147045. [Google Scholar] [CrossRef]
  36. Azim, S.M.; Sharma, A.; Noshadi, I.; Shatabda, S.; Dehzangi, I. A convolutional neural network based tool for predicting protein AMPylation sites from binary profile representation. Sci. Rep. 2022, 12, 11451. [Google Scholar] [CrossRef]
  37. LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef] [PubMed]
  38. Min, S.; Lee, B.; Yoon, S. Deep learning in bioinformatics. Brief. Bioinform. 2017, 18, 851–869. [Google Scholar] [CrossRef] [PubMed]
  39. Srivastava, N.; Hinton, G.; Krizhevsky, A.; Sutskever, I.; Salakhutdinov, R. Dropout: A simple way to prevent neural networks from overfitting. J. Mach. Learn. Res. 2014, 15, 1929–1958. [Google Scholar]
  40. Ioffe, S.; Szegedy, C. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv 2015, arXiv:1502.03167. [Google Scholar]
  41. Yarotsky, D. Error bounds for approximations with deep relu networks. Neural Netw. 2017, 94, 103–114. [Google Scholar] [CrossRef]
  42. Li, Y.; Yuan, Y. Convergence analysis of two-layer neural networks with relu activation. arXiv 2017, arXiv:1705.09886. [Google Scholar]
  43. Kingma, D.P.; Ba, J. Adam: A method for stochastic optimization. arXiv 2014, arXiv:1412.6980. [Google Scholar]
  44. Rubinstein, R.Y.; Kroese, D.P. The Cross-Entropy Method: A Unified Approach to Combinatorial Optimization, Monte-Carlo Simulation, and Machine Learning; Springer: New York, NY, USA, 2004; ISBN 978-0-387-21240-1. [Google Scholar]
  45. Stone, M. Cross-Validatory Choice and Assessment of Statistical Predictions. J. R. Stat. Soc. Ser. B (Methodol.) 1974, 36, 111–147. [Google Scholar] [CrossRef]
  46. James, G. An Introduction to Statistical Learning: With Applications in R; Springer: Berlin/Heidelberg, Germany, 2013; p. 176. ISBN 978-1461471370. [Google Scholar]
  47. Brownlee, J. What is the Difference Between Test and Validation Datasets? Machine Learning Mastery, 14 August 2020. [Google Scholar]
  48. Matthews, B.W. Comparison of the predicted and observed secondary structure of T4 phage lysozyme. Biochim. Biophys. Acta (BBA) Protein Struct. 1975, 405, 442–451. [Google Scholar] [CrossRef]
  49. Çetin, N.; Karaman, K.; Kavuncuoğlu, E.; Yıldırım, B.; Jahanbakhshi, A. Using hyperspectral imaging technology and machine learning algorithms for assessing internal quality parameters of apple fruits. Chemom. Intell. Lab. Syst. 2022, 230, 104650. [Google Scholar] [CrossRef]
  50. Vairavan, C.; Kamble, B.M.; Durgude, A.G.; Ingle, S.R.; Pugazenthi, K. Hyperspectral Imaging of Soil and Crop: A Review. J. Exp. Agric. Int. 2024, 46, 48–61. [Google Scholar] [CrossRef]
Figure 1. Instances of rotten and sound cranberry scanned images.
Figure 1. Instances of rotten and sound cranberry scanned images.
Information 15 00731 g001
Figure 2. The general architecture of our proposed CNN-based model (CARP).
Figure 2. The general architecture of our proposed CNN-based model (CARP).
Information 15 00731 g002
Figure 3. Receiver operating characteristic (ROC) curves for (a) five-fold CV on training dataset and (b) independent dataset.
Figure 3. Receiver operating characteristic (ROC) curves for (a) five-fold CV on training dataset and (b) independent dataset.
Information 15 00731 g003
Table 1. Performance of different machine learning models on the cranberry dataset.
Table 1. Performance of different machine learning models on the cranberry dataset.
ModelTrain (5-Fold CV on Training)Test (Independent Dataset)
AccSnSpMCCAccSnSpMCC
CARP97.497.997.20.9294.895.492.70.86
SVM86.595.885.40.5986.192.685.20.59
KNN94.398.193.40.8495.794.196.10.87
DT90.179.293.30.7293.583.397.10.83
LR92.387.793.40.7794.789.196.60.85
NB89.173.194.90.7192.681.696.50.80
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.

Share and Cite

MDPI and ACS Style

Azim, S.M.; Spadaro, A.; Kawash, J.; Polashock, J.; Dehzangi, I. Accurately Identifying Sound vs. Rotten Cranberries Using Convolutional Neural Network. Information 2024, 15, 731. https://doi.org/10.3390/info15110731

AMA Style

Azim SM, Spadaro A, Kawash J, Polashock J, Dehzangi I. Accurately Identifying Sound vs. Rotten Cranberries Using Convolutional Neural Network. Information. 2024; 15(11):731. https://doi.org/10.3390/info15110731

Chicago/Turabian Style

Azim, Sayed Mehedi, Austin Spadaro, Joseph Kawash, James Polashock, and Iman Dehzangi. 2024. "Accurately Identifying Sound vs. Rotten Cranberries Using Convolutional Neural Network" Information 15, no. 11: 731. https://doi.org/10.3390/info15110731

APA Style

Azim, S. M., Spadaro, A., Kawash, J., Polashock, J., & Dehzangi, I. (2024). Accurately Identifying Sound vs. Rotten Cranberries Using Convolutional Neural Network. Information, 15(11), 731. https://doi.org/10.3390/info15110731

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop