Abstract
The disease and pest recognition algorithms based on computer vision can automatically process and analyze a large amount of disease and pest images, thereby achieving rapid and accurate identification of disease and pest categories on crop leaves. Currently, most studies use deep learning models for feature extraction and identification of crop leaf disease and pest images. However, these methods are often seen as "black box" model, making it difficult to interpret the basis for their specific decisions. To address this issue, we propose an intrinsically interpretable crop leaf disease and pest identification model named Contrastive Prototypical Part Network (CPNet). The idea of CPNet is to find the key regions that influence the model's decision by calculating the similarity values between the convolutional feature maps and the learnable latent prototype feature representations. Moreover, because the limited availability of data resources for crop leaf disease and pest images, we employ a supervised contrastive learning strategy to capture the similar information between examples in one class and contrast them with examples in other classes. Finally, we evaluate our approach on four publicly available datasets, and the experimental results demonstrate that our proposed CPNet not only achieves improvements in performance over baseline methods across multiple datasets, but also provides interpretable evidence for crop leaf disease and pest identification.