Method, system and equipment for evaluating corn emergence rate based on deep learning
Patent Information
- Application Number
- CN202310670879.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2043-06-07
AI Technical Summary
[0004]为至少在一定程度上克服相关技术中传统的玉米出苗率评估方法主要依赖于人工观察和统计,存在着易受主观因素影响、效率低、准确度差的问题,本申请提供基于深度学习的玉米出苗率的评估方法、系统及设备
[0055] This application uses the corn seedling emergence situation image that meets the first threshold size and inputs it into the pre-constructed target detection model to obtain the position information of the surrounding frame of each corn seedling and the center point coordinate of the surrounding frame; uses the above-mentioned obtained position information and the center point coordinate of the surrounding frame to calculate the image rotation matrix and row spacing. Using the above-mentioned calculation results, the average plant distance is obtained through the plant distance, and the average plant distance is used to calculate the emergence rate statistics to obtain the relevant evaluation results of the corn seedling rate. This application performs deep learning through the object detection model and preset rules to achieve rapid, accurate and non-destructive assessment of corn seedling emergence rate, improving the accuracy and objectivity of the assessment.
Smart Images

Figure CN116721366B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of crop emergence rate statistics, and in particular to a method, system and device for evaluating corn emergence rate based on deep learning. Background Art
[0002] With the development of modern agriculture, corn planting has become an important economic crop in my country. However, due to differences in soil, climate, seed quality and other factors, there are large differences in corn emergence rate, which affects the yield and quality of corn. Therefore, accurate evaluation of corn emergence rate has important practical significance and economic benefits.
[0003] The traditional corn emergence rate assessment method mainly relies on manual observation and statistics, which has problems such as being easily affected by subjective factors, low efficiency and poor accuracy. Summary of the invention
[0004] In order to at least to some extent overcome the problems that the traditional corn emergence rate evaluation method in the related art mainly relies on manual observation and statistics, is easily affected by subjective factors, has low efficiency and poor accuracy, the present application provides a corn emergence rate evaluation method, system and equipment based on deep learning.
[0005] The scheme of this application is as follows:
[0006] In a first aspect, the present application provides a method for evaluating corn emergence rate based on deep learning, the method comprising:
[0007] Collect an image set of corn seedling emergence;
[0008] Using the image set of the corn seedling emergence condition, cutting into images of the corn seedling emergence condition at the stage that meet the first threshold size;
[0009] The corn seedling emergence image that meets the first threshold value is used as input into a pre-built target detection model to obtain the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame;
[0010] Using the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame, the image rotation matrix is calculated according to a first preset rule;
[0011] Using the result of calculating the image rotation matrix and the coordinates of the center point of the bounding box, the line spacing is calculated according to a second preset rule;
[0012] Using the result of the row spacing calculation, the plant spacing is calculated according to a third preset rule to obtain an average plant spacing;
[0013] The average plant spacing is used to perform seedling emergence rate statistics to obtain relevant evaluation results of the corn seedling emergence rate.
[0014] Furthermore, the image rotation matrix is calculated by using the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame according to a first preset rule, including:
[0015] Using the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame, the pixel values within the range of all the enclosing frames are set to 1, and the pixel values outside the range of the enclosing frames are set to 0, so as to obtain a binary image;
[0016] Using the binary image, rotating the binary image in the same direction by a degrees, where a=1, 2, ..., 90;
[0017] Calculate the sum of the pixels in each column of the rotated image, and the result is recorded as Where i is the number of columns of the rotated image, i = 1, 2, ..., 1024, ... n, and a is the rotation angle;
[0018] Put the sum of each column of the image rotated by a degrees into the pre-constructed first data set Set a middle,
[0019] In order from largest to smallest, a Sort the elements in , denoted by
[0020] right The sum of the first 300 elements of The summation result is stored in a pre-constructed second data set.
[0021] Get the maximum value in sumSet Get the maximum value The rotation angle a′ in , where the rotation angle a′ is the optimal rotation angle, and the image rotation matrix is obtained through this angle.
[0022] Furthermore, the use of the result of calculating the image rotation matrix and the coordinates of the center point of the bounding box to calculate the line spacing according to a second preset rule includes:
[0023] Using the center point coordinates of the bounding box, the image rotation matrix is rotated in the same direction by a preset angle to obtain the new center point coordinates (col′ i ,row′ i );
[0024] The column coordinates col′ of the new center point coordinates of all bounding boxes iSort from small to large, and store the sorted column coordinates in the pre-built third data set colset sorted ={col″1,col″2,…,col″ i ,…}, the corresponding center point coordinates are stored in the pre-constructed fourth data set pointSet = {(col"1,row"1),(col"2,row"2),…,(col" i ,row″ i ),…}, where i is the number of the bounding box after sorting, i = 1, 2,…, n;
[0025] Using the sorting result, the distance between two adjacent corn seedlings after sorting is calculated using Formula 1, and the distance is set as dis i , and store the distance in a preset fifth data set distSet = {dis1, dis2, ..., dis i ,…}middle;
[0026] dis i =col" i -col″ i+1 (i=1,2,..,n-1) (1);
[0027] Among them, dis i Indicates the pixel distance between the i-th seedling and the i+1-th seedling in the row direction, col″ i Indicates the column coordinate of the i-th seedling after sorting, cil″ i+1 represents the column coordinates of the i+1th seedling after sorting;
[0028] Sort the elements in the fifth data set distSet in descending order, denoted as distSet sorted ;
[0029] Get distSet sorted The first 6 elements in are taken and their average value is calculated as the average line spacing to obtain the result of line spacing calculation.
[0030] Furthermore, the method of using the result of the row spacing calculation to calculate the plant spacing according to a third preset rule to obtain an average plant spacing includes:
[0031] Single elements are sequentially taken out from the fifth data set distSet in order and compared with 3 / 4 times the average line spacing. If the single element is larger than 3 / 4 times the average line spacing, the single element is stored in the pre-constructed sixth data set breakSet={k0,k1,k2,…,k m-1 ,k m}, where k0 = 0, {k1, k2, …, k m-1} is the number of all elements greater than 3 / 4 times the line spacing, k m =n, n is the total number of bounding boxes, i.e. the maximum number;
[0032] The elements in the fourth data set pointSet are grouped using the number of the sixth data set as the dividing point, wherein the elements with numbers greater than k0 and less than or equal to k1 are the first group, the elements with numbers greater than k1 and less than or equal to k2 are the second group, and so on. m-1 and less than or equal to k m The last group is denoted by
[0033] The points in each group represent the coordinates of the corn seedlings located on the same ridge. The average value of the column coordinates of all the points in each group is calculated as the column coordinates of the center position of the corresponding ridge.
[0034] Using the coordinates of the corn seedlings on the same ridge, the row coordinates of all points therein are sorted, and the sorting results are stored in the seventh data set constructed in advance. where i = 1, 2, …, v u ,v u is the number of corn seedlings in the uth ridge;
[0035] Using the seventh data set Calculating the absolute value of the difference between the adjacent row coordinates as the distance between two adjacent corn plants, and storing the distance in a pre-constructed eighth data set, wherein the eighth data set is a data collection storing the distances between all two adjacent corn plants;
[0036] The eighth data set is used to calculate the average or median of all distance data to obtain the average plant spacing.
[0037] Furthermore, the average plant spacing is used to perform seedling emergence rate statistics to obtain relevant evaluation results of corn seedling emergence rate, including:
[0038] The average plant spacing is used to count the number of missing seedlings using Formula 2;
[0039] M ui =round(D ui / AD+0.5)-1 (2);
[0040] Among them, M ui is the number of missing corn seedlings between the i-th and i+1-th corn plants in the u-th ridge, D ui is the distance between the i-th and i+1-th corn plants in the u-th ridge, AD is the average plant distance, and round() is the rounding function;
[0041] The germination rate is calculated by using the statistical result of the number of missing seedlings and the total number of seedlings detected in advance through Formula 3 to obtain the relevant evaluation result of the corn germination rate;
[0042] Seedling emergence rate = number of emerged seedlings / (number of emerged seedlings + number of missing seedlings) × 100% (3).
[0043] In a second aspect, the present application provides a corn emergence rate evaluation system based on deep learning, the system comprising:
[0044] An acquisition module is used to collect an image set of the emergence of corn seedlings;
[0045] A preprocessing module, used to use the image set of corn seedling emergence conditions to cut into corn seedling emergence conditions images that meet a first threshold size;
[0046] A first data processing module is used to use the corn seedling emergence image that meets the first threshold value and input it into a pre-built target detection model to obtain the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame;
[0047] A second data processing module is used to calculate the image rotation matrix by using the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame according to the first preset rule;
[0048] A third data processing module is used to calculate the line spacing by using the result of calculating the image rotation matrix and the coordinates of the center point of the bounding box according to a second preset rule;
[0049] A fourth data processing module is used to calculate the plant spacing using the result of the row spacing calculation and a third preset rule to obtain an average plant spacing;
[0050] The evaluation module is used to use the average plant spacing to perform emergence rate statistics and obtain relevant evaluation results of the corn emergence rate.
[0051] In a third aspect, the present application provides a device for evaluating corn emergence rate based on deep learning, the device comprising:
[0052] A memory having an executable program stored therein;
[0053] A processor is used to execute the executable program in the memory to implement the steps of any one of the above methods.
[0054] The technical solution provided by this application may have the following beneficial effects:
[0055] The present application uses the corn seedling emergence image that meets the first threshold size, inputs it into a pre-built target detection model, and obtains the position information of each corn seedling bounding box and the center point coordinates of the bounding box; uses the above-obtained position information and the center point coordinates of the bounding box to perform image rotation matrix and row spacing calculations, uses the results of the above calculations to obtain the average plant spacing through plant spacing calculations, uses the average plant spacing to perform emergence rate statistics, and obtains relevant evaluation results of corn emergence rate. The present application uses a target detection model and preset rules for deep learning to achieve rapid, accurate, and non-destructive evaluation of corn emergence rate, thereby improving the accuracy and objectivity of the evaluation.
[0056] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0058] Figure 1 This is a flowchart of a method for evaluating corn emergence rate based on deep learning provided by an embodiment of the present application;
[0059] Figure 2 This is a schematic diagram of a corn emergence rate evaluation system based on deep learning provided by another embodiment of the present application;
[0060] Figure 3 This is a schematic diagram of the composition of a corn emergence rate evaluation device based on deep learning provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0061] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0062] Embodiment 1
[0063] See also Figure 1 , Figure 1 1 is a flowchart of a method for evaluating corn emergence rate based on deep learning provided by an embodiment of the present application, the method comprising:
[0064] S1. Collect images of corn seedling emergence;
[0065] S2. Using the image set of corn seedling emergence, cropping the image into corn seedling emergence images that meet the first threshold size;
[0066] S3. Using the corn seedling emergence image that meets the first threshold value, input it into a pre-built target detection model to obtain the position information of each corn seedling bounding box and the coordinates of the center point of the bounding box;
[0067] S4. Calculate the image rotation matrix by using the position information of the bounding box of each corn seedling and the coordinates of the center point of the bounding box according to the first preset rule;
[0068] S5. Using the result of calculating the image rotation matrix and the center point coordinates of the bounding box, the line spacing is calculated according to the second preset rule;
[0069] S6. Using the result of the row spacing calculation, the plant spacing is calculated according to the third preset rule to obtain the average plant spacing;
[0070] S7. Using the average plant spacing, statistics on the emergence rate are performed to obtain relevant evaluation results of the corn emergence rate.
[0071] In one embodiment, as described in step S1, the image set of corn seedling emergence is collected, including:
[0072] During the corn seedling stage, drone platforms carrying RGB cameras were used for aerial photography to achieve rapid and accurate monitoring of corn seedling emergence. 10-20 points were randomly selected in the entire corn field, and manual photography was used at each point. The aerial photography height was set between 5m and 30m, and the specific height was flexibly adjusted according to the image quality to ensure that the key parts of the seedlings were clearly visible, without obvious blur in the image, and could be distinguished by the human eye, so as to ensure qualified image quality.
[0073] In one embodiment, as described in step S2, the step of using the image set of corn seedling emergence conditions to cut the image of corn seedling emergence conditions that meets the first threshold size includes:
[0074] In order to consider the limitation of computing resources, deep learning models have certain requirements on the input image size. Since large-sized input images will increase the computational complexity of complex networks, the training time and computing resource consumption will also increase accordingly. Therefore, we need to randomly crop the single image obtained from the drone, and finally obtain 2-3 images of size 1024*1024 from each original image.
[0075] In one embodiment, as described in step S3, the corn seedling emergence image that meets the first threshold value is input into a pre-built target detection model to obtain the position information of the bounding box of each corn seedling and the coordinates of the center point of the bounding box, including:
[0076] Each cropped image is put into the pre-trained yolov5 or other object detection model to detect corn seedlings. The position information of each seedling bounding box is obtained, and the coordinates of the center point of each bounding box (col i ,row i ), is recorded as the stem position of each seedling. The origin (0,0) is the upper left corner of the image, and col i is the column coordinate of the point on the image, row i is the row coordinate of the point on the image, i is the number of the bounding box, i = 1, 2, ..n.
[0077] In one embodiment, as described in step S4, the image rotation matrix is calculated by using the position information of the bounding box of each corn seedling and the coordinates of the center point of the bounding box through the first preset rule, including: setting the pixel values within the bounding box range detected in step 3 to 1 and the remaining pixels to 0 to obtain a binary image. Rotate the image in the same direction by a degrees, where a = 1, 2, ..., 90. Calculate the sum of the pixels in each column of the rotated image, and record the result as Where i is the number of columns of the rotated image, i = 1, 2, ..., 1024, ..., a is the rotation angle; the sum of the pixels in each column of the image rotated a degrees is put into the data set Set a middle, In order from largest to smallest, a Sort the elements in , denoted by right The sum of the first 300 elements of Set data set Get the maximum value in sumSet The rotation angle a′ is the optimal rotation angle (at this time, the direction of the corn planting ridge in the rotated image is vertical), and the rotation matrix P is obtained through this angle.
[0078] In one embodiment, as described in step S5, the row spacing calculation is performed using the result of calculating the image rotation matrix and the center point coordinates of the bounding box according to the second preset rule, including: the center point coordinates (col i ,row i ) is rotated according to the rotation matrix P obtained in step 4 to obtain the new center point coordinates (col′) of each corn bounding box after rotation i ,row′i ). Set the column coordinates col′ of the new center points of all bounding boxes i Sort from small to large, and remember the sorted column coordinate data set colset sorted ={col″1,col″2,…,col″ i ,…}, the corresponding center point coordinate data set pointSet = {(col″1,row″1),(col″2,row″2),…,(col″ i ,row″ i ),…}, where i is the number of the bounding box after sorting, i = 1, 2,…, n; the distance dis between two adjacent corn seedlings after sorting is calculated according to formula (1): i , let the data set distSet = {dis1, dis2, ..., dis i ,…}; Sort the elements in distSet in descending order, recorded as distSet sorted ; Get distSet sorted The first 6 elements in are taken and their average value is calculated as the average row spacing, recorded as RowSpace.
[0079] dis i =col" i -col″ i+1 (i=1,2,..,n-1) (1)
[0080] Among them, dis i Indicates the pixel distance between the i-th seedling and the i+1-th seedling in the row direction, col″ i Indicates the column coordinate of the i-th seedling after sorting, col″ i+1 Represents the column coordinates of the i+1th seedling after sorting.
[0081] In one embodiment, as described in step S6, the method of calculating the row spacing using the result of the row spacing calculation and the third preset rule to calculate the plant spacing to obtain the average plant spacing includes:
[0082] Take out individual elements from the data set distDet in order and compare them with 3 / 4 times the row spacing (RowSpace×3 / 4), and find all elements that are greater than 3 / 4 times the row spacing (for example: ), combine these element numbers and the first and last endpoints into a set breakSet = {k0, k1, k2, ..., k m-1 ,k m}, where k0=0, {k1,k2,…,k m-1} is the number of all elements greater than 3 / 4 times the line spacing, k m= n, n is the total number of bounding boxes, that is, the maximum number; using these numbers as the dividing points, the elements in pointSet are grouped, where the elements with numbers greater than k0 and less than or equal to k1 are the first group, the elements with numbers greater than k1 and less than or equal to k2 are the second group, and so on. m-1 and less than or equal to k m The last group is denoted by
[0083] The points in each group represent the coordinates of the corn seedlings located on the same ridge. The average value of the column coordinates of all the points in each group is calculated as the column coordinates of the center position of the corresponding ridge.
[0084] For each ridge of corn, that is, the coordinate points in the group, sort the row coordinates of all the points in it, and record the sorting result of all the points in the u-th ridge as v u is the number of corn seedlings in the uth ridge; the absolute value of the difference between the coordinates of adjacent rows is calculated as the distance between two adjacent corn plants, denoted as D ui =|row″′ i -row″′ i+1 |, D ui > 0, that is, the pixel distance between the i-th and i+1-th corn plants (two adjacent corn plants) in the u-th ridge in the column direction; each group of coordinate points corresponds to a group of distance data, recorded as distGroup u ={D u1 ,D u2 ,…,D ui ,…},i=1,2,…,v u -1,u is the ridge number,v is u is the number of corn seedlings in the uth ridge; calculate the average or median of all distance data and record it as the average plant distance (AD).
[0085] In one embodiment, as described in step S7, the use of the average plant spacing to perform seedling emergence rate statistics to obtain relevant evaluation results of corn seedling emergence rate includes:
[0086] The average plant spacing is used to count the number of missing seedlings using Formula 2;
[0087] M ui =round( ui / +0.5)-1(2);
[0088] Among them, M ui is the number of missing corn seedlings between the i-th and i+1-th corn plants in the u-th ridge, D ui is the distance between the i-th and i+1-th corn plants in the u-th ridge, AD is the average plant distance, and round() is the rounding function;
[0089] Specifically, the statistical result of the number of missing seedlings and the total number of seedlings detected in advance are used to calculate the emergence rate through Formula 3 to obtain the relevant evaluation result of the corn emergence rate;
[0090] Seedling emergence rate = number of emerged seedlings / (number of emerged seedlings + number of missing seedlings) × 100% (3).
[0091] It should be noted that the present application uses the corn seedling emergence image that meets the first threshold size, inputs it into a pre-built target detection model, and obtains the position information of each corn seedling bounding box and the center point coordinates of the bounding box; uses the above-obtained position information and the center point coordinates of the bounding box to perform image rotation matrix and row spacing calculations, uses the results of the above calculations to calculate the average plant spacing through plant spacing, uses the average plant spacing to perform emergence rate statistics, and obtains relevant evaluation results of corn emergence rate. The present application uses the target measurement model and preset rules for deep learning to achieve rapid, accurate, and non-destructive evaluation of corn emergence rate, thereby improving the accuracy and objectivity of the evaluation.
[0092] Embodiment 2
[0093] See also Figure 2 , Figure 2 : is a schematic diagram of a corn emergence rate evaluation system based on deep learning provided by another embodiment of the present application, the system comprising:
[0094] An acquisition module 201 is used to collect an image set of corn seedling emergence conditions;
[0095] A preprocessing module 202 is used to use the image set of corn seedling emergence conditions to cut into corn seedling emergence conditions images that meet a first threshold size;
[0096] The first data processing module 203 is used to use the corn seedling emergence image that meets the first threshold value and input it into a pre-built target detection model to obtain the position information of the bounding box of each corn seedling and the coordinates of the center point of the bounding box;
[0097] The second data processing module 204 is used to calculate the image rotation matrix by using the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame according to the first preset rule;
[0098] The third data processing module 205 is used to calculate the line distance by using the result of calculating the image rotation matrix and the coordinates of the center point of the bounding box according to the second preset rule;
[0099] The fourth data processing module 206 is used to calculate the plant spacing using the result of the row spacing calculation and the third preset rule to obtain the average plant spacing;
[0100] The evaluation module 207 is used to perform seedling emergence rate statistics using the average plant spacing to obtain relevant evaluation results of the corn seedling emergence rate.
[0101] Embodiment 3
[0102] See also Figure 3 , Figure 3 : is a schematic diagram of a corn emergence rate evaluation device based on deep learning provided by another embodiment of the present application, the device comprising:
[0103] A memory 31 on which an executable program is stored;
[0104] The processor 32 is used to execute the executable program in the memory 31 to implement the steps of any one of the above methods.
[0105] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.
[0106] It should be noted that, in the description of this application, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" refers to at least two.
[0107] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0108] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0109] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0110] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0111] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0112] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0113] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A method for evaluating corn emergence rate based on deep learning, characterized in that: The method comprises: Collect an image set of corn seedling emergence; Using the image set of the corn seedling emergence condition, cutting into images of the corn seedling emergence condition at the stage that meet the first threshold size; The corn seedling emergence image that meets the first threshold value is used as input into a pre-built target detection model to obtain the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame; Using the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame, the image rotation matrix is calculated according to a first preset rule; Using the result of calculating the image rotation matrix and the coordinates of the center point of the bounding box, the line spacing is calculated according to a second preset rule; Using the result of the row spacing calculation, the plant spacing is calculated according to a third preset rule to obtain an average plant spacing; The average plant spacing is used to perform seedling emergence rate statistics to obtain relevant evaluation results of the corn seedling emergence rate.
2. The method according to claim 1, characterized in that The method of calculating the image rotation matrix by using the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame according to a first preset rule includes: Using the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame, the pixel values within the range of all the enclosing frames are set to 1, and the pixel values outside the range of the enclosing frames are set to 0, so as to obtain a binary image; Using the binary image, the binary image is rotated in the same direction Degrees, among which, ; Calculate the sum of the pixels in each column of the rotated image, and the result is recorded as ,in, is the number of columns of the rotated image, , is the rotation angle; Will rotate The sum of each column of the image is put into the pre-built first dataset middle, ; In order from largest to smallest Sort the elements in , denoted by ; right The sum of the first 300 elements of , , storing the summed result in a pre-constructed second data set ; Pick The maximum value in , get the maximum value Rotation Angle The rotation angle is the optimal rotation angle, through which the image rotation matrix is obtained.
3. The method according to claim 1, characterized in that The step of calculating the line spacing by using the result of calculating the image rotation matrix and the coordinates of the center point of the bounding box according to a second preset rule includes: Using the center point coordinates of the bounding box, rotate the image rotation matrix in the same direction , get the new center point coordinates of each corn bounding box after rotation The column coordinates of the new center point coordinates of all bounding boxes Sort from small to large and store the sorted column coordinates in a pre-built third data set , the corresponding center point coordinates are stored in the pre-built fourth data set ,in is the number of the bounding box after sorting, ; Using the sorting results, the distance between two adjacent corn seedlings after sorting is calculated using Formula 1. and store the distance in a preset fifth data set middle; (1); in, Indicates Seedlings and The pixel distance in the row direction of the seedlings, Indicates the sorted The column coordinates of the seedlings, Indicates the sorted Column coordinates of the seedlings; In order from largest to smallest Sort the elements in , denoted by ; Pick The first 6 elements in are taken and their average value is calculated as the average line spacing to obtain the result of line spacing calculation.
4. The method according to claim 3, characterized in that The method of calculating the plant spacing using the result of the row spacing calculation and a third preset rule to obtain an average plant spacing includes: From the fifth dataset In the sequence, single elements are taken out in turn and compared with 3 / 4 times of the average line spacing. If the single element is larger than 3 / 4 times of the average line spacing, the single element is stored in the pre-constructed sixth data set. Among them, , is the number of all elements that are greater than 3 / 4 times the line spacing, , is the total number of bounding boxes, i.e. the maximum number; The elements in the fourth data set pointSet are grouped using the number of the sixth data set as the dividing point, where the number is greater than and less than or equal to The elements of are the first group, greater than and less than or equal to The second group is greater than and less than or equal to The last group is denoted by , ; The points in each group represent the coordinates of the corn seedlings located on the same ridge, and the average value of the column coordinates of all the points in each group is calculated as the column coordinates of the center position of the corresponding ridge; Using the coordinates of the corn seedlings on the same ridge, the row coordinates of all points therein are sorted, and the sorting results are stored in the seventh data set constructed in advance. , , For the The number of corn seedlings in the ridge; Using the seventh data set , calculating the absolute value of the difference between adjacent row coordinates as the distance between two adjacent corn plants, and storing the distance in a pre-constructed eighth data set, wherein the eighth data set is a data collection storing all the distances between two adjacent corn plants; The eighth data set is used to calculate the average or median of all distance data to obtain the average plant spacing.
5. The method according to claim 1, characterized in that: The method of using the average plant spacing to perform seedling emergence statistics and obtain relevant evaluation results of corn seedling emergence rate includes: The average plant spacing is used to count the number of missing seedlings using Formula 2; (2); in, For the Longdi Zhuhe The number of missing seedlings between corn plants, For the Longdi Zhuhe The distance between corn plants, is the average plant spacing, is the rounding function; The germination rate is calculated by using the statistical result of the number of missing seedlings and the total number of seedlings detected in advance through Formula 3 to obtain the relevant evaluation result of the corn germination rate; Seedling emergence rate = number of emerged seedlings / (number of emerged seedlings + number of missing seedlings) × 100% (3).
6. A corn emergence rate evaluation system based on deep learning, characterized in that: The system comprises: An acquisition module is used to collect an image set of the emergence of corn seedlings; A preprocessing module, used to use the image set of corn seedling emergence conditions to cut into corn seedling emergence conditions images that meet a first threshold size; A first data processing module is used to use the corn seedling emergence image that meets the first threshold value and input it into a pre-built target detection model to obtain the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame; A second data processing module is used to calculate the image rotation matrix by using the position information of the enclosing frame of each corn seedling and the coordinates of the center point of the enclosing frame according to the first preset rule; A third data processing module is used to calculate the line spacing by using the result of calculating the image rotation matrix and the coordinates of the center point of the bounding box according to a second preset rule; A fourth data processing module is used to calculate the plant spacing using the result of the row spacing calculation and a third preset rule to obtain an average plant spacing; The evaluation module is used to use the average plant spacing to perform emergence rate statistics and obtain relevant evaluation results of the corn emergence rate.
7. A corn emergence rate evaluation device based on deep learning, characterized in that: The device comprises: a memory having an executable program stored therein; A processor, configured to execute the executable program in the memory to implement the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Evaluation method and device for corn sowing quality
CN114694047A
Pupation chamber
WO2022069697A1