Abstract

Quality control of hazelnuts is a major concern in many regions across the world, but particularly in Turkey as the world's largest hazelnut producer. Using image processing and deep learning techniques, this study intended to detect and classify healthy hazelnuts and hazelnuts infected with the Brown Marmorated Stink Bug. Infected hazelnut samples were collected from the 2021 production period by experts. A Guppy Pro CCD camera-based image acquisition system was used to capture hazelnut images. A total of 400 RGB hazelnut images were captured to train machine learning models. Image segmentation process was carried out to subtract hazelnut images from the background using the Thresholding technique. Moment features were extracted from RGB and l*a*b* spaces to be used to train traditional machine learning models. Furthermore, the most relevant and discriminative feature set was selected using the Boruta feature selection method. Traditional machine learning models including Random Forest, Support Vector Machine, Logistic Regression, Naive Bayes, and Decision Tree were trained twice, once with all features and another with the selected feature set only. The overall accuracy, statistical characteristics of the confusion matrix, and model training time were all calculated to evaluate and compare models performances. As a result, threshold value of 50 was determined from the gray level histogram and was able to separate hazelnut image from the background perfectly. Only seven moment features were identified as the most discriminative features out of 24 features. The SVM model with all feature vectors had the greatest classification accuracy of 98.75 %. When only the selected features were employed, the performance of Random Forest and Logistic Regression models improved to 97.5 and 96.25 %, respectively.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call