
Research Article
Explainable Deep Learning with ResNet50 and Grad-CAM for Agricultural Pest Classification
@INPROCEEDINGS{10.4108/eai.19-12-2025.2362580, author={Anshu Sharma}, title={Explainable Deep Learning with ResNet50 and Grad-CAM for Agricultural Pest Classification}, proceedings={Proceedings of the 1st International Conference on Computational Techniques in Data Science, IICTDS 2025, 19-20 December 2025, Chandigarh, India}, publisher={EAI}, proceedings_a={IICTDS}, year={2026}, month={11}, keywords={Agricultural pests Deep learning ResNet50 Transfer learning Explainable Artificial Intelligence (XAI) Grad-CAM Pest classification Smart farming Computer vision Precision agriculture}, doi={10.4108/eai.19-12-2025.2362580} }- Anshu Sharma
Year: 2026
Explainable Deep Learning with ResNet50 and Grad-CAM for Agricultural Pest Classification
IICTDS
EAI
DOI: 10.4108/eai.19-12-2025.2362580
Abstract
Detecting agricultural pests plays a crucial role in enhancing crop productivity and reducing yield losses. Pest identification through traditional methods, such as manual observations, is labor-intensive and requires domain knowledge, making it unsuitable for large-scale monitoring. In this study, we employ a deep learning-based approach and utilize the ResNet50 architecture to classify agricultural pests from a publicly available Kaggle dataset. After training and testing the model, we achieved high training accuracy (approximately 99%) and reasonable validation accuracy (approximately 89%). To increase the interpretability of the model, we utilize explainable artificial intelligence (XAI) techniques, specifically Grad-CAM, to highlight the areas on the input images that influence the model's classification decision, thereby providing a clearer explanation of the model's performance. The model performance, represented through a confusion matrix, indicated strong performance for most pest classes, while some categories indicated inter-class confusion, which may be due to visual similarities. The findings suggest that deep learning, in combination with explainable AI, holds great promise for automating pest detection, supporting farmers in the early stages of intervention.

