Field flax plant number statistical method based on deep learning target detection
Through deep learning object detection and image stitching technology, combined with drone shooting and flax growth point detection model, the problem of high-density planting flax plant count is solved, and efficient and accurate plant count statistics are achieved.
Patent Information
- Application Number
- CN202411399880.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-03-14
AI Technical Summary
The existing technology is difficult to effectively count the number of high-density planted flax plants. Traditional manual measurements are time-consuming and labor-intensive and error-prone. Most existing machine learning-based methods are not suitable for high-density planting crops.
Using a deep learning-based object detection method, a panoramic image of field flax plants was taken through low-speed and low-flying drones, high-resolution frontal imaging was generated using image stitching technology, and a flax growth point detection model was trained for statistics.
It improves the resolution and accuracy of flax plant count statistics, is suitable for high-density planting crops, and solves the problems of low efficiency and large errors of traditional methods.
Smart Images

Figure CN119625564A_ABST
Abstract
Description
Technical Field
[0001] The invention discloses a method for counting the number of flax plants in a field based on deep learning target detection. Background Art
[0002] Flax is ( Common flax L.) is a genus of the family Linaceae ( Linen ) is an annual herb and an important fiber and oil crop. Compared with natural fibers such as cotton and wool, flax fiber has the advantages of strong hygroscopicity, high mechanical strength, and low static electricity, so it is often used as high-end clothing fabrics. Flax seeds can be used for oil extraction. Flax seed oil is rich in α-linolenic acid, which is much higher than other oil crops and has high nutritional value. Therefore, planting flax has high economic benefits.
[0003] The number of crop plants can reflect the planting conditions of crops in the field and is an important factor affecting crop yields. It can provide data support for predicting crop yields in advance and calculating economic benefits. The traditional manual plant number measurement method is not only time-consuming and labor-intensive, but also inefficient and may have large errors. The existing crop plant number measurement methods based on machine learning are mostly suitable for crops with low planting density and tall plants, such as corn. Flax has slender stems and is a high-density planted crop, so high requirements are placed on the flax plant number statistical method. At present, there is no good way to measure the number of flax plants. Summary of the invention
[0004] In order to overcome the shortcomings of the prior art, the object of the present invention is to provide a method for counting the number of flax plants in the field based on deep learning target detection.
[0005] The technical solution for achieving the purpose of the present invention is as follows: A method for counting flax plants in a field based on deep learning target detection, comprising the following steps: 1) Test shooting to determine the flight speed; 2) Completely scan the seedling field; 3) Image stitching; 4) Divide the panoramic image into R rows and C columns, a total of R*C small images; 5) Flax growth point detection model training method.
[0006] 1) Test shooting to determine the flight speed: 1.1) Define the scanning area, plan a rectangular area, and use the drone to scan in a zigzag shape; 1.2) The flight altitude should not be lower than the tallest flax plant, and the camera should be flown at a low speed and at a constant frame rate; 1.3) Determine the center area of the picture, manually browse multiple images selected at random, and frame the center area of the square; 1.4) Randomly select two images taken at adjacent times and make sure that the central areas have a quarter of the overlap area.
[0007] 2) Complete scanning of the seedling field: The seedling field is scanned line by line at the flight speed V and shooting frame rate h determined during the test flight, with a row spacing of V / h.
[0008] 3) Image stitching: using the overlapping areas of temporally adjacent frames, all images are seamlessly stitched into a panoramic image of the seedling field.
[0009] The above 4) divides the panoramic image into R rows and C columns, with a total of R*C small images.
[0010] 5) Flax growth point detection model training method: The length and width of each small picture are between 0.8 S and 1 S, where S is pixel. The picture size is adjusted to SxS and sent to the growth point detection model to obtain the number of flax growth points contained in each small picture.
[0011] 5) Flax growth point detection model training method: The images of the central areas with differences were collected and manually annotated. Rectangles were used to mark the locations of all the flax growth points in the images. The images were divided into training set and validation set in a ratio of 9:1. A growth point detection model was obtained based on deep learning training.
[0012] The beneficial effects of the present invention are: Existing crop plant number measurement methods based on machine learning are mostly suitable for crops with low planting density. This method uses ultra-low height and low-speed scanning to greatly improve the shooting resolution. By intercepting and splicing the images of the central area, high-resolution frontal imaging of densely planted crops is obtained. On this basis, target detection is performed, and the problem of plant number measurement of densely planted crops is properly handled. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a schematic diagram of manual annotation of flax detection in the central area. DETAILED DESCRIPTION
[0014] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0015] A method for counting flax plants in the field based on deep learning target detection is as follows: 1. Test shooting to determine the flight speed 1.1) Define the scanning area. The flax seedling field is generally rectangular. If it is non-rectangular, a rectangular area can be manually planned to include the seedling field to facilitate the Z-shaped scanning of the drone.
[0016] 1.2) Test shooting at low speed and low altitude. Because flax is densely planted, the drone needs to fly at a low altitude to ensure resolution. The flight altitude should not be lower than the highest flax plant. After determining the altitude, fly at a low speed and shoot at a constant frame rate. For example, shoot at 5m / s and 10 Hz. The test flight only needs to shoot for about ten seconds.
[0017] 1.3) Determine the center area of the image. Due to the flight altitude limit, the camera can only shoot the growth points in the center area directly, such as Figure 1 As shown in the red box. Manually browse multiple images selected at random, frame the center area, and try to ensure that the center area is a square. Take the average value as the final center area. If the length and width are inconsistent, take the shorter one as the side length of the square center area.
[0018] 1.4) Randomly select two images taken at adjacent times and make sure that their central areas overlap by a quarter of their area. If the current speed does not meet the requirement, reduce the flight speed until the overlap requirement is met.
[0019] 2. Completely scan the seedling field The seedling field is completely scanned at the flight speed V and shooting frame rate h determined during the test flight. The recommended scanning method is line-by-line scanning with a line spacing of V / h.
[0020] 3. Image stitching The flight parameters obtained from the test flight have ensured that the central areas of adjacent frames have a quarter overlap area, and the central areas of the same column also have a quarter overlap area. Using these overlapping areas, all images are seamlessly stitched into a panoramic image of the seedling field. There are many stitching methods available, such as the open source OpenCV image stitching. To improve the stitching efficiency, the positioning information saved during shooting can be used to stitch only the images in the neighborhood.
[0021] 4. Divide the panoramic image into R rows and C columns, a total of R*C small images The length and width of each small picture are between 0.8S and 1S. Adjust the picture size to SxS and send it to the growth point detection model to get the number of flax growth points contained in each small picture. This step can be performed multiple times, for example, divided into R±1 rows and C columns, R rows and C±1 columns, etc. The final result is averaged to detect the inspection error. Among them, S is in pixels, and a feasible value is 512.
[0022] 5. Flax growth point detection model training The flax growth point inspection model uses CenterNet or other target detection models. Collect pictures of the central area with differences, it is recommended to have at least 10,000 pictures, and manually annotate them, using rectangles to mark the locations of all flax growth points in the pictures. Divide the pictures into training sets and validation sets in a certain ratio, such as 9:1, and obtain a growth point detection model based on deep learning training. The growth point detection model receives pictures of size SxS and outputs the locations of the growth points in the pictures, which are represented by rectangular boxes. The specific training methods are relatively mature in academia and industry, and can be referred to in the relevant literature, which will not be repeated here. The data collection and training steps only need to be performed once, and the resulting model can be used continuously.
[0023] The embodiments described above can be further combined or replaced, and the embodiments are only descriptions of preferred embodiments of the present invention, and do not limit the concept and scope of the present invention. Without departing from the design concept of the present invention, various changes and improvements made by ordinary technicians in this field to the technical solution of the present invention belong to the protection scope of the present invention. The protection scope of the present invention is given by the attached claims and any equivalents thereof.
Claims
1. A method for counting flax plants in the field based on deep learning target detection, characterized in that: include: 1) Test shooting to determine the flight speed; 2) Completely scan the seedling field; 3) Image stitching; 4) Divide the panoramic image into R rows and C columns, a total of R*C small images; 5) Flax growth point detection model training method.
2. The method for counting the number of flax plants in the field based on deep learning target detection according to claim 1 is characterized in that: 1) Test shooting to determine the flight speed: 1.1) Define the scanning area, plan a rectangular area, and use the drone to scan in a zigzag shape; 1.2) The flight altitude should not be lower than the tallest flax plant, and the camera should be flown at a low speed and at a constant frame rate; 1.3) Determine the center area of the picture, manually browse multiple images selected at random, and frame the center area of the square; 1.4) Randomly select two images taken at adjacent times and make sure that the central areas have a quarter of the overlap area.
3. The method for counting the number of flax plants in the field based on deep learning target detection according to claim 1 is characterized in that: 2) Completely scan the seedling field: The seedling field is scanned line by line at the flight speed V and shooting frame rate h determined during the test flight, with a row spacing of V / h.
4. The method for counting the number of flax plants in the field based on deep learning target detection according to claim 1, characterized in that: 3) Image stitching: Using the overlapping areas of temporally adjacent frames, all images are seamlessly stitched into a panoramic image of the seedling field.
5. The method for counting flax plants in the field based on deep learning target detection according to claim 1, characterized in that: 4) Divide the panoramic image into R rows and C columns, with a total of R*C small images.
6. The method for counting the number of flax plants in the field based on deep learning target detection according to claim 1, characterized in that: 5) Flax growth point detection model training method: The length and width of each small picture are between 0.8 S and 1 S, where S is pixel. The picture size is adjusted to SxS and sent to the growth point detection model to obtain the number of flax growth points contained in each small picture.
7. The method for counting the number of flax plants in the field based on deep learning target detection according to claim 1, characterized in that: 5) Flax growth point detection model training method: The images of the central areas with differences were collected and manually annotated. Rectangles were used to mark the locations of all the flax growth points in the images. The images were divided into training set and validation set in a ratio of 9:
1. A growth point detection model was obtained based on deep learning training.