# A Raisin Foreign Object Target Detection Method Based on Improved YOLOv8
## 4 Discussion  
The automated detection of agricultural products is currently one of the more important research areas, and for raisins, a considerable number of researchers have already implemented automated detection and classification using traditional machine learning techniques. [PERSON] et al. [22] engineered a machine vision-driven automatic sorting apparatus for raisins, comprising a conveyor belt, illumination module, control and processing unit, and a sorting mechanism. The system classifies raisins by initially segmenting them from the background in images and subsequently evaluating them based on hue, saturation, and intensity (HSI) color attributes, realizing a 93% classification accuracy. [PERSON] et al. [23] enhanced the preprocessing and segmentation of four raisin types--green, green with stems, black, and black with stems--leveraging image processing and data mining to extract a robust feature set of 44, including 36 color and 8 shape features. These data were fed into an Artificial Neural Network (ANN) with a 7-6-4 topology, achieving a 96.33% classification accuracy. [PERSON] et al. [24] introduced a  
Figure 14: The Detection effects of different foreign matter combinations. classification approach that amalgamates morphological, color, and texture features from RGB images, yielding 74 features classified via five models, with the linear discriminant model leading in accuracy at 99%. [PERSON] et al. [25] proposed a classification strategy integrating color and texture features, employing linear discriminant analysis, SIMCA, and LS-SVM to construct models that identified a 95% accuracy rate in classifying four raisin types. [PERSON] et al. [26] utilized four extraction techniques to distill 146 texture features, subsequently refined by principal component analysis (PCA), and applied ANN and SVM classifiers to differentiate between high-quality and substandard raisins, with SVM demonstrating superior accuracy at 92.71%. [PERSON] et al. [27] discerned seven morphological features and classified raisin varieties using logistic regression, multilayer perceptrons, and support vector machines, with SVM attaining the highest classification accuracy of 86.44%. [PERSON] et al. [28] advanced a texture-feature-based machine vision technique for bulk raisin classification, utilizing a Support Vector Machine with GLRM features to achieve 85.55% accuracy in quality classification and 69.78% in differentiating raisins from foreign matter such as sawdust and thistles. [PERSON] et al. [29] compared six machine learning models in classifying Turkish raisins, with the Multi-Layer Perceptron outperforming others at 94.07% accuracy. [PERSON] et al. [30] designed a raisin seed classification model, which employs feature normalization and principal component analysis for preprocessing, and then input the data into a fully connected neural network for the classification task, achieving an accuracy and F-Score exceeding 91%. Current studies reveal that conventional machine learning techniques have reached an exceptional level of precision in raisin classification, surpassing industry grading benchmarks. However, these methods are mostly focused on the classification of the raisins themselves, neglecting the presence of endogenous and exogenous foreign matter during the drying, collection, and processing stages. Moreover, existing methods heavily rely on feature engineering, which often requires a significant amount of time and effort from researchers during the model-building process. Handling situations with material density and complex backgrounds is particularly challenging. Deep learning is a new detection technology that has emerged in recent years, and a large number of researchers are currently using deep learning techniques to detect agricultural products. [PERSON] et al. [31] developed a deep learning model leveraging Faster R-CNN and ResNet-50 to identify the ripeness stages of coconuts against intricate backgrounds, attaining a model accuracy of 0.894 and an average processing velocity of 3.124 s per image.