Rice classification via convolutional neural network and transfer learning

Authors

  • Salamatu Osanga Ibrahim Department of Computer Science, Federal University of Lafia, Nasarawa, Nigeria
  • Muhammad Dahiru Liman Department of Computer Science, Federal University of Lafia, Nasarawa, Nigeria
  • Jeffrey Ovre Agushaka Department of Computer Science, Federal University of Lafia, Nasarawa, Nigeria

Keywords:

Rice, Classification, Data augmentation, Transfer learning, Convolutional neural networks

Abstract

This study classifies 20 rice varieties using three custom-built CNN architectures and four transfer-learning models: MobileNetV2, VGG16, ResNet50, and DenseNet121. The Bangladesh rice dataset, comprising original and augmented sets, was used to address the challenges of limited training data and poor model generalization. The performance of the proposed custom architectures and transfer-learning models was compared using accuracy, precision, recall, and F1-score. Custom Architecture 1 achieved the highest classification accuracy of 98.51%. Among the proposed architectures, Custom Architecture 1 achieved the highest classification accuracy on the combined dataset (original and augmented training sets), compared with 87.94% on the original dataset. The results show an increase in classification accuracy for the combined dataset, although the magnitude of the change varied across architectures. ResNet50 outperformed all transfer-learning models on the original dataset, whereas VGG16 achieved the highest accuracy of 97.87% on the combined dataset. In addition, image-resolution analysis shows that increasing the dataset size together with high-resolution inputs produced the best performance when compared with other resolutions.

66 13

References

[1] M. Zhao, Y. Lin & H. Chen, ``Improving nutritional quality of rice for human health'', Theoretical and Applied Genetics 133 (2020) 1397. https://doi.org/10.1007/s00122-019-03530-x.

[2] J. Chen, Y. Huang & Y. Tang, ``Quantifying economically and ecologically optimum nitrogen rates for rice production in south-eastern China'', Agriculture, Ecosystems & Environment 142 (2011) 195. https://doi.org/10.1016/j.agee.2011.05.005.

[3] R. Segal & M. Le Nguyet, Unfair harvest: The state of rice in Asia, Oxfam, 2019. https://oi-files-cng-v2-prod.s3.eu-west-2.amazonaws.com/asia.oxfam.org/s3fs-public/file_attachments/bp-unfair-harvest-rice-asia-200319-en.pdf.

[4] H. Ashraf, I. Murtaza, N. Nazir, A. B. Wani, S. Naqash & A. M. Husaini, ``Nutritional profiling of pigmented and scented rice genotypes of Kashmir Himalayas'', Journal of Pharmacognosy and Phytochemistry 6 (2017) 910. https://www.phytojournal.com/archives/2017/vol6issue6/PartM/6-6-142-977.pdf.

[5] T. Tipi, N. Yildiz, M. Nargelecekenler & B. Cetin, ``Measuring the technical efficiency and determinants of efficiency of rice (Oryza sativa) farms in Marmara Region, Turkey'', New Zealand Journal of Crop and Horticultural Science 37 (2009) 121. https://doi.org/10.1080/01140670909510257.

[6] J. D. Guzman & E. K. Peralta, Classification of Philippine rice grains using machine vision and artificial neural networks, World Conference on Agricultural Information and IT, Tokyo, Japan, 2008, pp. 41--48. https://api.semanticscholar.org/CorpusID:127366985.

[7] G. Shi, X. Zhang, G. Qu & Z. Chen, ``Classification of rice varieties using SIMCA applied to NIR spectroscopic data'', ACS Omega 7 (2022) 46623. https://doi.org/10.1021/acsomega.2c05561.

[8] M. Razavi, S. Mavaddati & H. Koohi, ``ResNet deep models and transfer learning technique for classification and quality detection of rice cultivars'', Expert Systems with Applications 247 (2024) 123276. https://doi.org/10.1016/j.eswa.2024.123276.

[9] S. J. M. Rad, F. A. Tab & K. Mollazade, Classification of rice varieties using optimal color and texture features and BP neural networks, 7th Iranian Conference on Machine Vision and Image Processing, Tehran, Iran, 2011, pp. 1--5. https://doi.org/10.1109/IranianMVIP.2011.6121583.

[10] S. Kamath, J. C. Stephen, S. Suresh, B. Barai, A. Sahoo, K. Radhika Reddy & K. R. Bhattacharya, ``Basmati rice: Its characteristics and identification'', Journal of the Science of Food and Agriculture 88 (2008) 1821. https://doi.org/10.1002/jsfa.3286.

[11] J. Chen, M. Li, T. Pan, L. Pang, L. Yao & J. Zhang, ``Rapid and non-destructive analysis for the identification of multi-grain rice seeds with near-infrared spectroscopy'', Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy 219 (2019) 179. https://doi.org/10.1016/j.saa.2019.03.105.

[12] N. M. U. Din, A. Assad, R. A. Dar, M. Rasool, S. U. Sabha, T. Majeed, Z. U. Islam, W. Gulzar & A. Yaseen, ``RiceNet: A deep convolutional neural network approach for classification of rice varieties'', Expert Systems with Applications 235 (2024) 121214. https://doi.org/10.1016/j.eswa.2023.121214.

[13] D. P. V. Hoai, T. Surinwarangkoon, V. T. Hoang, H.-T. Duong & K. Meethongjan, ``A comparative study of rice variety classification based on deep learning and hand-crafted features'', ECTI Transactions on Computer and Information Technology 14 (2020) 1. https://doi.org/10.37936/ECTI-CIT.2020141.204170.

[14] M. Koklu, I. Cinar & Y. S. Taspinar, ``Classification of rice varieties with deep learning methods'', Computers and Electronics in Agriculture 187 (2021) 106285. https://doi.org/10.1016/j.compag.2021.106285.

[15] M. Sliwinska-Bartel, D. T. Burns & C. Elliott, ``Rice fraud a global problem: A review of analytical tools to detect species, country of origin and adulterations'', Trends in Food Science & Technology 116 (2021) 36. https://doi.org/10.1016/j.tifs.2021.06.042.

[16] P. Dhaneesh, A. V. Prajeesh & V. Manohar, ``Optimizing rice variety classification with transfer learning: A robust and scalable model for agricultural applications'', Results in Engineering 28 (2025) 107570. https://doi.org/10.1016/j.rineng.2025.107570.

[17] C. Sun, T. Liu, C. Ji, M. Jiang, T. Tian, D. Guo, L. Wang, Y. Chen & X. Liang, ``Evaluation and analysis the chalkiness of connected rice kernels based on image processing technology and support vector machine'', Journal of Cereal Science 60 (2014) 426. https://doi.org/10.1016/j.jcs.2014.04.009.

[18] T. Liu, W. Wu, W. Chen, C. Sun, C. Chen, R. Wang, X. Zhu & W. Guo, ``A shadow-based method to calculate the percentage of filled rice grains'', Biosystems Engineering 150 (2016) 79. https://doi.org/10.1016/j.biosystemseng.2016.07.011.

[19] A. R. Pazoki, F. Farokhi & Z. Pazoki, ``Classification of rice grain varieties using two artificial neural networks (MLP and neuro-fuzzy)'', Journal of Animal and Plant Sciences 24 (2014) 336. https://psa.pastic.gov.pk/SearchArticleView.aspx?S_id=25131&articledetailId=28404.

[20] Y. Abbaspour-Gilandeh, A. Molaee, S. Sabzi, N. Nabipur, S. Shamshirband & A. Mosavi, ``A combined method of image processing and artificial neural network for the identification of 13 Iranian rice cultivars'', Agronomy 10 (2020) 117. https://doi.org/10.3390/agronomy10010117.

[21] I. Cinar & M. Koklu, ``Identification of rice varieties using machine learning algorithms'', Journal of Agricultural Sciences 28 (2022) 307. https://doi.org/10.15832/ankutbd.862482.

[22] P. Saxena, K. Priya, S. Goel, P. K. Aggarwal, A. Sinha & P. Jain, ``Rice varieties classification using machine learning algorithms'', Journal of Pharmaceutical Negative Results 13 (2022) 3762. https://www.researchgate.net/publication/367021922_RICE_VARIETIES_CLASSIFICATION_USING_MACHINE_LEARNING_ALGORITHMS.

[23] P. Lin, X. Li, Y. Chen & Y. He, ``A deep convolutional neural network architecture for boosting image discrimination accuracy of rice species'', Food and Bioprocess Technology 11 (2018) 765. https://doi.org/10.1007/s11947-017-2050-9.

[24] T. Ahmed, C. R. Rahman & M. F. M. Abid, ``Rice grain disease identification using dual phase convolutional neural network-based system aimed at small dataset'', arXiv (2020). https://arxiv.org/abs/2004.09870.

[25] H. Li, L. Zhang, H. Sun, Z. Rao & H. J. Ji, ``Identification of soybean varieties based on hyperspectral imaging technology and one-dimensional convolutional neural network'', Journal of Food Process Engineering 44 (2021) e13767. https://doi.org/10.1111/jfpe.13767.

[26] R. Deng, Y. Jiang, M. Tao, X. Huang, K. Bangura, C. Liu, J. Lin & L. Qi, ``Deep learning-based automatic detection of productive tillers in rice'', Computers and Electronics in Agriculture 177 (2020) 105703. https://doi.org/10.1016/j.compag.2020.105703.

[27] Y. Meng, W. Yuan, E. U. Aktilek, Z. Zhong, Y. Wang, R. Gao & Z. Su, ``Fine hyperspectral classification of rice varieties based on self-attention mechanism'', Ecological Informatics 75 (2023) 102035. https://doi.org/10.1016/j.ecoinf.2023.102035.

[28] Y. Meng, Z. Ma, Z. Ji, R. Gao & Z. Su, ``Fine hyperspectral classification of rice varieties based on attention module 3D-2DCNN'', Computers and Electronics in Agriculture 203 (2022) 107474. https://doi.org/10.1016/j.compag.2022.107474.

[29] D. S. Verma, M. Dafadar, J. K. Mishra, A. Kumar & S. Mahato, ``AI-enable rice image classification using hybrid convolutional neural network models'', International Journal of Intelligent Systems 2025 (2025) 5571940. https://doi.org/10.1155/int/5571940.

[30] M. A. Al Mamun, S. R. I. Karim, M. I. Sarkar & M. Z. Alam, ``Evaluating the efficacy of hybrid deep learning models in rice variety classification'', 2024. https://ijarise.org/index.php/ijarise/article/view/60.

[31] P. Shrivastava, K. Singh & A. Pancham, ``Classification of grains and quality analysis using deep learning'', International Journal of Engineering and Advanced Technology 11 (2021) 244. https://doi.org/10.35940/ijeat.A3213.1011121.

[32] S. Y. Prasetyo, Optimizing rice variety recognition through transfer learning with pretrained ResNet models, 4th International Conference of Science and Information Technology in Smart Administration (ICSINTESA), Balikpapan, Indonesia, 2024, pp. 231--235. https://doi.org/10.1109/ICSINTESA62455.2024.10748031.

[33] Z. Kang, R. Fan, C. Zhan, Y. Wu, Y. Lin, K. Li, R. Qing & L. Xu, ``The rapid non-destructive differentiation of different varieties of rice by fluorescence hyperspectral technology combined with machine learning'', Molecules 29 (2024) 682. https://doi.org/10.3390/molecules29030682.

[34] S. Weng, P. Tang, H. Yuan, B. Guo, S. Yu, L. Huang & C. Xu, ``Hyperspectral imaging for accurate determination of rice variety using a deep learning network with multi-feature fusion'', Spectrochimica Acta Part A: Molecular and Biomolecular Spectroscopy 234 (2020) 118237. https://doi.org/10.1016/j.saa.2020.118237.

[35] S. Chen, J. Xiong, W. Guo, R. Bu, Z. Zheng, Y. Chen, Z. Yang & R. Lin, ``Colored rice quality inspection system using machine vision'', Journal of Cereal Science 88 (2019) 87. https://doi.org/10.1016/j.jcs.2019.05.010.

[36] S. Pradana-López, A. M. Pérez-Calabuig, C. Rodrigo, M. A. Lozano, J. C. Cancilla & J. S. Torrecilla, ``Low requirement imaging enables sensitive and robust rice adulteration quantification via transfer learning'', Food Control 127 (2021) 108122. https://doi.org/10.1016/j.foodcont.2021.108122.

[37] V. K. Shrivastava, M. K. Pradhan, S. Minz & M. P. Thakur, ``Rice plant disease classification using transfer learning of deep convolution neural network'', The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences XLII-3/W6 (2019) 631. https://doi.org/10.5194/isprs-archives-XLII-3-W6-631-2019.

[38] S. Ghosal & K. Sarkar, Rice leaf diseases classification using CNN with transfer learning, IEEE Calcutta Conference (CALCON), Kolkata, India, 2020, pp. 230--236. https://doi.org/10.1109/CALCON49167.2020.9106423.

[39] N. N. I. Prova, ``Enhancing agricultural research with an attention-based hybrid model for precise classification of rice varieties'', International Journal of Cognitive Computing in Engineering 6 (2025) 412. https://doi.org/10.1016/j.ijcce.2025.02.002.

[40] R. Rajalakshmi, S. Faizal, S. Sivasankaran & R. Geetha, ``RiceSeedNet: Rice seed variety identification using deep neural network'', Journal of Agriculture and Food Research 16 (2024) 101062. https://doi.org/10.1016/j.jafr.2024.101062.

[41] K. Sharma, G. K. Sethi & R. K. Bawa, ``A comparative analysis of deep learning and deep transfer learning approaches for identification of rice varieties'', Multimedia Tools and Applications 84 (2025) 6825. https://doi.org/10.1007/s11042-024-19126-7.

[42] M. M. Islam, G. M. S. Himel, M. G. Moazzam & M. S. Uddin, ``An image dataset of rice varieties'', Mendeley Data, version 3 (2023). https://doi.org/10.17632/3mn9843tz2.3.

[43] A. G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto & H. Adam, ``MobileNets: Efficient convolutional neural networks for mobile vision applications'', arXiv (2017). https://doi.org/10.48550/arXiv.1704.04861.

[44] K. Simonyan & A. Zisserman, ``Very deep convolutional networks for large-scale image recognition'', arXiv (2014). https://doi.org/10.48550/arXiv.1409.1556.

[45] K. He, X. Zhang, S. Ren & J. Sun, Deep residual learning for image recognition, IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 2016, pp. 770--778. https://doi.org/10.1109/CVPR.2016.90.

[46] G. Huang, Z. Liu, L. van der Maaten & K. Q. Weinberger, Densely connected convolutional networks, IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 2017, pp. 2261--2269. https://doi.org/10.1109/CVPR.2017.243.

FIG9

Published

2026-11-03

How to Cite

Rice classification via convolutional neural network and transfer learning. (2027). Journal of the Nigerian Society of Physical Sciences, 9(1), 3432. https://doi.org/10.46481/jnsps.2027.3432

How to Cite

Rice classification via convolutional neural network and transfer learning. (2027). Journal of the Nigerian Society of Physical Sciences, 9(1), 3432. https://doi.org/10.46481/jnsps.2027.3432

Similar Articles

1-10 of 202

You may also start an advanced similarity search for this article.

Most read articles by the same author(s)