The Investigation of Hyperparameters Influence on Fruit and Vegetable Image Recognition Performance Using SVM
DOI:
https://doi.org/10.61173/23awbm85Keywords:
Image recognition, logistic regression, SVM, hyperparameter tuningAbstract
This study aims to improve the efficiency of automatic classification and quality control of fruits and vegetables through image recognition technology, to achieve efficient and accurate intelligent sorting in agricultural production, reduce labor costs and improve market competitiveness. A high-quality image dataset of 36 fruit and vegetable categories from Kaggle is used in this study. The images in the dataset have been preprocessed to ensure that the data is suitable for the classification task and sets the stage for efficient training and evaluation of the model. Logistic regression was first used as the baseline model in order to compare the performance with the Support Vector Machine (SVM) model. Subsequently, hyperparameter tuning is performed to optimize the model to achieve the best cross-validation accuracy. Next, the SVM model is trained with the selected hyperparameters, and the training time is recorded. The performance of the model was evaluated in detail by confusion matrix and classification reports, and the test set was used for final validation to ensure that the model would also perform well on unseen data. The SVM model achieves an accuracy of 96% on both validation and test sets, which is a very good performance. The hyperparameters optimized by GridSearchCV (C = 10, gamma = 0.1, kernel = rbf) effectively improve the performance of the model, verifying that reasonable hyperparameter selection is crucial to the SVM model. These results show that the model has good generalization ability and potential to be applied to real-time classification tasks.
References
[1] Rangarajan AK, Purushothaman R, Ramesh A. Tomato crop disease classification using pre-trained deep learning algorithm. Procedia computer science. 2018 Jan 1;133:1040-7.
[2] Wang B. Identification of crop diseases and insect pests based on deep learning. Scientific Programming. 2022;2022(1):9179998.
[3] Al-Sammarraie MA, Gierz Ł, Przybył K, Koszela K, Szychta M, Brzykcy J, Baranowska HM. Predicting fruit’s sweetness using artificial intelligence—case study: Orange. Applied Sciences. 2022 Aug 17;12(16):8233.
[4] Moeinizade S, Pham H, Han Y, Dobbels A, Hu G. An applied deep learning approach for estimating soybean relative maturity from UAV imagery to aid plant breeding decisions. Machine Learning with Applications. 2022 Mar 15;7:100233.
[5] Chandra MA, Bedi SS. Survey on SVM and their application Dean&Francis in image classification. International Journal of Information Technology. 2021 Oct;13(5):1-1.
[6] Kaggle Fruits and Vegetables Image Recognition, https:// www.kaggle.com/code/aaronfriasr/fruits-and-vegetables-imagerecognition#Fruits-and-Vegetables-Image-Recognition-%F0%9 F%8D%89%F0%9F%8D%91%F0%9F%A5%A5, 2024.
[7] Dalal N, Triggs B. Histograms of oriented gradients for human detection. In 2005 IEEE computer society conference on computer vision and pattern recognition (CVPR‘05) 2005 Jun 20 (Vol. 1, pp. 886-893). Ieee.
[8] Déniz O, Bueno G, Salido J, De la Torre F. Face recognition using histograms of oriented gradients. Pattern recognition letters. 2011 Sep 1;32(12):1598-603.
[9] Maćkiewicz A, Ratajczak W. Principal components analysis (PCA). Computers & Geosciences. 1993 Mar 1;19(3):303-42.
[10] Daffertshofer A, Lamoth CJ, Meijer OG, Beek PJ. PCA in studying coordination and variability: a tutorial. Clinical biomechanics. 2004 May 1;19(4):415-28.
Downloads
Published
Issue
Section
License
Copyright (c) 2024 by the authors.

This work is licensed under a Creative Commons Attribution 4.0 International License.
