Crop diseases seriously affect food security, and traditional identification methods are inefficient and inaccurate. This paper proposes a GoogLeNet model with an attention mechanism. By integrating an attention module inside the Inception module, the recognition ability of subtle disease features and complex backgrounds is improved. Based on strict data preprocessing and enhancement, the proposed method achieves 87.75% accuracy on the AI Challenger 2018 crop disease dataset, which is better than the existing advanced methods, which verifies the effectiveness and practicability of the method and provides technical support for smart agriculture.