Abstract
Plant disease is a critical factor affecting agricultural production. Traditional manual recognition methods face significant drawbacks, including low accuracy, high costs, and inefficiency. Deep learning techniques have demonstrated significant benefits in identifying plant diseases, but they still face challenges such as inference delays and high energy consumption. Deep learning algorithms are difficult to run on resource-limited embedded devices. Offloading these models to cloud servers is confronted with the restriction of communication bandwidth, and all of these factors will influence the inference's efficiency. We propose a collaborative inference framework for recognizing plant diseases between edge devices and cloud servers to enhance inference speed. The DNN model for plant disease recognition is pruned through deep reinforcement learning to improve the inference speed and reduce energy consumption. Then the optimal split point is determined by a greedy strategy to achieve the best collaborated inference acceleration. Finally, the system for collaborative inference acceleration in plant disease recognition has been implemented using Gradio to facilitate friendly human-machine interaction. Experiments indicate that the proposed collaborative inference framework significantly increases inference speed while maintaining acceptable recognition accuracy, offering a novel solution for rapidly diagnosing and preventing plant diseases.
Introduction
Deep Learning (DL) has revolutionized plant disease identification, but deploying these models in the field presents a classic "tug-of-war" between hardware constraints and connectivity. Edge-side inference on resource-limited devices often suffers from high latency and energy consumption. Conversely, cloud-side offloading is restricted by communication bandwidth, as uploading high-resolution images can be slower than local processing. This paper proposes a collaborative inference framework that intelligently splits a neural network between edge devices and cloud servers to optimize performance.
Proposed Framework
The framework utilizes a two-stage optimization strategy to bridge the gap between local and remote processing.
1. DRL-based Model Compression
Using the Deep Deterministic Policy Gradient (DDPG) algorithm, the system automatically determines the optimal "sparsity ratio" for each layer of the neural network (AlexNet). This reinforcement learning approach ensures that layers are pruned intelligently to maintain accuracy while reducing computational load.
2. Latency-Aware Greedy Partitioning
The framework identifies an "optimal split point" using a greedy search. This point is selected where the intermediate data size is minimal, reducing transmission latency while offloading the remaining heavy computation to the server. For the tested setup, Layer 6 was identified as the mathematical "sweet spot" for splitting the workload.
Experimental Results
The study utilized the Plant Village dataset, consisting of 54,305 images across 38 categories of diseased and healthy plant leaves.
Latency and Data Reduction
The "pruned collaborated inference" method achieved a 1.69x speedup over edge-only inference and a massive 4.35x speedup over cloud-only methods. The average collaborative latency was reduced to just 18.55ms.
As shown in Figure 4, pruning significantly reduces both the output data size (KB) and the processing latency (ms) across the convolutional layers. This reduction is crucial for minimizing the data bottleneck during transmission between the device and the server.
Accuracy Recovery
While pruning typically degrades performance, fine-tuning the pruned model resulted in a Top-1 accuracy of 97.17%, surpassing the original model's 93.67%. This suggests that the pruning process effectively regularized the network, removing noise and improving generalization.
Conclusion
The proposed framework offers a robust solution for rapid plant disease diagnosis. By combining DRL-based pruning with intelligent partitioning, the system achieves significant acceleration and maintains high accuracy, making it suitable for real-world agricultural deployment where bandwidth and device resources are limited.
Summary updated