Fresh sweet corn, prized for its tender texture and rich nutritional value, has become one of the premium foods on modern dining tables [
1]. However, weed infestation in cornfields has become one of the key factors limiting stable and increased yields of sweet corn. The diverse and highly competitive weeds found in sweet corn fields severely impact crop growth, development, yield, and quality [
2]. Currently, the primary challenges in weed control for fresh-market corn fields include: diverse weed species growing in mixed stands, inefficient manual weeding with high labor intensity, and the inability to meet the demands of large-scale agricultural production. This results in untimely weed removal, further impacting both the yield and quality of fresh-market corn [
3]. While chemical weed control is suitable for large-scale farmland, it causes significant environmental pollution and directly impacts the quality and taste of sweet corn.
Due to the direct-consumption nature of sweet corn, the use of chemical pesticides for field weed control can adversely affect its quality and taste. There is an urgent need for a weed control method that does not harm the crop. As a high-energy, high-precision physical approach, laser technology has seen a growing research focus in agricultural applications and has gained widespread adoption. Laser weed control technology leverages the high energy and precise targeting capabilities of lasers to effectively disrupt the cellular structure of weeds, rendering them incapable of growth and thereby achieving weed elimination. Laser weeding avoids the use of chemical agents, reducing pollution to soil, water bodies, and air. It can precisely target specific parts of weeds, minimizing damage to surrounding crops. Accurate detection of weeds in sweet corn fields provides technical support for laser precision weeding operations, which is crucial for enhancing sweet corn yields. Precise identification and localization of weeds in the field are essential prerequisites for the successful implementation of laser weeding. Timely and accurate detection of weed locations not only enables precise weeding solutions for farmland management but also effectively reduces weed control costs while enhancing crop yield and quality [
4,
5,
6]. In recent years, deep learning methods have been extensively studied for detecting weeds in crops [
7,
8,
9,
10]. Object detection, as one of the foundational deep learning technologies applied in agriculture, has found extensive use in the management of weeds in farmland [
11,
12,
13]. Numerous researchers have conducted in-depth studies on the application of deep learning technology in field weed control and achieved some results. Cui et al. [
14] proposed that the Faster R-CNN model with VGG16 as the backbone feature extraction network achieves optimal recognition accuracy. By analyzing the dataset’s inherent characteristics and optimizing anchor frame parameters, the refined model achieved an average recognition accuracy of 88.69% per data frame with an average recognition time of 310 ms, enabling accurate identification of soybean seedlings and weeds across varying densities. Zhao et al. [
15] proposed the MC-YOLOv4 model, which replaces the backbone network in the YOLOv4 architecture with the lightweight MobileNetV3 network and introduces separable convolutions in the Path Aggregation Network (PANet). This model achieved a mAP of 98.52% in potato field weed detection, with an average detection time of 12.49 ms per image. These models, optimized over traditional CNNs, exhibit high parameter counts and computational demands, resulting in slow processing speeds and ineffective handling of issues like weed occlusion. With the continuous advancement of object detection technology and iterative model development, numerous new models tailored for weed detection have emerged. Jia et al. [
16] proposed the ADL-YOLOv8 model, which integrates a lighter AKConv network to better handle specific features, particularly for detecting small objects. On the same weed dataset, it achieved a 2.2% improvement in accuracy and a 2.45% increase in recall. The model size was reduced by 15.77%, and computational complexity decreased by 10.98%. Jawadul Karim et al. [
17] proposed the YOLOv8 nano weed detection model, which combines deep neural networks with lightweight attention mechanisms to efficiently identify various weed types in cotton fields. The improved model achieved an average detection accuracy of 97.6%. Shao et al. [
18] proposed an enhanced deep learning model, GTCBS-YOLOv5s, for identifying six weed species in rice fields. This algorithm incorporates a spatial pyramid pooling structure and attention mechanism, achieving an accuracy of 91.1% and a detection speed of 85.7 FPS. Zheng et al. [
19] proposed the YOLOv8-DMAS algorithm for detecting weeds in cotton fields under complex environments. To enhance the model’s ability to capture multi-scale features of different weeds, all BottleNecks were replaced with dilated residual modules (DWR) in the C2f network, and a multi-scale module (MSBlock) was added to the last layer of the backbone. Compared with the original model, the accuracy, recall rate, mAP@0.5, and mAP@0.5-0.95 of this algorithm increased by 1.7%, 3.8%, 2.1%, and 3.7%, respectively. The above research has achieved satisfactory results in weed detection precision and accuracy. However, practical challenges remain when applying these models to laser weeding, including the large number of model parameters and lengthy training times. Laser weeding demands rapid detection speeds, high recognition accuracy, and precise weed localization—particularly the accurate identification of weed center points. Enhancing laser targeting effectiveness while avoiding crop damage is crucial for improving overall operational efficiency. Therefore, designing an efficient, non-destructive method for detecting and locating weeds in sweet corn fields using lightweight convolutional neural networks is of significant importance.
Based on the aforementioned challenges, this study proposes an integrated weed detection, localization, and laser weeding framework for sweet corn fields at the seedling stage. The purpose of this work is not limited to improving weed detection accuracy, but also extends to developing a lightweight perception module capable of supporting real-time weed localization for laser weeding. Specifically, the objectives of this study were as follows:
(1) Was to create a real-world weed image dataset for sweet corn fields at the seedling stage. Field images were collected under natural conditions and expanded through data augmentation, providing a reliable data basis for model training and evaluation.
(2) To develop a lightweight weed detection model, YOLO-GFD, for real-time weed localization in sweet corn fields. In this model, a CAMB feature enhancement module was designed and embedded into the C2f-Faster structure to improve feature fusion and weed target representation under complex field backgrounds. Meanwhile, GAM-StarNet and Detect-GSC were introduced to reduce model complexity, and the original CIoU loss was replaced with WIoU to improve bounding box regression. This design enabled the model to balance detection accuracy, lightweight deployment, and real-time localization requirements for laser weeding.
(3) To conduct laser weeding experiments using near-infrared and blue light lasers under different power levels and irradiation durations. The experimental results were used to determine suitable laser operation parameters, providing technical support for subsequent weed center targeting and precision laser weeding in sweet corn fields.