Cashew nut size classification using hybrid learning techniques

Main Article Content

Pawat Chimlek
Thongrob Auxsorn
Sakesan Sivilai
Sutasinee Jitanan

Abstract

The research problem originated from the limitations of traditional cashew nut size classification methods, which result in high labor costs and inconsistent product quality, affecting the competitiveness of Thailand’s cashew nut industry in the global market. The research objective was to develop a high-precision cashew nut size classification system by integrating deep learning and machine learning techniques. The proposed methodology involves a hybrid cashew nut size classification system. First, a deep learning technique utilizing YOLOv5 was applied to detect cashew nuts from images, with experiments conducted to determine the optimal and most efficient parameters. Subsequently, machine learning using a Support Vector Machine (SVM) was employed for size classification based on dominant morphological features, including width, length, and area. The SVM model was evaluated using four kernel types: linear, radial basis function (RBF), polynomial, and sigmoid. The results indicated that the detection model performed optimally when using 400 epochs and a batch size of 64, achieving a precision of 0.9817 and a recall of 0.9706. Furthermore, the size classification model achieved perfect performance, yielding precision and recall values of 1.0 across all tested kernels. However, the overall system performance still had minor limitations due to occasional errors in the detection step. In conclusion, this system can improve the accuracy of cashew nut size classification and enhance the competitiveness of Thailand’s cashew nut industry in the global market by reducing labor costs and improving product quality consistency. Future developments should focus on refining the detection process to further enhance the overall system efficiency.

Article Details

Section
Original Articles

References

Baitu, G. P., Gadalla, O. A. A., & Öztekin, Y. B. (2023). Traditional machine learning-based classification of cashew kernels using colour features. Journal of Tekirdag Agricultural Faculty, 20(1), 115–124. https://doi.org/10.33462/jotaf.1100782

Kumari, A. S. S. S. R., Anjaneyulu, K. S. R., & Krishna, K. S. R. (2021). Classification of first quality fancy cashew kernels using four deep convolutional neural network models. Materials Today: Proceedings, 44, 3423–3429. https://doi.org/10.1016/j.matpr.2020.11.897

LearnOpenCV. (2021). Mean average precision (mAP) in object detection. https://learnopencv.com/mean-average-precision-map-object-detection-model-evaluation-metric/

Pham, V.-N., Do Ba, Q.-H., Tran Le, D.-A., Nguyen, Q.-M., Do Van, D., & Nguyen, L. (2024). A low-cost deep-learning-based system for grading cashew nuts. Computers, 13(3), Article 71. https://doi.org/10.3390/computers13030071

Song, X., Li, Z., Zhang, X., & Liu, J. (2022). Recognition and counting of apples in a dynamic state using a 3D camera and deep learning algorithms for robotic harvesting systems. Sensors, 22(19), Article 7012. https://doi.org/10.3390/s22197012

Sunoj, S., Igathinathane, C., & Jenicka, S. (2018). Cashews whole and splits classification using a novel machine vision approach. Computers and Electronics in Agriculture, 145, 1–9. https://doi.org/10.1016/j.compag.2017.12.034

World Population Review. (n.d.). Cashew production by country. Retrieved February 27, 2025, from https://worldpopulationreview.com/country-rankings/cashew-production-by-country

Zha, Y., Yang, L., Liu, Y., Ma, Y., Li, D., & Wang, H. (2025). Weed recognition in cotton fields based on YOLOv8. Intelligent Agriculture, 1(1), Article 100019. https://doi.org/10.1016/j.inag.2025.100019

Zhang, Y., Zhang, Y., & Zhang, Y. (2024). Apple fruit edge detection model using a rough set and convolutional neural network. Sensors, 24(7), Article 2283. https://doi.org/10.3390/s24072283