Variable pesticide application system and field weed detection and variable pesticide application method
By designing a shock-absorbing camera assembly that can adjust the camera height and angle and improving the YOLOv8 model, the problem of large calculation volume of field weed detection model and vibration of the drug application system is solved, and variable application with higher accuracy and flexibility is achieved.
Patent Information
- Application Number
- CN202510398212.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-01
- Publication Date
- 2025-07-18
AI Technical Summary
The existing field weed detection model has a large amount of calculation and is not easy to deploy in small equipment. The detection accuracy is insufficient. The vibration of the drug application system affects the camera stability, resulting in insufficient accuracy and precision of variable application. There is a delay between weed detection and spraying, which affects the accuracy of drug application.
Design a shock-absorbing camera component that can adjust the camera height and angle, improve the YOLOv8 model to reduce the amount of calculation, and perform detection and application procedures in parallel through image area division, reduce spray delay, and improve application accuracy.
It improves the camera's stability and model detection capabilities, achieves more accurate variable application, reduces spraying delay, and improves the accuracy and flexibility of the application system.
Smart Images

Figure CN120339830A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of intelligent agricultural machinery equipment, and particularly relates to a variable spraying system and a method for detecting and variably spraying field weeds. Background Art
[0002] Field weeds will hinder the healthy growth of crops and reduce crop yields. Therefore, weed control is an indispensable part of the plant protection process. Although spraying herbicides indiscriminately can achieve a certain weeding effect, it will cause pesticide waste and environmental pollution, affect crop growth, and even produce pesticide residues, damaging the physical health of crop consumers. Therefore, the variable spraying method shows great advantages in terms of economy and human health protection and has received attention from local governments and even countries.
[0003] Variable spraying is part of intelligent agriculture. Currently, it is closely combined with artificial intelligence technology, demonstrating great economic and social value. The variable spraying technology for field weeds is inseparable from the intelligent detection of field weeds. Currently, with the development of deep learning technology, some weed detection models have been established. However, the existing weed detection models have a relatively large computational amount, are not easily deployed in small devices, and their detection accuracy also needs to be improved. The detection system for variable spraying is usually based on visual perception. During the operation of the spraying machinery, vibrations will occur, affecting the stability of the camera, thereby reducing the accuracy of the detection system. The existing variable spraying systems are also difficult to accurately perform variable spraying in the field, and the accuracy and fineness of spraying are insufficient. At the same time, there is a certain time delay between weed detection and nozzle spraying, seriously affecting the accuracy of variable spraying. Summary of the Invention
[0004] Aiming at the deficiencies of the existing technology, the present invention proposes a variable spraying system and a method for detecting and variably spraying field weeds. By dividing the image area, the spraying fineness of the variable spraying system is improved. Through the staggered execution of the system program and structural design, the spraying delay is reduced, and the accuracy of the variable spraying system is improved. By designing a shock-absorbing camera assembly that can adjust the height and angle of the camera, the stability and flexibility of the camera are improved. By methods such as a lightweight feature extraction network, an improved feature fusion module, introducing an attention mechanism, and improving the loss function, the YOLOv8 model is improved to enhance the performance of the field weed detection model.
[0005] A variable spraying system provided by the present invention is composed of a spraying component A, a camera component Ⅰ B1, a camera component Ⅱ B2, a control component C, a medicine box 1, a rear box 2, a frame and push rod assembly 3, and a walking system 4. The frame and push rod assembly 3 is installed above the walking system 4. The medicine box 1 and the rear box 2 are respectively installed in front of and above the frame and push rod assembly 3, and the spraying component A is installed behind the frame and push rod assembly 3. The camera component Ⅰ B1 and the camera component Ⅱ B2 are installed above the spraying component A.
[0006] The described spraying component A is composed of a hollow spray rod 5 and 15 - 20 spray nozzles of the nozzle group 6. The inlets of the 15 - 20 spray nozzles are communicated with the hollow spray rod 5. The camera component Ⅰ B1 and the camera component Ⅱ B2 are respectively fixed to the left and right halves of the hollow spray rod of the spraying component A through their respective bases Ⅰ.
[0007] The described camera component Ⅰ B1 and the camera component Ⅱ B2 have the same structure, and both are composed of a guide rod component D, an orbital plate E, a clamp F, an upper rod 7, a spring 8, a height - adjusting sleeve 9, a lower rod 10, a base Ⅰ 11, a screw 12, a limit pin 13, a camera 14 and a bolt group 15. The described guide rod component D is composed of a support block 20, a connecting rod 21, a top plate 22, a middle plate 23, a base Ⅲ 24 and a pair of side plates 25. A central hole 26 is provided on the middle plate 23. The top plate 22 and the middle plate 23 are arranged up and down. The left and right ends of the top plate 22 and the middle plate 23 are respectively fixed to the two side plates of the pair of side plates 25. The upper end of the top plate 22 is fixed to the support block 20 through the connecting rod 21.
[0008] The described orbital plate E is composed of a cross - plate 16, a base Ⅱ 17 and a vertical plate 19. Two slots of a slot pair 18 are provided on the cross - plate 16 and the vertical plate 19. The base Ⅱ 17 is fixed to the upper surface of the front end of the slot pair 18 in the cross - plate 16. The lower end of the vertical plate 19 is fixedly connected to the rear end of the cross - plate 16 at a right angle.
[0009] The described clamp F is composed of a flexible material 27, a pair of upper connecting rods 28, a pair of lower connecting rods 29, a connecting - rod driving body 30, a nut group 31 and a clamp control rod 32. The upper part of the pair of upper connecting rods 28 is arc - shaped, and the middle part thereof is a 120 - degree corner. The flexible material 27 is bonded inside the arc - shaped part of the pair of upper connecting rods 28. The middle part of the pair of upper connecting rods 28 is hinged to the support block 20. The lower end of the pair of upper connecting rods 28 is hinged to the upper end of the pair of lower connecting rods 29. The lower ends of the pair of lower connecting rods 29 are respectively hinged to the left and right ends of the connecting - rod driving body 30. The connecting - rod driving body 30 is threadedly connected to the upper part of the control rod 32. The lower part of the clamp control rod 32 passes through the central hole 26. The nut group 31 is composed of four nuts, which are respectively threadedly connected to the clamp control rod 32 from top to bottom. The upper two nuts are respectively located on the upper and lower sides of the connecting - rod driving body 30, and the lower two nuts are respectively located on the upper and lower sides of the middle plate 23.
[0010] The lower rod 10 is fixedly connected to the base Ⅰ 11. The middle surface of the lower rod 10 is provided with threads, and there are 10 equally spaced screw holes on the threaded part; the height adjustment sleeve 9 is provided with grooves and 16 evenly distributed limit pin holes, and is threadedly connected to the middle part of the lower rod 10; the spring 8 is sleeved on the upper part of the lower rod 10 and is located between the height adjustment sleeve 9 and the upper rod 7. The upper rod 7 is sleeved on the lower rod 10. There is a flange at the front of the lower end of the upper rod 7. The limit pin 13 passes through the flange of the upper rod 7 and the limit pin holes of the height adjustment sleeve 9; the screw 12 passes through the groove on the height adjustment sleeve 9 and the screw holes of the lower rod 10 at the same time; the upper end of the upper rod 7 is fixedly connected to the lower surface of the front part of the middle cross plate 16 of the track plate E; the base Ⅲ 24 in the guide rod assembly D and the base Ⅱ 17 in the fixture F are hinged. The two side plates of the side plate pair 25 in the guide rod assembly D are respectively slidably connected to the two grooves of the groove pair 18 in the track plate E and are limited by the four bolts of the bolt group 15. The camera 14 is clamped by the flexible material 27 of the upper connecting rod pair 28 in the fixture F.
[0011] The control assembly C is composed of a Raspberry Pi 33, a wheel speed sensor 34, an Arduino 35, a relay group 36, a power supply 37, a solenoid valve group 38, an overflow valve 39, and a hydraulic pump 40. The Raspberry Pi 33, the Arduino 35, and the relay group 36 are installed on the right side of the frame and the push rod assembly 3. The wheel speed sensor 34 is installed in the wheels of the traveling system 4. The power supply 37, the overflow valve 39, and the hydraulic pump 40 are installed in the rear box 2. The solenoid valve group 38 is installed on the hollow spray rod 5 and is respectively connected to 15 - 20 nozzles of the nozzle group 6.
[0012] The distance Ld between the rearmost part of the visual field projection of the camera 14 in the camera assembly Ⅰ B1 and the camera assembly Ⅱ B2 and the perpendicular line of the nozzle of the nozzle group 6 is αv0t d , where: α is a correction coefficient, the default value of α is taken as 1.2, v0 is the rated forward speed of this system, and t d is the delay time for weed detection, flow rate calculation, and data transmission.
[0013] The method for detecting field weeds and variable rate application of the variable rate application system includes the following steps:
[0014] 1) Construct a field weed detection model based on the improved YOLOv8;
[0015] 1.1 Collect and process field weed data, and divide the data into a training set, a validation set, and a test set according to a ratio of 8:1:1;
[0016] 1.2 Construct a field weed detection model based on the improved YOLOv8 model and train the field weed detection model, including the following steps:
[0017] 1.2.1 The field weed detection model is based on the YOLOv8n model;
[0018] 1.2.2 Replace the CBS and C2f in the backbone network and the neck network with GhostCBS and C2fGhost respectively, where GhostCBS replaces the Conv in the original CBS with GhostConv; C2fGhost consists of 2-6 G-bneck modules, and the G-bneck module is stacked by Ghost modules; the main body of the Ghost module is GhostConv, and GhostConv consists of Conv, grouped convolution and identity mapping;
[0019] 1.2.3 Replace the feature fusion module with the optimized weighted bidirectional feature pyramid fusion network BiFPN_Contact2, and introduce Triplet Attention before Detect3. The optimized weighted bidirectional feature pyramid fusion network BiFPN_Contact2 changes the number of layers of the original BiFPN from five-in and five-out to three-in and three-out, and adds skip connections in the connections of P3 and P4 layers. The connection method of features adopts Concat splicing;
[0020] 1.2.4 Use the training set and the validation set, and train the model with Wise-IoU v3 as the loss function;
[0021] 1.3 Deploy the model with the highest accuracy on the validation set during the training process to the Raspberry Pi 33 of the variable rate spraying system;
[0022] 2) Divide and calibrate the image area, including the following steps:
[0023] 2.1 Measure the ground spraying range of a single nozzle, and use the minimum circumscribed rectangle of the nozzle spraying range as the size of the sub-region W ij ;
[0024] 2.2 According to the size of the sub-region W ij , use paint or colored powder on the flat ground to divide a certain range of the ground into sub-regions W ij with uniform area, where i represents the area serial number from below the nozzle to the front of the system in the system forward direction, i = 1, 2 ······ n; j represents the area serial number of the hollow spray boom 5 from left to right, j = 1, 2 ······ 17;
[0025] 2.3 Use the camera 14 to align and shoot the divided sub-regions;
[0026] 2.4 Use the paint or colored powder in the picture to divide the picture area, and correspond and calibrate the ground sub-region W ij with the image sub-region S ij one by one, and calibrate each image sub-region S ijThe corresponding nozzle is used to calibrate the distance L from each image sub-region to the position below the nozzle i ;
[0027] 3) The application method of the variable-rate application system includes the following steps:
[0028] 3.1 Start the variable-rate application system and initialize it. The execution parameters and preparatory parameters in the system are initialized to 0. The execution parameters are the parameters based on which application is carried out; the preparatory parameters are the parameters that are stored first after calculation and transmission. The Raspberry Pi 33 is used as the host computer to load the field weed detection model;
[0029] 3.2 Use the camera 14 to obtain the field image and transfer the field image to the Raspberry Pi 33. At the same time, the Arduino 35 updates the first timing program t1. According to the signal of the wheel speed sensor 34, calculate the speed v and the moving distance l1 of the variable-rate application system, where l1 = t1v;
[0030] 3.3 Use the field weed detection model in the Raspberry Pi 33 to detect the field image. According to the detection results, count the number of weeds K in each image sub-region S ij inside ij ;
[0031] 3.4 Divide the number of weeds K ij into six levels: 0, 1, 2, 3, 4, and ≥5. When K ij = 0, the expected application flow rate Q of each sub-region W ij is set to 0. For each increase of one level in the number of weeds K ij , the expected application flow rate Q ij increases by one-fifth of the nozzle rated flow rate. The Raspberry Pi 33 sends the application flow rate Q ij to the Arduino 35 as a preparatory parameter; ij
[0032] 3.5 While the Raspberry Pi 33 is making predictions, the Arduino 35 applies the chemical according to the execution parameters. At the beginning of startup, since the initial parameters are 0, the application amount is 0, that is, no chemical is applied;
[0033] 3.6 When l1 = Ld, the nozzle position reaches the application area corresponding to the bottom of the image. At this time, update the second timing program t2, and the original preparatory parameter becomes the execution parameter;
[0034] 3.7 Calculate the moving distance l2 in real time, where l2 = vt2. According to l2 and the calibrated L i judge in real time the sub-region S ij corresponding to the position below the nozzle, and according to the corresponding expected application flow rate Q ij , control the PWM of each solenoid valve in the solenoid valve group 38 to adjust the application amount;
[0035] 3.8 When the moving distance l1 = Lw, where Lw is the actual distance of the effective field of view of the camera, the Raspberry Pi 33 executes step 3.2 again, the Raspberry Pi 33 enters the next cycle, and the Arduino 35 continues to execute the pesticide application program according to the execution parameters;
[0036] 3.9 When l2 = Lw, that is, l1 = Ld, the t2 and execution parameters in the Arduino 35 are updated, and the Arduino 35 enters the next cycle.
[0037] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0038] In the variable pesticide application system proposed by the present invention, a shock-absorbing camera module with adjustable camera height and angle is designed to reduce the vibration transmitted from the spray boom to the camera, improve the shooting stability of the camera, and at the same time, the angle and height of the camera can be adjusted at any time to suit different application scenarios; the present invention proposes a method for detecting field weeds based on an improved YOLOv8 model, which reduces the model calculation amount, improves the deployment ability of the model on micro and small devices, and at the same time, by improving the model structure and loss function, improves the detection ability and training ability of the model; the present invention also proposes a more accurate variable pesticide application method, which divides the image area and can apply pesticides to each small area more accurately. At the same time, the weed detection program and the pesticide application program are executed in parallel to reduce the spraying delay and improve the pesticide application accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is a schematic diagram of the overall structure of the variable pesticide application system;
[0040] Figure 2 is a schematic diagram of the structure of the pesticide spraying component A;
[0041] Figure 3 is a schematic diagram of the overall structure of the camera module B;
[0042] Figure 4 is Figure 3 the enlarged view indicated by a in
[0043] Figure 5 is the left view of the camera module B;
[0044] Figure 6 is Figure 5 the enlarged view indicated by b in
[0045] Figure 7 is Figure 5 the enlarged view indicated by c in
[0046] Figure 8 is a schematic diagram of the structure of the track plate E;
[0047] Figure 9 It is a schematic structural diagram of the guide rod assembly D;
[0048] Figure 10 It is a schematic structural diagram of the fixture F;
[0049] Figure 11 It is a schematic diagram of the dimensional requirements of the height adjustment sleeve 9;
[0050] Figure 12 It is a schematic diagram of the positions of the camera, the nozzle and the ground;
[0051] Figure 13 It is a schematic diagram of the hardware connection of the control component C;
[0052] Figure 14 It is a training and deployment flow chart of the field weed detection method based on the improved YOLOv8 model;
[0053] Figure 15 It is a network structure diagram of the improved YOLOv8 network model;
[0054] Figure 16 It is a schematic diagram of the C2fGhost structure;
[0055] Figure 17 It is a schematic diagram of the BiFPN_Contact2 structure;
[0056] Figure 18 It is a schematic diagram of the Triplet Attention structure;
[0057] Figure 19 It is a flow chart of the image area division and calibration method;
[0058] Figure 20 It is a work flow chart of the variable spraying method;
[0059] Where: A. Spraying component B1. Camera component Ⅰ B2. Camera component Ⅱ C. Control component D. Guide rod component E. Track plate F. Fixture 1. Medicine box 2. Rear box 3. Frame and push rod component 4. Traveling system 5. Hollow spray rod 6. Nozzle group 7. Upper rod 8. Spring 9. Height adjustment sleeve 10. Lower rod 11. Base Ⅰ 12. Screw 13. Limit pin 14. Camera 15. Bolt group 16. Cross plate 17. Base Ⅱ 18. Groove pair 19. Vertical plate 20. Support block 21. Link rod 22. Top plate 23. Middle plate 24. Base Ⅲ 25. Side plate pair 26. Central hole 27. Flexible material 28. Upper link rod pair 29. Lower link rod pair 30. Driving body 31. Nut group 32. Regulation rod 33. Raspberry Pi 34. Wheel speed sensor 35. Arduino 36. Relay group 37. Power supply 38. Solenoid valve group 39. Overflow valve 40. Hydraulic pump. Detailed implementation manners
[0060] To make the objectives, technical solutions and advantages of the present invention clearer, the following will clearly and completely describe the technical solutions in the present invention with reference to the accompanying drawings in the present invention. Apparently, the described embodiments are part of the embodiments of the present invention, rather than all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present invention without creative efforts shall fall within the protection scope of the present invention.
[0061] The following will be combined with Figures 1 - 20 describe the variable application system and the field weed detection and variable application method in the present invention;
[0062] As Figure 1 and Figure 2 shown, the variable application system provided by the present invention is composed of a spraying component A, a camera component Ⅰ B1, a camera component Ⅱ B2, a control component C, a medicine box 1, a rear box 2, a frame and push rod component 3, and a traveling system 4. It is characterized in that the frame and push rod component 3 is installed above the traveling system 4, the medicine box 1 and the rear box 2 are respectively installed in front of and above and behind and above the frame and push rod component 3, the spraying component A is installed behind the frame and push rod component 3, the camera component Ⅰ B1 and the camera component Ⅱ B2 are installed above the spraying component A, and are respectively fixedly connected to the left and right halves of the hollow spray rod of the spraying component A through their respective bases Ⅰ; the spraying component A is composed of a hollow spray rod 5 and 15-20 spray heads of a spray head group 6, and the inlets of the 15-20 spray heads are communicated with the hollow spray rod 5.
[0063] As Figures 3 - 10As shown in the figure, the camera assembly ⅠB1 and the camera assembly ⅡB2 have the same structure, and both are composed of a guide rod assembly D, an orbital plate E, a fixture F, an upper rod 7, a spring 8, a height adjustment sleeve 9, a lower rod 10, a base Ⅰ11, a locknut 12, a limit pin 13, a camera 14 and a bolt group 15. The guide rod assembly D is composed of a support block 20, a connecting rod 21, a top plate 22, a middle plate 23, a base Ⅲ24 and a pair of side plates 25. A central hole 26 is provided on the middle plate 23. The top plate 22 and the middle plate 23 are arranged up and down. The left and right ends of the top plate 22 and the middle plate 23 are fixedly connected to the pair of side plates 25 respectively. The upper end of the top plate 22 is fixedly connected to the support block 20 through the connecting rod 21. The orbital plate E is composed of a cross plate 16, a base Ⅱ17 and a vertical plate 19. A pair of slots 18 are provided on the cross plate 16 and the vertical plate 19. The base Ⅱ17 is fixedly connected above the cross plate 16. The lower end of the vertical plate 19 is fixedly connected to the rear end of the cross plate 16. The pair of slots 18 extend from the position of the base Ⅱ17 on the cross plate 16 to the top of the vertical plate 19. The fixture F is composed of a flexible material 27, an upper pair of connecting rods 28, a lower pair of connecting rods 29, a driving body 30, a nut group 31 and a regulating rod 32. The upper part of the upper pair of connecting rods 28 is arc-shaped, and the middle part thereof is a 120-degree corner. The flexible material 27 is bonded to the arc-shaped part of the upper pair of connecting rods 28. The middle part of the upper pair of connecting rods 28 is hinged to the support block 20. The lower end of the upper pair of connecting rods 28 is hinged to the upper end of the lower pair of connecting rods 29. The lower pair of connecting rods 29 is hinged to the driving body 30. The driving body 30 is threadedly connected to the regulating rod 32. The regulating rod 32 passes through the central hole 26. The nut group 31 has a total of four nuts, which are respectively installed at the upper and lower ends of the driving body 30 and the middle plate 23 on the regulating rod 32.
[0064] The base Ⅰ11 is installed on the spray rod. The lower rod 10 is fixedly connected to the base Ⅰ11. There is a section of thread on the surface of the lower rod 10. 10 equally spaced screw holes are provided on the threaded part. The height adjustment sleeve 9 is threadedly connected to the lower rod 10. The height adjustment sleeve 9 is provided with a slot and 16 uniformly distributed limit pin holes. The slot is used to install the locknut 12.
[0065] The inner hole surface of the height adjustment sleeve 9 has a thread. By rotating the height adjustment sleeve 9, the position of the height adjustment sleeve 9 on the lower rod can be adjusted. After adjusting the position of the height adjustment sleeve 9, the locknut 12 can be installed in the slot of the height adjustment sleeve 9 and the locknut hole of the lower rod 10 to prevent the height adjustment sleeve 9 from shifting due to frequent vibration. As Figure 11 shown in the figure, to ensure that the locknut 12 can play an effective role, the dimensions of the parts need to meet the following formula:
[0066] L1 = L2 + R
[0067] Wherein: L1 is the length of the anti-loosening screw groove, L2 is the distance between the anti-loosening screw holes, R is the radius of the screw. When the part dimensions satisfy the formula, no matter what height the height adjustment sleeve 9 is at, as long as the anti-loosening screw groove and the anti-loosening screw holes are aligned, it can be ensured that at least one hole position can effectively install the anti-loosening screw 12.
[0068] The spring 8 is sleeved on the lower rod 10 and is located between the height adjustment sleeve 9 and the upper rod 7 to provide support for the upper rod 7. The upper rod 7 has an inner hole with a relatively large frictional force on its surface. The upper rod 7 is sleeved on the lower rod 10 and is supported by the spring 8. There is a relatively large damping between the inner hole of the upper rod 7 and the lower rod 10. When the hollow spray rod 5 vibrates, the lower rod 10 and the height adjustment sleeve 9 vibrate accordingly. The damping between the spring 8 and the inner hole of the upper rod 7 and the lower rod 10 will play a buffering role, thereby reducing the vibration of the upper rod 7, and further reducing the vibration of the camera 14, improving the imaging stability.
[0069] There is a small flange for installing the limit pin 13 at the lower part of the upper rod 7. The limit pin 13 passes through the small flange of the upper rod 7 and the limit pin hole in the height adjustment sleeve 9 to limit the rotation of the upper rod 7, and further limit and control the rotation of the camera 14 in the horizontal direction. The anti-loosening screw 12 simultaneously passes through the groove on the height adjustment sleeve 9 and the screw hole of the lower rod 10. The track plate E is fixedly connected to the upper end of the upper rod 7. The base III 24 in the guide rod assembly D and the base II 17 in the fixture F are hinged. The two side plates of the side plate pair 25 in the guide rod assembly D are respectively slidably connected to the two grooves 3 in the track plate E and are limited by the four bolts of the bolt group 15. The camera 14 is clamped by the flexible material 27 of the upper link pair 28 of the fixture E.
[0070] When installing the camera 14, first loosen the pair of nuts at the bottom in the nut group 31, then control the regulating rod 32 to move upward. The regulating rod 32 drives the driving body 30 to move upward, and then drives the upper link pair 28 to rotate through the lower link pair 29, so that the space at the position of the flexible material 27 is enlarged. Then place the camera 14 between the flexible materials 27 of the upper link pair 28, pull down the regulating rod 32 so that the upper link pair 28 clamps the camera 14 tightly, and then tighten the nut group 31 to complete the installation of the camera 14. This system can work bidirectionally, enabling the camera to rotate 180 degrees in the horizontal plane direction, and the variable rate spraying system to change direction, thus realizing the change of the field of view and the working direction.
[0071] As Figure 12 shown, adjust the guide rod assembly D so that the distance Ld between the rearmost of the field of view projection of the camera 14 in the imaging assembly IB1 and the imaging assembly IIB2 and the perpendicular line of the nozzle of the nozzle group 6 is αv0t d , wherein: α is a correction coefficient, the default value of α is taken as 1.2, v0 is the rated forward speed of this system, t d is the delay time for weed detection, flow calculation and data transmission, and take 1.2 times of v0t dLd can still play a role when the system works too slowly or too fast.
[0072] like Figure 13 As shown, the control component C is composed of a Raspberry Pi 33, a wheel speed sensor 34, an Arduino 35, a relay group 36, a power supply 37, a solenoid valve group 38, a relief valve 39 and a hydraulic pump 40. The Raspberry Pi 33, the Arduino 35 and the relay group 36 are installed on the right side of the frame and push rod assembly 3, the wheel speed sensor 34 is installed in the wheel of the walking system 4, the power supply 37, the relief valve 39 and the hydraulic pump 40 are installed in the rear box 2, and the solenoid valve group 38 is installed on the hollow spray rod 5, and is respectively connected to a single nozzle in the nozzle group 6 and a pipe on the hollow spray rod 5.
[0073] The camera 14 is used to collect image data and transmit the data to the Raspberry Pi 33 through a communication line. The Raspberry Pi 33 is used as the upper computer of the system to carry the field weed detection model and predict and count the field weed data, and transmit the statistical results to the Arduino 35 lower computer. The Arduino 35 is used as the lower computer of the system and is connected to the Raspberry Pi 33 and the relay group 36 through the communication line. The relay group 36 establishes a communication line with the solenoid valve group 38 and is used as a control and conversion circuit. The Arduino 35 controls the opening and closing of the solenoid valve group 38 through the relay group 36 according to the statistical data transmitted by the Raspberry Pi 33. The wheel speed sensor 34 is installed on the wheel On the wheel of the walking system 4, the wheel speed information is transmitted to Arduino35 in real time. Arduino35 calculates the displacement of the system in real time according to the wheel speed. The power supply 37 is a 24V power supply, which provides power for each component of the system. The solenoid valve group 38 is controlled by Arduino35 and connected to the nozzle to control the opening and closing of the liquid medicine channel. The nozzle group 6 sprays and atomizes the liquid medicine. The hydraulic pump 40 connects the medicine box 1 and the solenoid valve group 38, which is responsible for transporting the liquid medicine from the medicine box 1 to the nozzle group 6. The overflow valve 39 connects the downstream of the hydraulic pump 40 with the medicine box 1 to prevent excessive pressure in the hydraulic pipeline and protect the safety of the hydraulic system. The medicine box 1 is used to store liquid medicine.
[0074] like Figure 14 , Figure 19 and Figure 20 As shown, the present invention provides a method for detecting weeds in a field and applying a variable amount of pesticide, comprising the following steps:
[0075] 1) Build a field weed detection model based on improved YOLOv8;
[0076] 1.1 Use a camera to capture images of weeds in the field and collect field weed image data; remove low-quality data, annotate the weeds in the images, and divide the data into training set, validation set, and test set in a ratio of 8:1:1;
[0077] 1.2 Build a field weed detection model based on the improved YOLOv8 model, and train and deploy the field weed detection model, including the following steps:
[0078] 1.2.1 The field weed detection model is based on the YOLOv8n model;
[0079] 1.2.2 As Figure 15 shown, replace CBS and C2f in the backbone network and the neck network with GhostCBS and C2fGhost respectively, where GhostCBS replaces the Conv in the original CBS with GhostConv; as Figure 16 shown, C2fGhost is composed of 2-6 G-bneck modules, and the G-bneck modules are stacked by Ghost modules; the main body of the Ghost module is GhostConv, and GhostConv is composed of Conv, grouped convolution, and identity mapping;
[0080] 1.2.3 Replace the feature fusion module with the optimized weighted bidirectional feature pyramid fusion network BiFPN_Contact2 to enhance the model's feature extraction ability and improve the model's detection accuracy; introduce TripletAttention before Detect3 to effectively improve the model's performance by capturing cross-dimensional interaction information; as Figure 17 shown, the optimized weighted bidirectional feature pyramid fusion network BiFPN_Contact2 changes the number of layers of the original BiFPN from five-in-five-out to three-in-three-out to adapt to the output channel number of the model framework, and adds skip connections in the connections of P3 and P4 layers to improve the training performance of the model, prevent network degradation, and the connection method of features uses Concat splicing;
[0081] As Figure 18As shown, the Triplet Attention; the Triplet Attention consists of 3 branches. For the first branch, first rotate the input tensor X counterclockwise by 90° along the height H, then perform the Z-Pool pooling operation, and reduce the dimension of the channel width W to 2, that is, obtain the maximum eigenvalue and the average eigenvalue in the dimension. Then, pass this two-dimensional tensor through a standard convolutional layer Conv with a convolutional kernel size of k×k, perform batch normalization processing, and then pass through a sigmoid activation layer to generate attention weights, and rotate the output tensor clockwise by 90° along the height H or width W in the first step to keep the output tensor the same size as the input tensor X. For the second branch, first rotate the input tensor X counterclockwise by 90° along the width W, then perform the Z-Pool pooling operation, reduce the dimension of the channel height H to 2, and then the processing method is the same as that of the first branch. In the third branch, the rotation operation is removed. First, directly reduce the channels of the input tensor X to 2 through the Z-Pool pooling layer, then pass through a standard convolutional layer Conv with a convolutional kernel size of k, perform batch normalization processing, and the output tensor passes through the sigmoid activation layer to generate attention weights with a size of 1×H×W. Finally, take the average value of the output tensors of the three branches to obtain the tensor Y;
[0082] 1.2.4 Use the training set and the validation set, and train the model with Wise-IoU v3 as the loss function; Wise-IoU v3 used in the training process improves the convergence efficiency and the model generalization ability of the model. The calculation formula of Wise-IoU v3 is:
[0083] L WI o U v3=rR WI o U L I o U
[0084]
[0085]
[0086] In the formula: Wg represents the width of the minimum bounding rectangle of the predicted box and the ground truth box, Hg represents the height of the minimum bounding rectangle of the predicted box and the ground truth box, * represents separating Wg and Hg from the computational graph, β represents the outlier degree, R represents the non-monotonic focusing coefficient, α and δ represent hyperparameters, represents the monotonic focusing coefficient, represents the moving average value of the momentum m;
[0087] 1.3 Deploy the model with the highest accuracy on the validation set during the training process to the Raspberry Pi 33 of the variable spraying system;
[0088] 2) Divide and calibrate the image area, including the following steps:
[0089] 2.1 Measure the ground spraying range of a single nozzle, and use the smallest circumscribed rectangle of the nozzle spraying range as the size of sub-region W ij ;
[0090] 2.2 According to the size of sub-region W ij Paint or colored powder is used to divide a certain range of the ground into uniformly sized sub-regions W ij on the flat ground, where i represents the area serial number from below the nozzle to the front of the system in the system forward direction, i = 1, 2 ······ n, and j represents the area serial number from left to right in the boom direction, j = 1, 2 ······ 17;
[0091] 2.3 Use camera 14 to take pictures of the divided sub-regions;
[0092] 2.4 Use the paint or colored powder in the picture to divide the picture into regions, and correspond and calibrate the ground sub-region W ij with the image sub-region S ij one by one, calibrate the nozzle corresponding to each image sub-region S ij and calibrate the distance L from each image sub-region to below the nozzle i ;
[0093] 3) The spraying method of the variable spraying system, including the following steps:
[0094] 3.1 Start the variable spraying system and initialize it. The execution parameters and preparatory parameters in the system are initialized to 0. The execution parameters are the parameters based on when spraying; the preparatory parameters are the parameters stored after calculation and transmission. Raspberry Pi 33 is used as the upper computer to load the field weed detection model;
[0095] 3.2 Use camera 14 to obtain the field image and transfer the field image to Raspberry Pi 33. At the same time, Arduino 35 updates the first timing program t1, calculates the speed v of the variable spraying system according to the signal of the wheel speed sensor 34, and calculates the moving distance l1, l1 = t1v;
[0096] 3.3 Use the field weed detection model in Raspberry Pi 33 to detect the field image, and count the number of weeds K ij in each image sub-region S ij ;
[0097] 3.4 Divide the number of weeds K ij into six levels: 0, 1, 2, 3, 4, and ≥5. When K ij = 0, the expected spraying flow rate Q ij of each sub-region W ijSet to 0, the number of weeds K ij For each level increase, the expected spraying flow rate Q ij Increase the rated flow rate of the nozzle by one-fifth, and the Raspberry Pi 33 will set the spraying flow rate Q ij Send it to the Arduino 35 as a preliminary parameter;
[0098] 3.5 While the Raspberry Pi 33 is making a prediction, the Arduino 35 sprays according to the execution parameters. At startup, since the initial parameter is 0, the spraying amount is 0, that is, no spraying is performed;
[0099] 3.6 When l1 = Ld, the nozzle position reaches the spraying area corresponding to the bottom of the image. At this time, update the second timing program t2, and the original preliminary parameter becomes the execution parameter;
[0100] 3.7 Calculate the moving distance l2 in real time, l2 = vt2, and based on l2 and the calibrated L i Judge the sub-region S corresponding to the nozzle in real time ij and adjust the PWM of each solenoid valve of the solenoid valve group 38 according to the corresponding expected spraying flow rate Q ij to adjust the spraying amount;
[0101] 3.8 When the moving distance l1 = Lw, where Lw is the actual distance of the effective viewing area of the camera, the Raspberry Pi 33 executes step 3.2 again. The Raspberry Pi 33 enters the next cycle, and the Arduino 35 continues to execute the spraying program according to the execution parameters;
[0102] 3.9 When l2 = Lw, that is, l1 = Ld, the t2 and execution parameters in the Arduino 35 are updated, and the Arduino 35 enters the next cycle.
Claims
1. A variable dosing system is composed of a spraying component (A), a camera component I (B1), a camera component II (B2), a control component (C), a medicine box (1), a rear box (2), a frame and push rod assembly (3), and a traveling system (4). The frame and push rod assembly (3) is installed above the traveling system (4). The medicine box (1) and the rear box (2) are respectively installed in front of and above, and behind and above the frame and push rod assembly (3). The spraying component (A) is installed behind the frame and push rod assembly (3). The camera component I (B1) and the camera component II (B2) are installed above the spraying component (A); It is characterized in that, The described spraying component (A) consists of a hollow spray boom (5) and 15 - 20 nozzles of the nozzle group (6). The inlets of the 15 - 20 nozzles are communicated with the hollow spray boom (5); The camera component I (B1) and the camera component II (B2) are respectively fixed to the left and right halves of the hollow spray boom of the spraying component (A) through their respective bases I; The camera component I (B1) and the camera component II (B2) have the same structure and are both composed of a guide rod component (D), an orbital plate (E), a fixture (F), an upper rod (7), a spring (8), a height - adjusting sleeve (9), a lower rod (10), a base I (11), screws (12), a limit pin (13), a camera (14) and a bolt group (15); The guide rod component (D) consists of a support block (20), a connecting rod (21), a top plate (22), a middle plate (23), a base III (24) and a pair of side plates (25). A central hole (26) is provided on the middle plate (23). The top plate (22) and the middle plate (23) are arranged vertically. The left and right ends of the top plate (22) and the middle plate (23) are respectively fixed to the two side plates of the pair of side plates (25). The upper end of the top plate (22) is fixed to the support block (20) through the connecting rod (21); The orbital plate (E) consists of a cross - plate (16), a base II (17) and a vertical plate (19). Two slots of a slot pair (18) are provided on the cross - plate (16) and the vertical plate (19); The base II (17) is fixed to the upper surface of the front end of the slot pair (18) in the cross - plate (16), and the lower end of the vertical plate (19) is fixedly connected to the rear end of the cross - plate (16) at a right angle; The fixture (F) consists of a flexible material (27), an upper pair of connecting rods (28), a lower pair of connecting rods (29), a connecting - rod driving body (30), a nut group (31) and a fixture regulating rod (32). The upper part of the upper pair of connecting rods (28) is arc - shaped, and its middle part has a 120 - degree corner. The flexible material (27) is bonded inside the arc - shaped part of the upper pair of connecting rods (28). The middle part of the upper pair of connecting rods (28) is hinged to the support block (20). The lower end of the upper pair of connecting rods (28) is hinged to the upper end of the lower pair of connecting rods (29). The lower ends of the lower pair of connecting rods (29) are respectively hinged to the left and right ends of the connecting - rod driving body (30). The connecting - rod driving body (30) is threadedly connected to the upper part of the regulating rod (32). The lower part of the fixture regulating rod (32) passes through the central hole (26). The nut group (31) consists of four nuts, which are respectively threadedly connected to the fixture regulating rod (32) from top to bottom. The upper two nuts are respectively located on the upper and lower sides of the connecting - rod driving body (30), and the lower two nuts are respectively located on the upper and lower sides of the middle plate (23); The lower rod (10) is fixed to the base I (11). Threads are provided on the middle - surface of the lower rod (10), and 10 equally - spaced screw holes are provided on the threaded part; The height - adjusting sleeve (9) is provided with a slot and 16 equally - distributed limit - pin holes and is threadedly connected to the middle part of the lower rod (10);The spring (8) is sleeved on the upper part of the lower rod (10) and is located between the height adjustment sleeve (9) and the upper rod (7). The upper rod (7) is sleeved on the lower rod (10). A flange is provided at the front part of the lower end of the upper rod (7). The limit pin (13) passes through the flange of the upper rod (7) and the limit pin hole of the height adjustment sleeve (9). The screw (12) passes through the slot on the height adjustment sleeve (9) and the screw hole of the lower rod (10) at the same time. The upper end of the upper rod (7) is fixedly connected to the lower surface of the front part of the middle cross plate (16) of the track plate (E). The base III (24) in the guide rod assembly (D) and the base II (17) in the fixture (F) are hinged. The two side plates of the side plate pair (25) in the guide rod assembly (D) are respectively slidably connected to the two slots of the slot pair (18) in the track plate (E) and are limited by the four bolts of the bolt group (15). The camera (14) is clamped by the flexible material (27) of the upper connecting rod pair (28) in the fixture (F). The control assembly (C) is composed of a Raspberry Pi (33), a wheel speed sensor (34), an Arduino (35), a relay group (36), a power supply (37), a solenoid valve group (38), a relief valve (39) and a hydraulic pump (40). The Raspberry Pi (33), the Arduino (35) and the relay group (36) are installed on the right side of the frame and the push rod assembly (3). The wheel speed sensor (34) is installed in the wheels of the traveling system (4). The power supply (37), the relief valve (39) and the hydraulic pump (40) are installed in the rear box (2). The solenoid valve group (38) is installed on the hollow spray boom (5) and is respectively communicated with 15-20 nozzles of the nozzle group (6).; 2. The variable application system according to claim 1, characterized in that The distance Ld between the rearmost point of the field of view projection of the camera (14) in the imaging component Ⅰ (B1) and the imaging component Ⅱ (B2) and the perpendicular line of the nozzle of the nozzle group (6) is αv0t d , where: α is a correction coefficient, the default value of α is 1.2, v0 is the rated forward speed of this system, and t d is the delay time for weed detection, flow calculation and data transmission.
3. A method for detecting field weeds and variable-rate spraying based on the variable-rate spraying system described in claim 1, characterized in that, It includes the following steps: 1) Construct a field weed detection model based on the improved YOLOv8; 1.1 Collect and process field weed data, and divide the data into a training set, a validation set, and a test set according to a ratio of 8:1:1; 1.2 Construct a field weed detection model based on the improved YOLOv8 model and train the field weed detection model, including the following steps: 1.2.1 The field weed detection model is based on the YOLOv8n model; 1.2.2 Replace CBS and C2f in the backbone network and the neck network with GhostCBS and C2fGhost respectively, where GhostCBS replaces Conv in the original CBS with GhostConv; C2fGhost consists of 2 - 6 G-bneck modules, and the G-bneck module is stacked by Ghost modules; the main body of the Ghost module is GhostConv, and GhostConv consists of Conv, grouped convolution, and identity mapping; 1.2.3 Replace the feature fusion module with the optimized weighted bidirectional feature pyramid fusion network BiFPN_Contact2, and introduce Triplet Attention before Detect3. The optimized weighted bidirectional feature pyramid fusion network BiFPN_Contact2 changes the number of layers of the original BiFPN from five-in-five-out to three-in-three-out, and adds skip connections in the connections of P3 and P4 layers. The connection method of features uses Concat splicing; 1.2.4 Use the training set and the validation set, and train the model with Wise-IoU v3 as the loss function; 1.3 Deploy the model with the highest accuracy on the validation set during the training process to the Raspberry Pi (33) of the variable rate spraying system; 2) Divide and calibrate the image area, including the following steps: 2.1 Measure the ground spraying range of a single nozzle, and use the smallest circumscribed rectangle of the nozzle spraying range as the sub-region W ij in size; 2.2 According to the size of the sub-region W ij On a flat ground, use paint or colored powder to divide a certain range of the ground into sub-regions W with uniform areas ij , where i represents the area serial number from below the nozzle to the front of the system in the system's forward direction, i = 1, 2 ······ n; j represents the area serial number of the hollow spray rod (5) from left to right, j = 1, 2 ······ 17; 2.3 Use the camera (14) to align and take pictures of the divided sub-areas; 2.4 Use the paint or colored powder in the picture to divide the area of the picture and obtain the sub-region W of the ground ij which corresponds one-to-one with the image sub-region S ij and calibrate them. Calibrate each image sub-region S ij to the corresponding nozzle, and calibrate the distance L from each image sub-region to the area below the nozzle i ; 3) The spraying method of the variable rate spraying system, including the following steps: 3.1 Start the variable rate spraying system and initialize it. The execution parameters and preparatory parameters in the system are initialized to 0. The execution parameters are the parameters based on when spraying; the preparatory parameters are the parameters stored first after calculation and transmission. The Raspberry Pi (33) is used as the upper computer to load the field weed detection model; 3.2 Use the camera (14) to obtain the field image and transfer the field image to the Raspberry Pi (33). At the same time, Arduino (35) updates the first timing program t1, and calculates the speed v and the moving distance l1 of the variable rate spraying system according to the signal of the wheel speed sensor (34), l1 = t1v; 3.3 Detect the field images using the field weed detection model in the Raspberry Pi (33), and count the number of weeds K in each image sub-region S according to the detection results ij inside ij ; 3.4 Divide the weed number K ij into six levels: 0, 1, 2, 3, 4, and ≥5. When K ij = 0, the expected spraying flow rate Q ij for each sub-region W ij is set to 0. For each level increase in the weed number K ij , the expected spraying flow rate Q ij increases by one-fifth of the nozzle rated flow rate. The Raspberry Pi (33) sends the spraying flow rate Q ij to the Arduino (35) as a preparatory parameter; 3.5 While the Raspberry Pi (33) is making predictions, Arduino (35) sprays according to the execution parameters. When it is just started, since the initial parameters are 0, the spraying amount is 0, that is, no spraying is carried out; 3.6 When l1 = Ld, the nozzle position reaches the spraying area corresponding to the bottom of the image. At this time, update the second timing program t2, and the original preparatory parameters become the execution parameters; 3.7 Real-time calculation of the moving distance l2, l2 = vt2, based on l2 and the calibrated L i Real-time judgment of the sub-region S corresponding to the nozzle ij , and according to the corresponding desired application flow rate Q ij , control the PWM of each solenoid valve of the solenoid valve group (38) to adjust the application amount; 3.8 When the moving distance l1 = Lw, where Lw is the actual distance of the effective visual field area of the camera, the Raspberry Pi (33) executes step 3.2 again, the Raspberry Pi (33) enters the next loop, and the Arduino (35) continues to execute the drug application program according to the execution parameters; 3.9 When l2 = Lw, that is, l1 = Ld, the t2 and execution parameters in the Arduino (35) are updated, and the Arduino (35) enters the next loop.