This study presents a comparative analysis of deep learning architectures for automated rice variety classification, focusing on whether Convolutional Neural Networks (CNNs) or transformer-based models offer superior performance. We evaluate three representative CNNs (MobileNetV2, ResNet18, and DenseNet121), a hybrid CNN model (ConvNeXt-Base), and two transformer variants (ViT-Base and Swin-Tiny). Experiments on the PaddyVarietyBD dataset, comprising 14,000 rice grain images across 35 varieties, assessed model performance using accuracy, precision, recall, and F1-score. Additionally, we apply Grad-CAM to visualize and interpret each model’s focus regions during classification. Results consistently show CNN-based models outperform their transformer counterparts in both classification accuracy and computational efficiency. DenseNet121 achieved the highest accuracy (97.32%), while MobileNetV2 provided competitive performance (96.79%) with substantially lower computational cost. Grad-CAM visualizations revealed that CNNs attend more coherently to key grain features, whereas transformer models, particularly ViT-Base, displayed more scattered attention patterns. These findings underscore the practical advantages of CNN architectures, especially lightweight models like MobileNetV2, for effective and interpretable rice variety classification.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

CNNs Versus Transformers: An Interpretability-Focused Study for Rice Variety Classification

  • Phi-Hung Hoang,
  • Nam-Thuan Trinh,
  • Van-Manh Tran,
  • Thi-Thu-Hong Phan

摘要

This study presents a comparative analysis of deep learning architectures for automated rice variety classification, focusing on whether Convolutional Neural Networks (CNNs) or transformer-based models offer superior performance. We evaluate three representative CNNs (MobileNetV2, ResNet18, and DenseNet121), a hybrid CNN model (ConvNeXt-Base), and two transformer variants (ViT-Base and Swin-Tiny). Experiments on the PaddyVarietyBD dataset, comprising 14,000 rice grain images across 35 varieties, assessed model performance using accuracy, precision, recall, and F1-score. Additionally, we apply Grad-CAM to visualize and interpret each model’s focus regions during classification. Results consistently show CNN-based models outperform their transformer counterparts in both classification accuracy and computational efficiency. DenseNet121 achieved the highest accuracy (97.32%), while MobileNetV2 provided competitive performance (96.79%) with substantially lower computational cost. Grad-CAM visualizations revealed that CNNs attend more coherently to key grain features, whereas transformer models, particularly ViT-Base, displayed more scattered attention patterns. These findings underscore the practical advantages of CNN architectures, especially lightweight models like MobileNetV2, for effective and interpretable rice variety classification.