Plant Disease Detection Using an Innovative Swin-Axial Transformer
Ao Zhang, Wei Liu
Abstract
Plant diseases are a significant threat to global agricultural production, and accurate and efficient disease detection is crucial for ensuring food security. With the rapid development of deep learning technology, Transformer architectures have demonstrated strong global feature extraction capabilities in image classification and detection tasks. However, traditional Transformer models still face high computational costs and large parameter volumes when handling multi-scale diseases and complex backgrounds. To address this challenge, this paper proposes the Swin-Axial Transformer model based on the Swin Transformer. By introducing the TokenEmbedder module, the number of tokens is reduced, and multi-scale deep convolution is used to efficiently extract image features, significantly lowering computational costs. Furthermore, the Axial Transformer module reduces computational complexity by restricting self-attention calculations to local regions along the axial direction. With the combination of the Axial Compression module and the Detail Enhancement module, the model can efficiently extract global semantic features and effectively supplement local detail information. Compared to traditional global self-attention mechanisms, the Axial Transformer successfully avoids computational bottlenecks through axial compression strategies. Experimental results show that the model achieves a precision of 79.52% on the PlantDoc dataset, 99.79% on the PlantVillage dataset, and 95.69% on a self-constructed fusion dataset. The model’s parameter size is 14.87 M with a computational load of 2.96 GMac, which represents a reduction of 46% and 32%, respectively, compared to the Swin Transformer-T model, significantly improving computational efficiency. The model presented in this paper provides an efficient and reliable solution for large-scale crop disease detection.