1. Introduction
Rice is one of the most important staple crops worldwide, and stable rice production is closely linked to food security [
1]. In paddy-field cultivation, weed control during the early growth stage is especially important because this period determines whether rice seedlings can establish a favorable population structure under field competition [
2]. Representative annotated target classes in this study included barnyard grass,
Sagittaria trifolia, Alisma spp., rice seedlings, and reed, which frequently co-occur during the early growth stage of paddy fields, and accurate discrimination among them is directly related to subsequent selective weed control. These targets, especially the weed species, compete strongly for nutrients, water, light, and growing space, thereby affecting rice growth and final yield [
3,
4]. Weed infestation also lowers rice market grade, raises harvesting and drying costs, and can reduce quality and sale price. Traditional weeding relies on manual identification or blanket pesticide spraying, which is inefficient and causes serious ecological pollution and pesticide residues from overapplication. Thus, a real-time and reliable crop–weed discrimination method for complex paddy-field environments is crucial for supporting timely weed control, reducing unnecessary herbicide application, improving field-management efficiency, and advancing the green development of smart agriculture [
5,
6,
7].
Weed recognition technology has evolved from traditional image processing methods reliant on manual features, such as color and texture, to automatic feature extraction driven by deep learning [
8,
9]. Over the past five years, one-stage object detection algorithms, particularly the YOLO series, have made significant advancements in this domain [
10,
11]. Wu et al. improved the residual structure of YOLOv4 to strengthen shallow feature propagation and local detail retention, thereby enhancing the representation and detection of small weed targets in agricultural scenes [
12]. Further developments, such as HAD-YOLO, improved detection accuracy in complex agricultural backgrounds by optimizing the feature pyramid, which enhanced multi-scale feature aggregation and strengthened the representation of small targets under cluttered field conditions [
13]. Similar difficulties have also been reported in other agricultural vision tasks, where small targets, occlusion, and structural interference likewise affect detection performance. For instance, Yang et al. proposed YOLO-SGD based on YOLOv7-l by introducing involution in the early backbone to enhance the spatial specificity of shallow features. In addition, the explicit visual center (EVC) and spatial context pyramid (SCP) modules were integrated at the backbone output to suppress instance interference caused by root winding and to improve contextual and multi-scale feature representation, especially for small and partially occluded targets [
14]. This study suggests that robust weed recognition under complex field conditions can be improved not merely by replacing the detector, but by introducing targeted architectural designs for shallow feature preservation, interference suppression, and multi-scale feature fusion under dense distribution and leaf-overlap occlusion.
In recent years, research has transitioned from a primary focus on accuracy to a coordinated emphasis on accuracy, speed, and computational constraints. AGRI-YOLO employed the lightweight YOLOv11n as the detection backbone to improve inference efficiency in cornfield weed detection, demonstrating the practical value of lightweight one-stage detectors for real-time agricultural applications [
15,
16]; GE-YOLO improved multi-scale feature fusion through the Gold-YOLO feature aggregation network, which strengthened information interaction across feature levels and enhanced the representation of targets with scale variation in field environments [
17]. The latest models, YOLO-CESn [
18] and GTDR-YOLOv12 [
14], sought to address real-time detection challenges in complex field environments by balancing lightweight design with enhanced feature representation, thereby reducing parameter burden while preserving detection performance. Furthermore, for the real-time detection of multi-trait and small-scale targets in the field, Yu et al. introduced SLW-YOLO, which incorporated the LSKNet attention mechanism to enhance attention to informative regions, a dedicated small-target detection layer (SNet) to improve sensitivity to tiny objects, and the WIoU v3 loss function to optimize localization quality, thereby achieving a better balance between accuracy and speed in complex backgrounds [
19]. In the context of high-speed detection requirements on production lines, Li et al. developed Cotton-YOLO, which integrated ConvNext and Swin-Transformer into the backbone and detection head of YOLOv7 to combine stronger local feature extraction with improved contextual modeling, thereby enabling high-speed inference without sacrificing accuracy [
20]. Concurrently, Pawłowski et al. conducted seed size detection and measurement utilizing the instance segmentation capabilities of YOLOv8, which enabled more precise object boundary delineation and quantitative measurement, thereby achieving both high accuracy and low error rates [
21]. Additionally, the incorporation of the Transformer mechanism and deformable attention, as seen in YOLO-SW [
22], improves the modeling of long-range dependencies and spatially adaptive feature sampling, which is beneficial for capturing target deformation and irregular morphology. Window self-attention modules such as Swin-Transformer have been used in agricultural target detection to improve contextual representation in complex backgrounds while controlling computational cost through localized attention computation, thus making them more suitable for real-time applications [
23]. These studies indicate that recent performance gains in agricultural detection mainly rely on improved multi-scale fusion, enhanced contextual modeling, stronger attention to small or irregular targets, and lightweight architectural design for real-time deployment.
Despite these advances, the previous studies collectively suggest that recent performance improvements in agricultural detection mainly rely on enhanced shallow feature preservation, stronger multi-scale feature fusion, better contextual or attention-based modeling, and lightweight architectural optimization. However, the current literature still lacks a method that can simultaneously address the specific requirements of early-stage paddy-field crop–weed discrimination [
24,
25,
26]. In this scenario, rice seedlings and weeds such as barnyard grass often exhibit highly similar morphology, while water-surface reflection, muddy background textures, and severe leaf overlap further increase the risk of false and missed detections [
27,
28]. At the same time, agricultural edge platforms impose strict constraints on model size, computational cost, and real-time inference capability. Therefore, the unresolved gap is not simply the need for higher detection accuracy, but the lack of a lightweight and robust method that can jointly handle fine-grained crop–weed confusion, complex paddy-field interference, and edge-side deployment requirements [
29,
30].
To address the above challenges, this study proposes DGS-Net, a lightweight weed detection model based on YOLOv11n for paddy-field environments. Unlike existing lightweight YOLO-based detectors that mainly improve deployment efficiency by reducing network scale or simplifying convolutional operations, DGS-Net is designed as a task-oriented architecture for the specific visual difficulties of paddy-field weed detection. In practical field scenes, weeds often exhibit irregular leaf shapes, small and dense distributions, high visual similarity to rice seedlings, partial occlusion, and interference from muddy backgrounds and water–surface reflections. To cope with these problems, a C2PSA_DAT module is introduced into the backbone to strengthen deformable feature extraction for weeds with irregular contours and elongated structures [
31]; a VoV-GSCSP module is embedded in the neck to improve lightweight multi-scale feature fusion while controlling computational cost [
32,
33].
In addition, a separated and enhancement attention module (SEAM) is incorporated before the detection head to enhance the representation of partially occluded weed targets and suppress background interference. Through this coordinated design, DGS-Net aims to achieve a better balance between detection accuracy, model complexity, and edge-side deployment suitability, providing a practical solution for real-time weed recognition in paddy-field robotic and precision spraying applications.
3. Results and Analysis
3.1. Ablation Experiments
Based on the YOLOv11n baseline, ablation experiments were conducted to evaluate the individual and combined contributions of the C2PSA_DAT, VoV-GSCSP, and SEAM modules to paddy-field weed detection. The results are presented in
Table 1.
In Experiment 1, the baseline model without the C2PSA_DAT, VoV-GSCSP, and SEAM modules achieved a precision of 88.3%, recall of 88.4%, and mean average precision of 91%. These reference values indicate the model’s baseline detection performance prior to any optimization.
In Experiment 2, incorporating the VoV-GSCSPmodule raised both the precision and recall to 89.7%, and increased the mAP to 92.3%. These results indicate that VoV-GSCSP substantially improves feature fusion and effectively enhances the network’s multi-scale feature representation.
In Experiment 3, after introducing the C2PSA_DAT module, the model achieved an 89.8% precision, 87.1% recall, and 91.5% average precision. The C2PSA_DAT module enhances the network’s adaptive modeling of key regions via a deformable attention mechanism. In particular, for rice weed recognition, it markedly improved the capture of edge information.
In Experiment 4, introducing the SEAM module raised the precision and mean average precision to 90.5% and 91.6%, respectively. Although the recall declined slightly to 86%, the module markedly improved the model’s robustness for detecting targets in complex backgrounds, particularly when rice leaves were occluded.
Following the integration of the VoV-GSCSP and SEAM modules in Experiment 5, the model attained a precision of 90.5%, a recall of 84.7%, and an average precision of 90.6%. In comparison to the baseline model, this configuration enhanced precision while slightly decreasing the computational cost from 6.4 to 6.2 GFLOPs; however, both recall and mean average precision (mAP) experienced a decline. These findings suggest that the combination of VoV-GSCSP and SEAM did not result in a consistent overall enhancement in detection performance, although it may have bolstered confidence in certain positive predictions.
Upon integrating the C2PSA_DAT and SEAM modules in Experiment 6, precision achieved 86.5%, recall 89.9%, and average precision 90.9%. This configuration exhibited improved recall compared to the baseline model, albeit with a decrease in precision and a slightly lower mAP. Moreover, the parameter count and computational cost rose to 2,719,215 and 6.6 GFLOPs, respectively. Consequently, this setup does not alleviate the computational burden; instead, it indicates that the amalgamation of C2PSA_DAT and SEAM bolstered recall while introducing additional complexity and reduced precision.
After adding the C2PSA_DAT and VoV-GSCSP modules in Experiment 7, the model achieved a precision of 89.5%, a recall of 91.2%, and an average precision of 92.5%. This module combination substantially improved both precision and recall while keeping computational complexity low. Among the eight configurations, Experiment 7 achieved the highest mean average precision (mAP) of 92.5% and a recall rate of 91.2% while also exhibiting the lowest model weight at 5.3 MB and a computational cost of 6.0 GFLOPs. This performance indicates the most favorable trade-off within the ablation study. In contrast, Experiment 8 primarily improved the precision to 91.7%, but it did not exceed Experiment 7 in terms of mAP, recall, model size, or computational cost. Consequently, the ablation results imply that the combination of C2PSA_DAT and VoVGSCSP offers the most substantial overall contribution. Furthermore, the precision improvement noted in Experiment 8 is practically significant, as enhanced precision can mitigate false alarms and reduce the risk of incorrectly treating rice seedlings in paddy-field weed management.
3.2. Comparison of Baseline Models
For overall performance evaluation, representative lightweight CNN-based and Transformer-based detectors were selected as baseline models under unified experimental settings. Specifically, the compared models used the same input resolution, training epochs, optimizer, learning-rate schedule, and data augmentation strategy, so that the comparison can be understood as a controlled benchmark under a unified implementation pipeline. Precision, recall, mAP, model size, number of parameters, and GFLOPs were compared to analyze the trade-off between detection accuracy reliability and deployment efficiency for edge-side paddy-field applications.
Among the CNN-based baseline models, lightweight variants such as YOLOv5n, YOLOv8n, YOLOv10n, YOLOv11n, and YOLOv12n maintained relatively small model sizes and low computational cost, making them suitable for real-time deployment on resource-constrained devices. However, under the present paddy-field dataset, their limitations are more clearly reflected in complex scenarios involving dense small targets, strong visual similarity between rice seedlings and weeds, and severe background interference. Although these models provide competitive baseline performance, their overall detection reliability still declines under such conditions. In comparison, DGS-Net achieved a 91.7% precision, 86.8% recall, and 92.4% mAP with only a 5.8 MB model size and 6.2 GFLOPs, indicating that the proposed design improved not only the aggregated metrics in
Table 2, but also the practical robustness required for crop–weed discrimination in complex paddy-field scenes. This balance between accuracy and computational cost is important for paddy-field robots, where lower GFLOPs can reduce inference burden and help maintain longer continuous operation under limited onboard power.
Transformer-based detectors, including variants of RT-DETR (RT-DETR-L, RT-DETR-Resnet50, RT-DETR-Resnet101, RT-DETR-X) [
31], demonstrate robust global modeling capabilities through attention-based feature interactions. However, within the current unified training and evaluation framework, they do not exhibit an accuracy–efficiency trade-off that is comparable to that of DGS-Net on this dataset. While lightweight Transformer variants such as LW-DETR-Tiny and LW-DETR-Small [
32] do reduce the computational costs, their overall detection performance remained inferior to that of the more robust lightweight YOLO baselines and DGS-Net in the present paddy-field task. This finding should be viewed as a relative comparison within the specific experimental context, rather than as an inherent limitation of Transformer-based detectors. For the current dataset, the primary challenge lies not only in global context modeling, but also in the reliable representation of dense, small, and visually similar crop–weed targets amid complex field interferences. Although Transformer-based detectors can model global dependencies, their higher computational cost may limit real-time deployment on compact agricultural platforms. In contrast, DGS-Net maintains competitive accuracy with lower complexity, making it more suitable for edge-side weed recognition in field operations.
The DGS-Net proposed in this study demonstrated superior detection performance compared to lightweight models while maintaining low resource consumption. With 2,707,279 parameters, 6.2 GFLOPs, and a model weight of 5.8 MB, DGS-Net’s deployment cost is similar to models like YOLOv11n and YOLOv12n. In standardized experiments, DGS-Net achieved a precision of 91.7%, a recall of 86.8%, and an mAP of 92.4%, surpassing most lightweight YOLO variants. The concept of a favorable balance in this research involves achieving robust detection accuracy in challenging paddy-field conditions without significantly increasing deployment costs. By incorporating C2PSA_DAT, VoV-GSCSP, and SEAM modules into the YOLOv11n architecture, DGS-Net enhances feature representation for small targets in complex backgrounds without excessive parameter complexity. This enhancement is particularly beneficial in scenarios with visual similarities between rice and weeds, dense small targets, partial occlusions, and backgrounds affected by reflections, where improved precision and mAP are crucial for minimizing false positives and missed weed detections. Consequently, DGS-Net is well-suited for accurate crop–weed differentiation and precise weed management on resource-limited platforms such as paddy-field drones and ground robots.
While the quantitative comparison illustrates the overall superiority of DGS-Net, it does not adequately elucidate how the introduced modules alter the network’s emphasis on target regions. Consequently, a gradient-weighted class activation mapping (Grad-CAM) analysis was conducted to offer supplementary visual evidence. These results suggest that the performance gain of DGS-Net is not obtained by simply increasing model scale, but by improving feature extraction and fusion in a manner consistent with the visual characteristics of paddy-field weed targets.
3.3. Heatmap Analysis
To further investigate the impact of the proposed modules on feature attention, Grad-CAM was employed on representative test images from five categories: barnyard,
Sagittaria trifolia,
Alisma spp., seedling, and reed. It is important to note that Grad-CAM provides qualitative rather than quantitative evidence. Consequently, the heatmaps serve as supportive visual evidence for model behavior, and their interpretation was considered alongside the ablation results and detection comparisons. In this study, the heatmaps were analyzed primarily from three qualitative perspectives: the concentration of activation on visible weed structures, the reduction in scattered responses in background regions, and the alignment of visual patterns with the detection differences outlined in
Section 3.4. The examples presented in
Figure 7 were selected from the test set to represent typical paddy-field conditions encountered in this study, such as occlusion, weak boundaries, and background interference. These examples are intended for illustrative comparison rather than statistical generalization.
Figure 7 contrasts the activation maps of four model configurations: the baseline YOLOv11n, YOLOv11n + SEAM, YOLOv11n + SEAM + VoV-GSCSP, and the complete DGS-Net. This progressive comparison is significant, as it enables a step-by-step examination of the visual contributions of each added component, rather than limiting the analysis to a comparison between the baseline and the final model.
In comparison to the baseline YOLOv11n, the model incorporating SEAM exhibited enhanced activation in partially visible target regions while demonstrating diminished responses in surrounding cluttered areas. This modification is particularly significant in paddy-field scenes, where leaf overlap and incomplete target visibility frequently occur. This visual pattern aligns qualitatively with SEAM’s intended function of maintaining essential structural cues during occlusion and minimizing distractions from non-target regions amid complex background interference.
Following the introduction of VoV-GSCSP, the activation regions exhibited greater continuity on slender leaves and became more concentrated around the target body, while the scattered responses in muddy-water and reflection-affected background areas diminished. This visual pattern aligns qualitatively with a more stable multi-scale target representation under lightweight constraints. Thus, the observed changes in the heatmap can be interpreted as illustrative visual cues that broadly correspond with the gains reported in the ablation and model comparison experiments, rather than serving as independent evidence of enhanced feature fusion.
After adding C2PSA_DAT to the full DGS-Net, activation maps concentrated more on structurally informative regions such as narrow leaves, target centers, and irregular contours, while responses in non-target background areas were further suppressed. This improvement was most pronounced for categories with weak boundaries or complex surrounding textures, where the full model showed better alignment between the principal activation region and the actual weed structure. These qualitative differences support the interpretation that C2PSA_DAT enhances the modeling of irregular local morphology, and that the combined use of VoV-GSCSP and SEAM strengthens feature aggregation and robustness to occlusion. Overall, the Grad-CAM results align with the ablation and qualitative detection findings but should be treated as visual corroboration rather than definitive proof of improved target discrimination.
Heatmaps offer feature-level visual evidence, but detection quality on complex field images is better judged by the predicted bounding boxes. Therefore, we also present qualitative comparisons of the detection results.
3.4. Comparison of Detection Effects
In the comparative analysis of YOLO-series algorithms, each version performed acceptably on weeds in simple backgrounds but exhibited clear limitations in complex paddy-field environments (
Figure 8). Detection images revealed that lightweight models such as YOLOv5n and YOLOv6n suffered from substantial missed detections. Small targets such as barnyard and
Sagittaria trifolia, which intermingle with rice seedlings, frequently lacked clearly identified boundaries and were sometimes completely overlooked. Even YOLOv8l, despite its larger parameter count and higher overall detection rate, produced inaccurate bounding boxes under conditions of strong light-induced water–surface reflection or plant overlap. The models often misclassified muddy-water textures as weeds or failed to detect weeds in densely infested areas, thereby falling short of the high-precision weed-removal requirements.
Transformer-based detectors (e.g., the RT-DETR family) exhibit strong global modeling capabilities in visual detection but remain inadequate for detecting very small targets. Comparison diagrams show that variants such as RTDETR-l and RTDETR-x produce relatively stable bounding boxes for larger weed targets. However, when weeds lie near image borders or are heavily occluded by rice leaves, these models often yield low confidence scores or misaligned boxes. The Transformer’s relatively coarse extraction of local fine-grained features impairs its ability to distinguish barnyard grass from rice, which have highly similar appearances, thus increasing false detections. Additionally, the predicted boxes are frequently oversized and fail to closely follow true weed contours. For precision-spraying tasks that demand accurate localization, this deficiency in positioning accuracy constitutes a critical limitation.
In contrast, the DGS-Net model presented in this paper achieved superior detection performance across diverse, complex paddy-field scenarios. Visualization results show that DGS-Net accurately identified various weed types. Even when weed targets were extremely small, closely blended with the background, or heavily occluded by rice seedlings, the model attained high-confidence detections. Thanks to the C2PSA_DAT module’s capacity to capture deformable features, the bounding boxes produced by DGS-Net tightly aligned with weed growth centers and edge contours, yielding markedly better localization accuracy than the YOLO and Transformer-series models. In areas with extreme weed density, DGS-Net reliably distinguished individual plants, substantially reducing both missed detections and false positives and thereby improving crop–weed discrimination for subsequent precise field interventions in complex paddy-field environments.
3.5. Deployment of the Model on Embedded Devices
This study aimed to achieve the high-precision, real-time detection of rice seedlings and representative weeds in paddy fields using a lightweight model. To evaluate deployment performance on edge devices and support subsequent real-time field recognition and intelligent agricultural machinery applications, we conducted a deployment experiment in Xinfutun, Shangzhi City, Harbin, Heilongjiang Province, China (coordinates to be verified: 44°79′12″ N–44°79′16″ N, 123°05′80″ E–123°05′90″ E). DGS-Net was deployed in an edge inference environment (Thunderobot MIX 8745H48 Mini PC, Qingdao Thunderobot Technology Co., Ltd., Qingdao, China) (AMD Ryzen 7 8745HS CPU, PyTorch 2.1.0 + cpu, Ultralytics 8.3.241). Test-set images were used to assess detection performance under edge conditions. At an input resolution of 640 × 640 pixels, the model’s average end-to-end processing time per image was 30.8 ms (preprocessing 0.5 ms, inference 30.1 ms, post-processing 0.2 ms), achieving a stable frame rate of approximately 32.5 FPS while maintaining high accuracy (mAP
50 = 0.9278, mAP
50–95 = 0.6358, P = 0.9194, R = 0.8671) (See
Table 3).
Figure S1 in the Supplementary Materials illustrates the deployment environment.
4. Discussion
4.1. Advantages of DGS-Net in Paddy-Field Weed Detection
The performance of DGS-Net is closely related to the agronomic and visual characteristics of early-stage paddy fields. At this stage, rice seedlings and co-occurring weeds compete for light, nutrients, water, and space, making reliable crop–weed discrimination within the rice cultivation system more critical than generic object detection. In practical paddy-field scenes, weeds often show irregular leaf morphology, slender structures, dense distribution, and high visual similarity to rice seedlings. Meanwhile, water–surface reflections, muddy-water textures, and plant overlap introduce substantial visual interference, which further complicates accurate field recognition.
The structural design of DGS-Net is intended to address these challenges in a targeted manner. C2PSA_DAT enhances the modeling of irregular local structures by introducing deformable attention into the backbone, which benefits the detection of weeds with narrow leaves, unstable contours, and weak edge information. VoV-GSCSP improves lightweight feature fusion in the neck, helping preserve useful shallow and mid-level cues for small and densely distributed weed targets while keeping the computational cost low. SEAM further strengthens the representation of partially visible weed regions before final prediction. Under overlap or occlusion, a weed may be recognized from only limited visible structures rather than its complete appearance; therefore, SEAM helps enhance relevant responses and suppress background interference, improving the stability of recognition in complex scenes.
The advantage of DGS-Net does not arise from simply increasing model complexity. Instead, it results from aligning module design with the specific visual characteristics of paddy-field weed detection. Compared with general lightweight YOLO-based models that mainly reduce parameters or simplify convolutional operations, DGS-Net combines deformable feature extraction, lightweight multi-scale fusion, and attention-enhanced representation to address irregular weed morphology, dense small targets, and occlusion-related interference simultaneously. This explains why the proposed model can improve detection accuracy while retaining low computational cost and real-time inference capability.
The Grad-CAM visualization results further support this interpretation. Compared with the baseline model, DGS-Net produces more concentrated activation responses on weed leaf structures, target centers, and irregular contours. At the same time, scattered responses in muddy backgrounds, water–surface reflections, and overlapping rice leaves are reduced. This visual evidence is consistent with the quantitative results of the comparison and ablation experiments, indicating that the proposed modules not only improve detection metrics but also guide the network to focus more effectively on agronomically relevant target regions. However, Grad-CAM should be regarded as qualitative evidence rather than direct quantitative proof; therefore, its results were interpreted together with the detection performance and ablation analysis.
For practical agricultural platforms, the lightweight design of DGS-Net is also important. Lower GFLOPs, fewer parameters, and a compact model size reduce the computational burden of real-time inference, which is beneficial for autonomous paddy-field robots and embedded field devices with limited computing resources, storage capacity, and battery power. In precision weed management, improved recall can reduce missed weed targets, while stable localization can support subsequent spraying or mechanical weeding operations. Therefore, DGS-Net improves not only benchmark detection performance, but also the practical applicability of crop–weed discrimination for field deployment and precision weed management [
35].
4.2. Limitations
Although DGS-Net improves the overall detection performance, challenging cases remain unresolved. The principal errors occur in scenes with severe occlusion, strong reflections, and densely distributed targets. When weeds are heavily covered by rice leaves, positioned near image borders, or intermixed with seedlings that share very similar local appearance, the detector can still produce missed detections or inaccurate bounding boxes. These observations indicate that the current method enhances robustness but does not eliminate fine-grained confusion between weeds and rice seedlings in complex paddy-field environments [
36].
The deployment results indicate that detection difficulty varies across classes. For example,
Sagittaria trifolia exhibited a lower recall and reduced mAP@0.5:0.95 compared with other categories, indicating that the model is less stable when targets have more challenging visible structures or experience stronger interference from surrounding vegetation. Thus, the advantages of DGS-Net should be understood as an improvement under complex conditions rather than a complete solution for all difficult cases in paddy-field weed detection [
37].
A further limitation is the constrained validation range. The dataset was collected from two paddy-field sites in Harbin during June–July of 2023 and 2024; despite variation in backgrounds, illumination, and occlusion, these images reflect a relatively specific scenario. Thus, the current results suffice to demonstrate DGS-Net’s effectiveness within the studied setting but do not establish that this advantage will persist across other ecological regions, seasons, water regimes, or weed-density levels. Additionally, the framework remains limited to two-dimensional object detection: it supports category recognition and bounding-box localization but cannot yet resolve weed morphology, density, or biomass at finer scales. This limitation restricts application in more precise field-management tasks.
4.3. Future Work and Practical Significance
Beyond benchmark performance, this study’s practical contribution is a lightweight, deployable perception module tailored to complex paddy-field environments. In real agricultural settings, weed detection serves not as an end but as the visual front end for downstream tasks such as targeted spraying, robotic weeding, field monitoring, and real-time decision-making. Thus, DGS-Net’s value extends beyond improved detection accuracy to include sustained deployability under strict computing, storage, and power constraints. This property renders the proposed method better suited to edge-side agricultural platforms than models that achieve accuracy gains primarily through large computational expansions.
5. Conclusions
Weed recognition in paddy fields faces several challenges: weeds exhibit irregular morphologies, backgrounds include confounding elements such as water–surface reflections and muddy textures, and lightweight detectors lack robust multi-scale feature extraction. To address these issues, we propose DGS-Net, an improved model built on the YOLOv11n object-detection architecture. DGS-Net incorporates a C2PSA_DAT module with deformable attention to better capture salient features, GSConv and VoV-GSCSP modules to trade off computational cost and semantic diversity, and a SEAM module to improve robustness under occlusion. These modifications yield substantial gains in detection performance. The main contributions are summarized as follows:
(1) Effective data augmentation and preprocessing were applied to address the complexity of the paddy field imaging environment: To represent the variability of scenes in paddy field images, we employed geometric transformations, including rotation and translation, alongside optical augmentations such as Gaussian noise addition and contrast adjustment to simulate realistic imaging changes. These augmentations increased training-data diversity, improved model generalization and robustness across lighting and turbidity conditions, and supplied higher-quality inputs for model training.
(2) The proposed DGS-Net improves detection accuracy and robustness in complex paddy-field environments. The C2PSA_DAT module enhances the capture of irregular edge information, VoV-GSCSP preserves effective feature representation within a lightweight framework, and SEAM improves robustness under partial occlusion. Heatmap-based visual analysis further shows that DGS-Net produces more concentrated activation in target regions and better suppresses background interference.
(3) We assessed the practical utility of the algorithm in real-world agricultural inspection scenarios. In comparative experiments, DGS-Net demonstrated a lightweight footprint of 5.8 MB while achieving a mean average precision (mAP) of 92.4%. Compared to mainstream models such as YOLOv8 and RT-DETR, it significantly reduced missed detections and minimized computational overhead in complex backgrounds. The model effectively identifies target categories across various scales and conditions, including barnyard, Sagittaria trifolia, Alisma spp., seedling, and reed. This capability provides robust algorithmic support for intelligent weed control and precision agriculture.
Despite the algorithmic advances reported here, certain limitations remain. The current detection framework focuses on two-dimensional bounding-box recognition and does not provide pixel-level morphological quantification of features such as weed density and biomass. Future work will extend the detector into a more integrated field-perception framework. The lightweight design of DGS-Net reduces model size and computational overhead, and it also improves deployability on resource-constrained agricultural platforms. Beyond combining object detection with semantic segmentation, future studies should explore multimodal sensing, enhanced cross-scene robustness, and tighter integration with downstream decision modules such as targeted spraying, robotic weeding, and real-time field monitoring. Such developments would transition the method from isolated weed detection to a deployable sensing-to-decision component for intelligent paddy-field management.