Classification of Rice Varieties from Milled Rice Grain Images by Object Detection Method
Main Article Content
Abstract
This research has applied the YOLOv5 object detection model to help classify rice varieties from images of milled rice grains from the following varieties: Karacadag, Jasmine, Ipsala, Basmati, and Arborio. The research was divided into three main parts: data engineering, which involved developing a Python program to prepare data for artificial intelligence learning; data science operations using Python programming in conjunction with Google Colaboratory for milled rice grain detection; and the development of model accuracy evaluation method. In the data preparation phase, single-grain JPEG images were obtained from https://www.muratkoklu.com/datasets/, and noise reduction, background removal, and conversion to PNG format were performed. These images were then placed into 800 x 800 pixels images, each containing 20–64 grains, with varying degrees of overlapping: no overlap, and 5, 10, 15, 20, and 25 percent overlap. The non-overlapping images were used to train the YOLOv5 model, which was then used to classify rice varieties and identify the locations of various milled rice grains in the images. The research results showed that the YOLOv5 model could effectively classify all five rice varieties. Evaluating the model's accuracy at a threshold of 0.6, it was found that the model could correctly classify rice varieties in images with 0, 5, 10, 15, 20, and 25 percent grain overlap, with accuracy rates of 99.13, 99.00, 98.62, 98.19, 97.56, and 96.89 percent, respectively.
Article Details
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
Article Accepting Policy
The editorial board of Thai-Nichi Institute of Technology is pleased to receive articles from lecturers and experts in the fields of business administration, languages, engineering and technology written in Thai or English. The academic work submitted for publication must not be published in any other publication before and must not be under consideration of other journal submissions. Therefore, those interested in participating in the dissemination of work and knowledge can submit their article to the editorial board for further submission to the screening committee to consider publishing in the journal. The articles that can be published include solely research articles. Interested persons can prepare their articles by reviewing recommendations for article authors.
Copyright infringement is solely the responsibility of the author(s) of the article. Articles that have been published must be screened and reviewed for quality from qualified experts approved by the editorial board.
The text that appears within each article published in this research journal is a personal opinion of each author, nothing related to Thai-Nichi Institute of Technology, and other faculty members in the institution in any way. Responsibilities and accuracy for the content of each article are owned by each author. If there is any mistake, each author will be responsible for his/her own article(s).
The editorial board reserves the right not to bring any content, views or comments of articles in the Journal of Thai-Nichi Institute of Technology to publish before receiving permission from the authorized author(s) in writing. The published work is the copyright of the Journal of Thai-Nichi Institute of Technology.
References
M. Shahbandeh. “Principal rice exporting countries worldwide 2022/2023.” STATISTA.com. https://www.statista.com/statistics/255947/top-rice-exporting-countries-worldwide-2011/ (accessed Apr. 10, 2023).
Thai Rice Exporters Association. “F.O.B. Prices.” THAIRICEEXPORTERS.or.th. http://www.thairiceexporters.or.th/ (accessed Apr. 10, 2023).
Notifications of the Ministry of Commerce: Prescribe Thai Hom Mali Rice as a Standard Product and Thai Hom Mali Rice Product Standard (no. 3), B.E. 2559, Thai Government Gazette 133(243D), Ministry of Commerce, Oct. 21, 2016.
R. Chityala and S. Pudipeddi, Image Processing and Acquisition Using Python. New York, NY, USA: CRC Press, 2014.
R. C. Gonzalez and R. E. Woods, Digital Image Processing, 3rd ed. Upper Saddle River, NJ, USA: Pearson Prentice Hall, 2008.
S. S. A. Zaidi, S. Ansari, A. Aslam, N. Kanwal, M. Asghar, and B. Lee, “A survey of modern deep learning based object detection models,” Digit. Signal Process., vol. 126, 2022, Art. no. 103514, doi: 10.1016/j.dsp.2022.103514.
D. Thuan, “Evolution of YOLO algorithm and YOLOV5: The state-of-the-art object detection algorithm,” B.S. thesis, Dept. Inform. Technol., Oulu Univ. Appl. Sci., Oulum, Finland, 2021.
O. Aki, A. Güllü, and E. Uçar, “Classification of rice grains using image processing and machine learning techniques,” in Proc. Int. Sci. Conf. “UNITECH 2015”, Gabrovo, Bulgaria, Nov. 2015, pp. 352–354.
H. Zareiforoush, S. Minaei, M. R. Alizadeh, and A. Banaka, “Qualitative classification of milled rice grains using computer vision and metaheuristic techniques,” J. Food Sci. Technol., vol. 53, no. 1, pp. 118–131, Jan. 2016.
I. Cinar and M. Koklu, “Classification of rice varieties using artificial intelligence methods,” Int. J. Intell. Syst. Appl. Eng., vol. 7, no. 3, pp. 188–194, 2019.
I. Cinar and M. Koklu, “Determination of effective and specific physical features of rice varieties by computer vision in exterior quality inspection,” Selcuk J. Agriculture Food Sci., vol. 35, no. 3, pp. 229–243, 2021.
M. Koklu, I. Cinar, and Y. S. Taspinar, “Classification of rice varieties with deep learning methods,” Comp. Electron. Agriculture, vol. 187, 2021, Art. no. 106285, doi: 10.1016/j.compag.2021.106285.
I. Cinar and M. Koklu, “Identification of rice varieties using machine learning algorithms,” J. Agricultural Sci. (Tarim Bilimleri Dergisi), vol. 28, no. 2, pp. 307–325, 2022.