Search for a command to run...
Rice is a global staple food that plays a key role in terms of fostering global trade, economic developments and food. China, India, Pakistan, Thailand, Vietnam and Indonesia are some of the Asian countries that have been engaged in the production of various varieties of rice including short and long grains. These varieties are even further categorized into basmati, jasmine, kainat saila, ipsala, arborio, and so on, which suits all the different culinary styles as well as cultural backgrounds. In case of local and international trade, there is need to check and maintain the quality of rice grains to satisfy the customers and to maintain the reputation of a country. Quality check and classification using the manual are very tedious and time consuming. It is also very susceptible to errors. In this research paper, the automatic framework is a convolutional neural network (CNN) framework to classify rice varieties, i.e. basmati, jasmine, ipsala, arborio, and karacadag. The CNN model was trained and validated, with an impressive accuracy rate and an ideal area under each class Receiver Operating Characteristic (ROC) curve. The confusion matrix analysis indicated that the model was effective in differentiating the various rice varieties with few misclassifications. Also, the use of explainability methods including LIME (Local Interpretable Model-agnostic Explanations) and SHAP (SHapley Additive exPlanations) helped to understand the decision-making process of a model and provided some new insights about how particular features of rice grains impacted the results of classification. The interpretability fosters trust in the model predictions and increases its applicability in the real-world context. The results demonstrate the enormous potential of deep learning methods in agriculture, which opens the path to the development of automated classification systems.