A method for identifying crops, electronic equipment and storage medium

By acquiring and combining crop recognition characteristics and vegetation reflectivity data, the crops and confidence of each pixel point are determined, and the problems of low crop recognition efficiency and poor accuracy in the prior art are solved, achieving more efficient and accurate crop recognition.

CN119762970APending Publication Date: 2025-04-04ZHEJIANG LINGJIAN SHUZHI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411903350.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The prior art is inefficient in crop identification and the accuracy is affected by a variety of factors, making it difficult to meet the needs of modern agricultural production.

Method used

By obtaining the target image recognition feature list and the target image recognition weight list, and combining the vegetation image feature value, the initial crop and confidence of each pixel point are determined. If the confidence level is greater than the threshold, it is determined as the final crop, otherwise it will be finalized based on the vegetation reflectance data.

Benefits of technology

The accuracy and efficiency of crop recognition are improved, and the accuracy of identification results is ensured through the combination of primary screening and vegetation NDVI values.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119762970A_ABST
    Figure CN119762970A_ABST
Patent Text Reader

Abstract

The present invention provides a crop recognition method, an electronic device and a storage medium, and relates to the field of data processing. The method comprises: obtaining a target image recognition feature list and a target image recognition weight list, obtaining a vegetation image feature value list, recognizing crops based on the vegetation image feature value list and the target image recognition weight list, determining the initial crop and the confidence of the initial crop of each pixel point in an image corresponding to a target crop area, if the confidence of the initial crop is greater than a preset confidence threshold, determining the initial crop of the pixel point as the final crop of the pixel point, if the confidence of the initial crop is not greater than the preset confidence threshold, obtaining vegetation reflectance data of the pixel point based on vegetation data, and determining the final crop of the pixel point based on the vegetation reflectance data, thereby improving the recognition accuracy of the crop.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing, and in particular to a crop identification method, electronic equipment and storage medium. Background Art

[0002] my country is a large agricultural country. The planting and management of crops are of great significance to ensuring national food security and sustainable agricultural development. With the advancement of science and technology, the use of information technology for crop identification has become an important trend in the development of modern agriculture. Traditional crop identification methods mostly rely on manual experience, which is not only inefficient, but also has an accuracy rate affected by many factors, making it difficult to meet the needs of modern agricultural production.

[0003] The existing methods for crop identification include: First, methods based on remote sensing technology. Different crops have different spectral reflectances in different bands. After obtaining multispectral or hyperspectral data through satellite or aerial remote sensing, the vegetation index is calculated to determine the crops. However, the acquisition of multispectral or hyperspectral data is greatly affected by weather conditions. Second, methods based on computer vision extract the color features, shape features, texture features, etc. of crops, and then use neural network models for identification. However, the field environment is complex and easily affects the identification accuracy. How to accurately identify crops has been explored. Summary of the invention

[0004] In view of the above technical problems, the technical solution adopted by the present invention is: a method for identifying crops, the method comprising the following steps:

[0005] Obtaining a target image recognition feature list and a target image recognition weight list, wherein the target image recognition feature list includes a plurality of target image recognition features for identifying crops, and the target image recognition weight list includes a plurality of target image recognition weights, and each target image recognition feature uniquely corresponds to a target image recognition weight;

[0006] Acquire an image corresponding to a target crop area at a preset acquisition interval, and acquire a vegetation image feature value corresponding to a target image recognition feature based on the image corresponding to the target crop area, thereby acquiring a vegetation image feature value list, wherein the vegetation image feature value list includes a plurality of vegetation image feature values;

[0007] Based on the vegetation image feature value list and the target image recognition weight list, determine the initial crop and the confidence of the initial crop for each pixel in the image corresponding to the target crop area;

[0008] If the confidence of the initial crop of a pixel is greater than a preset confidence threshold, the initial crop of the pixel is determined as the final crop corresponding to the pixel;

[0009] If the confidence of the initial crop of a pixel is not greater than a preset confidence threshold, the vegetation reflectance data of the pixel is obtained, and the final crop corresponding to the pixel is determined based on the vegetation reflectance data.

[0010] According to another aspect of the present invention, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the aforementioned method.

[0011] According to yet another aspect of the present invention, an electronic device is provided, comprising a processor and the aforementioned non-transitory computer-readable storage medium.

[0012] The present invention has at least the following beneficial effects: In summary, a target image recognition feature list and a target image recognition weight list are obtained, and vegetation image feature values ​​corresponding to the target image recognition features are obtained, thereby obtaining a vegetation image feature value list. Based on the vegetation image feature value list and the target image recognition weight list, crops are identified, and the initial crop and the confidence of the initial crop of each pixel point in the image corresponding to the target crop area are determined. If the confidence of the initial crop is greater than a preset confidence threshold, the initial crop of the pixel point is determined as the final crop of the pixel point. If the confidence of the initial crop is not greater than the preset confidence threshold, vegetation reflectance data of the pixel point is obtained based on the vegetation data, and the final crop of the pixel point is determined according to the vegetation reflectance data. The present invention performs primary screening through target image recognition features to identify some crops, and then continues to use vegetation NDVI values ​​for identification to obtain the final crop, thereby improving recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0014] Figure 1 The present invention provides a flowchart of a crop identification method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0016] The embodiment of the present invention provides a method for identifying crops. Figure 1 As shown, the method comprises the following steps:

[0017] S001, obtaining a target image recognition feature list and a target image recognition weight list, wherein the target image recognition feature list includes a plurality of target image recognition features for identifying crops, and the target image recognition weight list includes a plurality of target image recognition weights, and each target image recognition feature uniquely corresponds to a target image recognition weight.

[0018] Specifically, the target image recognition feature list D = {D1, D2, ..., D r , …, D s}, the target image recognition weight list E = {E1, E2, ..., E r , …, E s}, D r is the rth target image recognition feature, E r Yes D r The corresponding target image recognition weight, r, ranges from 1 to s, where s is the number of target image recognition features.

[0019] S002, acquiring images corresponding to the target crop area at a preset acquisition interval, and based on the images corresponding to the target crop area, acquiring vegetation image feature values ​​corresponding to the target image recognition features, thereby acquiring a vegetation image feature value list, wherein the vegetation image feature value list includes a plurality of vegetation image feature values.

[0020] Specifically, the vegetation image feature value list F = {F1, F2, ..., F r , …, F s}, F r Yes D r Corresponding vegetation image feature values.

[0021] S003, based on the vegetation image feature value list and the target image recognition weight list, determine the initial crop and the confidence of the initial crop for each pixel in the image corresponding to the target crop area.

[0022] Specifically, those skilled in the art know that any method of identifying crops by using vegetation image feature values ​​and target image recognition weights in the prior art falls within the scope of protection of the present invention and will not be described in detail herein. For example, the initial crop and the confidence of the initial crop for each pixel in the image corresponding to the target crop area can be obtained by the recognition model.

[0023] S004: If the confidence of the initial crop of a pixel is greater than a preset confidence threshold, the initial crop of the pixel is determined as the final crop corresponding to the pixel. Specifically, the preset confidence threshold can be set according to actual needs.

[0024] S005, if the confidence of the initial crop of a pixel point is not greater than a preset confidence threshold, obtain vegetation reflectance data of the pixel point, and determine the final crop corresponding to the pixel point based on the vegetation reflectance data. Specifically, the vegetation reflectance data at least includes a vegetation NDVI value.

[0025] Specifically, the final crop of the pixel point is determined based on the vegetation reflectance data, including:

[0026] The vegetation NDVI value is obtained based on the vegetation reflectance data, and the final crop of the pixel point is determined based on the vegetation NDVI value.

[0027] In summary, a target image recognition feature list and a target image recognition weight list are obtained, and vegetation image feature values ​​corresponding to the target image recognition features are obtained, thereby obtaining a vegetation image feature value list. Based on the vegetation image feature value list and the target image recognition weight list, crops are identified, and the initial crop and the confidence of the initial crop of each pixel in the image corresponding to the target crop area are determined. If the confidence of the initial crop is greater than a preset confidence threshold, the initial crop of the pixel is determined as the final crop of the pixel. If the confidence of the initial crop is not greater than the preset confidence threshold, vegetation reflectance data of the pixel is obtained based on the vegetation data, and the final crop of the pixel is determined based on the vegetation reflectance data. The present invention performs primary screening through target image recognition features to identify some crops, and then continues to use vegetation NDVI values ​​for identification to obtain the final crop, thereby improving recognition efficiency.

[0028] Furthermore, by initially screening the crops when they are still small, the impact of non-crops on the crops can be eliminated in a timely manner, thereby improving the quality of the crops.

[0029] Furthermore, the target image recognition features are obtained through the following steps:

[0030] A historical data list and a historical image list are obtained, wherein the historical data list includes historical vegetation reflectance data of each historical crop area in several historical time periods, and the historical image list includes historical images corresponding to each historical crop area.

[0031] Based on the historical image list and historical vegetation reflectance data, crops are identified to obtain the historical crops for each pixel in the historical image.

[0032] A preset image recognition feature list is obtained, wherein the preset image recognition feature list includes a plurality of preset image recognition features, and the preset image recognition features are features used to identify crops.

[0033] Wherein, the preset image recognition feature at least includes RGB value.

[0034] Based on the preset image recognition feature list, a list of historical feature values ​​corresponding to each historical pixel in the historical image is obtained.

[0035] Based on the historical feature value list corresponding to each historical pixel point in the historical image and the historical crops of each pixel point in the historical image, the correlation coefficient between each preset image recognition feature and the historical crops is obtained.

[0036] Specifically, the Pearson coefficient of the preset image recognition feature and the historical crops is obtained as the correlation coefficient between the preset image recognition feature and the historical crops.

[0037] When the correlation coefficient is greater than a set threshold, the preset image recognition feature corresponding to the correlation coefficient is marked as a target image recognition feature, thereby obtaining a target image recognition feature list. Specifically, the set threshold can be determined according to actual needs.

[0038] Furthermore, after obtaining the target image recognition feature list, it also includes:

[0039] The correlation coefficient corresponding to the target image recognition feature is obtained and the correlation coefficient corresponding to the target image recognition feature is normalized to obtain the target image recognition weight.

[0040] In summary, a historical data list and a historical image list are obtained, crops are identified based on the historical image list and historical reflectivity data, historical crops for each pixel point of the historical image are obtained, a preset image recognition feature list is obtained, and based on the preset image recognition feature list, a historical feature value list corresponding to each historical pixel point in the historical image is obtained, based on the historical feature value list corresponding to each historical pixel point in the historical image and the historical crops for each pixel point of the historical image, a correlation coefficient between the preset image recognition feature and the historical crops is obtained, and when the correlation coefficient is greater than a set threshold, the preset image recognition feature corresponding to the correlation coefficient is marked as a target image recognition feature, thereby obtaining a target image recognition feature list. The present invention obtains the correspondence between the historical feature value list and the historical crops through the historical data list and the historical image list, thereby more accurately determining the target image recognition feature.

[0041] Furthermore, after the final crop is determined, it also includes:

[0042] The area of ​​the final crop in the image corresponding to the target crop area is obtained. If the final area ratio is less than the preset ratio threshold, the next step is executed. The final area ratio is the ratio of the area of ​​the final crop to the area of ​​the image corresponding to the target crop area.

[0043] A preset vegetation feature list and a vegetation image feature value list corresponding to an image corresponding to a target crop area are obtained, wherein the preset vegetation feature list includes a plurality of preset vegetation features, and the target vegetation feature value list includes a plurality of target vegetation feature values. The preset vegetation features include crop leaf shapes, etc.

[0044] The final crop is verified based on the list of target vegetation characteristic values.

[0045] In summary, the area of ​​the final crops in the target image is obtained. If the final area ratio is less than the preset proportion threshold, the preset vegetation feature list and the target vegetation feature value list corresponding to the target image are obtained. Based on the target vegetation feature value list, the final crops are verified. When the area of ​​the final crops in the target image is less than a certain ratio, it is considered that there may be a problem in the recognition process. Therefore, the preset vegetation features are used for further verification, so as to more accurately identify the crops.

[0046] Specifically, the preset collection interval is obtained through the following steps:

[0047] A sample data list set is obtained, wherein the sample data list set includes several sample data lists, wherein the sample data lists include area values ​​of crop sample areas, sample NDVI values ​​of the crop sample areas collected at several first time points, sample NDVI change values ​​of the crop sample areas collected at several first time points, and a sample collection time interval; the crop sample areas and the sample data lists correspond one to one; and the sample NDVI change value is a rate of change of sample NDVI values ​​collected at two adjacent first time points.

[0048] Specifically, the sample data list set A = {A1, A2, ..., A i , …, A m}, A i is the i-th sample data list, i ranges from 1 to m, m is the number of sample data lists, A i Including the sample area corresponding to the sample area, the sample collection time interval, and the NDVI values ​​of several samples collected at the first time point AB i,1 , A.B. i,2 , …, AB i,j , …, AB i,n , several sample NDVI change values ​​AC collected at the first time point i,1 , A.C. i,2 ,…,AC i,j ,…,AC i,n , A.C. i,j =(AB i,j -AB i,j-1 ) / (TB ij -TB ij-1 ), j ranges from 1 to n, and n is the number of the first time point. TB i,j AB i,j The acquisition time, TB i,j-1 AB i,j-1 Specifically, the sample area includes a crop area with only crops and a crop area with weeds.

[0049] Specifically, the first time points are all within a first preset time period.

[0050] An intermediate data list set is obtained, wherein the intermediate data list set includes several intermediate data lists, and the intermediate data list includes the area value of the crop sample area, the sample collection time interval, the sample NDVI mean corresponding to the crop sample area, and the sample NDVI change mean corresponding to the crop sample area; the crop sample area and the intermediate data list correspond one to one, the sample NDVI mean is the mean of the NDVI values ​​collected at several first time points in the corresponding sample data list, and the sample NDVI change mean is the mean of the sample NDVI change values ​​collected at several first time points in the corresponding sample data list.

[0051] Specifically, get AB i0 =(∑ n j=1 AB ij ) / n,AC i0 =(∑ n j=1 AC ij ) / n, the intermediate data list set B = {B1, B2, ..., B i , …, B m}, B i Including the sample area corresponding to the sample area, sample collection time interval, AB i0 , AC i0 .

[0052] A plurality of initial judgment models are constructed, wherein the initial judgment models include a plurality of judgment nodes, wherein the judgment nodes are nodes of preset regular expressions, and the preset regular expressions are regular expressions based on area, NDVI mean, and NDVI change mean.

[0053] The intermediate data list set is input into each initial judgment model, and the initial judgment model is trained to obtain several target judgment models, among which the area value of the crop sample area in the intermediate data list, the sample NDVI mean corresponding to the crop sample area, and the sample NDVI change mean corresponding to the crop sample area are used as input values ​​of the initial judgment model, and the sample collection time interval in the intermediate data list is used as the target value of the initial judgment model.

[0054] Obtain a target data list for the target crop area, the target data list including the target crop area area value, the target NDVI mean and the target NDVI change mean, the target NDVI mean is the mean of the target NDVI values ​​collected at several second time points, the target NDVI change mean is the mean of the target NDVI change values ​​collected at several second time points; the target NDVI change value is the rate of change of the target NDVI values ​​collected at two adjacent second time points.

[0055] Specifically, the second time points are all located in the second preset time period. In one embodiment of the present invention, the second preset time period corresponds to the first preset time period. For example, the first preset time period is May, and the second preset time period is May.

[0056] Specifically, the target NDVI change value and the sample NDVI change value are calculated in the same manner.

[0057] Input the target data list into several target judgment models to obtain the target collection interval.

[0058] In summary, a sample data list set is obtained, an intermediate data list set is obtained, several initial judgment models are constructed, the intermediate data list set is input into each initial judgment model, the initial judgment model is trained, several target judgment models are obtained, a target data list of the target crop area is obtained, the target data list is input into several target judgment models, and the target collection interval is obtained. The present invention trains the constructed initial judgment model through sample data, obtains the target judgment model, and obtains the target collection interval more accurately.

[0059] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiment.

[0060] An embodiment of the present invention further provides an electronic device, comprising a processor and the aforementioned non-transitory computer-readable storage medium.

[0061] Although some specific embodiments of the present invention have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are only for illustration, not for limiting the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention.

Claims

1. A method for identifying crops, characterized in that: The method comprises the following steps: Obtaining a target image recognition feature list and a target image recognition weight list, wherein the target image recognition feature list includes a plurality of target image recognition features for identifying crops, and the target image recognition weight list includes a plurality of target image recognition weights, and each target image recognition feature uniquely corresponds to a target image recognition weight; Acquire an image corresponding to a target crop area at a preset acquisition interval, and acquire a vegetation image feature value corresponding to a target image recognition feature based on the image corresponding to the target crop area, thereby acquiring a vegetation image feature value list, wherein the vegetation image feature value list includes a plurality of vegetation image feature values; Based on the vegetation image feature value list and the target image recognition weight list, determine the initial crop and the confidence of the initial crop for each pixel in the image corresponding to the target crop area; If the confidence of the initial crop of a pixel is greater than a preset confidence threshold, the initial crop of the pixel is determined as the final crop corresponding to the pixel; If the confidence of the initial crop of a pixel is not greater than a preset confidence threshold, the vegetation reflectance data of the pixel is obtained, and the final crop corresponding to the pixel is determined based on the vegetation reflectance data.

2. The crop identification method according to claim 1, characterized in that: The final crops determined for this pixel based on vegetation reflectance data include: The vegetation NDVI value is obtained based on the vegetation reflectance data, and the final crop of the pixel point is determined based on the vegetation NDVI value.

3. The crop identification method according to claim 1, characterized in that: Obtain the target image recognition features through the following steps: Acquire a historical data list and a historical image list, wherein the historical data list includes historical vegetation reflectance data of each historical crop area in a number of historical time periods, and the historical image list includes historical images corresponding to each historical crop area; Based on the historical image list and historical vegetation reflectance data, crops are identified to obtain the historical crops of each pixel in the historical image; Obtaining a preset image recognition feature list, wherein the preset image recognition feature list includes a plurality of preset image recognition features, and the preset image recognition features are features used to identify crops; Based on the preset image recognition feature list, obtain a list of historical feature values ​​corresponding to each historical pixel point in the historical image; Based on the historical feature value list corresponding to each historical pixel point in the historical image and the historical crops of each pixel point in the historical image, the correlation coefficient between each preset image recognition feature and the historical crops is obtained; When the correlation coefficient is greater than a set threshold, the preset image recognition feature corresponding to the correlation coefficient is marked as a target image recognition feature, thereby obtaining a target image recognition feature list.

4. The crop identification method according to claim 3, characterized in that: After obtaining the target image recognition feature list, it also includes: The correlation coefficient corresponding to the target image recognition feature is obtained and the correlation coefficient corresponding to the target image recognition feature is normalized to obtain the target image recognition weight.

5. The crop identification method according to claim 3, characterized in that: The preset image recognition feature at least includes an RGB value.

6. The crop identification method according to claim 1, characterized in that: After the final crop is determined, it also includes: Obtaining the final area of ​​the crop in the image corresponding to the target crop area, and if the final area ratio is less than a preset ratio threshold, executing the next step, wherein the final area ratio is the ratio of the area of ​​the final crop to the area of ​​the image corresponding to the target crop area; Acquire a preset vegetation feature list and a vegetation image feature value list corresponding to an image corresponding to a target crop area, wherein the preset vegetation feature list includes a plurality of preset vegetation features, and the target vegetation feature value list includes a plurality of target vegetation feature values; The final crop is verified based on the list of target vegetation characteristic values.

7. The crop identification method according to claim 1, characterized in that: To obtain the preset collection interval, follow these steps: Acquire a sample data list set, the sample data list set includes a plurality of sample data lists, the sample data lists include area values ​​of crop sample areas, sample NDVI values ​​of a plurality of crop sample areas collected at a first time point, sample NDVI change values ​​of a plurality of crop sample areas collected at a first time point, and a sample collection time interval; the crop sample areas correspond to the sample data lists one by one; the sample NDVI change value is a change rate of the sample NDVI values ​​collected at two adjacent first time points; Acquire an intermediate data list set, the intermediate data list set includes several intermediate data lists, the intermediate data list includes the area value of the crop sample area, the sample collection time interval, the sample NDVI mean corresponding to the crop sample area, and the sample NDVI change mean corresponding to the crop sample area; the crop sample area and the intermediate data list correspond one to one, the sample NDVI mean is the mean of the NDVI values ​​collected at several first time points in the corresponding sample data list, and the sample NDVI change mean is the mean of the sample NDVI change values ​​collected at several first time points in the corresponding sample data list; Constructing a plurality of initial judgment models, wherein the initial judgment models include a plurality of judgment nodes, wherein the judgment nodes are nodes of preset regular expressions, and the preset regular expressions are regular expressions based on area, NDVI mean, and NDVI change mean; Input the intermediate data list set into each initial judgment model, train the initial judgment model, and obtain several target judgment models, wherein the area value of the crop sample area in the intermediate data list, the sample NDVI mean value corresponding to the crop sample area, and the sample NDVI change mean value corresponding to the crop sample area are used as input values ​​of the initial judgment model, and the sample collection time interval in the intermediate data list is used as the target value of the initial judgment model; Obtain a target data list of a target crop area, the target data list including the target crop area area value, the target NDVI mean and the target NDVI change mean, the target NDVI mean is the mean of the target NDVI values ​​collected at a plurality of second time points, the target NDVI change mean is the mean of the target NDVI change values ​​collected at a plurality of second time points; the target NDVI change value is the change rate of the target NDVI values ​​collected at two adjacent second time points; Input the target data list into several target judgment models to obtain the target collection interval.

8. The crop identification method according to claim 3, characterized in that: The Pearson coefficient of the preset image recognition feature and the historical crops is obtained as the correlation coefficient between the preset image recognition feature and the historical crops.

9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program is loaded and executed by the processor to implement the crop identification method as described in any one of claims 1-8.

10. An electronic device, characterized in that: The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.