Original papers
Classification of rice varieties with deep learning methods

https://doi.org/10.1016/j.compag.2021.106285Get rights and content

Highlights

  • Arborio, Basmati, Ipsala, Jasmine and Karacadag rice varieties were used.

  • The dataset (1) has 75K images including 15K pieces from each rice variety. The dataset (2) has 12 morphological, 4 shape and 90 color features.

  • ANN, DNN and CNN models were used to classify rice varieties.

  • Classified with an accuracy rate of 100% through the CNN model created.

  • The models used achieved successful results in the classification of rice varieties.

Abstract

Rice, which is among the most widely produced grain products worldwide, has many genetic varieties. These varieties are separated from each other due to some of their features. These are usually features such as texture, shape, and color. With these features that distinguish rice varieties, it is possible to classify and evaluate the quality of seeds. In this study, Arborio, Basmati, Ipsala, Jasmine and Karacadag, which are five different varieties of rice often grown in Turkey, were used. A total of 75,000 grain images, 15,000 from each of these varieties, are included in the dataset. A second dataset with 106 features including 12 morphological, 4 shape and 90 color features obtained from these images was used. Models were created by using Artificial Neural Network (ANN) and Deep Neural Network (DNN) algorithms for the feature dataset and by using the Convolutional Neural Network (CNN) algorithm for the image dataset, and classification processes were performed. Statistical results of sensitivity, specificity, prediction, F1 score, accuracy, false positive rate and false negative rate were calculated using the confusion matrix values of the models and the results of each model were given in tables. Classification successes from the models were achieved as 99.87% for ANN, 99.95% for DNN and 100% for CNN. With the results, it is seen that the models used in the study in the classification of rice varieties can be applied successfully in this field.

Introduction

Image processing and computer vision applications in agriculture are of interest due to their non-destructive evaluation and low cost compared to manual methods (Mahajan et al. 2015). Computer vision applications based on image processing offer advantages compared to traditional methods based on manual work (Barbedo 2016). Evaluating or classifying grains by manual methods can be time-consuming and costly, as the human factor is at the forefront. In manual methods, the evaluation process may differ, as it is limited to the experience of the evaluation experts. In addition, rapid decision-making by manual methods can be difficult when an assessment is made on a large scale (Patrício & Rieder 2018).

Rice from grain products is among the products produced in many countries and consumed all over the world. Rice is priced on various parameters in the market. Texture, shape, color and fracture rate are some of these parameters (Aukkapinyo et al. 2019). After acquiring digital images of the products, various machine learning algorithms are used to determine these parameters and perform classification operations. Machine learning algorithms ensure that large amounts of data are analyzed quickly and reliably. It is important to use such methods in rice production to improve the quality of the final product and to meet food safety criteria in an automated, economical, efficient and non-destructive way (Al-Jarrah et al., 2015, Zareiforoush et al., 2015, Grinberg et al., 2020).

In recent years, many digital image features have been used to evaluate rice classification and quality. These include geometric parameters (length, perimeter, etc.), fracture rate, whiteness and determination of rice grain cracks can be given examples. Various features of grain products can be extracted by using systems based on image processing. Furthermore, these features are seen to be classified using algorithms such as ANN (Ebrahimi et al., 2014, Shrestha et al., 2016, Sabanci et al., 2017, Kaya and Saritas, 2019), SVM (Cortes & Vapnik 1995), LR (LaValley 2008), DNN (Dahl et al., 2013, Liu et al., 2017) and CNN (Lin et al., 2018, Ahmed et al., 2020) from machine learning algorithms. These studies are compiled and summarized in Table 1.

In a study in the literature, a two-class dataset containing 1700 rice data was carried out and 98.5% classification success was achieved using the SVM algorithm (Sun et al. 2014). In another study, 200 pieces of data were examined from sixteen classes and 87.16% accuracy was obtained using the SVM algorithm (Liu et al. 2016b). In the study, which used three classes and 7399 pieces of data, a 95.5% success rate was achieved with the deep CNN algorithm (Lin et al. 2018). In another study conducted with three different types of rice and 200 pieces of data, the researchers used CNN for classification procedures after feature extraction and achieved 88.07% success (Ahmed et al. 2020).

The aim of this study is to develop a non-destructive model to increase classification success by using images of rice varieties. In the proposed models, 106 morphological and color features obtained from rice images were given as input to ANN and DNN and classification was carried out. In addition, 75,000 rice images from 5 different classes even distribution to the CNN method, which has the ability to classify raw images without requiring pre-processing, were given as input and the classification process was carried out. Later, the classification successes of ANN, DNN, CNN methods were compared.

This study is organized as follows. In the second section of the paper, the dataset, performance metrics, cross validation and methods used in the study were described. In the third section, the experimental results obtained in the study were described. In the last section, experimental results were evaluated and recommendations were presented.

Section snippets

Material and methods

Models were created using ANN, DNN and CNN algorithms to perform classification operations with the image and feature datasets used in the study. The flow chart of the proposed models for the classification of rice varieties is given in Fig. 1.

Experimental results

Classification results made by ANN, DNN and CNN methods are given in this section. The data set used in the study contains features obtained from 75,000 rice grain images. In ANN and DNN methods, this data was used as input. Arborio, Basmati, Ipsala, Jasmine and Karacadag rice classes were given as classification outputs. The images contained in the data set used were used as an introduction to CNN. The hardware specifications used to run these algorithms and the network structures used in the

Conclusions

In this study, performance measurements of 3 different machine learning algorithms were obtained using rice images and features extracted from these images. Statistical measurements of confusion matrix as a result of classification were used as performance metrics. SNS, SPC, PRE, F1S, ACC, FPR, FNR values were obtained and compared for each method and each class. With the help of these metrics, information about the training and testing success of algorithms has been calculated. Looking at

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

References (38)

  • S. Mahajan et al.

    Image acquisition techniques for assessment of legume quality

    Trends Food Sci. Technol.

    (2015)
  • M. Olgun et al.

    Wheat grain classification by using dense SIFT features with SVM classifier

    Comput. Electron. Agric.

    (2016)
  • D.I. Patrício et al.

    Computer vision and artificial intelligence in precision agriculture for grain crops: a systematic review

    Comput. Electron. Agric.

    (2018)
  • R.D.L. Pires et al.

    Local descriptors for soybean disease recognition

    Comput. Electron. Agric.

    (2016)
  • B.L. Shrestha et al.

    A two-camera machine vision approach to separating and identifying laboratory sprouted wheat kernels

    Biosyst. Eng.

    (2016)
  • K.P. Singh et al.

    Artificial neural network modeling of the river water quality—a case study

    Ecol. Model.

    (2009)
  • M. Sokolova et al.

    A systematic analysis of performance measures for classification tasks

    Inf. Process. Manage.

    (2009)
  • C. Sun et al.

    Evaluation and analysis the chalkiness of connected rice kernels based on image processing technology and support vector machine

    J. Cereal Sci.

    (2014)
  • Ahmed, T. Rahman, C. R. Abid, M., Mahmud, F., 2020. Rice grain disease identification using dual phase convolutional...
  • Cited by (90)

    View all citing articles on Scopus
    View full text