Automated Fruit Sorting in Smart Agriculture System: Analysis of Deep Learning-based Algorithms

—Automated fruit sorting plays a crucial role in smart agriculture, enabling efficient and accurate classification of fruits based on various quality parameters. Traditionally, rule-based and machine-learning methods have been employed for fruit sorting, but in recent years, deep learning-based approaches have gained significant attention. This paper investigates deep learning methods for fruit sorting and justifies their prevalence in the field. Therefore, it is necessary to address these limitations and improve the effectiveness of CNN-based fruit sorting methods. This research paper presents a comprehensive analysis of CNN-based methods, highlighting their strengths and limitations. This analysis aims to contribute to advancing automated fruit sorting in smart agriculture and provide insights for future research and development in deep learning-based fruit sorting techniques.


I. INTRODUCTION
Automated fruit sorting has emerged as a promising technology in the field of smart agriculture, revolutionizing the way fruits are cultivated, harvested, and processed [1,2].These technologies integrate advanced sensing, data analytics, and automation techniques to improve productivity, efficiency, and quality in fruit production and processing [3,4].Automated fruit sorting plays a vital role in the post-harvest stage, ensuring accurate and efficient classification of fruits based on various quality parameters such as size, color, shape, and ripeness [5].One of the key components of automated fruit sorting systems is video-based fruit sorting [6], which utilizes computer vision and image processing techniques to analyze visual information and make real-time applications [7,8].
Video-based fruit sorting has gained significant attention due to its non-destructive nature, high-speed operation, and ability to handle a large volume of fruits [9,10].This approach involves capturing video footage of fruits from multiple angles and utilizing computer vision algorithms to extract relevant features for classification.By analyzing the visual characteristics of fruits, video-based sorting systems can accurately classify them into different categories, ensuring consistent quality and reducing manual labor.
In recent years, there have been remarkable advancements in video-based fruit sorting systems driven by the rapid progress in computer vision, machine learning, and deep learning techniques [10,11].These technologies have enabled the development of more sophisticated and efficient algorithms for fruit classification, leading to improved accuracy and speed in sorting operations [12,13].Deep learning, in particular, has shown great potential in fruit sorting applications, leveraging its ability to learn discriminative features from large-scale data automatically.
Deep learning-based approaches have demonstrated superior performance in various computer vision tasks, and fruit sorting is no exception [14,15].Convolutional Neural Networks (CNNs) have emerged as a popular choice for fruit classification due to their ability to extract hierarchical features from images [10,16,17].The context of the CNNs, significant features are automatically learned during the training process [18].CNNs automatically identify and extract relevant patterns and features from input data through convolutional layers, optimizing the network's parameters to minimize the difference between predicted and actual target labels.Additionally, Recurrent Neural Networks (RNNs) and hybrid models combining CNNs and RNNs have been explored to capture spatial and temporal information in video-based fruit sorting.
Although significant progress has been made in deep learning-based fruit sorting, there are still some limitations and research gaps that need to be addressed.Firstly, the lack of annotated datasets specific to fruit sorting poses challenges for training and evaluating deep learning models.Secondly, the generalization and robustness of deep learning models across different fruit types and environmental conditions need to be investigated further.Finally, the computational complexity and deployment feasibility of deep learning models in real-world fruit sorting systems requires careful consideration.Therefore, this review paper aims to address these research gaps and present an in-depth investigation and analysis of deep learning methods for fruit sorting.By conducting this investigation, we aim to shed light on the potential of deep learning methods in improving the efficiency, accuracy, and scalability of automated fruit sorting systems, contributing to the advancement of smart agriculture and post-harvest technologies.The contributions of this study are three-fold: 1) A comprehensive review of the most recent deep learning-based approaches for fruit sorting, highlighting their strengths and limitations; 2) An analysis of current research gaps and challenges in CNN-based methods; 3) Addressing potential strategies and future directions to overcome these challenges and advance the field of deep learning-based fruit sorting.www.ijacsa.thesai.org

II. RELATED WORKS
This section provides related works focusing on grading and sorting fruit using machine learning and deep learningbased approaches.
Patil et al. [19] focus on the grading and sorting technique of dragon fruits using machine learning algorithms.The study explores the application of machine learning algorithms, specifically support vector machine (SVM) and random forest, for grading and sorting dragon fruits based on their quality attributes.The findings demonstrate that both SVM and random forest models achieved high accuracy in classifying the dragon fruits into different grades.However, the study also highlights certain limitations, such as the need for a large and diverse dataset to improve the models' performance and the challenges of integrating the grading and sorting system into an automated production line.This research contributes to the development of efficient grading and sorting techniques for dragon fruits using machine-learning algorithms while also acknowledging the areas that require further exploration and improvement.
Gill and Khehra [20] focused on fruit image classification using deep learning techniques.The study aims to develop an accurate and efficient system for automatically classifying fruits based on their images.The researchers employ deep learning models, such as convolutional neural networks (CNNs), to extract meaningful features from fruit images and train classification models.The findings demonstrate the effectiveness of deep learning in accurately identifying different types of fruits, achieving high classification accuracy.The proposed system has practical applications in fruit sorting and quality control processes, enabling faster and more reliable classification compared to traditional methods.Overall, this research contributes to the field of automated fruit classification using deep learning, showcasing the potential of this approach in various fruit-related industries.Kumar and Parkavi [21] provided a comprehensive review of the quality grading of fruits and vegetables using image processing techniques and machine learning.The study examines various image processing methods, such as color analysis, texture analysis, and shape analysis, and discusses their applications in assessing the quality attributes of fruits and vegetables.Machine learning algorithms, including support vector machine (SVM), random forest, and artificial neural networks (ANN), are investigated for automated quality grading.The findings highlight the effectiveness of image processing techniques coupled with machine learning in accurately grading fruits and vegetables based on their quality parameters.However, the paper also recognizes certain limitations, such as the need for robust and diverse datasets, standardized grading criteria, and real-time implementation challenges.This review serves as a valuable resource for researchers and practitioners in the field of automated fruit and vegetable quality grading while emphasizing the areas that require further research and development to overcome the existing limitations.
Chakraborty et al. [22] presented the development of a realtime automatic citrus fruit grading and sorting machine using a computer vision-based adaptive deep learning model.The study aims to improve the efficiency and accuracy of citrus fruit grading by leveraging advanced machine-learning techniques.The findings demonstrate that the proposed system, equipped with an optimized deep learning model, achieves high accuracy in grading citrus fruits based on quality attributes such as size, color, and shape.The system effectively handles various challenges encountered in citrus fruit grading, such as variations in fruit appearance and lighting conditions.However, the paper also acknowledges certain limitations, including the need for a large and diverse dataset to enhance the model's performance further.This research contributes to the development of a practical and efficient citrus fruit grading system while highlighting the potential for further advancements and improvements in deep learning-based approaches for fruit sorting applications.

III. METHODOLOGY
With the continuous advancements in Convolutional Neural Network (CNN) architectures and the availability of wellannotated fruit datasets, CNN-based frameworks have emerged as valuable tools for automating fruit sorting processes across various industries, including agriculture, food processing, and packaging.
In this research study, we focus on the evaluation and analysis of existing CNN-based approaches for fruit disease detection.We specifically investigate the performance of popular CNN frameworks, namely DenseNet, InceptionV3, and SqueezeNet.To achieve this, we conduct extensive experiments using these models and collect the resulting performance metrics.In addition to our experiments, we gather data from previously published research works to augment our analysis.We extract performance measurements such as sensitivity, specificity, and accuracy from these studies.By incorporating a diverse range of sources, we aim to provide a comprehensive overview of the effectiveness of CNN-based approaches in fruit disease detection.For the dataset, this study uses Fruits 360.The Fruits 360 is a large-scale dataset of images containing fruits and vegetables, which can be used for various computer vision tasks such as classification, segmentation, and detection.The dataset consists of 90380 images of 131 different types of fruits and vegetables, with each image having a size of 100x100 pixels.

A. CNN based Methods
This study focuses on exploring and analyzing the effectiveness of CNN-based approaches for automated fruit sorting.Extensive experiments are conducted to evaluate the performance of various models, and the results are carefully gathered and analyzed.Additionally, valuable insights are gathered from previously published research works, where performance measurements based on sensitivity, specificity, and accuracy metrics are collected and compared.By examining experimental findings and existing literature, this study aims to provide comprehensive insights into the effectiveness and potential of CNN-based methods for automated fruit-sorting applications.
1) ResNet: ResNet, short for Residual Neural Network, is a deep learning architecture that revolutionized image www.ijacsa.thesai.orgclassification tasks, including automated fruit sorting [23].ResNet introduces skip connections that allow the network to learn residual mappings, making it easier to train deeper networks [24].This architecture helps in overcoming the degradation problem in very deep networks and enables the accurate classification of fruits based on their visual characteristics.Fig. 1 shows the structure of the ResNet model.
2) InceptionV3: InceptionV3 is a widely used deep convolutional neural network architecture for automated fruit sorting.It employs a combination of 1x1, 3x3, and 5x5 convolutional filters to capture various scales of features in the input images [26].InceptionV3's inception modules efficiently capture both local and global patterns, allowing for accurate classification and identification of fruit types (see Fig. 2).
3) VGGNet: VGGNet is a classic deep convolutional neural network architecture that has been applied to automated fruit sorting.It consists of multiple convolutional layers with small receptive fields, followed by fully connected layers [28].VGGNet's uniform architecture and deeper network depth allow it to capture intricate visual features, leading to robust fruit classification and sorting capabilities (see Fig. 3).

4) DenseNet:
DenseNet is another deep learning architecture commonly utilized in fruit sorting tasks.DenseNet introduces dense connections, where each layer is directly connected to every other layer in a feed-forward fashion [30].These dense connections enable feature reuse and encourage gradient flow, resulting in more efficient and accurate classification of fruits based on their attributes (see Fig. 4).
5) MobileNet: MobileNet is a lightweight deep-learning architecture designed for mobile and resource-constrained devices.It employs depth-wise separable convolutions to reduce the computational cost while preserving accuracy [32].MobileNet-based models are efficient for fruit sorting applications where computational resources are limited (see Fig. 5).
6) NASNet: NASNet, short for Neural Architecture Search Network, is an architecture discovered using neural architecture search techniques.It automatically searches for optimal network architectures for fruit sorting, resulting in highly efficient and accurate models [34].NASNet-based models can adapt to different fruit sorting tasks by automatically learning the optimal network structure (see Fig. 6).Fig. 5.The structure of MobileNet [33].www.ijacsa.thesai.orgFig. 6.Two structures of NASNet [35].Fig. 7.The structure of EfficientNet [36].Fig. 8.The structure of SqueezeNet [39].www.ijacsa.thesai.org7) EfficientNet: EfficientNet is a family of deep learning models that achieve state-of-the-art performance with significantly fewer parameters and computational resources.These models employ a compound scaling method that balances model depth, width, and resolution to achieve optimal performance [15,34].EfficientNet-based models provide excellent accuracy and efficiency for automated fruit sorting tasks (see Fig. 7).
8) SqueezeNet: SqueezeNet is a lightweight deep-learning architecture that achieves high accuracy with a reduced number of parameters.It utilizes fire modules, which consist of both 1x1 and 3x3 filters, to efficiently capture and process fruit image features [37,38].SqueezeNet is particularly suitable for resource-constrained environments while maintaining competitive performance in fruit sorting (see Fig. 8).

B. Performance Measurements
In CNN-based fruit sorting, performance measurements such as sensitivity, specificity, and accuracy play a crucial role in evaluating the effectiveness of the models.These metrics are derived from the concepts of True Positive (TP), False Negative (FN), True Negative (TN), and False Positive (FP).The definitions of these metrics are as follows: True Positive (TP): It represents the number of correctly classified positive instances, i.e., the number of diseased fruits correctly identified by the CNN model.
False Negative (FN): It refers to the number of positive instances that were incorrectly classified as negative, i.e., the number of diseased fruits that were wrongly identified as healthy or undetected by the CNN model.
True Negative (TN): It represents the number of correctly classified negative instances, i.e., the number of healthy fruits correctly identified by the CNN model.
False Positive (FP): It refers to the number of negative instances that were incorrectly classified as positive, i.e., the number of healthy fruits that were wrongly identified as diseased by the CNN model.
Based on these definitions, we can calculate the following performance measurements, Sensitivity (True Positive Rate or Recall): Sensitivity measures the proportion of correctly classified positive instances out of all the actual positive instances.It indicates the model's ability to detect and classify diseased fruits accurately.Specificity (True Negative Rate): Specificity measures the proportion of correctly classified negative instances out of all the actual negative instances.It evaluates the model's ability to accurately identify healthy fruits without misclassifying them as diseased.
Accuracy: Accuracy represents the overall correctness of the model's predictions by calculating the proportion of correctly classified cases, positive and negative, out of the total number of cases.The corresponding equations for sensitivity, specificity and accuracy are as follows:

IV. ANALYSIS OF CNN-BASED METHODS
In this section, a performance analysis of CNN-based frameworks is presented.We have chosen the widely adopted CNN frameworks, namely DenseNet, InceptionV3, ResNet, VGGNet, Xception, MobileNet, NASNet, EfficientNet, and SqueezeNet models.To thoroughly investigate their performance, we conducted a series of comprehensive experiments and meticulously collected the corresponding results.Additionally, we gathered relevant data from previously published research works, which provided valuable insights into the models' performance.The performance measurements were evaluated using sensitivity, specificity, and accuracy metrics, enabling a robust assessment of the models' capabilities.Specificity, sensitivity, accuracy, and associated metrics such as true positive (TP), true negative (TN), false positive (FP), and false negative (FN) are considered as the most popular and fundamental metrics for technical analysis and performance measurement, particularly in classification tasks such as automated fruit sorting using CNN-based models.
The sensitivity values provide insights into how well each CNN-based method can identify diseased fruits, a critical aspect of fruit sorting for disease detection.Sensitivity is particularly relevant in applications where minimizing false negatives is essential, ensuring that diseased fruits are not overlooked.
As shown in Fig. 9, we observe that EfficientNet demonstrates the highest sensitivity value of 0.93, indicating its strong capability to identify diseased fruits accurately.InceptionV3 follows closely with a sensitivity of 0.92, highlighting its effectiveness in detecting diseased instances.Xception and ResNet also show notable sensitivity values of 0.91 and 0.9, respectively.DenseNet and NASNet have sensitivity values of 0.89 and 0.9, respectively, indicating their ability to capture most of the diseased fruits but with a slightly lower performance compared to the aforementioned methods.VGGNet has a sensitivity of 0.88, while MobileNet and SqueezeNet have lower sensitivities of 0.87 and 0.85, respectively.
Based on these sensitivity values, it can be inferred that EfficientNet, InceptionV3, Xception, and ResNet exhibit relatively higher performance in correctly identifying diseased fruits.These models are likely to be more reliable in fruit disease detection applications.www.ijacsa.thesai.orgIn fruit sorting applications, a high specificity value is desirable as it ensures that healthy fruits are correctly recognized and avoids misclassifying them as diseased.These specificity values help in evaluating the performance of different CNN-based methods and can guide the selection of appropriate models for fruit sorting tasks.These specificity values represent the proportion of correctly classified negative cases (healthy fruits) out of all the actual negative cases.A higher specificity value indicates a better ability of the model to accurately identify healthy fruits without misclassifying them as diseased.
Based on the specificity values provided in Fig. 10, we can observe that EfficientNet has the highest specificity (0.94), followed by InceptionV3, ResNet, Xception, and NASNet, which all have a specificity of 0.92.DenseNet, VGGNet, and MobileNet have a specificity of 0.91, while SqueezeNet has the lowest specificity at 0.88.These specificity values provide insights into the models' performance in accurately identifying healthy fruits in the fruit sorting process.A higher specificity indicates a lower chance of misclassifying healthy fruits as diseased, which is desirable for efficient fruit sorting applications.Therefore, among the methods listed, EfficientNet stands out with the highest specificity value of 0.94, indicating its strong capability to identify healthy fruits accurately.InceptionV3, ResNet, Xception, and NASNet also exhibit high specificity values of 0.92, highlighting their effectiveness in correctly classifying healthy fruits.Inaccuracy measurement, Fig. 11 presents accuracy rates for different CNN-based methods used in a certain application.Accuracy measures the overall correctness of a model's predictions and represents the proportion of correctly classified instances (both positive and negative) out of the total instances.By analyzing the accuracy results, we observe that EfficientNet achieves the highest accuracy rate of 0.95, indicating its strong performance in accurately classifying diseased and healthy fruits.InceptionV3 follows closely with an accuracy of 0.94, suggesting its effectiveness in achieving correct predictions.ResNet, and Xception, models also exhibit high accuracy values of 0.93, highlighting their reliability in fruit classification tasks.DenseNet, VGGNet, and NASNet demonstrate an accuracy of 0.92, indicating similar performance in achieving correct classifications.MobileNet, with an accuracy of 0.91, performs slightly lower than the aforementioned methods.SqueezeNet, however, shows a lower accuracy of 0.89, suggesting it may not perform as well in accurately classifying fruit instances.
Based on these accuracy values, EfficientNet stands out as the top-performing model, closely followed by InceptionV3, ResNet, and Xception.These models have demonstrated a higher capability to achieve accurate predictions and can be considered reliable choices for fruit classification tasks.
As results, DenseNet's strength lies in its effective feature reuse and alleviation of the vanishing gradient problem through dense connectivity, enhancing parameter efficiency.InceptionV3 excels at capturing multi-scale features with its inception modules, suitable for diverse object recognition tasks, but its complex architecture may lead to longer training times.ResNet introduces residual connections, enabling the training of very deep networks, but its increased complexity may demand higher computational resources.VGGNet, with its simple and uniform architecture, performs well on image recognition tasks but is susceptible to overfitting.Xception efficiently employs depth-wise separable convolutions, though it may require more training data.MobileNet, designed for mobile and edge devices, balances accuracy and efficiency but may lack representation capacity.NASNet's use of neural architecture search enhances performance but demands significant computational resources.EfficientNet achieves high accuracy with improved parameter efficiency but may be computationally expensive to train.SqueezeNet's compact design prioritizes parameter efficiency for edge devices but may sacrifice some accuracy.These nuances in strengths and limitations provide insights into the trade-offs associated with each CNN-based framework, aiding informed choices for fruit sorting applications in smart agriculture.

V. CONCLUSION
This study emphasizes the importance of automated fruit sorting in smart agriculture and the growing significance of deep learning-based approaches in comparison to traditional methods.The need to address limitations in Convolutional Neural Network (CNN)-based fruit sorting methods is acknowledged, prompting the research paper to conduct a comprehensive analysis.This analysis aims to highlight both the strengths and limitations of CNN-based methods for fruit sorting, with the overarching goal of advancing automated fruit sorting in smart agriculture.By focusing on these features, the paper aims to provide valuable insights for future research and development, contributing to the continual improvement of deep learning-based fruit sorting techniques in the agricultural domain.This research study investigates the use of CNN-based frameworks for automating fruit sorting detection in industries such as agriculture, food processing, and packaging.The study focuses on evaluating popular CNN models, including DenseNet, InceptionV3, ResNet, VGGNet, Xception, MobileNet, NASNet, EfficientNet, and SqueezeNet.Through extensive experiments and analysis of performance metrics such as sensitivity, specificity, and accuracy, the study aims to provide a comprehensive understanding of the strengths and limitations of these models.The findings will contribute to the development of more accurate and reliable systems for fruit

Fig. 9 .
Fig. 9. Analysis of CNN methods based on sensitivity metric.

Fig. 10 .
Fig. 10.Analysis of CNN methods based on specificity metric.
.ijacsa.thesai.orgsorting algorithms in agriculture, leading to improved efficiency and productivity in the industry.Directions for future works that can be pursued as investigating the effectiveness of ensemble methods in improving the performance of fruit sorting algorithms.By exploring ensemble techniques such as bagging, boosting, or stacking, researchers can examine how the combination of multiple CNN models can further improve the fruit sorting process.Another future work will focus on the real-time implementation and deployment of the CNN-based fruit sorting algorithms.While the current study evaluates the performance of different CNN models, their practical application in real-time sorting systems is an important aspect that requires further exploration.