A precise laser weeding method fusing multi-target tracking and safety constraint scheduling

By using the YOLO-GFD lightweight model and the ByteTrack multi-target tracking method, combined with elliptical safe zones and priority target scheduling, the problem of accurate identification and safe screening of weed targets in laser weeding systems was solved, achieving efficient and precise laser weeding operations.

CN122637162APending Publication Date: 2026-08-25JILIN AGRICULTURAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610806898.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-05
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing laser weeding methods are difficult to accurately identify, continuously track, safely screen, and efficiently manage weeds in complex farmland environments, leading to problems such as repeated identification, repeated attacks, accidental crop damage, and energy waste.

Method used

By employing the YOLO-GFD lightweight model combined with the ByteTrack multi-target tracking method, an elliptical safe zone is constructed, and a priority target scheduling strategy is adopted to achieve stable positioning and intelligent strike against weed targets.

Benefits of technology

It improves the accuracy of weed identification, reduces the risk of repeated strikes and accidental crop damage, optimizes the laser strike sequence, and improves operational efficiency and energy utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122637162A_ABST
    Figure CN122637162A_ABST
Patent Text Reader

Abstract

The application discloses a kind of fusion multi-target tracking and precision laser weeding method of security constraint scheduling, comprising: establishing corn crop row dataset and carrying out annotation and enhancement;YOLO-GFD light weight model is used to detect corn seedling and weed, the main network of the model uses GAM-StarNet, neck network uses C2f-Faster-CAMB module, detection head uses Detect-GSC, and improved Wise-IoU loss function is introduced;Based on ByteTrack method, the weed is tracked, and each weed is assigned a unique ID and obtains continuous trajectory;Based on the corn detection result, an elliptical safety zone is constructed, and the weed that has been tracked is screened for attackability, and the weed that enters or approaches the safety zone is excluded;A priority target scheduling method is used, the mirror migration cost, target urgency and trajectory stability are determined to determine the optimal attack target, and the image coordinates are converted into mirror control coordinates to realize accurate laser attack.The application can realize accurate, efficient and low-redundancy laser removal of weeds under the premise of ensuring the safety of corn crops.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a precise laser weeding method that integrates multi-target tracking and safety constraint scheduling. Background Technology

[0002] Currently, weed control technologies in farmland mainly include manual weeding, mechanical weeding, chemical weeding, and physical weeding. Manual weeding is labor-intensive and inefficient, making it difficult to meet the needs of large-scale agricultural production. While mechanical weeding can reduce herbicide use, it can easily damage crops during the seedling stage or when crops are close to weeds. Chemical weeding has advantages such as high efficiency and wide applicability, but long-term, excessive use of herbicides can lead to problems such as decreased agricultural product quality, soil and water pollution, and increased herbicide resistance in weeds. To reduce reliance on chemical herbicides and improve the precision of weed control, laser weeding technology is gradually becoming an important research direction in the fields of precision agriculture and intelligent agricultural machinery.

[0003] Laser weeding utilizes high-energy lasers to target the stems, growing points, or other key tissues of weeds, inhibiting or destroying their growth through thermal damage. Compared to traditional weeding methods, it offers advantages such as being non-contact, leaving no chemical residue, providing precise targeting, and being environmentally friendly. However, the effectiveness of laser weeding depends not only on laser energy and irradiation time but also on factors such as weed identification accuracy, target localization accuracy, real-time operation, and the order in which targets are targeted. In complex field environments, crops and weeds are often spatially interspersed, with diverse weed species and significant morphological differences. Furthermore, weeds are greatly affected by changes in light intensity, leaf shading, and background interference, making weed target detection and growing point localization challenging.

[0004] In recent years, with the development of machine vision and deep learning technologies, weed identification methods based on target detection models have been widely applied in intelligent weeding systems. These methods can automatically extract crop and weed features from field images and provide target location information for laser weeding actuators. Compared to traditional image processing methods, deep learning models have stronger feature representation and target recognition capabilities in complex backgrounds, which can improve the accuracy and robustness of weed detection to a certain extent. However, existing laser weeding methods mostly focus on weed detection and localization in single-frame images, lacking stable tracking and status updates of weed targets during continuous operations. This easily leads to the problem of the same weed target being repeatedly identified, repeatedly targeted, or missed, thereby reducing operational efficiency and increasing energy consumption.

[0005] Furthermore, crop safety is a crucial factor affecting the application of laser weeding systems in actual field operations. If the laser strike point is too close to the crop, or if the weed target overlaps with the crop area, accidental crop damage is likely. Existing methods typically rely solely on weed detection results for direct laser strikes, lacking constraint modeling of crop safety zones, making it difficult to ensure both weed control effectiveness and crop protection. Additionally, the galvanometer control system incurs migration costs when switching between different targets. Without considering target spatial location, target urgency, and strike sequence optimization, laser path redundancy, increased response time, and decreased operational efficiency may result.

[0006] Therefore, accurately identifying, continuously tracking, safely screening, and efficiently scheduling weeds in complex farmland environments is a pressing issue that needs to be addressed in the practical application of precision laser weeding systems. To improve the real-time performance, operational safety, and energy efficiency of laser weeding systems, it is necessary to construct a precision laser weeding method that integrates target detection, multi-target tracking, crop safety zone constraints, and target scheduling strategies. This method would enable stable positioning and intelligent targeting of weeds and provide reliable technical support for the field application of laser weeding equipment. Summary of the Invention

[0007] The technical solution of this invention to solve the above-mentioned technical problems is to provide a precise laser weeding method that integrates multi-target tracking and safety constraint scheduling, comprising the following steps:

[0008] Step 1: Establish a maize crop row dataset under various growth environments, use annotation tools to annotate maize plants and associated weeds, and perform data augmentation on the dataset;

[0009] Step 2: Detect corn seedlings and weeds using the YOLO-GFD lightweight model; the YOLO-GFD lightweight model includes a backbone network, a neck network, and a detection head; wherein, the backbone network adopts the GAM-StarNet network, the neck network adopts the C2f-Faster-CAMB module, the detection head adopts the Detect-GSC detection head, and the improved Wise-IoU loss function is used as the bounding box regression loss function;

[0010] Step 3: Based on the ByteTrack weed multi-target tracking method, weed targets in consecutive frames are tracked, and a unique ID is assigned to each weed target to achieve stable inter-frame target association and obtain continuous position change information and trajectory information of weed targets.

[0011] Step 4: After obtaining the trajectory information of the weed targets, construct an elliptical safe zone based on the corn detection results. Model the core safe zone of the corn using an ellipse inscribed in a rectangular frame, and perform strikeability screening on the tracked weed targets. Weed targets located within the elliptical safe zone or whose intersection ratio with the elliptical safe zone exceeds a threshold are determined to be non-strikeable targets; otherwise, they are determined to be candidate strike targets.

[0012] Step 5: Using a priority target scheduling method, candidate targets are prioritized and selected as the current optimal target. The image coordinates of the optimal target are then converted into galvanometer control coordinates to control the laser for strike.

[0013] Furthermore, the GAM-StarNet network described in step 2 is constructed by integrating the global attention mechanism GAM into the StarNet network. Through joint modeling of channel attention and spatial attention, it enhances the model's ability to perceive the target area of ​​weeds and its salient features, and suppresses background interference.

[0014] Furthermore, the C2f-Faster-CAMB module mentioned in step 2 is formed by combining the MBConv module with the coordinate attention mechanism CA to form the CAMB module, and further fused with the FasterBlock structure to replace the Bottleneck structure in the original C2f feature fusion module of YOLOv8n; wherein, the depthwise separable convolution in MBConv is used to reduce the number of parameters and computation, the CA attention mechanism is used to introduce spatial coordinate information, and the FasterBlock is used to improve inference speed.

[0015] Furthermore, in step 2, the Detect-GSC detection head, while maintaining the decoupled structure of the classification branch and the regression branch, introduces the GSConv module to replace some of the convolutional structures in the original detection head; the GSConv generates lightweight features through Ghost convolution and combines it with the Shuffle operation to realize information interaction between channels.

[0016] Furthermore, the improved Wise-IoU loss function described in step 2 enables the model to adaptively adjust its optimization focus based on the target scale and the quality of the predicted boxes by assigning dynamic weights to predicted boxes of different quality. For small-scale weeds and densely clustered weeds, it enhances the penalty effect on center point offset error; for high-quality predicted boxes, it avoids over-optimization.

[0017] Furthermore, the ByteTrack weed multi-target tracking method described in step 3 specifically includes: dividing the detection box of each frame into two categories, high confidence and low confidence, according to the confidence level, and matching it with the tracking trajectory of the previous frame; the matching adopts the joint measurement method of intersection-union ratio and center distance; a secondary matching strategy is adopted for the low confidence detection results: first, try to match with the unmatched trajectory; if the distance is less than the set threshold, update the trajectory; otherwise, create a new trajectory to wait for subsequent verification.

[0018] Furthermore, the formula for constructing the elliptical safe region in step 4 is as follows:

[0019] ;

[0020] in, ,and α and β employ a dynamic expansion strategy based on the target size;

[0021] ;

[0022] in, , Based on the expansion factor, , To adjust the parameters, and These are the image width and height, respectively; in the attackability screening, the intersection-union ratio (IUGR) is introduced as an auxiliary constraint: when: Even if the center point of the weed target is outside the elliptical safe zone, it is still considered an unstrikeable target.

[0023] Furthermore, the formula for converting image coordinates to galvanometer control coordinates in step 5 is as follows:

[0024] ;

[0025] in, , These are the control coordinates of the galvanometer in the horizontal and vertical directions, respectively; This is the inverse of the camera intrinsic parameter matrix; The pixel coordinates of the weed target in the image; For corresponding depth information; The rotation matrix is ​​for attitude compensation; For the platform's movement speed, This refers to the system response time.

[0026] Furthermore, the priority target scheduling method described in step 5 specifically includes:

[0027] The candidate weed target set is Among them, candidate targets It contains target ID, current location, and trajectory information;

[0028] Target priority Calculated using the following formula:

[0029] ;

[0030] in, The cost of galvanometer migration, To assess the urgency of the goal, For the duration of the trajectory in frames, , and Here, ε is the weighting coefficient, and ε is a small constant.

[0031] Optimal target at the current moment for:

[0032] ;

[0033] When a target is successfully hit, the system records its corresponding trajectory ID and suppresses the repeated assignment of the same trajectory in subsequent frames.

[0034] Compared with the prior art, the advantages of the present invention are as follows:

[0035] (1) This application constructs a weed image dataset for the complex environment of fresh corn fields and proposes a lightweight weed detection model, which improves the accuracy of weed identification in complex backgrounds and reduces the complexity of the model.

[0036] (2) This application integrates target detection and multi-target tracking algorithms to achieve continuous tracking and stable ID allocation of weed targets, reduce repeated attacks and ineffective laser irradiation, and improve the real-time performance of operations.

[0037] (3) This application proposes a target screening method based on maize safety zone constraints, which eliminates high-risk targets through adaptive elliptical safety zones to reduce the risk of accidental damage to maize seedlings.

[0038] (4) This application combines the cost of galvanometer migration and the urgency of the target to construct a target scheduling strategy, optimize the laser strike sequence, and improve the target strike efficiency and success rate.

[0039] (5) This application constructs a precision laser weeding system that integrates visual perception, target tracking, safety screening, target scheduling and laser control. It can achieve stable tracking and efficient weed control in complex field environments, providing a technical solution for the application of precision laser weeding equipment. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0041] Figure 1 This is a flowchart illustrating the steps of the precision laser weeding method based on the fusion of multi-target tracking and safety constraint scheduling described in this invention.

[0042] Figure 2 Examples of dataset images and image data annotations for this invention;

[0043] Figure 3 This is a diagram of the YOLO-GFD network architecture of the present invention;

[0044] Figure 4 This is a diagram showing the weed detection effect of the YOLO-GFD network of this invention;

[0045] Figure 5 The result diagram of the YOLO-GFD-ByteTrack algorithm of this invention is shown;

[0046] Figure 6 This is a schematic diagram of the elliptical adaptive corn safety zone division of the present invention;

[0047] Figure 7 This is a diagram showing the elliptical adaptive corn safety zone division results of this invention;

[0048] Figure 8 This figure shows the comparison results of different scheduling methods of the present invention on various evaluation indicators.

[0049] Figure 9 This image shows the results of precise laser weeding based on the integration of multi-target tracking and safety constraint scheduling in this invention. Detailed Implementation

[0050] This invention proposes a precision laser weeding method that integrates multi-target tracking and safety constraint scheduling, aiming to construct a precision laser weeding method that integrates target detection, multi-target tracking, crop safety zone constraints, and target scheduling strategies.

[0051] The precise laser weeding method integrating multi-target tracking and safety constraint scheduling proposed in this invention will be described below in specific embodiments:

[0052] Example 1:

[0053] A precise laser weeding method integrating multi-target tracking and safety-constrained scheduling, such as Figure 1 As shown, it includes the following steps:

[0054] Step 1: Establish a dataset of maize crop rows under various growth environments, such as... Figure 2 As shown, annotation tools were used to label corn plants and associated weeds, and data augmentation was performed on the dataset.

[0055] The Labelimg tool was used to label the corn plants and their roots, with the label categories being "cron" and "weed".

[0056] Data augmentation includes horizontal and vertical flipping, noise addition, brightness enhancement, and brightness reduction.

[0057] Step 2: Detect corn seedlings and weeds using the YOLO-GFD lightweight model;

[0058] Lightweight YOLO-GFD models, such as Figure 3 As shown, the main components include: Backbone (backbone network) responsible for extracting multi-level features from the input image, providing basic feature information for subsequent detection; Neck (neck network) responsible for aggregating multi-scale features, enhancing feature expression capabilities, and improving the detection effect for targets of different sizes; and Head (detection head) responsible for object classification and bounding box regression based on the aggregated features, completing the object detection task.

[0059] In the backbone, the original YOLOv8n backbone network is replaced with GAM-StarNet. StarNet captures high-dimensional and non-linear feature spaces from low-dimensional input through star-shaped operations, enhancing the model's ability to express key differences between crops and weeds while reducing redundant information and computational complexity. To further improve the feature perception capability of weed targets in complex field backgrounds, the global attention mechanism GAM is integrated into StarNet to construct the GAM-StarNet module. This module uses joint modeling of channel attention and spatial attention to make the model pay more attention to the target weed area and its salient features, while suppressing background interference such as soil, shadows, and crop leaves, thereby improving the model's ability to identify occluded weeds and small-scale weeds.

[0060] In the Neck section, this invention improves upon the original C2f feature fusion module of YOLOv8n by proposing the C2f-Faster-CAMB module. Addressing the issue of high false detection risk due to the similarity in morphology between sweet corn seedlings and weeds, the MBConv module is combined with the coordinate attention mechanism (CA) to form the CAMB module, which is further fused with FasterBlock to replace the Bottleneck structure in C2f. The depthwise separable convolutions in MBConv reduce the number of parameters and computational cost, the CA attention mechanism introduces spatial coordinate information, enhancing the model's ability to perceive the target's position and orientation features, and FasterBlock improves inference speed through its efficient feature extraction structure. Through this structural fusion, the C2f-Faster-CAMB module can enhance the representation of local detail features and spatial location information at a lower computational cost, improving the model's detection accuracy and stability for weed targets in complex backgrounds.

[0061] In the Head section, this invention proposes the Detect-GSC detection head to replace some of the convolutional structures in the original YOLOv8n detection head. While maintaining the decoupled structure of the classification and regression branches, Detect-GSC introduces the GSConv module for a lightweight design of the detection head. GSConv generates lightweight features through Ghost convolutions and combines them with Shuffle operations to achieve inter-channel information exchange, enhancing feature fusion capabilities while reducing the number of parameters and computational cost. This detection head can improve the detection accuracy and inference speed of weed targets in complex scenes, making the model more suitable for real-time laser weeding and edge computing device deployment.

[0062] In the loss function section, an improved Wise-IoU loss function is adopted to replace the original bounding box regression loss function in YOLOv8n. This loss function dynamically assigns weights to predicted boxes of different qualities, enabling the model to adaptively adjust its optimization focus based on the target scale and the quality of the predicted boxes. For small-scale weeds and densely clustered weeds, the improved loss function enhances the penalty effect for center point offset errors, guiding the model to focus more on weed targets that are difficult to detect and locate; for high-quality predicted boxes, it avoids over-optimization that would waste training resources. By transforming static geometric metrics into dynamically weighted losses related to target scale and bounding box quality, the model's localization accuracy, convergence stability, and robustness in complex field environments are improved.

[0063] Step 3: Based on the ByteTrack weed multi-target tracking method, stable weed IDs and continuous target localization are provided in consecutive frames, reducing repeated detection and redundant laser strikes;

[0064] After each frame detection, the model categorizes the detection boxes into high-confidence and low-confidence classes based on their confidence level and matches them with the tracking trajectory from the previous frame. Matching uses a joint metric of Intersection over Union (IoU) and center distance, prioritizing matching and trajectory updates in high-confidence regions. If a match is successful, the trajectory status is updated; if a match fails, it is determined to be a new target or a lost track. When a trajectory fails to be matched by detection results for several consecutive frames and its confidence level is below a threshold, the trajectory is deemed invalid and removed from the target list. For low-confidence detection results, the system employs a secondary matching strategy: first, it attempts to match with the unmatched trajectory; if the distance is less than a set threshold, the trajectory is updated; otherwise, a new trajectory is created for subsequent verification. Finally, the system assigns a unique ID to each weed target, achieving stable inter-frame target association.

[0065] The set of test results is Among them, the first The detection target is , Category The coordinates of the bounding box center and its width and height. To test the confidence level, the detection results can be divided into a corn target set based on the category labels. and weed target set Through the tracking module, the system can not only obtain continuous positional change information of weed targets, but also provide a trajectory basis for subsequent repeated strike suppression, target urgency estimation, and strike sequence optimization.

[0066] Step 4: After obtaining the trajectory information of the weed targets, to avoid accidental laser damage to corn seedlings, an elliptical safe zone is constructed based on the corn detection results. An ellipse inscribed within a rectangular frame is used to model the core safe area of ​​the corn, and the tracked weed targets are screened for their attackability. Figure 6 As shown, Figure 6 (a) Original image; (b) Detection results of corn and weeds; (c) Elliptical safe region mask; (d) ExG algorithm for weeds; (e) Enlarged schematic diagram of ExG weed extraction; (f) Connected component analysis and centroid calculation.

[0067] When the detected first When a corn plant is grown, its target bounding box is: .in Center of the detection frame and These represent the width and height of the detection frame, respectively. Since corn seedlings primarily grow longitudinally, an elliptical region with a longitudinal semi-axis larger than its transverse semi-axis is used to model its core safety area. Let the... The formula for the corn safety zone is as follows:

[0068]

[0069] in ,and To reflect the longitudinal expansion characteristics, and to enhance the adaptability of the safety zone to corn targets of different scales, a dynamic expansion strategy based on target size is further introduced, as shown in the following formula:

[0070]

[0071] in, , Based on the expansion factor, , To adjust the parameters, and These represent the image width and height, respectively. This method allows larger corn targets to have a larger protected area, while smaller targets still maintain a compact safety boundary, thus balancing crop protection and weed attackability. After modeling the safety zone, attackable weeds are screened. Let the... The bounding box of the weed target is:

[0072]

[0073] To simplify the laser aiming process, take its center point. As the initial laser screening point. For the weed trajectory output by target tracking, if its current strike point satisfies: If the weeds are not targeted, they are considered untargetable; otherwise, they are considered potential targets. ,in, This indicates that the target is ready to be attacked. This indicates that the target is located within a crop protection area.

[0074] To avoid misjudging weeds close to the corn edge due to center point offset, the Intersection over Union (IoU) ratio is introduced as an auxiliary constraint. When: If the center point is located outside the safe zone, it will still be classified as a high-risk target and will not be included in the laser strike. This allows for the screening of strike targets.

[0075] Step 5: Employ a priority target scheduling method to achieve dynamic laser strike target selection under safety constraints, thereby improving the positioning accuracy of weed growth points and the actual weeding effect.

[0076] After screening the candidate weeds, in order to achieve precise laser targeting, the target position in the image coordinate system needs to be mapped to the galvanometer control space. This involves a step-by-step transformation from two-dimensional pixel coordinates to the actual physical space and then to the galvanometer control coordinates, which is ultimately used for laser output. The transformation formula is as follows:

[0077] ;

[0078] in, , These are the control coordinates of the galvanometer in the horizontal and vertical directions, respectively; This is the inverse of the camera intrinsic parameter matrix; The pixel coordinates of the weed target in the image; For corresponding depth information; The rotation matrix is ​​for attitude compensation; For the platform's movement speed, This represents the system response time. Through the above transformation, the target position in the image space can be converted into a galvanometer control signal. , This allows for precise targeting of weeds with the laser. Combined with a priority scheduling strategy, the system can quickly locate and engage selected targets, improving overall operational efficiency and stability.

[0079] After completing the safe zone constraint screening, the model determines the current priority target from the candidate weed targets. Since laser weeding platforms can typically only strike one target at a time, and the time required for the galvanometer to deflect from its current position to different target positions varies, it is necessary to prioritize the candidate targets to optimize the laser strike sequence. A priority-based target scheduling method is proposed to predict the priority of candidate targets and achieve real-time selection of the optimal strike target. The formula for the candidate weed target set obtained after tracking and safe zone screening is as follows:

[0080] ;

[0081] Among them, candidate targets It contains target ID, current position, and trajectory information. This paper incorporates both galvanometer migration cost and target urgency into priority calculation. The galvanometer migration cost characterizes the control cost required to move the current galvanometer position to the target position. Let the current galvanometer pointing position be... Candidate target strike points are Then the target The migration cost can be expressed by the following formula:

[0082] ;

[0083] The smaller the migration amplitude, the shorter the time required for the galvanometer to complete the deflection, and the higher the target response efficiency. Target urgency describes the degree to which candidate weeds are close to the boundary of the corn safe zone or about to enter the high-risk area. Let the distance from the target center point to the nearest corn safe zone boundary be... The urgency of the goal can then be calculated using the following formula.

[0084] ;

[0085] in, To prevent the use of tiny constants with a denominator of zero, the closer the target is to the safe zone, the greater the likelihood of it subsequently entering the danger zone, and the higher the urgency. To comprehensively consider trajectory stability, the trajectory duration can be [calculated in frames]. A priority evaluation function is also introduced. The comprehensive priority of candidate targets is given by the following formula.

[0086] ;

[0087] , and , where are weighting coefficients, representing the degree of influence of target urgency, galvanometer migration efficiency, and trajectory stability on the scheduling decision, respectively. The higher the priority, the more frequently the target should be targeted by laser. Therefore, the optimal target for the current moment is determined by the following formula.

[0088] ;

[0089] After a target is successfully hit, the system records its corresponding trajectory ID and prevents the repeated allocation of the same trajectory in subsequent frames, avoiding repeated attacks on the same weed and reducing ineffective operations. The scheduling strategy prioritizes the removal of more urgent and lower-cost weeds while ensuring the safety of the corn, thereby improving the efficiency and control stability of laser weeding operations. Based on the centroid and velocity of each frame, the position of the weeds in the next frame is calculated, and the weeds are processed. The ByteTrack model tracks targets and places new targets waiting to be processed into a queue. Specifically, when a weed target crosses the decision line at the laser zone entrance, it is queued for processing. As the platform moves, the position of each target in the queue is continuously updated in real time. When the laser is available, the queue is evaluated, and the next suitable target is selected. Once a target is selected and actively tracked, the laser platform receives updated tracking information every 1mm of movement.

[0090] Example 2:

[0091] A precise laser weeding method integrating multi-target tracking and safety-constrained scheduling includes the following steps:

[0092] Step 1: Establish a corn field weed dataset. A self-made platform using a D435i depth camera was used to capture RGB images of corn at the sweet corn planting base of Jilin Fuyu Agricultural Technology Co., Ltd. in Antu County, Yanbian Korean Autonomous Prefecture, Jilin Province (longitude: 128.97, latitude: 43.06, corn row spacing 50cm) to establish a corn image database. The data collection period was from June 19, 2024 to July 10, 2024, with shooting times between 8:00 AM and 10:00 AM. The camera was mounted on the top of the platform, approximately 30cm-50cm above the ground, with a shooting angle within 30 degrees below the horizontal plane. The platform moved at approximately 0.8 meters per second, generating a stable video sequence, which was extracted into images at 5 frames per second and saved in JPG format. These images, totaling 3200, cover different occlusion conditions of sweet corn seedlings in the field.

[0093] The corn seedlings and weeds in the image were labeled using LabelImg. During the labeling process, to ensure target detection and localization accuracy, a minimum bounding box was used to label each weed, minimizing the background area within the bounding box. The labeling results were saved as files with the .xml extension. The data augmentation and image labeling results are shown below. Figure 2 As shown. Since the annotation file format required for YOLO model training is .txt text, the .xml file is converted to .txt format. In the converted .txt file, each line of data corresponds to an annotation target, including the target category number, the normalized center point coordinates, and the width and height information of the bounding box.

[0094] Step 2: Detect corn seedlings and weeds using the lightweight YOLO-GFD model. For the problem of weed detection in sweet corn fields, an improved YOLOv8n algorithm is proposed. To address mobile deployment issues, GAM-StarNet is replaced with the original backbone network, improving feature capture capabilities without significantly increasing computational complexity. To avoid false detections and damage to seedlings due to the similar morphology of sweet corn seedlings and weeds, the C2f-Faster-CAMB module is proposed, accelerating inference speed while ensuring efficient feature extraction from the backbone network. Finally, the overall YOLO-GFD model structure diagram is shown below. Figure 3 As shown,

[0095] The specific training process of the detection network model is explained below:

[0096] The constructed dataset was input into the model for training. The learning rate was set to 0.001, the number of training iterations was 200, the batch size was 16, the parameter optimization algorithm was Adam, and the improved WIoU loss function was selected.

[0097] In actual testing, the YOLOv8n model achieved an accuracy of 85.1%, a recall of 88.3%, and an mAP@0.5 of 90.2% on 200 weed test images. Unlike the YOLOv8n model, the proposed model achieved an accuracy of 92.8%, a recall of 90.7%, and an mAP@0.5 of 92.1% on weed detection. Compared to the original model, the accuracy, recall, and mAP for weed detection increased by 7.7, 2.4, and 1.9 percentage points, respectively. Figure 4 As shown in the figure, yellow circles represent missed detections, and green circles represent false positives. The YOLOv8n model exhibits a certain degree of missed and false positives, while the YOLO-GFD model accurately identifies each target even under field testing conditions. Although there are missed detections under severe occlusion, the cost of fresh corn is high, and weeds around the crop can be ignored to protect it from damage. This indicates that the YOLO-GFD model still performs well in practical applications.

[0098] Step 3: Based on the ByteTrack weed multi-target tracking method, stable weed IDs and continuous target localization are provided in consecutive frames, reducing repeated detection and redundant laser strikes;

[0099] Multi-target tracking of weeds was performed using the YOLO-GFD+ByteTrack model. During the tracking process, the trajectory of each weed target was accurately labeled, and the expected position of each weed target in the next few frames was displayed. In the figure, the light green boxes represent the detection boxes of the weed targets. The light green arrows indicate the weed position at frame 10, the light green arrows at frame 20, and the dark green arrows at frame 30. Figure 5 As shown.

[0100] Through a multi-target tracking algorithm, the model can accurately predict the future trajectory of weed targets in dynamic environments and generate the expected position corresponding to the current frame. This method improves the operational continuity of laser weeding systems, ensuring that the laser can accurately and promptly strike weed targets without being affected by image jitter or short-term occlusion. The model achieves a tracking frame rate (FPS) of 19.3 frames per second during operation, ensuring real-time performance while maintaining high target tracking accuracy. These results demonstrate that the proposed scheme has good practicality and real-time performance in complex field environments, providing reliable support for subsequent laser execution.

[0101] Step 4: To verify the effectiveness of the adaptive elliptical safety zone in laser weed control, this embodiment designed and conducted a field simulation experiment, comparing the performance of the rectangular safety zone based on the corn detection frame and the adaptive elliptical safety zone in practical applications. The core of the experiment was to evaluate the advantages and disadvantages of the two methods in reducing false weed protection, improving weed control efficiency, and ensuring corn safety by comparing their effectiveness in targeting weeds at the same location.

[0102] Figure 7 Two methods for dividing different safety zones are shown. The red box indicates three weeds at the same position as the corn plant. Figure 7 In section a, the weeds in the rectangular safe zone were not attacked because the rectangle was too large. Figure 7 In the middle b, the adaptive elliptical safe zone method ensures that all weeds are successfully hit.

[0103] In the rectangular safe zone method, three weeds were located around the corn. Although two of the weeds were outside the safe zone, the size of the rectangle could not accurately match the shape of the corn, resulting in some weeds not being targeted by the laser. The rectangle covered a large area of ​​non-crop, causing some weeds that should have been targeted to be mistakenly identified as corn protection targets and thus not effectively removed. In practical applications, this affects weeding efficiency and leads to weed residue. In contrast, the adaptive elliptical safe zone method dynamically adjusts the shape and size of the safe zone according to the size and shape of the corn target. In the experiment, all three weeds around the corn seedlings were successfully targeted. Because the elliptical region fits the growth morphology of the corn more accurately than the rectangular region, the definition of the safe zone is more reasonable, reducing overprotection and ensuring that all weeds that should be targeted are removed. The results show that using the adaptive elliptical safe zone can avoid targeting failures caused by overprotection and improve weeding efficiency.

[0104] In summary, the experimental results validate the advantages of the adaptive elliptical safety zone method over the rectangular safety zone method in improving weed control rate, reducing false protection, and ensuring crop safety. By dynamically adjusting the shape and size of the safety zone, the adaptive elliptical safety zone better adapts to the growth pattern of maize, effectively avoiding the overprotection problem of the traditional rectangular safety zone method, thus providing a more precise and efficient solution in laser weed control.

[0105] Step 5: To evaluate the execution efficiency of different target scheduling strategies in laser weeding tasks, the First-In-First-Out (FIFO) strategy, the Dynamic Traveling Salesman Problem (DTSP) method with time constraints, and the Rolling Time Control (RHC) method are selected as comparison methods and compared with the priority-based target scheduling method (PTS) proposed in this paper. The above methods represent three typical scheduling strategies: simple sequential scheduling, global path optimization, and local dynamic optimization, respectively.

[0106] The experiment uses the YOLO-GFD and ByteTrack tracking algorithms to obtain a set of candidate weed targets. Potential high-risk targets are eliminated by using elliptical safe zone constraints, resulting in a set of weed targets to be scheduled. The candidate targets are then sorted using FIFO, DTSP, RHC, and PTS methods to generate a laser strike sequence. To ensure fairness, all scheduling methods are run under the same video sequence, target set, platform speed, and system response time. In the trajectory analysis experiment, 20 weed targets are selected from the same frame as a unified input, and the same initial point is set to eliminate the influence of environmental factors on the scheduling results. Figure 8 As shown.

[0107] The RHC method employs a rolling time-domain strategy for local prediction and optimization of future targets, demonstrating better adaptability in dynamic environments. Its average deflection distance is further reduced to 14.2 mm, the response time is 128.7 ms, the success rate reaches 87.9%, and the repeat hit rate is reduced to 10.4%. Overall performance surpasses FIFO and DTSP. However, this method requires repeated local optimization calculations at each time step, placing higher demands on the system's real-time performance.

[0108] In comparison, the proposed PTS method demonstrates superior performance across all metrics. Its average response time is reduced to 102.3 ms, the average deflection distance to 11.6 mm, the success rate to 90.6%, the repeat hit rate to 6.8%, and the number of targets processed per unit time reaches 3.21 targets / s. The results show that the PTS method can effectively improve system execution efficiency and stability while maintaining real-time performance.

[0109] Weeding rate, seedling damage rate, and regeneration rate were selected for evaluation. Weeding rate was calculated by comparing the number of weeds before and after laser irradiation within the same plot. Laser damage to maize seedlings within the same plot was visually assessed to obtain the seedling damage rate. Weed regeneration data were collected at 0, 3, and 7 days after treatment to evaluate the instantaneous irradiation (0 days), short-term recovery (3 days), and long-term regeneration rate (7 days).

[0110] Figure 9 The morphology of weeds under laser irradiation at three different time periods using this method: Figure 9 The laser strike from center a occurs immediately (t=0). Figure 9 3 days after irradiation with medium-intensity beta-laser Figure 9Seven days after laser irradiation, the immediate irradiation effect and subsequent suppression of weed regeneration were assessed. The results show that this method basically meets the agronomic requirements of laser weed control. This demonstrates that the proposed method can achieve stable tracking and safe targeting of weeds under dynamic field conditions, providing a feasible solution for the practical application of precision laser weed control equipment in cornfields.

[0111] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A precise laser weeding method integrating multi-target tracking and safety-constrained scheduling, characterized in that, Includes the following steps: Step 1: Establish a maize crop row dataset under various growth environments, use annotation tools to annotate maize plants and associated weeds, and perform data augmentation on the dataset; Step 2: Detect corn seedlings and weeds using the YOLO-GFD lightweight model; the YOLO-GFD lightweight model includes a backbone network, a neck network, and a detection head; wherein, the backbone network adopts the GAM-StarNet network, the neck network adopts the C2f-Faster-CAMB module, the detection head adopts the Detect-GSC detection head, and the improved Wise-IoU loss function is used as the bounding box regression loss function; Step 3: Based on the ByteTrack weed multi-target tracking method, weed targets in consecutive frames are tracked, and a unique ID is assigned to each weed target to achieve stable inter-frame target association and obtain continuous position change information and trajectory information of weed targets. Step 4: After obtaining the trajectory information of the weed targets, construct an elliptical safe zone based on the corn detection results. Model the core safe zone of the corn using an ellipse inscribed in a rectangular frame, and perform strikeability screening on the tracked weed targets. Weed targets located within the elliptical safe zone or whose intersection ratio with the elliptical safe zone exceeds a threshold are determined to be non-strikeable targets; otherwise, they are determined to be candidate strike targets. Step 5: Using a priority target scheduling method, candidate targets are prioritized and selected as the current optimal target. The image coordinates of the optimal target are then converted into galvanometer control coordinates to control the laser for strike.

2. The method according to claim 1, characterized in that, The GAM-StarNet network described in step 2 is constructed by integrating the global attention mechanism GAM into the StarNet network. By jointly modeling channel attention and spatial attention, it enhances the model's ability to perceive the target area of ​​weeds and its salient features, and suppresses background interference.

3. The method according to claim 1, characterized in that, The C2f-Faster-CAMB module mentioned in step 2 is formed by combining the MBConv module with the coordinate attention mechanism CA to form the CAMB module, and further fused with the FasterBlock structure to replace the Bottleneck structure in the original C2f feature fusion module of YOLOv8n. Among them, the depthwise separable convolution in MBConv is used to reduce the number of parameters and computation, the CA attention mechanism is used to introduce spatial coordinate information, and FasterBlock is used to improve inference speed.

4. The method according to claim 1, characterized in that, The Detect-GSC detection head described in step 2, while maintaining the decoupled structure of the classification branch and the regression branch, introduces the GSConv module to replace part of the convolutional structure in the original detection head; the GSConv generates lightweight features through Ghost convolution and combines it with the Shuffle operation to realize information interaction between channels.

5. The method according to claim 1, characterized in that, The improved Wise-IoU loss function described in step 2 enables the model to adaptively adjust its optimization focus based on the target scale and the quality of the predicted boxes by assigning dynamic weights to predicted boxes of different quality. For small-scale weeds and densely clustered weeds, it enhances the penalty effect for center point offset errors; for high-quality predicted boxes, it avoids over-optimization.

6. The method according to claim 1, characterized in that, The ByteTrack weed multi-target tracking method described in step 3 specifically includes: dividing the detection box of each frame into two categories, high confidence and low confidence, and matching it with the tracking trajectory of the previous frame; the matching adopts a joint measurement method of intersection-union ratio and center distance; a secondary matching strategy is adopted for the low confidence detection results: first, try to match with the unmatched trajectory; if the distance is less than the set threshold, update the trajectory; otherwise, create a new trajectory to wait for subsequent verification.

7. The method according to claim 1, characterized in that, The formula for constructing the elliptical safe zone in step 4 is: ; in, ,and α and β employ a dynamic expansion strategy based on the target size; ; in, , Based on the expansion factor, , To adjust the parameters, and These are the image width and height, respectively; in the attackability screening, the intersection-union ratio (IUGR) is introduced as an auxiliary constraint: when: Even if the center point of the weed target is outside the elliptical safe zone, it is determined to be an unstrikeable target.

8. The method according to claim 1, characterized in that, The formula for converting image coordinates to galvanometer control coordinates in step 5 is as follows: ; in, , These are the control coordinates of the galvanometer in the horizontal and vertical directions, respectively. This is the inverse of the camera intrinsic parameter matrix; The pixel coordinates of the weed target in the image; For corresponding depth information; The rotation matrix is ​​for attitude compensation; For the platform's movement speed, This refers to the system response time.

9. The method according to claim 1, characterized in that, The priority target scheduling method described in step 5 specifically includes: The candidate weed target set is Among them, candidate targets It contains target ID, current location, and trajectory information; Target priority Calculated using the following formula: ; in, The cost of galvanometer migration, To assess the urgency of the goal, For the duration of the trajectory in frames, , and Here, ε is the weighting coefficient, and ε is a small constant. Optimal target at the current moment for: ; When a target is successfully hit, the system records its corresponding trajectory ID and suppresses the repeated assignment of the same trajectory in subsequent frames.