Accurate identification of plant diseases is a critical task in agricultural production. The existing deep learning crop disease recognition methods require a large number of labeled images for training, limiting the implementation of large-scale detection. To overcome this limitation, this study explores the application of self-supervised learning (SSL) in plant disease recognition. We propose a new model that combines a masked autoencoder (MAE) and a convolutional block attention module (CBAM) to alleviate the harsh requirements of large amounts of labeled data. The performance of the model was validated on the CCMT dataset and our collected dataset. The results show that the improved model achieves an accuracy of 95.35% and 99.61%, recall of 96.2% and 98.51%, and F1 values of 95.52% and 98.62% on the CCMT dataset and our collected dataset, respectively. Compared with ResNet50, ViT, and MAE, the accuracies on the CCMT dataset improved by 1.2%, 0.7%, and 0.8%, respectively, and the accuracy of our collected dataset improved by 1.3%, 1.6%, and 0.6%, respectively. Through experiments on 21 leaf diseases (early blight, late blight, leaf blight, leaf spot, etc.) of five crops, namely, potato, maize, tomato, cashew, and cassava, our model achieved accurate and rapid detection of plant disease categories. This study provides a reference for research work and engineering applications in crop disease detection.