An Application of Image Processing and Machine Learning for Rice Varieties Classification
Keywords:
image processing, machine learning, rice variety classificationAbstract
This research aims to compare the efficiency of techniques for classifying rice varieties from images of milled rice grains. Five rice varieties were considered: Karacadag, Jasmine, Ipsala, Basmati, and Arborio. Image processing combined with machine learning methods were applied. The procedure started with image processing to reduce noise from the images of rice grains of various varieties, which were color JPEG format images with a resolution of 250x250 pixels, with a total of 15,000 images per variety. All noise-reduced images were then processed for classification using seven different techniques: Canny edge detection, Sobel edge detection, ridge detection, texture detection, image enhancement with Laplacian filters, image enhancement with Gaussian blur, and histogram equalization. Features, including 21 shape features and 11 texture features, were extracted and classified using six machine learning techniques: decision trees, Naïve Bayes, k-Nearest Neighbors, Artificial Neural Network (ANN), Support Vector Machines (SVMs), and gradient boosted trees. Training was conducted with K-fold cross-validation with K=10 for all machine learning techniques. The research findings showed that using image processing with Sobel edge detection combined with classification using SVMs was the most effective method, with classification accuracies of 98.68%, precision of 98.67%, recall of 98.67%, F1-score of 98.67%, and a Cohen’s kappa coefficient of 98.35%. The classification process took 136.21 seconds.
References
Abueleiwa, M. H., & Abu-Naser, S. S. (2024). Classification of rice using deep learning. International Journal of Academic Information Systems Research (IJAISR), 8(4), 26–36. Retrieved from http://ijeais.org/wp-content/uploads/2024/4/IJAISR240404.pdf
Aki, O., Güllü, A., & Uçar, E. (2015). Classification of rice grains using image processing and machine learning techniques. Proceeding of International Scientific Conference (pp. 352-354). Gabrovo: Technical University of Gabrovo.
Armi, L., & Fekri-Ershad, S. (2019). Texture image analysis and texture classification methods - A Review. International Online Journal of Image Processing and Pattern Recognition, 2(1), 1-29. Retrieved from https://arxiv.org/pdf/1904.06554#:~:text=This%20article%20has%20been%20compiled,vector%20machines%2C%20and%20so%20on.
Chunwitthayathira, S. (2014). Image registration and arrangement techniques. EAU Heritage Journal Science and Technology, 6(2), 24–29. retrieved from https://he01.tci-thaijo.org/index.php/EAUHJSci/article/view/25719 (in Thai)
Cinar, I., & Köklü, M. (2019). Classification of rice varieties using artificial intelligence methods. International Journal of Intelligent Systems and Applications in Engineering (IJISAE), 7(3), 188–194. https://doi.org/10.18201/ijisae.2019355381
Cinar, I., & Köklü, M. (2021). Determination of effective and specific physical features of rice varieties by computer vision in exterior quality inspection. Selcuk Journal of Agriculture and Food Sciences (SJAFS), 35(3), 229-243. https://doi.org/10.15316/SJAFS.2021.252
Cinar, I., Köklü, M., & Taspinar, Y. S. (2021). Classification of Rice Varieties with Deep Learning Methods. Computer and Electronics in Agriculture, 187, 16285. https://doi.org/10.1016/j.compag.2021.106285
Cinar, I., & Köklü, M. (2022). Identification of rice varieties using machine learning algorithms. Journal of Agricultural Sciences (Tarim Bilimleri Dergisi), 28(2), 307-325. https://doi.org/10.15832/ankutbd.862482
Cohen, J. (1960). A coefficient of agreement for nominal scales. Educational and psychological measurement, 20(1), 37-46. https://doi.org/10.1177/001316446002000104
Farid, D., Rahman, M. & Al-Mamun, M. (2014). Efficient and scalable multi¬class classification using naïve Bayes tree. Proceeding of 2014 International Conference on Informatics, Electronics and Vision (ICIEV 2014) (pp. 1-4). Dhaka: IEEE.
Gonzalez, R. C., & Woods, R. E. (1992). Digital image processing. USA: Addison-Wesley Publishing Company.
Grandini, M., Bagli, E., & Visani, G. (2020). Metrics for multi-class classification: An overview. arXiv, 2008, 05756v1, Retrieved from https://arxiv.org/abs/2008.05756.
Jameel, S. A.., & Mohamed Shanavas, A. R. (2015). Implementation of improved gaussian filter algorithm for retinal fundus images. International Journal of Computer Applications, 132(8), 1-4. https://doi.org/10.5120/ijca2015907489.
Kullimratchai, P. (2014). Image retrieval fundamentals. EAU Heritage Journal Science and Technology, 7(2), 40–46. retrieved from https://he01.tci-thaijo.org/index.php/EAUHJSci/article/view/25546 (in Thai)
Kumyaito, N., Tamee, K., & Sittijuk, P. (2023). Artificial intelligence platform on semantic knowledge base for recommending elderly with chronic diseases care. EAU Heritage Journal Science and Technology, 17(2), 120–137. retrieved from https://he01.tci-thaijo.org/index.php/EAUHJSci/article/view/259516 (in Thai)
Microsoft. (2024). One-vs-All Multiclass. Azure machine learning. Retrieved from https://learn.microsoft.com/en-us/azure/machine-learning/component-reference/one-vs-all-multiclass?view=azureml-api-2.
Natekin, A., & Knoll, A. (2013). Gradient boosting machines, a tutorial. Frontiers in Neurorobotics, 7, 21. https://doi.org/10.3389/fnbot.2013.00021
NV5 Geospatial Software. (2023). Apply laplacian filters. Retrieved from https://www.nv5geospatialsoftware.com/docs/LaplacianFilters.html.
Patel, O., Maravi, Y. P. S., & Sharma, S. (2013). A comparative study of histogram equalization based image enhancement techniques for brightness preservation and contrast enhancement. Signal & Image Processing: An International Journal, 4, 11-25. https://doi.org/10.5121/sipij.2013.4502.
Reddy, R. P. K., Nagaraju, C., & Reddy, I. R. (2016). Canny scale edge detection. International Journal of Engineering Trends and Technology, x(y), 1-4. https://doi.org/10.14445/22315381/IJETT-ICGTETM-N3/ICGTETM-P121
Rexce, J., & Usha Kingsly Devi, K. (2017). Classification of milled rice using image processing. International Journal of Scientific & Engineering Research, 8(2), 10-14.
Siharad, D., & Sookprasert, A. (2024). Improving performance of using machine learning techniques and application for perceiving tourists’ hotel staying behaviors. EAU Heritage Journal Science and Technology (Online), 18(1), 161–175. retrieved from https://he01.tci-thaijo.org/index.php/EAUHJSci/article/view/264174 (in Thai)
Sinsomboonthong, S. (2017). Data mining 1: Discovering knowledge in data (2nd ed.). Bangkok: Chamchuree Products Co., ltd. (in Thai)
Shokouh, G. S., Baptiste, M., Xu, B., & Montesinos, P. (2021). Ridge detection by image filtering techniques: A review and an objective analysis. Pattern Recognition and Image Analysis, 31, 551-570. https://doi.org/10.1134/S1054661821030226
Tanwong, K., Suksawang, P., & Punsawad, Y. (2019). Development of rice grain phenotype quality verification Ssystem using machine learning. EAU Heritage Journal Science and Technology, 13(1), 76–94. retrieved from https://he01.tci-thaijo.org/index.php/EAUHJSci/article/view/177478 (in Thai)
Thai Rice Exporters Association. (2024). F.O.B. Prices. Retrieved from http://www.thairiceexporters.or.th/ (in Thai)
Zareiforoush, H., Minaei, S., Alizadeh, M. R., & Banaka, A. (2016). Qualitative classification of milled rice grains using computer vision and metaheuristic techniques. Journal of Food Science Technology, 53(1), 118-131. https://doi.org/10.1007/s13197-015-1947-4
