Classification of Paddy as Visual Anomaly in Rice Piles Using MobileNetV2-Based Convolutional Neural Network

Authors

  • Barokah Saadah Universitas Dharma Wacana
  • Tri Aristi Saputri Universitas Dharma Wacana

DOI:

10.33395/sinkron.v10i3.16129

Keywords:

Convolutional Neural Network; Grad-CAM; Grains; MobileNetV2; Rice; Transfer learning; Visual Anomalies

Abstract

Rice is a strategic food commodity whose quality is assessed based on the visual appearance of the grains, including the presence of unhusked rice as an undesirable element in piles of milled rice. Manual inspection is subjective, time-consuming, and prone to errors, necessitating a more objective automated approach. To address this issue, this study applies a MobileNetV2-based Convolutional Neural Network with transfer learning to classify unhusked grains as visual anomalies in rice piles into two classes: normal rice and anomalous grains. In terms of methodology, the dataset consists of 1,000 self-acquired images stratified into three groups with a 70:15:15 ratio. Image preprocessing was performed via background removal using the rembg library and random background simulation with five background color variations. Training was conducted in two phases: Phase 1 (transfer learning with a frozen base model) and Phase 2 (fine-tuning by opening the last 30 layers of the base model). The evaluation results on the test data showed an accuracy of 90.67%, a macro precision of 0.9213, a macro recall of 0.9067, and a macro F1-score of 0.9058. The false positive rate across all tests was 0. Phase 1 was selected as the best model because it produced more stable performance compared to Phase 2. Grad-CAM visualizations confirmed that the model focuses its attention on the visual features of the objects, not background patterns. These findings demonstrate that a combination of preprocessing, transfer learning, and data augmentation is effective for binary image classification when dealing with limited datasets.

GS Cited Analysis

Downloads

Download data is not yet available.

References

Aminudin, M. A. I., Abdullah, M. N., Mustapha, F., Eng, K. K., Mustapha, M., & Mustapha, A. (2025). Explainable Deep learning Framework for Binary Corrosion Image Classification Using Grad-CAM. Sensors, 25(22), 7070. https://doi.org/10.3390/s25227070

Aznan, A., Viejo, C. G., Pang, A., & Fuentes, S. (2021). Computer Vision and Machine learning Analysis of Commercial Rice Grains: A Potential Digital Approach for Consumer Perception Studies. Sensors, 21(19), 6354. https://doi.org/10.3390/s21196354

Bastian, A., Priyadi, D., Zaliluddin, D., Mardiana, A., Wahid, A., Rifki, M., & Aziz, M. F. (2025). Penerapan Convolutional Neural Network (CNN) untuk Klasifikasi Kualitas Beras sebagai Strategi Peningkatan Keamanan Pangan di Indonesia. TEMATIK, 12(1), 50–58. https://doi.org/10.38204/tematik.v12i1.2332

Bichri, H., Chergui, A., & Hain, M. (2023). Image Classification with Transfer learning Using a Custom Dataset: Comparative Study. Procedia Computer Science, 220, 48–54. https://doi.org/10.1016/j.procs.2023.03.009

Chen, W., Li, W., & Wang, Y. (2022). Evaluation of Rice Degree of Milling Based on Bayesian Optimization and Multi-Scale Residual Model. Foods, 11(22), 3720. https://doi.org/10.3390/foods11223720

Chun, T. H., Hashim, U. R., Ahmad, S., Salahuddin, L., Choon, N. H., & Kanchymalay, K. (2022). Efficacy of the Image Augmentation Method Using CNN Transfer learning in Identification of Timber Defect. International Journal of Advanced Computer Science and Applications, 13(5), 107–114. https://doi.org/10.14569/IJACSA.2022.0130514

Faqih, R. R., Irsan, M., & Fathoni, M. F. (2024). Rice Plant Disease Detection System Using Transfer learning with MobilenetV3Large. Sinkron, 8(2), 805–812. https://doi.org/10.33395/sinkron.v8i2.13383

Gkountakos, K., Ioannidis, K., Demestichas, K., Vrochidis, S., & Kompatsiaris, I. (2024). A Comprehensive Review of Deep learning-Based Anomaly Detection Methods for Precision Agriculture. IEEE Access, 12, 197715–197733. https://doi.org/10.1109/ACCESS.2024.3522248

Gong, L., & Fan, S. (2022). A CNN-Based Method for Counting Grains Within a Panicle. Machines, 10(1), 30. https://doi.org/10.3390/machines10010030

Gulzar, Y. (2023). Fruit Image Classification Model Based on MobileNetV2 with Deep Transfer learning Technique. Sustainability, 15(3), 1906. https://doi.org/10.3390/su15031906

He, Y., Fan, B., Sun, L., Fan, X., Zhang, J., Li, Y., & Suo, X. (2023). Rapid Appearance Quality of Rice Based on Machine Vision and Convolutional Neural Network Research on Automatic Detection System. Frontiers in Plant Science, 14. https://doi.org/10.3389/fpls.2023.1190591

Ilo, B., Badjona, A., Singh, Y., Shenfield, A., & Zhang, H. (2025). Artificial Intelligence in Rice Quality and Milling: Technologies, Applications, and Future Prospects. Processes, 13(11), 3731. https://doi.org/10.3390/pr13113731

Mendoza-Bernal, J., González-Vidal, A., & Skarmeta, A. F. (2024). A Convolutional Neural Network Approach for Image-Based Anomaly Detection in Smart Agriculture. Expert Systems with Applications, 247(2), 123210. https://doi.org/10.1016/j.eswa.2024.123210

Prabowo, S. T., & Hadikurniawati, W. (2023). Deteksi dan Pengenalan Jenis Beras Menggunakan Metode Convolutional Neural Network. JATI (Jurnal Mahasiswa Teknik Informatika), 7(1), 163–167. https://doi.org/10.36040/jati.v7i1.6150

Setiawan, A., Adi, K., & Widodo, C. E. (2023). Rice Foreign Object Classification Based on Integrated Color and Textural Feature Using Machine learning. Mathematical Modelling of Engineering Problems, 10(2), 572–580. https://doi.org/10.18280/mmep.100226

Sokudlor, N., Laloon, K., Junsiri, C., & Sudajan, S. (2023). Enhancing Milled Rice Qualitative Classification with Machine learning Techniques Using Morphological Features of Binary Images. International Journal of Food Properties, 26(2), 2978–2992. https://doi.org/10.1080/10942912.2023.2264533

Suryana, E. A. (2023). Application to Estimate the Rice Polishing Degree Using Image Processing. Jurnal Pangan, 32(1), 33–40. https://doi.org/10.33964/jp.v32i1.585

Thammastitkul, A., & Petsuwan, J. (2023). Thai Hom Mali Rice Grading Using Machine learning and Deep learning Approaches. IAES International Journal of Artificial Intelligence (IJ-AI), 12(2), 815–822. https://doi.org/10.11591/ijai.v12.i2.pp815-822

Wang, C., Caragea, D., Narayana, N. K., Hein, N. T., Bheemanahalli, R., Somayanda, I. M., & Jagadish, S. V. K. (2022). Deep learning Based High-Throughput Phenotyping of Chalkiness in Rice Exposed to High Night Temperature. Plant Methods, 18(9), 2–23. https://doi.org/10.1186/s13007-022-00839-5

Wang, Y., & Su, W. (2022). Convolutional Neural Networks in Computer Vision for Grain Crop Phenotyping: A Review. Agronomy, 12(11), 1–25. https://doi.org/10.3390/agronomy12112659

Yumono, F., Yuliana, D. E., & Sarbini, R. N. (2022). Histogram Citra Jenis Beras dengan Menyertakan Kertas Putih Untuk Identifikasi Awal Jenis Beras dengan Menggunakan Jaringan Syaraf Tiruan. Jurnal Informatika dan Rekayasa Perangkat Lunak, 3(2), 129–137. https://doi.org/10.33365/jatika.v3i1.1891

Yusuf, M., Ruimassa, R., Tawainella, A. I., & Maharani, D. (2024). Klasifikasi Kualitas Beras Menggunakan Convolutional Neural Network Berbasis Android. Jurnal Komputer dan Informatika, 12(2), 186–192. https://doi.org/10.35508/jicon.v12i2.18004

Downloads


Crossmark Updates

How to Cite

Saadah, B., & Saputri, T. A. (2026). Classification of Paddy as Visual Anomaly in Rice Piles Using MobileNetV2-Based Convolutional Neural Network. Sinkron : Jurnal Dan Penelitian Teknik Informatika, 10(3), 1745-1754. https://doi.org/10.33395/sinkron.v10i3.16129