CN-122024056-A - Real-time weed detection and area statistics system and method based on deep learning model
Abstract
The invention discloses a real-time weed detection and area statistics system and method based on a deep learning model, comprising a hardware architecture and a software module which work cooperatively, wherein the hardware architecture comprises a calculation unit, an image acquisition unit and a storage unit, the software module comprises an initialization module, an image acquisition and preprocessing module, a dynamic sampling and weed detection module, an area quantization module and a data management module, the hardware units are in communication connection through a data interface, and the software modules are used for realizing data interaction through a data bus and completing real-time detection, classification and coverage area statistics of farmland weeds. The invention is based on CUDA acceleration and TensorRT engine optimization, the weed detection frame rate (FPS) is more than or equal to 20 frames/second, the real-time monitoring requirement of a mobile carrier is met, the detection accuracy is optimized, namely mAP@0.5 is more than or equal to 0.885 under a complex background based on a GRASS-YOLO model, the weed category identification accuracy is more than or equal to 95%, and the calculation error of the weed area is less than or equal to 5% by using a double-mask accumulation and physical size calibration technology.
Inventors
- JIN SHENGYING
- WANG QI
- HE CHENTAO
- CHENG CAOMING
- YANG LAN
Assignees
- 广东东篱智云科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260130
Claims (10)
- 1. A real-time weed detection and area statistics system based on a deep learning model is characterized by comprising a hardware architecture and a software module which work cooperatively; The hardware architecture comprises a computing unit, an image acquisition unit and a storage unit, wherein the software module comprises an initialization module, an image acquisition and preprocessing module, a dynamic sampling and weed detection module, an area quantification module and a data management module, the hardware units are in communication connection through a data interface, and the software modules realize data interaction through a data bus and are used for completing real-time detection, classification and coverage area statistics of farmland weeds.
- 2. The real-time weed detection and area statistics system based on the deep learning model of claim 1, wherein the computing unit is an embedded computing platform with parallel computing capability, and is used for running the deep learning detection model and each software module and providing reasoning acceleration; The image acquisition unit is a camera and is arranged on the mobile carrier, acquires original image data towards the farmland area and transmits the original image data to the calculation unit, and the storage unit is a pluggable SD card and is used for storing the original image, the model file, the detection result and the log data.
- 3. The real-time weed detection and area statistics system based on the deep learning model of claim 1, wherein the initialization module is used for completing computing resource configuration, deep learning detection model loading and image acquisition unit parameter configuration, and the image acquisition and preprocessing module is used for receiving an original image and performing format conversion, noise reduction and standardization processing; the dynamic sampling and weed detection module is used for dynamically adjusting the sampling interval and realizing detection and classification of weed targets, the area quantization module is used for accumulating weed pixel areas and converting the weed pixel areas into physical coverage areas, and the data management module is used for storing and managing various data; The area quantization module comprises a physical mapping unit and a motion parameter integration unit, wherein the physical mapping unit is used for establishing a mapping relation from a camera pixel coordinate system to an actual physical space, and the motion parameter integration unit is used for calculating an actual coverage area by combining the speed and the visual field length parameters of the mobile carrier.
- 4. The real-time weed detection and area statistics system based on a deep learning model according to claim 1, wherein the deep learning detection model is optimized by: constructing an agricultural data set by integrating multi-scene farmland image data and enhancing the data; Performing anchor frame optimization and network architecture adjustment aiming at weed detection characteristics, and re-clustering the anchor frame sizes on an agricultural data set based on a preset algorithm to obtain a preset anchor frame of small target weeds; A multi-stage training strategy is employed in combination with model compression techniques.
- 5. The real-time weed detection and area statistics system based on a deep learning model of claim 1, wherein the dynamic sampling and weed detection module dynamically determines a sampling interval based on a traveling speed of a mobile carrier and a visual field parameter of an image acquisition unit; and (3) detecting the weed target on the standardized image data through the reasoning acceleration capability of the computing unit, outputting the position information, the category information and the confidence coefficient of the weed target, and screening effective detection results.
- 6. The real-time weed detection and area statistics system based on a deep learning model of claim 1, wherein the area quantization module is used for accumulating the non-repeated weed coverage pixel area by adopting bit operation by constructing a global target mask and a single frame target mask, converting the weed pixel occupation ratio into a physical coverage area by combining equipment parameters of an image acquisition unit, a shooting distance and motion parameters of a mobile carrier, and accumulating and calculating the whole weed area occupation ratio.
- 7. A real-time weed detection and area statistics method based on a deep learning model, implemented based on the system of any one of claims 1-6, comprising the steps of: s1, initializing a system, completing computing resource configuration, loading a deep learning detection model and configuring parameters of an image acquisition unit, and starting an image acquisition process; S2, image acquisition and preprocessing, namely continuously acquiring original images of farmlands, and generating image data adapting to a detection model through format conversion, noise reduction and standardization processing; s3, dynamically sampling and weed detection, dynamically adjusting sampling intervals according to motion parameters and visual field parameters of the mobile carrier, detecting and classifying the weeds in the standardized image data, and outputting effective detection results; s4, quantifying the area, accumulating a weed pixel area without repetition, converting the pixel occupation ratio into a weed physical coverage area by combining physical parameters, and counting the whole area occupation ratio; And S5, data management, namely storing the original image, the detection result and the area statistical data, and supporting data local checking and remote transmission.
- 8. The method for real-time weed detection and area statistics based on a deep learning model according to claim 7, wherein in S3, the dynamic adjustment sampling interval is adaptively adjusted based on the traveling speed of the mobile carrier and the visual field length of the image acquisition unit, so as to ensure effective coverage of adjacent sampling areas; The weed detection is realized through an inference acceleration mechanism of the computing unit, and the weed targets with confidence meeting the preset requirements are screened and the classification results are output.
- 9. The method for real-time weed detection and area statistics based on deep learning model of claim 7, wherein in S4, the specific process of area quantization is as follows: the method comprises the steps of constructing a global target mask with initial values of weed-free marks and a single-frame target mask, marking pixels corresponding to weed areas in a single-frame image as weed-free areas, and updating the global target mask through bit operation to accumulate the weed-free areas; And counting the total number of weed pixels in the global target mask, and obtaining the physical coverage area and the whole-course duty ratio of the weeds by combining physical parameter conversion.
- 10. The method for real-time weed detection and area statistics based on deep learning model according to claim 9, wherein the formula for calculating the single-frame weed pixel ratio is that the single-frame weed pixel ratio=the number of pixels of weed area in single frame ≡the total number of pixels of single-frame image; the formula for calculating the single-frame weed area is that the single-frame weed area = calibration coefficient x single-frame weed pixel occupation ratio x single-frame total coverage area; The formula for calculating the physical area of the whole-course masked weed is that the physical area occupation ratio of the whole-course masked weed=the total physical area of the accumulated weeds +..
Description
Real-time weed detection and area statistics system and method based on deep learning model Technical Field The invention belongs to the technical field of computer vision and agricultural intellectualization, and particularly relates to a real-time weed detection and area statistics system and method based on a deep learning model. Background With the rapid development of agriculture intellectualization and accurate agriculture, weed detection and area statistics have become core support technologies for field management and accurate pesticide application. Weeds and crops compete for nutrients, moisture and illumination, the coverage of the weeds and crops directly affects the crop yield, and according to statistics, the weeds which are not timely prevented and controlled can lead the crops to reduce the yield by 10% -30%, so that the weeds are rapidly and accurately detected and the coverage area of the weeds is quantified, and the method has important significance in improving the agricultural production efficiency, reducing the pesticide abuse and protecting the ecological environment. At present, field weed detection and area statistics technologies are mainly divided into two types of traditional image processing and machine learning technologies and existing deep learning detection technologies, but have the obvious defects that the traditional technology depends on manual design characteristics and combines a machine learning algorithm, the robustness of the traditional technology to complex field environments is insufficient, the recognition accuracy is generally lower than 70%, the anti-interference capability is weak and the quantitative analysis capability is lacking, the existing deep learning technology improves the precision, but a general model is not optimized for the characteristics of 'small targets, dense distribution and unbalanced categories' of weeds, real-time reasoning is difficult to realize on embedded equipment, an area statistics method is extensive, a sampling strategy is stiff, and the field operation scene of a mobile carrier cannot be adapted. The core problems of the prior art are concentrated in four aspects, namely, the contradiction between real-time performance and hardware dependency is outstanding, most systems need to rely on a high-performance industrial personal computer or a server, the cost is high, the systems cannot be adapted to mobile carriers such as unmanned vehicles and plant protection unmanned vehicles, the model adaptability is insufficient, the detection effect on small-size densely distributed weeds is poor, the recognition accuracy of the weeds in the class of the masses is low, the statistical error of the area is large, the calibration is carried out without combining physical information such as camera internal parameters, shooting distance, mobile carrier motion parameters and the like, the error is generally more than 15%, the sampling effectiveness is insufficient, the running speed change of the mobile carriers is not considered in a fixed interval sampling mode, and the sampling omission and the data redundancy during low-speed running are caused during high-speed running. The root of the problems is that the model design lacks pertinence, the software and hardware are not coordinated enough, the pixel-physical space mapping is lost, the sampling strategy is disjointed from the actual operation scene, so that the detection precision, the instantaneity, the area quantization accuracy and the hardware suitability are difficult to be considered in the prior art. In the practical application of precise agriculture, the defects of the prior art severely restrict the refinement level of field management, and cannot meet the core requirements of precise pesticide application, crop yield prediction and the like. The low precision of the traditional technology and the high cost and low suitability of the deep learning technology lead to that most farmers still rely on manual weeding or blind pesticide application, which wastes resources and pollutes the environment. Therefore, development of a weed detection and area statistics system and method based on deep learning, which can realize accurate statistics of physical area with high precision and real-time performance, is needed to solve the core pain points in the aspects of detection precision, hardware suitability, area quantization accuracy and the like in the prior art, and provide reliable technical support for accurate agriculture. Disclosure of Invention Aiming at the problems of the background technology, the invention aims to provide a real-time weed detection and area statistics system and method based on a deep learning model, which are based on deep learning, give consideration to high precision and real-time performance and can realize accurate physical area statistics, solve the core pain points in the aspects of detection precision, hardware suitability, area quantization accuracy and