Abstract:
Real-time detection of leaf diseases is often required in grape cultivation. In this study, a lightweight model, named DaEMC-YOLO, was proposed to detect grape leaf diseases under complex backgrounds. Excessive interference parameters were reduced from complex backgrounds and decreased. YOLOv8n was selected as the baseline. Three improvements were also introduced. (1) The fourth-stage backbone feature layer was incorporated with deformable attention. Adaptive sampling offsets were learned using bilinear interpolation. Feature sampling was redirected to leaf targets, according to leaf morphology, with emphasis on disease cues and localization, and suppressed background responses. (2) The neck incorporated the MBSMFFPN to promote cross-scale interaction. Enhanced upsampling combined interpolation and depthwise convolution. Modulation fusion weighted shallow boundaries and deep semantics, while cross-stage convolution combined depthwise convolutions, channel shuffling, and concatenation for multi-scale representation. (3) Feature-fusion and detection-head channels were reduced from 256 to 192 to reduce parameters, computation, and storage to retain detection performance. Ablation results revealed that the better complementary effects were achieved after evaluation. Deformable attention raised the mAP from 86.40% to 87.42%, while only increasing the parameter count by 0.03 M, indicating efficient foreground discrimination. MBSMFFPN then raised the mAP to 87.76%, while the parameter count was reduced to 2.18 M, computation to 7.3, and model size to 4.5 MB. The concurrent changes indicated that the fusion path reduced redundant processing for cross-scale interaction. The mAP increased to 88.43% after channel reduction, whereas the model was reduced to 1.89 M parameters, 6.0, and 4.0 MB. Together, the three improvements increased accuracy by 2.03 percentage points, while parameters and model size were reduced by 37.21% and 33.33%, respectively, indicating the trade-off after detection. DaEMC-YOLO achieved the highest mAP and the smallest model scale. Specifically, YOLOv10n and YOLOv12n surpassed it by 2.93 percentage points and 3.67 percentage points, respectively, while the larger YOLOv8s surpassed it by 1.02 percentage points. Compared with single-shot and two-stage detectors, the mAP increased by 19.39 percentage points and 20.48 percentage points, respectively, using far fewer parameters. The category also showed that there was an uneven difficulty pattern. The highest average precision was achieved for black rot, downy mildew, and Esca, whereas healthy leaves and leaf blight remained 1.04 percentage points and 0.08 percentage points below their best values. Complex backgrounds therefore made healthy leaves harder to distinguish, although the model remained competitive over all categories. Grad-CAM connected the numerical gains with feature attention. YOLOv8n distributed responses over leaves and surrounding backgrounds, whereas DaEMC-YOLO concentrated on leaf targets and weakened non-target responses. Channel-width experiments showed that there was a non-monotonic relationship between width and accuracy: More channels failed to consistently improve the accuracy of the detection. The 192-channel configuration produced the highest mAP, which supported a moderate feature capacity rather than unrestricted channel expansion. The moderate channel allocation preserved useful feature capacity to avoid unnecessary computational expansion during edge inference. Deployment experiments were performed on the Jetson Orin NX Super platform. Structural compression was translated into practical efficiency. The inference speed of DaEMC-YOLO reached 27.83 frames/s, while the inference time shortened to 35.93 ms/img, and memory usage was reduced to 0.18 GB. Compared with YOLOv8n, there was a 13.55% frame-rate increase, an 11.94% inference-time reduction, and an 18.18% memory reduction. The DaEMC-YOLO can be expected to improve foreground-focused detection with controlled network redundancy on resource-constrained edge devices.