Preprint
Article

This version is not peer-reviewed.

Deep Learning-Based Crop Disease Recognition System for Smart Agriculture

Submitted:

20 October 2025

Posted:

21 October 2025

You are already at the latest version

Abstract
With the rapid advancement of artificial intelligence (AI) and computer vision, intelligent agricultural systems have become a crucial component of smart farming. Among them, automatic crop disease recognition plays a vital role in ensuring agricultural productivity and food security. This study proposes an AI‑based crop disease recognition system that integrates deep learning, image processing, and edge computing. A large‑scale dataset of crop disease images was constructed, and transfer learning was employed to enhance model generalization. A convolutional neural network (CNN) was optimized by incorporating attention mechanisms and multi‑scale feature fusion to improve accuracy. Experiments show an average accuracy of 97.8% on the PlantVillage dataset [9] and stable performance under real‑field lighting variations. A lightweight deployment framework based on TensorFlow Lite enables real‑time disease detection on mobile and embedded platforms. The system provides a feasible, efficient AI‑driven solution for precision agriculture and contributes to the digital transformation of modern farming.
Keywords: 
;  ;  ;  ;  

1. Introduction

Agriculture, the foundation of human survival, directly affects food security and ecological stability. Traditional crop disease identification relies on manual observation and expert diagnosis, which is time-consuming, labor-intensive, subjective, and often limited in accuracy [1,2,3,12].
With rapid advances in AI, deep learning models have become a major direction for automatic crop disease identification in smart agriculture. Convolutional neural networks (CNNs) have achieved breakthroughs in image recognition and have been widely adopted across domains such as medical imaging, autonomous driving, and industrial inspection [6,16].

2. Relevant Research and Technical Foundations

Deep learning is an important branch of machine learning, and its core idea is to automatically learn high-level abstract features from data through multi-layer neural networks, thereby achieving intelligent recognition and prediction of complex tasks. Compared with traditional shallow learning algorithms (e.g., support vector machines, decision trees), deep learning can effectively handle nonlinear relationships and exhibits stronger generalization ability on large-scale datasets [5,16].
In the field of image recognition, deep learning has become a mainstream paradigm. Multi-layer convolutional neural networks (CNNs) can automatically learn texture, shape, color, and other discriminative visual features, realizing end-to-end recognition and classification. The key principle is to extract spatial hierarchical representations using local receptive fields and weight sharing, which both preserve spatial information and reduce computational cost [6,7,8]. Representative architectures such as VGG, Inception, and ResNet have greatly advanced computer-vision performance.
In recent years, the application of deep learning in agricultural vision has grown rapidly. AI models for crop disease detection, fruit ripeness assessment, weed identification, and yield prediction have become integral components of precision agriculture [9,10,12,19]. When integrated with the Internet of Things (IoT), remote sensing, and unmanned aerial vehicles (UAVs), deep learning promotes the intelligent and automated transformation of traditional agriculture.
Convolutional neural networks are currently the most widely used models for agricultural image analysis. In crop-disease identification, CNNs can automatically extract key visual cues such as leaf texture, chromatic variations, and lesion morphology, enabling accurate classification even under complex field backgrounds [9,10,11,12]. However, due to the scarcity of large-scale labeled datasets in agriculture, directly training deep networks often leads to overfitting. Transfer learning alleviates this problem by pre-training models on large general datasets such as ImageNet and then fine-tuning them on domain-specific crop-disease data, significantly reducing training cost and improving generalization [9,11,17].
In real agricultural scenarios, many devices—including drones, field sensors, and mobile terminals—have limited computational resources, making it difficult to deploy large-scale deep models directly. Edge computing therefore provides vital technical support for intelligent crop-disease recognition [4,14]. By moving part of the computation from the cloud to the edge, it reduces latency and communication overhead while enabling real-time response close to data sources. Combined with lightweight networks such as MobileNet, ShuffleNet, and EfficientNet-Lite, edge computing enables efficient and practical on-device disease detection for modern smart-farming applications.

3. Methodology

3.1. Four-Layer Architecture

The proposed system adopts a four-layer architecture:
1)
Data layer: image acquisition and storage (disease sample repository and metadata).
2)
Model layer: training and optimization of deep learning algorithms.
3)
Service layer: encapsulated inference APIs supporting remote calls and batch recognition.
4)
Application layer: user-facing visual interfaces and interaction.
The system uses a front–back separation: a Python + Flask backend exposes RESTful APIs, and a Vue-based frontend provides an interactive UI. Models are trained and updated in the cloud and, after lightweight optimization, are deployed to edge devices for real-time field identification.

3.2. Data Preprocessing

Before training, the original images are processed as follows:
1)
Size normalization: resize all images to 224×224 pixels.
2)
Data augmentation: rotation (±30°), flipping, brightness adjustment (0.8–1.2), etc.
3)
Denoising and background suppression: Gaussian filtering and edge detection.
4)
Class balance: oversample minority classes (e.g., SMOTE).
After preprocessing, the dataset contains 62,000 images split into training/validation/test sets at a 7:2:1 ratio.

4. Model Design and Implementation

We base the recognition model on a lightweight CNN architecture enhanced with an attention mechanism (SE-Block) and a multi-scale feature fusion module. ResNet-50 is used as the backbone during comparative experiments and ablations [6]. The final classifier is a Softmax layer that outputs the disease class and confidence.
Architecture overview:
1)
Input layer: 224×224×3 RGB images.
2)
Convolutional feature extraction: depthwise-separable convolutions to reduce parameters.
3)
Attention mechanism: SE modules emphasize lesion regions and suppress background noise.
4)
Multi-scale fusion: integrates features from different layers to capture lesion size, shape, and texture.
5)
Global average pooling: reduces parameters while preserving salient information.
6)
Classification output: Softmax predictions of disease classes.

5. Experimental Setup and System Testing

Experiments were conducted in the following software and hardware environment, as shown in Table 1.
Training employs transfer learning with EfficientNet-B3 initialization on ImageNet and fine-tuning on the crop disease dataset [17]. Early stopping monitors validation accuracy and loss to prevent overfitting, as shown in Table 2.

6. Experimental Results and Analysis

Table 3 reports model performance on the same test set. Classical baselines (VGG16, ResNet50, MobileNetV2) are included for comparison [4,6,7].
During training, the proposed model’s loss decreased steadily; validation accuracy stabilized after approximately the 35th epoch, indicating good convergence and generalization. Per-crop accuracy is summarized in Table 4.
Edge deployment on a Raspberry Pi 4B achieves an average inference time of 0.48 s per image, with ~230 MB memory usage and real-time throughput up to 2 FPS.

7. Applications and Deployment

The proposed intelligent crop disease recognition system supports flexible deployment across various agricultural scales and computing environments, mainly including cloud-based and edge-based modes. In the cloud deployment mode, the system runs on centralized high-performance servers or agricultural data centers, suitable for large farms and regional monitoring platforms that process large volumes of crop images. The cloud framework performs batch data processing, high-precision inference, and continuous model updating through online learning. It also integrates data analytics and visualization modules, allowing users to monitor disease occurrence, evaluate control measures, and make decisions based on big-data insights. Moreover, multi-user collaboration is supported—researchers, managers, and farmers can jointly contribute labeled data and knowledge, enhancing the comprehensiveness of the disease database.
In contrast, the edge deployment mode emphasizes lightweight, real-time applications in field environments. After compression and quantization using TensorFlow Lite, the optimized model occupies less than 20 MB and runs efficiently on low-power embedded devices such as smartphones, field sensors, and UAVs. Edge computing minimizes dependence on cloud networks, shortens response latency, and enables on-site diagnosis even in areas with poor connectivity. With an average inference time below 0.5 s per image, the system provides immediate feedback to users, facilitating early warning and rapid intervention. In practice, farmers can capture leaf images via mobile terminals, UAVs can survey large fields and transmit summarized results to the cloud for mapping and trend analysis, while agricultural management platforms can generate statistical reports and predictive analyses. The hybrid integration of cloud and edge computing thus forms a closed-loop framework of perception, learning, and optimization, supporting continuous improvement in accuracy, robustness, and scalability for intelligent agricultural applications.

8. Future Work

Although the proposed system achieves high accuracy and good real-time performance, there remain several directions for future research and improvement. First, the construction of more diversified datasets is essential. Current training data mainly cover limited regions and specific seasons, whereas crop diseases are highly affected by environmental and climatic factors. Expanding image sampling across different regions, varieties, growth stages, and climates will improve the model’s robustness and adaptability. Second, future studies should explore multimodal data fusion, combining spectral imagery, thermal sensing, and environmental parameters (e.g., humidity, temperature, soil moisture) to enhance disease diagnosis and reduce false detections caused by single-modality limitations.
Furthermore, the introduction of knowledge graph technology can systematically organize agricultural disease knowledge, linking symptoms, causes, and treatment strategies to enable intelligent Q&A, decision support, and personalized recommendations [13,15]. Federated learning also represents a promising direction: it allows multiple agricultural institutions or regional data centers to collaboratively train models without sharing raw data, thereby protecting data privacy while improving model generalization across heterogeneous environments. Finally, continued optimization toward ultra-lightweight network architectures and model compression will support deployment on resource-constrained devices, ensuring long-term scalability for mobile and IoT-based precision agriculture.

9. Conclusion

In this paper, an intelligent recognition system based on deep learning is designed and implemented for crop disease identification, and the main innovations and contributions include:
This study designed and implemented a deep-learning-based crop disease recognition system that integrates attention mechanisms and multi-scale feature fusion to achieve both high accuracy and real-time performance on edge devices. The proposed framework realizes a complete workflow from image acquisition, preprocessing, and model inference to intelligent diagnosis and visual presentation, forming a practical, end-to-end solution for smart agriculture. Experimental results demonstrate that the optimized model achieves an average accuracy of 97.8% on benchmark datasets and performs robustly under real-field conditions [9,12]. The system’s dual deployment strategy—cloud for large-scale data analysis and edge for field-level real-time detection—provides flexible adaptability to various agricultural environments. Overall, the proposed work offers a feasible technical route for the modernization and digital transformation of agricultural disease management, laying a solid foundation for future intelligent farming systems.

Funding

This research was funded by the Science Foundation of Shandong Province.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Yu, Y. Research Progress of Crop Disease Image Recognition Based on Wireless Network Communication and Deep Learning. Wirel. Commun. Mob. Comput. 2021, 2021. [CrossRef]
  2. Tugrul, B.; Elfatimi, E.; Eryigit, R. Convolutional Neural Networks in Detection of Plant Leaf Diseases: A Review. Agriculture 2022, 12, 1192. [CrossRef]
  3. Lee, H.-Y.; Kim, D.-H.; Park, K.-R. Pest diagnosis system based on deep learning using collective intelligence. Int. J. Electr. Eng. Educ. 2019, 60, 5–19. [CrossRef]
  4. Chen, J.; Zhang, D.; Nanehkaran, Y.A. Identifying plant diseases using deep transfer learning and enhanced lightweight network. Multimedia Tools Appl. 2020, 79, 31497–31515. [CrossRef]
  5. Cao, Z.; Jiang, Z.; Liu, G.; Wang, Y.; Qu, H. Why does strawberry fruit weight distribution show positive skewness? A simulation model reveals the underlying processes of fruit production. Front. Plant Sci. 2023, 14, 1255724. [CrossRef]
  6. He, Kaiming, et al. "Deep residual learning for image recognition." Proceedings of the IEEE conference on computer vision and pattern recognition. 2016.
  7. Simonyan, Karen, and Andrew Zisserman. "Very deep convolutional networks for large-scale image recognition." arXiv preprint arXiv:1409.1556 (2014).
  8. Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A.; Liu, W.; et al. Going deeper with convolutions. In Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 1–9. [CrossRef]
  9. Mohanty, S.P.; Hughes, D.P.; Salathé, M. Using Deep Learning for Image-Based Plant Disease Detection. Front. Plant Sci. 2016, 7, 1419. [CrossRef]
  10. Ferentinos, K.P. Deep learning models for plant disease detection and diagnosis. Comput. Electron. Agric. 2018, 145, 311–318. [CrossRef]
  11. Too, E.C.; Yujian, L.; Njuki, S.; Yingchun, L. A comparative study of fine-tuning deep learning models for plant disease identification. Comput. Electron. Agric. 2019, 161, 272–279. [CrossRef]
  12. Kamilaris, Andreas, and Francesc X. Prenafeta-Boldú. "Deep learning in agriculture: A survey." Computers and electronics in agriculture 147 (2018): 70-90.
  13. Cao, Z.; He, G.; Mu, S.; Qu, H. Effects of Bee Density and Hive Distribution on Pollination Efficiency for Greenhouse Strawberries: A Simulation Study. Agronomy 2023, 13, 731. [CrossRef]
  14. Yağ, İ.; Altan, A. Artificial Intelligence-Based Robust Hybrid Algorithm Design and Implementation for Real-Time Detection of Plant Diseases in Agricultural Environments. Biology 2022, 11, 1732. [CrossRef]
  15. Cao, Z.; Jiang, S.; Qu, H. Strategies to enhance greenhouse strawberry yield through honeybee pollination behavior: a simulation study. Front. Plant Sci. 2024, 15, 1514372. [CrossRef]
  16. LeCun, Yann, Yoshua Bengio, and Geoffrey Hinton. "Deep learning." nature 521.7553 (2015): 436-444.
  17. Russakovsky, Olga, et al. "Imagenet large scale visual recognition challenge." International journal of computer vision 115.3 (2015): 211-252.
  18. Yuan, Y.; Chen, L.; Wu, H.; Li, L. Advanced agricultural disease image recognition technologies: A review. Inf. Process. Agric. 2022, 9, 48–59. [CrossRef]
  19. Jiang, C.; Miao, K.; Hu, Z.; Gu, F.; Yi, K. Image Recognition Technology in Smart Agriculture: A Review of Current Applications Challenges and Future Prospects. Processes 2025, 13, 1402. [CrossRef]
  20. Petcu, M.A.; Sobolevschi-David, M.-I.; Curea, S.C.; Moise, D.F. Integrating Artificial Intelligence in the Sustainable Development of Agriculture: Applications and Challenges in the Resource-Based Theory Approach. Electronics 2024, 13, 4580. [CrossRef]
Table 1. Software and hardware environment.
Table 1. Software and hardware environment.
Project Configuration
Operating system Ubuntu 22.04 LTS
Programming language Python 3.9
Deep learning frameworks TensorFlow 2.13 / PyTorch 2.1
GPU device NVIDIA RTX 3080 (10GB VRAM)
Database MySQL 8.0
Deployment framework Flask RESTful API + Vue 3 frontend
Operating system Ubuntu 22.04 LTS
Programming language Python 3.9
Table 2. Training hyperparameters.
Table 2. Training hyperparameters.
Project Configuration
Learning rate 0.0001
Batch size 32
Epochs 100
Optimizer Adam
Loss function CrossEntropyLoss
Regularization Dropout (0.5)
Table 3. Performance of different models on the test set.
Table 3. Performance of different models on the test set.
Model Accuracy Precision Recall F1-score Inference time (ms)
VGG16 93.42% 92.85% 91.76% 92.30% 185
ResNet50 95.11% 94.63% 93.87% 94.25% 163
MobileNetV2 96.02% 95.21% 94.88% 95.04% 97
SE-EfficientNet 97.82% 97.11% 96.83% 96.97% 72
Table 4. Per-crop recognition accuracy.
Table 4. Per-crop recognition accuracy.
Crop Number of disease classes Average recognition accuracy
Tomato 10 98.3%
Wheat 8 97.5%
Corn 8 97.9%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.
Prerpints.org logo

Preprints.org is a free preprint server supported by MDPI in Basel, Switzerland.

Subscribe

Disclaimer

Terms of Use

Privacy Policy

Privacy Settings

© 2025 MDPI (Basel, Switzerland) unless otherwise stated