Farmland weed detection system and detection method based on image recognition

By using convolutional neural networks and a lateral blowing module to expose hidden weeds, combined with dynamic image recognition and multispectral analysis, the problem of difficulty in detecting weeds hidden by crop leaves in existing technologies has been solved, achieving efficient and low-cost weed detection in farmland.

CN121962880APending Publication Date: 2026-05-01BENGBU COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BENGBU COLLEGE
Filing Date
2024-03-08
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In existing farmland weed detection systems, weeds hidden by crop leaves are easily overlooked during image preprocessing. Multi-angle photography and multi-sensor fusion methods are costly and ineffective, making it difficult to effectively detect hidden weeds.

Method used

A training module and a lateral blowing module based on convolutional neural networks are used. The training model labels the features of crops and weeds, and the lateral blowing module reveals the hidden weeds. Combined with dynamic image recognition and multispectral analysis, judgment indices PDZs are generated to identify the weed type.

Benefits of technology

It improves the accuracy and efficiency of detecting covered weeds, reduces system costs, and enables effective identification and management of weeds in farmland.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962880A_ABST
    Figure CN121962880A_ABST
Patent Text Reader

Abstract

The invention discloses a farmland weed detection system and detection method based on image recognition, and the method comprises the steps: receiving crop sowing data, dividing a farmland into a crop region and a discrimination region through a region division unit, marking the crop coordinates of the crop region and the discrimination region in static image recognition data, the lateral blowing module is used for laterally blowing the marked crops to obtain dynamic image identification data of the crop area and the discrimination area, the first weed marking module is used for marking the weeds in the discrimination area, and the second weed marking module is used for marking the weeds exposed in the crop area; shielding weeds in a crop area and a discrimination area are marked through a dynamic image weed marking module based on dynamic image recognition data, the types of the weeds are specifically discriminated according to a judgment index PDZs, features of the exposed weeds in a wind blowing motion state are acquired, and the weeds are judged and marked.
Need to check novelty before this filing date? Find Prior Art

Description

A farmland weed detection system and method based on image recognition Technical Field

[0001] This invention belongs to the field of image recognition, specifically relating to an image recognition-based system and method for detecting weeds in farmland. Background Technology

[0002] An image recognition-based farmland weed detection system is a technological system that uses computer vision and machine learning techniques to automatically detect and identify weeds in farmland. The main purpose of this system is to help farmers or agricultural workers manage farmland more effectively, reduce competition and impact of weeds on crops, thereby improving crop yield and quality. Its specific components are as follows:

[0003] Image acquisition equipment: This can be a camera, multispectral sensor, or infrared camera, used to capture image data of farmland;

[0004] Image preprocessing: Acquired images typically require preprocessing steps such as correction, noise reduction, and contrast enhancement to ensure image quality suitable for subsequent analysis;

[0005] Feature extraction: In the image, the system needs to identify and extract features related to crops and weeds, such as shape, color, and texture. These features will be used for subsequent analysis and classification.

[0006] Machine learning model: A model is trained using machine learning algorithms, such as convolutional neural networks (CNN) or support vector machines (SVM), which can distinguish between crops and weeds in an image based on extracted features. This usually requires labeled training data to train and validate the model's accuracy.

[0007] Weed detection and classification: A trained machine learning model is used to detect weeds in an image and classify them as crops or other objects, which enables farmers to understand the distribution and density of weeds;

[0008] Results display and decision support: The system usually provides a user-friendly interface to display the detection results, including the location and quantity of weeds and possible control measures, which helps in decision-making, such as identifying areas that need weed management;

[0009] Automated control: Some systems can also be integrated with automated agricultural machinery or spraying systems to achieve automated weed control, such as automated herbicide spraying.

[0010] The article "Application Research of Image Processing Technology in Field Weed Identification" by Ren Quanhui et al. (article number 2095-5553(2020)06-0154-05) describes the basic principles of farmland weed identification. The webpage link is as follows:

[0011] https: / / www.doc88.com / p-17539726172454.html

[0012] However, the above solutions have the following shortcomings: In image recognition-based farmland weed detection systems, weeds hidden by crop leaves are often ignored during image preprocessing. Existing solutions often employ multi-angle photography (binocular vision technology) or multi-sensor fusion to detect hidden weeds. However, the signal light intensity obtained from multi-angle photography varies, making it impossible to fully synchronize the gain and level of each camera. Moreover, even with the same image acquisition card, the physical errors of different channels are different, all of which lead to differences in the grayscale values ​​of the obtained images, increasing the requirements for image preprocessing and raising the cost. How to further improve the image recognition-based farmland weed detection system, based on the use of a single image recognition device, by using an external fan to laterally blow the crops, thereby revealing the weeds hidden by crop leaves, and then acquiring features of the revealed weeds in wind-blown motion to identify and mark them, is the direction that needs improvement. Summary of the Invention

[0013] The purpose of this invention is to provide a farmland weed detection system and method based on image recognition, so as to solve the problems existing in the above-mentioned background art.

[0014] To achieve the above objectives, the present invention provides the following technical solution: a farmland weed detection system based on image recognition, comprising:

[0015] Training module: Based on the training library of crop and weed images obtained by convolutional neural network, a machine learning model is trained and constructed. The training data of weeds and crops in the machine learning model are labeled and a classifier model is generated.

[0016] Data acquisition module: used to collect crop sowing data and static image recognition data of crop areas, and transmit them to the data processing module;

[0017] Data processing module: It is used to receive crop sowing data and divide farmland into crop area and discrimination area through regional division unit. It marks the crop coordinates of crop area and discrimination area in static image recognition data, and uses the side blowing module to blow the marked crops sideways to obtain dynamic image recognition data of crop area and discrimination area.

[0018] Weed marking module: used to mark weeds in the discrimination area using the first weed marking module, to mark weeds exposed in the crop area using the second weed marking module, and to mark weeds that are covered in the crop area and discrimination area based on dynamic image recognition data and using the dynamic image weed marking module;

[0019] Weed identification module: After receiving the weed image data marked in the first weed marking module, the second weed marking module and the dynamic image weed marking module, it compares them with the training library, and generates a judgment index PDZs through the classifier model. Based on the judgment index PDZs, the weed type is specifically identified.

[0020] Preferably, the crop sowing data includes the crop growth status parameter SZZt, the sowing density parameter BZMd, and the sowing category parameter BZLb.

[0021] The growth state parameter SZZt is composed of leaf color feature YPYs, leaf outline feature YPLk, and leaf height feature YPGd. The leaf color feature YPYs, leaf outline feature YPLk, and leaf height feature YPGd are normalized and mapped to the following value range:

[0022] 0≤YPYs≤1, 0≤YPLk≤1, 0≤YPGd≤1, the normalization calculation formula is as follows:

[0023]

[0024] Where GY represents the numerical normalization target, Y s Let X represent the original value, max represent the maximum value, and min represent the minimum value. X can be any one of the leaf color feature YPYs, leaf outline feature YPLk, and leaf height feature YPGd. The following formula is obtained for calculating the growth state parameter SZZt:

[0025] SZZt=YPYs GY ×a1+YPLk GY ×a2+YPGd GY ×a3

[0026] Where a1, a2, and a3 are weighting coefficients, and 0 < a1 < a2 < a3;

[0027] The sowing density parameter BZMd is composed of the plant quantity characteristic ZZSl, the plant coverage characteristic FGd, and the plant spacing characteristic ZJj.

[0028] The plant quantity feature ZZSl, plant coverage feature FGd, and plant spacing feature ZJj were normalized and mapped to the following value range:

[0029] 0≤ZZSl≤1, 0≤FGd≤1, 0≤ZJj≤1, the normalization calculation formula is as follows:

[0030]

[0031] Where GY represents the numerical normalization target, Y s X represents the original value, max represents the maximum value, and min represents the minimum value. X can be any one of the plant quantity feature ZZSl, plant coverage feature FGd, and plant spacing feature ZJj, and the following calculation formula for the sowing density parameter BZMd is obtained:

[0032] BZMd=ZZSl GY ×b1+FGd GY ×b2+ZJj GY ×b3

[0033] Where b1, b2, and b3 are weighting coefficients, and 0 < b1 < b2 < b3;

[0034] The dynamic threshold range values ​​for the leaf color feature YPYs, leaf outline feature YPLk, leaf height feature YPGd, and plant cover feature FGd of the crop are set as follows: and The threshold range is dynamically adjusted according to the crop type and growth stage corresponding to the sowing category parameter BZLb.

[0035] Preferably, the static image recognition data includes visual images of crop areas acquired by an image device. The data processing module preprocesses the acquired visual images sequentially by performing grayscale conversion, median filtering, and OTSU threshold background separation. The Canny operator is used to perform edge detection on the preprocessed images to form region segmentation units. Based on the edge detection, the visual images are segmented into crop areas and discrimination areas. The segmentation results are then post-processed to remove noise, fill holes, or perform morphological operations to further improve classification accuracy.

[0036] Preferably, the crop area is divided according to the growth status parameter SZZt, the sowing density parameter BZMd, and the sowing category parameter BZLb, and the discrimination area is divided according to the plant spacing feature ZJj and the plant coverage feature FGd. The lateral blowing module includes blowing pipes symmetrically arranged on both sides of the image device. The blowing pipes on both sides are obliquely facing the shooting area of ​​the image device. The air inlet of the blowing pipe is connected to the exhaust end of an external fan, and the blowing pipes on both sides perform unilateral exhaust according to the marking and positioning of crops in the crop area and the discrimination area.

[0037] Preferably, the dynamic image recognition unit includes edge features BYTz of crops blown by unilateral exhaust wind and weeds covered by wind, motion state features YDTz, and multispectral variation features DGPTz.

[0038] The edge feature BYTz is based on Cann y Edge detection determines the outline and shape of crops and compares them with leaf outline features YPLk;

[0039] Meanwhile, the multispectral variation feature DGPTz uses a spectral sensor or multispectral image acquisition to analyze the spectral features in the dynamic image recognition data and compares them with the leaf color feature YPYs to distinguish between crops and weeds.

[0040] The motion state feature YDTz includes the leaf shape change value YPXz, the leaf motion orientation value YDFw, and the leaf texture value YPWl.

[0041] The leaf shape variation value YPXz, edge feature BYTz, multispectral variation feature DGPTz, leaf motion orientation value YDFw, and leaf texture value YPWl are normalized and mapped to the following value range:

[0042] 0≤YPXz≤1, 0≤YDFw≤1, 0≤YPWl≤1, the normalization calculation formula is as follows:

[0043]

[0044] Where GY represents the numerical normalization target, Y s represents the original value, max represents the maximum value, and min represents the minimum value. X can be any one of the following: leaf shape change value YPXz, edge feature BYTz, multispectral change feature DGPTz, leaf motion orientation value YDFw, and leaf texture value YPWl. The following calculation formula for the motion state feature YDTz is obtained:

[0045] YDTz=YPXz GY ×c1+YDFw GY ×c2+YPWl GY ×c3

[0046] Where c1, c2, and c3 are weighting coefficients, and 0 < c1 < c2 < c3.

[0047] Preferably, the judgment index PDZ s The following formula is obtained by formulating the edge feature BYTz, motion state feature YDTz, multispectral variation feature DGPTz, leaf outline feature YPLk, and leaf color feature YPYs:

[0048]

[0049] Where δ is the correction coefficient, -0.21≤δ≤0.65, and the comparison threshold for the judgment index PDZs is set as follows. and

[0050] when When the positive difference between the multispectral variation feature DGPTz and the leaf color feature YPYs is large, it indicates that weeds are present in the crop area or discrimination area and their type is being determined.

[0051] when At that time, it indicates that no weeds were detected in either the crop area or the discrimination area;

[0052] when This indicates that weeds are covering the crops, and the type of weeds is then identified.

[0053] A detection method, applicable to the image recognition-based farmland weed detection system, includes the following steps:

[0054] S1. Based on the convolutional neural network, a training library of crop and weed images is obtained, trained, and a machine learning model is constructed. The training data of weeds and crops in the machine learning model are labeled and a classifier model is generated.

[0055] S2 is used to collect crop sowing data and static image recognition data of crop areas, and transmit them to the data processing module;

[0056] S3 is used to receive crop sowing data and divide farmland into crop areas and discrimination areas through the regional division unit. It marks the crop coordinates of the crop areas and discrimination areas in the static image recognition data, and uses the side blowing module to blow the marked crops sideways to obtain dynamic image recognition data of the crop areas and discrimination areas.

[0057] S4. Used to mark weeds in the discrimination area using a first weed marking module, mark weeds exposed in the crop area using a second weed marking module, and mark weeds hidden in the crop area and discrimination area using dynamic image recognition data and a dynamic image weed marking module.

[0058] S5 is used to receive the weed image data marked in the first weed marking module, the second weed marking module and the dynamic image weed marking module, compare it with the training library, and generate a judgment index PDZs through the classifier model, and make a specific judgment on the weed type based on the judgment index PDZs.

[0059] Compared with the prior art, the beneficial effects of the present invention are as follows: receiving crop sowing data and dividing farmland into crop areas and discrimination areas through regional division units, marking the crop coordinates of crop areas and discrimination areas in static image recognition data, and using this to perform lateral blowing on the marked crops through a lateral blowing module to obtain dynamic image recognition data of crop areas and discrimination areas, marking weeds in the discrimination area through a first weed marking module, marking exposed weeds in the crop area through a second weed marking module, marking obscured weeds in the crop area and discrimination area based on dynamic image recognition data and through a dynamic image weed marking module, specifically judging the weed type according to the judgment index PDZs, and acquiring features of exposed weeds that are in wind-blown motion, thereby judging and marking the weeds. Attached Figure Description

[0060] Figure 1 is a schematic diagram of the process of the present invention;

[0061] Figure 2 is a flowchart of the present invention;

[0062] Figure 3 is a schematic diagram of the output unit of the present invention. Detailed Implementation

[0063] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0064] Please refer to Figures 1-3. This invention provides a technical solution:

[0065] Example 1:

[0066] A farmland weed detection system based on image recognition includes:

[0067] Training module: Based on the training library of crop and weed images obtained by convolutional neural network, the model is trained and a machine learning model is constructed. The training data of weeds and crops in the machine learning model are labeled and a classifier model is generated.

[0068] The specific steps are as follows:

[0069] Step 1: Data Collection

[0070] Collect an image dataset containing crops and weeds, ensuring the dataset has enough samples to cover different species and scenarios.

[0071] Data tags:

[0072] Each image is labeled to indicate the location of crops and weeds in the image. This can be done manually or by using an image annotation tool.

[0073] Data partitioning:

[0074] The dataset is divided into a training set and a test set. The training set is used to train the model, while the test set is used to evaluate the model's performance.

[0075] Step Two: Data Augmentation

[0076] Data augmentation is performed on the training set to expand the dataset and improve the model's generalization ability. Common data augmentations include rotation, flipping, scaling, and brightness adjustment.

[0077] Step 3: Model Selection

[0078] Choose an appropriate convolutional neural network architecture, such as VGG, ResNet, or MobileNet, or design a custom architecture based on the problem requirements.

[0079] Step 4: Model Building

[0080] Use deep learning frameworks such as TensorFlow and PyTorch to build the chosen convolutional neural network model.

[0081] Step 5: Model Compilation

[0082] Compile the model, specifying the loss function, optimizer, and evaluation metric. For multi-class classification problems, use cross-entropy loss.

[0083] Step Six: Model Training

[0084] Input the prepared training set into the model and train it. Monitor the model's performance on both the training and validation sets to avoid overfitting.

[0085] Step 7: Model Evaluation

[0086] The performance of the model is evaluated using a test set. This can be done using metrics such as confusion matrix, accuracy, precision, and recall.

[0087] Step 8: Deploy the model

[0088] Integrate the trained model into the application for real-time prediction or other purposes;

[0089] Data acquisition module: Collects crop sowing data and static image recognition data of crop areas, and transmits them to the data processing module. The output processing module is selected from computers with data processing chips.

[0090] Data processing module: Receives crop sowing data and divides farmland into crop areas and discrimination areas through regional division units. Marks the crop coordinates of crop areas and discrimination areas in static image recognition data, and uses the lateral blowing module to blow lateral air onto the marked crops to obtain dynamic image recognition data of crop areas and discrimination areas.

[0091] Weed marking module: Weeds in the discrimination area are marked by the first weed marking module, weeds exposed in the crop area are marked by the second weed marking module, and weeds hidden in the crop area and discrimination area are marked by the dynamic image weed marking module based on dynamic image recognition data.

[0092] Weed identification module: After receiving the weed image data marked in the first weed marking module, the second weed marking module and the dynamic image weed marking module, it compares them with the training library, and generates the identification index PDZs through the classifier model. Based on the identification index PDZs, the weed type is specifically identified.

[0093] Furthermore, the output terminals of the receiving first weed marking module, second weed marking module, and dynamic image weed marking module are also connected to the output unit, which is a device for weed removal, such as laser weed removal or robotic arm weed removal equipment in the prior art, which will not be elaborated further.

[0094] Example 2:

[0095] Based on Example 1, the crop sowing data includes the crop growth status parameter SZZt, the sowing density parameter BZMd, and the sowing category parameter BZLb. These parameters are collected through corresponding sensors and IoT devices.

[0096] The growth state parameter SZZt is composed of leaf color feature YPYs, leaf outline feature YPLk, and leaf height feature YPGd. The leaf color feature YPYs, leaf outline feature YPLk, and leaf height feature YPGd are normalized and mapped to the following value range:

[0097] 0≤YPYs≤1, 0≤YPLk≤1, 0≤YPGd≤1, the normalization calculation formula is as follows:

[0098]

[0099] Where GY represents the numerical normalization target, Ys represents the original value, max represents the maximum value, and min represents the minimum value, and X can be any one of the leaf color feature YPYs, leaf outline feature YPLk, and leaf height feature YPGd, and the following calculation formula for the growth state parameter SZZt is obtained:

[0100] SZZt=YPYs GY ×a1+YPLk GY ×a2+YPGd GY ×a3

[0101] Where a1, a2, and a3 are weighting coefficients, and 0 < a1 < a2 < a3;

[0102] The seeding density parameter BZMd is composed of the plant number characteristic ZZSl, the plant coverage characteristic FGd, and the plant spacing characteristic ZJj.

[0103] The plant quantity feature ZZSl, plant coverage feature FGd, and plant spacing feature ZJj were normalized and mapped to the following value range:

[0104] 0≤ZZS1≤1, 0≤FGd≤1, 0≤ZJj≤1, the normalization calculation formula is as follows:

[0105]

[0106] Where GY represents the numerical normalization target, Y s X represents the original value, max represents the maximum value, and min represents the minimum value. X can be any one of the plant quantity feature ZZSl, plant coverage feature FGd, and plant spacing feature ZJj, and the following calculation formula for the sowing density parameter BZMd is obtained:

[0107] BZMd=ZZSl GY ×b1+FGd GY ×b2+ZJj GY ×b3

[0108] Where b1, b2, and b3 are weighting coefficients, and 0 < b1 < b2 < b3;

[0109] The dynamic threshold ranges for the following crop features are set as follows: leaf color feature YPYs, leaf outline feature YPLk, leaf height feature YPGd, and plant cover feature FGd. and The threshold range is dynamically adjusted according to the crop type and growth stage corresponding to the sowing category parameter BZLb;

[0110] When the leaf color feature YPYs is in the corresponding When the value is outside the threshold range, it indicates that there are lesions on the surface of crop leaves, or that the surface of the crop is covered by weed leaves.

[0111] When the leaf contour feature YPLk and the leaf height feature YPGd are in the corresponding When the value is outside the threshold range, it indicates that the leaf growth status is abnormal and needs to be recorded for subsequent review.

[0112] When the plant cover characteristic FGd is in the corresponding When the value is outside the threshold range, it indicates that the leaves are growing vigorously and an adaptive adjustment needs to be made to the spacing feature ZJj at the corresponding location.

[0113] Example 3:

[0114] Building upon Example 2, the static image recognition data includes visual images of crop areas acquired by an image device. The data processing module preprocesses the acquired visual images sequentially through grayscale conversion, median filtering, and OTSU threshold background separation. The Canny operator is then used to perform edge detection on the preprocessed images to form region segmentation units. Based on edge detection, the visual image is segmented into crop areas and discrimination regions. Post-processing is then applied to the segmentation results to remove noise, fill holes, or perform morphological operations to further improve classification accuracy. Specifically:

[0115] S1. Noise Removal:

[0116] Use filters (such as Gaussian filters) to further reduce noise in the image, which can lead to inaccuracies in edge detection and segmentation. Smoothing the image can reduce the impact of noise.

[0117] S2, Fill the voids:

[0118] After segmentation, there may be gaps between the crop region and the discriminant region, which need to be filled to ensure the connectivity of the region. This can be achieved through morphological operations (such as dilation and erosion). Dilation can expand the boundary of the object and fill small gaps, while erosion can shrink the boundary of the object to remove minor discontinuities.

[0119] S3, Morphological Operations:

[0120] Morphological operations can be used to further process images, such as connecting adjacent objects, removing small noise or cracks, etc. Opening and closing operations are commonly used morphological operations that can be used to adjust the shape and structure of an image.

[0121] S4. Connect adjacent regions:

[0122] Sometimes, objects are incorrectly divided into multiple parts, requiring the connection of adjacent regions to obtain a more accurate crop area. This can be achieved by labeling the segmented regions and analyzing their relative positions.

[0123] S5. Remove isolated small objects:

[0124] After segmentation, there may be very small objects or noise. These irrelevant areas can be removed based on an area threshold.

[0125] S6. Evaluate the segmentation quality:

[0126] Finally, the segmentation results should be evaluated for quality. This can be done by comparing the segmented regions with the crop regions in the original image to ensure segmentation accuracy.

[0127] Example 4:

[0128] Based on Example 3, the crop area is further divided according to the growth status parameter SZZt, the sowing density parameter BZMd, and the sowing category parameter BZLb. The discrimination area is divided based on the plant spacing feature ZJj and the plant coverage feature FGd. Specifically, the gaps between plants and the parts outside the plant leaf coverage are divided into discrimination areas. Crops may exist in the discrimination areas, so discrimination is required. The lateral blowing module includes blowing pipes symmetrically arranged on both sides of the imaging device. The blowing pipes on both sides are obliquely facing the imaging area of ​​the imaging device. The air inlet of the blowing pipe is connected to the exhaust end of an external fan. The blowing pipes on both sides perform unilateral exhaust according to the marking and positioning of crops in the crop area and the discrimination area. Specifically:

[0129] S1. Adjust the angle of the blower hose:

[0130] First, change the direction of the airflow by rotating the air blower, tilting it towards the weeds. This requires ensuring that the air outlet of the air blower is pointing correctly at the crop planting area so that the airflow is directly directed at the area where the weeds are hidden.

[0131] S2. Locating based on crop markers:

[0132] Based on the location of the crop markings, the direction of the blower is adjusted so that it faces the weeds. This is achieved with the help of a PLC controller, which adjusts the blowing direction in real time according to the detected markings.

[0133] S3, Fan Control:

[0134] Adjust the speed and direction of the external fan to ensure that the airflow from the blower is directed toward the weeds. Adapt the fan to the type of weeds and crops. This requires an adjustable fan system that allows the direction and intensity of the airflow to be changed as needed. Specifically, select a variable power fan to make it easier to expose weeds that are covered by crops.

[0135] S4. Real-time monitoring and feedback:

[0136] Set up a real-time monitoring system to ensure that the airflow direction is consistently directed towards the weeds. This can be achieved through visual feedback or sensors. If the imaging device detects weeds in the crop area, the system can automatically adjust the airflow direction to more effectively expose the hidden weeds.

[0137] Example 5:

[0138] Based on Example 2, the dynamic image recognition unit further includes the edge features BYTz of crops blown by unilateral exhaust wind and the edge features of weeds covered by wind, the motion state features YDTz, and the multispectral variation features DGPTz.

[0139] Leaf margin characteristics:

[0140] Weeds: The edges of weed leaves usually have irregular, serrated or wavy outlines, and these characteristics can be highly variable, depending on the species of weed.

[0141] Crops: The edges of crop leaves usually have regular shapes, such as elliptical or oval, and this regularity helps in the identification and classification of crops;

[0142] Characteristics of motion state:

[0143] Weeds: The movement characteristics of weeds may show disordered growth and movement, usually not following a specific pattern;

[0144] Crops: The movement characteristics of crops are usually more controlled by farmland management. They typically exhibit regular movement during their growth stages, such as growth, flowering, and ripening.

[0145] Multispectral variation characteristics:

[0146] Weeds: The multispectral variation characteristics of weeds can reflect their interaction with the soil and surrounding environment, and these characteristics may vary in different spectral bands;

[0147] Crops: The multispectral variation characteristics of crops often show patterns related to growth stage and health status. Different types of crops may exhibit specific spectral characteristics in different bands, which helps in their monitoring and classification.

[0148] The edge feature BYTz determines the outline and shape of crops based on Canny edge detection and compares it with the leaf outline feature YPLk;

[0149] Meanwhile, the multispectral variation feature DGPTz uses a spectral sensor or multispectral image acquisition to analyze the spectral features in the dynamic image recognition data and compares them with the leaf color features YPYs to distinguish between crops and weeds. Different plants may have different reflectance in different wavelengths.

[0150] The motion state characteristic YDTz includes the leaf shape change value YPXz, the leaf motion orientation value YDFw, and the leaf texture value YPWl.

[0151] The leaf shape variation value YPXz, edge feature BYTz, multispectral variation feature DGPTz, leaf motion orientation value YDFw, and leaf texture value YPWl are normalized and mapped to the following value range:

[0152] 0≤YPXz≤1, 0≤YDFw≤1, 0≤YPWl≤1, the normalization calculation formula is as follows:

[0153]

[0154] Where GY represents the numerical normalization target, Y s represents the original value, max represents the maximum value, and min represents the minimum value. X can be any one of the following: leaf shape change value YPXz, edge feature BYTz, multispectral change feature DGPTz, leaf motion orientation value YDFw, and leaf texture value YPWl. The following calculation formula for the motion state feature YDTz is obtained:

[0155] YDTz=YPXz GY ×c1+YDFw GY ×c2+YPWl GY ×c3

[0156] Where c1, c2, and c3 are weighting coefficients, and 0 < c1 < c2 < c3.

[0157] Example 6:

[0158] Based on Example 5, the judgment index PDZs is further formulated with edge feature BYTz, motion state feature YDTz, multispectral variation feature DGPTz, leaf outline feature YPLk, and leaf color feature YPYs to obtain the following formula:

[0159]

[0160] Where δ is the correction coefficient, -0.21≤δ≤0.65, and the comparison threshold for the judgment index PDZs is set as follows. and

[0161] when When the positive difference between the multispectral variation feature DGPTz and the leaf color feature YPYs is large, it indicates that weeds are present in the crop area or discrimination area and their type is being determined.

[0162] when At that time, it indicates that no weeds were detected in either the crop area or the discrimination area;

[0163] when This indicates that weeds are covering the crops, and the type of weeds is identified.

[0164] The specific criteria are as follows:

[0165] Goosegrass:

[0166] Changes in leaf shape: The leaves become more twisted and tangled, and their shape becomes more irregular;

[0167] Leaf texture: The texture may be finer and longer, and more twisted textures will appear on the leaves;

[0168] Multispectral variation characteristics: Obvious color changes will appear, especially at the bends of the leaves;

[0169] Bitter grass:

[0170] Changes in leaf shape: The leaves become more twisted, and some varieties will show curling of the leaf edges;

[0171] Leaf texture: The texture will become denser, and even irregular texture distribution will appear;

[0172] Multispectral variation characteristics: Vallisneria natans exhibits different reflectances on its leaves, resulting in significant changes in multispectral images;

[0173] Pig feed:

[0174] Leaf shape changes: When blown by the wind, the leaves of pigweed will sway more and their shapes will be arranged irregularly.

[0175] Leaf texture: The texture will show more wavy variations on the leaf surface;

[0176] Leaf movement direction: The leaves will tilt in different directions, and there may even be cases where the entire leaf of pigweed tilts in one direction.

[0177] Grains and weeds:

[0178] Changes in leaf shape: Leaves may become warped, curled, or twisted.

[0179] Leaf texture: When blown by the wind, the leaf texture of grains and weeds becomes more chaotic and irregular;

[0180] Multispectral variation characteristics: Grains and weeds show significant changes in spectral images across different spectral bands;

[0181] bermudagrass:

[0182] Changes in blade shape: The blades will twist and deform over a wider range due to the wind.

[0183] Leaf texture: The texture on the surface of the leaf may be rougher and more chaotic, and sometimes it may even present a disordered texture structure;

[0184] Blade movement direction: When blown by the wind, the blades of the bermudagrass may swing in different directions, showing different movement directions;

[0185] The leaf shape variations, leaf shape variations, and multispectral variations of the aforementioned different weeds require extensive training based on machine learning models to improve their discrimination accuracy.

[0186] A detection method applicable to an image recognition-based farmland weed detection system, comprising the following steps:

[0187] S1. Based on the convolutional neural network, obtain a training library of crop and weed images, train the model and construct a machine learning model. Label the training data of weeds and crops in the machine learning model and generate a classifier model.

[0188] S2 is used to collect crop sowing data and static image recognition data of crop areas, and transmit them to the data processing module;

[0189] S3 is used to receive crop sowing data and divide farmland into crop areas and discrimination areas through the regional division unit. It marks the crop coordinates of the crop areas and discrimination areas in the static image recognition data, and uses the side blowing module to blow the marked crops sideways to obtain dynamic image recognition data of the crop areas and discrimination areas.

[0190] S4 is used to mark weeds in the discrimination area using the first weed marking module, mark weeds exposed in the crop area using the second weed marking module, and mark weeds hidden in the crop area and discrimination area using dynamic image recognition data and the dynamic image weed marking module.

[0191] S5 is used to receive the weed image data marked in the first weed marking module, the second weed marking module and the dynamic image weed marking module, compare it with the training library, and generate a judgment index PDZs through the classifier model, and make a specific judgment on the weed type based on the judgment index PDZs.

[0192] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. A semiconductor medium can be a solid-state drive.

[0193] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0194] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0195] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division of a waterway underwater topography change analysis system and method. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between devices or units, and may be electrical, mechanical, or other forms.

[0196] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0197] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0198] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0199] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A farmland weed detection system based on image recognition, characterized in that, include: Training module: Based on a convolutional neural network, a training library of crop and weed images is acquired for training and to form a machine learning model. The training data of weeds and crops in the machine learning model are labeled and a classifier model is generated. Data acquisition module: Used to collect crop sowing data and static image recognition data of crop areas and transmit them to the data processing module. The data processing module receives crop sowing data and divides farmland into crop areas and discrimination areas using a regional division unit. It marks the crop coordinates in the static image recognition data for both crop and discrimination areas, and then uses a lateral airflow module to laterally blow air onto the marked crops to obtain dynamic image recognition data for both crop and discrimination areas. The weed marking module marks weeds in the discrimination area using a first weed marking module, and weeds visible in the crop area using a second weed marking module. It also marks obscured weeds in the crop and discrimination areas based on dynamic image recognition data using a dynamic image weed marking module. The weed judgment module receives weed image data marked by the first, second, and dynamic image weed marking modules, compares it with a training library, generates a judgment index (PDZs) using a classifier model, and then makes a specific judgment based on the PDZs.

2. The farmland weed detection system based on image recognition according to claim 1, characterized in that: The crop sowing data includes the crop growth status parameter SZZt, sowing density parameter BZMd, and sowing category parameter BZLb. The growth status parameter SZZt is composed of leaf color feature YPYs, leaf outline feature YPLk, and leaf height feature YPGd. The leaf color feature YPYs, leaf outline feature YPLk, and leaf height feature YPGd are normalized and mapped to the following value ranges: 0≤YPYs≤1, 0≤YPLk≤1, 0≤YPGd≤1. The normalization calculation formula is as follows: Where GY represents the numerical normalization target, Ys represents the original value, max represents the maximum value, and min represents the minimum value, and X can be any one of the leaf color feature YPYs, leaf outline feature YPLk, and leaf height feature YPGd, and the following formula is obtained for calculating the growth state parameter SZZt: SZZt = YPYs GY ×a1+YPLk GY ×a2+YPGd GY ×a3, where a1, a2, and a3 are weighting coefficients, and 0 < a1 < a2 < a3; the sowing density parameter BZMd is composed of the plant quantity feature ZZSl, the plant coverage feature FGd, and the plant spacing feature ZJj. The plant quantity feature ZZSl, the plant coverage feature FGd, and the plant spacing feature ZJj are normalized and mapped to the following value ranges: 0 ≤ ZZSl ≤ 1, 0 ≤ FGd ≤ 1, 0 ≤ ZJj ≤ 1. The normalization calculation formula is as follows: Where GY represents the numerical normalization target, Ys represents the original value, max represents the maximum value, and min represents the minimum value, X can be any one of the plant quantity feature ZZSl, plant coverage feature FGd, and plant spacing feature ZJj, and the following formula is obtained for calculating the sowing density parameter BZMd: BZMd=ZZSl GY ×b1+FGd GY ×b2+ZJj GY ×b3 where b1, b2, and b3 are weighting coefficients, and 0 < b1 < b2 < b3; the dynamic threshold ranges for the leaf color feature YPYs, leaf outline feature YPLk, leaf height feature YPGd, and plant coverage feature FGd of the crop are set as follows: and The threshold range is dynamically adjusted according to the crop type and growth stage corresponding to the sowing category parameter BZLb.

3. The farmland weed detection system based on image recognition according to claim 2, characterized in that: The static image recognition data includes visual images of crop areas acquired by the image device. The data processing module preprocesses the acquired visual images by performing grayscale conversion, median filtering, and OTSU threshold background separation. The Canny operator is used to perform edge detection on the preprocessed images to form region segmentation units. Based on the edge detection, the visual images are segmented into crop areas and discrimination areas. The segmentation results are post-processed to remove noise, fill holes, or perform morphological operations to further improve classification accuracy.

4. The farmland weed detection system based on image recognition according to claim 3, characterized in that: The crop area is divided according to the growth status parameter SZZt, the sowing density parameter BZMd, and the sowing category parameter BZLb. The discrimination area is divided according to the plant spacing feature ZJj and the plant coverage feature FGd. The lateral blowing module includes blowing pipes symmetrically arranged on both sides of the image device. The blowing pipes on both sides are obliquely facing the shooting area of ​​the image device. The air inlet of the blowing pipe is connected to the exhaust end of the external fan. The blowing pipes on both sides perform unilateral exhaust according to the marking and positioning of crops in the crop area and the discrimination area.

5. The farmland weed detection system based on image recognition according to claim 2, characterized in that: The dynamic image recognition unit includes edge features (BYTz), motion state features (YDTz), and multispectral variation features (DGPTz) of crops blown by unilateral ventilation and weeds being covered. The edge feature (BYTz) determines the outline and shape of the crops based on Canny edge detection and compares it with the leaf outline feature (YPLk). Simultaneously, the multispectral variation feature (DGPTz) is acquired using a spectral sensor or multispectral image acquisition, analyzes the spectral features in the dynamic image recognition data, and compares them with the leaf color feature (YPYs) to distinguish between crops and weeds. The motion state feature (YDTz) includes leaf shape change value (YPXz), leaf motion orientation value (YDFw), and leaf texture value (YPWl). The leaf shape change value (YPXz), edge feature (BYTz), multispectral variation feature (DGPTz), leaf motion orientation value (YDFw), and leaf texture value (YPWl) are normalized and mapped to the following value ranges: 0 ≤ YPXz ≤ 1, 0 ≤ YDFw ≤ 1, 0 ≤ YPWl ≤ 1. The normalization calculation formula is as follows: Where GY represents the numerical normalization target, Ys represents the original value, max represents the maximum value, and min represents the minimum value, X can be any one of the following: leaf shape variation value YPXz, edge feature BYTz, multispectral variation feature DGPTz, leaf motion orientation value YDFw, and leaf texture value YPWl. The following formula is obtained for calculating the motion state feature YDTz: YDTz = XPXz GY ×c1+YDFw GY ×c2+YPWl GY ×c3 where c1, c2, and c3 are weighting coefficients, and 0 < c1 < c2 < c3.

6. The farmland weed detection system based on image recognition according to claim 2, characterized in that: The judgment index PDZs is combined with edge feature BYTz, motion state feature YDTz, multispectral variation feature DGPTz, leaf outline feature YPLk, and leaf color feature YPYs to obtain the following formula: Where δ is the correction coefficient, -0.21≤δ≤0.65, and the comparison threshold for the judgment index PDZs is set as follows. and when When the positive difference between the multispectral variation feature DGPTz and the leaf color feature YPYs is large, it indicates the presence of weeds in the crop area or discrimination area, and type identification is performed; when When, it indicates that no weeds were detected in either the crop area or the discrimination area; when This indicates that weeds are covering the crops, and the type of weeds is then identified.

7. A detection method, characterized in that: The method is applicable to the image recognition-based farmland weed detection system according to any one of claims 1-6, and the specific steps include: S1, training a machine learning model by acquiring a training library of crop and weed images based on a convolutional neural network, labeling the training data of weeds and crops in the machine learning model, and generating a classifier model; S2, collecting crop sowing data and static image recognition data of crop areas, and transmitting them to the data processing module; S3, receiving crop sowing data and dividing the farmland into crop areas and discrimination areas through a region division unit, labeling the crop coordinates of the crop areas and discrimination areas in the static image recognition data, and using this to transmit the data through the lateral blowing module. S4. Laterally blow air onto the marked crops to obtain dynamic image recognition data of the crop area and the discrimination area; S5. Mark the weeds in the discrimination area using the first weed marking module, mark the exposed weeds in the crop area using the second weed marking module, and mark the shaded weeds in the crop area and the discrimination area based on the dynamic image recognition data and using the dynamic image weed marking module; S6. After receiving the weed image data marked in the first weed marking module, the second weed marking module, and the dynamic image weed marking module, compare it with the training library, and generate a judgment index PDZs through the classifier model, and make a specific judgment on the weed type based on the judgment index PDZs.