Crop Early Recognition Method, System and Medium Based on Customized Features of Genetic Programming
Through the method of customizing characteristics by genetic planning, the initial features are generated using spectral bands and iteratively optimized, the problem of insufficient sample size and accuracy in early and seasonal crop mapping is solved, and high-precision crop classification and mapping results are achieved.
Patent Information
- Application Number
- CN202510117826.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-01-24
AI Technical Summary
The prior art has problems with large sample size requirements and insufficient classification accuracy in early and seasonal crop mapping. Especially when crop types and proportions in the rotation areas have large differences, it is difficult to achieve high-precision crop classification.
Using a method of customized features based on genetic planning, by obtaining the initial images and ground samples of the target area, using the spectral bands to generate initial features, perform binary classification and fitness value calculations, combined with selection method and genetic operator iteration, custom features are generated, and finally a random forest classifier is used to classify crops.
While reducing sample size, it improves the classification accuracy of early and seasonal crops, provides more reliable mapping information, and is suitable for different agricultural areas and crop types, with good versatility and adaptability.
Smart Images

Figure CN120047826B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of crop recognition, and particularly to a method, system and storage medium for early crop recognition based on customized features of genetic programming. Background Art
[0002] Early and in-season crop mapping can provide spatial distribution information of crops in near real-time, playing an important role in agricultural monitoring, yield prediction, risk management and crop insurance.
[0003] In the past three decades, remote sensing technology has been widely used for crop mapping due to its advantages such as wide monitoring range, fast update speed, and rich spectral information. However, most studies have achieved post-harvest crop classification based on images throughout the entire crop growing season. Due to limited image and spectral information, early and in-season crop mapping remains a challenge.
[0004] In the prior art, some studies have used prior knowledge and historical images for early and in-season crop mapping tasks. Some studies have adopted an incremental classification method to obtain the earliest time for high-precision crop classification results, but have not solved the limitation of limited image information on crop classification accuracy. At the same time, this method lacks time information, especially key phenological information, which will reduce the ability of the classifier to identify crops. Another solution in the prior art is to train a classifier based on remote sensing images of historical years and use it for early crop mapping of the current year. Compared with traditional classification methods, this method ensures a higher classification accuracy in a shorter time, but this method requires a large number of crop samples in historical years and is difficult to apply to rotation areas with large differences in crop types and proportions.
[0005] In addition, feature construction provides another solution for capturing the differential information between crop spectra under limited spectral information conditions. Features derived from spectral bands are divided into two categories, namely customized features and advanced features. Some studies have constructed customized features for target crops by analyzing the unique spectral features of different crops. However, finding the spectral uniqueness of specific crops is both time-consuming and subjective. Other researchers have used artificial intelligence methods for high-level feature construction to capture and amplify the subtle changes of crops. For example, deep neural networks and long short-term memory networks. However, these methods have poor interpretability and also rely on a large number of samples for training.
[0006] Therefore, it is necessary to develop a method suitable for early and in-season crop mapping, which can obtain accurate early and in-season crop classification and mapping results while reducing the required sample size. Summary of the Invention
[0007] An embodiment of the present invention provides a method, system, and storage medium for early crop recognition based on customized features of genetic programming to solve one or more of the above problems existing in the prior art. The present invention can obtain accurate early and in-season crop classification and mapping results while reducing the required sample size.
[0008] An embodiment of the present invention provides a method for early crop recognition based on customized features of genetic programming, including:
[0009] Obtain the initial image of the target area and the ground samples collected in the field, generate the initial features of the target crop using the spectral bands of the initial image, and generate an initial population according to the initial features of the target crop;
[0010] Calculate the eigenvalue of the initial feature, and perform binary classification on the eigenvalue of the initial feature according to a preset feature threshold;
[0011] Obtain the classification label of the ground sample according to the initial feature, combine it with the true label of the ground sample to obtain the accuracy of the binary classification, and obtain the fitness value of the initial feature according to the accuracy;
[0012] Iterate the initial population through the selection method and genetic operators to obtain the customized features of the target crop;
[0013] Perform crop classification on the target crop based on the customized features, and obtain the classification mapping result of the early crop or in-season crop according to the classification result.
[0014] As an improvement of the above solution, the obtaining the initial image of the target area and the ground samples collected in the field, generating the initial features of the target crop using the spectral bands of the initial image, and generating an initial population according to the initial features of the target crop includes:
[0015] Obtain the initial image of the target area and collect multiple ground samples in the target area range;
[0016] Collect the values of the visible light band, near-infrared band, and short-wave infrared band in the initial image;
[0017] Use the visible light band, near-infrared band, and short-wave infrared band as leaf nodes, and obtain the tree-like structure individuals corresponding to the initial features according to the leaf nodes;
[0018] Select a part of the initial features and generate the first population using the complete method;
[0019] Select another part of the initial features and generate the second population using the growth method;
[0020] Take the first population and the second population as components of the initial population.
[0021] As an improvement to the above solution, calculating the eigenvalue of the initial feature and performing binary classification on the eigenvalue of the initial feature according to a preset feature threshold includes:
[0022] Calculate the eigenvalue of the initial feature through the following formula:
[0023]
[0024] In the formula, Fe is the eigenvalue of the initial feature, SWIR1 is the value of the short-wave infrared band, NIR is the value of the near-infrared band, R and B are the values of the red band and the blue band, and 0.86 is a random constant in the range of [-1, 1];
[0025] If the eigenvalue of the initial feature is greater than the feature threshold, mark the initial feature corresponding to the eigenvalue of the initial feature as the target crop, otherwise mark it as a non-target crop.
[0026] As an improvement to the above solution, obtaining the classification label of the ground sample according to the initial feature, combining with the true label of the ground sample to obtain the accuracy of binary classification, and obtaining the fitness value of the initial feature according to the accuracy includes:
[0027] According to the true label of the ground sample and the obtained classification label of the ground sample, identify the number of correctly classified ground samples, the number of non-target crop ground samples classified as target crops, the number of correctly classified non-target crop ground samples, and the number of target crop ground samples classified as non-target crops;
[0028] Obtain the fitness value of the initial feature through the following formula:
[0029]
[0030] In the formula, Fit is the fitness value of the initial feature, TP is the number of correctly classified ground samples, FP is the number of non-target crop ground samples classified as target crops, TN is the number of correctly classified non-target crop ground samples, and FN is the number of target crop ground samples classified as non-target crops.
[0031] As an improvement to the above solution, iterating the initial population through the selection method and genetic operators to obtain the customized features of the target crop includes:
[0032] Adopt the tournament selection method, randomly select several individuals from the initial population, and further select the individual with the highest fitness value among the randomly selected individuals to obtain an intermediate individual group;
[0033] Iterate the intermediate population using the copy, crossover, and mutation algorithms. After the number of iterations reaches the preset iteration threshold, select the best individual in the last generation as the customized feature of the target crop.
[0034] As an improvement to the above solution, after classifying the target crop based on the customized feature, it further includes:
[0035] Calculate the accuracy rate of the crop classification;
[0036] When the accuracy rate of the crop classification does not meet the preset accuracy condition, perform cluster classification on the initial image of the target area to obtain the main cluster image and the slave cluster image;
[0037] Extract initial features from the main cluster image and the slave cluster image respectively to obtain the main cluster features and the slave cluster features;
[0038] Calculate the eigenvalue of the main cluster features, and perform binary classification on the eigenvalue of the main cluster features according to the feature threshold;
[0039] Obtain the true label of the main cluster features, obtain the accuracy rate of the binary classification according to the true label of the main cluster features, and obtain the fitness value of the main cluster features;
[0040] If the fitness value of the main cluster features is greater than the preset main fitness threshold, generate a second population according to the main cluster features and a third population according to the slave cluster features;
[0041] Select a second individual population from the second population using the selection method;
[0042] For the second individual population, perform copy and mutation iterations, and collect individuals from the third population based on the first probability value and perform crossover iterations with the second individual population. After the number of iterations reaches the preset iteration threshold, select the best individual in the last generation as the new customized feature of the target crop;
[0043] Classify the target crop based on the new customized feature and obtain the classification mapping result of early crops or in-season crops according to the classification result;
[0044] If the fitness value of the main cluster features is not greater than the preset main fitness threshold, re-perform cluster classification on the initial image of the target area to obtain a new main cluster image and a slave cluster image until the fitness value of the main cluster features is greater than the preset main fitness threshold.
[0045] As an improvement of the above solution, classifying the target crop based on the customized features, and obtaining a classification mapping result of early crops or in-season crops according to the classification result, including:
[0046] Inputting the customized features into a random forest classifier, obtaining a classification result through the random forest classifier, and performing classification mapping.
[0047] Another embodiment of the present invention correspondingly provides a crop early recognition system based on customized features by genetic programming, including:
[0048] An initialization module, configured to obtain an initial image of a target area and ground sample data collected on-site, generate initial features of the target crop by using spectral bands of the initial image, and generate an initial population according to the initial features of the target crop;
[0049] A feature classification module, configured to calculate feature values of the initial features, and perform binary classification on the feature values of the initial features according to a preset feature threshold;
[0050] A fitness module, configured to obtain classification labels of ground samples according to the initial features, obtain the accuracy rate of binary classification by combining the true labels of the ground samples, and obtain a fitness value of the initial features according to the accuracy rate;
[0051] A customized feature module, configured to iterate the initial population through a selection method and genetic operators to obtain customized features of the target crop;
[0052] A classification mapping module, configured to classify the target crop based on the customized features, and obtain a classification mapping result of early crops or in-season crops according to the classification result.
[0053] Another embodiment of the present invention provides a crop early recognition system based on customized features by genetic programming, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, the crop early recognition method based on customized features by genetic programming described in the above embodiment of the present invention is implemented.
[0054] Another embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium includes a stored computer program. When the computer program runs, it controls the device where the computer-readable storage medium is located to execute the crop early recognition method based on customized features by genetic programming described in the above embodiment of the present invention.
[0055] Compared with the prior art, in the embodiments of the present invention, initial features are automatically generated using the spectral bands of the initial images of the target area, which can quickly extract crop-related features from the image data, reducing the workload of feature extraction and dependence on a large number of images; the feature values of the initial features are binary-classified according to preset feature thresholds, thus effectively identifying the features that have the greatest impact on crop classification; by iterating the initial population through the selection method and genetic operators, the amount of images required can be reduced while ensuring accuracy, which is particularly beneficial for early-season or in-season crop mapping scenarios with high data collection costs or scarce data; based on the precise customized features obtained through iteration, the classification accuracy of early-season and in-season crop mapping can be improved, providing more reliable information for mapping; at the same time, the method of this embodiment can also be applied to different early-season or in-season crops, having good generality and adaptability, and can be widely applied to different agricultural regions and crop types; in summary, this embodiment can obtain accurate early-season and in-season crop classification and mapping results while reducing the required sample size. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 FIG. 6 is a schematic flowchart of a method for early crop recognition based on genetic programming to customize features provided by an embodiment of the present invention;
[0057] Figure 2 FIG. 10 is a schematic diagram of the geographical location of the research area provided by an embodiment of the present invention;
[0058] Figure 3 FIG. 14 is the phenological calendar of the main crops in Kaiyuan City provided by an embodiment of the present invention;
[0059] Figure 4 FIG. 18 is a schematic diagram of the spectral information of corn, rice, and soybeans provided by an embodiment of the present invention;
[0060] Figure 5 FIG. 22 is a schematic diagram of an individual with a tree structure in genetic programming provided by an embodiment of the present invention;
[0061] Figure 6 FIG. 26 is the original image and the corresponding customized feature crop classification result provided by an embodiment of the present invention;
[0062] Figure 7 FIG. 30 is a schematic diagram of the visualization results of spectral features, vegetation indices, and crop customized features provided by an embodiment of the present invention;
[0063] Figure 8 FIG. 34 is a schematic diagram of the visualization results of crop customized features provided by an embodiment of the present invention;
[0064] Figure 9 FIG. 38 is the statistical result of crop customized feature nodes provided by an embodiment of the present invention;
[0065] Figure 10 are the characteristic values of different crop types in S4 and S8 provided by an embodiment of the present invention;
[0066] Figure 11 is a schematic diagram of the t-SNE dimensionality reduction visualization result provided by an embodiment of the present invention;
[0067] Figure 12 is a schematic diagram of the correlation coefficients of spectral features, vegetation indices, and customized features provided by an embodiment of the present invention;
[0068] Figure 13 is a schematic diagram of the structure of a crop early identification system based on genetic programming customized features provided by an embodiment of the present invention;
[0069] Figure 14 is a schematic diagram of the structure of a crop early identification system based on genetic programming customized features provided by an embodiment of the present invention. Detailed implementation manners
[0070] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0071] See Figure 1 , which is a schematic flowchart of a crop early identification method based on genetic programming customized features provided by an embodiment of the present invention, including steps S101 to S105:
[0072] S101. Obtain the initial image of the target area and the ground samples collected in the field, generate the initial features of the target crop using the spectral bands of the initial image, and generate an initial population according to the initial features of the target crop;
[0073] Specifically, see Figure 2 , which is a schematic diagram of the geographical location of the research area provided by an embodiment of the present invention, located in Kaiyuan City, Liaoning Province, China. Kaiyuan City is located in the golden belt for crop planting at 42° north latitude, with suitable climate and soil conditions for agricultural production. In 2019, the cultivated land area was 1,202.79 square kilometers, accounting for 42.75% of the total land area. The main crops planted are corn, rice, and soybeans. The phenological information of the above main crops can be seen in Figure 3 , and its entire growing season starts from sowing in late April and harvests from late September to October.
[0074] In this embodiment, Sentinel-2 images from April to September 2020 were collected for crop classification in the study area, including April 13th, May 13th, June 17th, July 22nd, August 21st, and September 25th, and radiometric calibration and atmospheric correction were performed. Details of the relevant band information and spatial resolution are shown in the following original spectral characteristics table. The spatial resolution of all bands was resampled to 10 meters.
[0075]
[0076] The crop early identification method based on genetic programming customized features provided in this embodiment was used for on-site investigation of the aforementioned target study area and visual interpretation of high-resolution images. A total of 418 ground samples were collected on-site, including 131 corn samples, 80 rice samples, 66 soybean samples, and 141 other samples. The samples were randomly divided into a training set (70%) and a test set (30%).
[0077] The obtained Sentinel-2 images were combined with the ground samples of corn, rice, and soybeans. See Figure 4 , which are the spectral characteristics of the three main crops of corn, rice, and soybeans. From Figure 3 , it can be seen that crops are in the sowing and emergence stages in April and May. However, from the false-color composite image in (a) of Figure 4 , only the characteristics of bare soil can be seen. Starting from June, the cultivated land pixels gradually show obvious crop characteristics. For example, the corn pixels turn red due to the vegetation characteristics, and the rice pixels turn darker due to the water characteristics during the special period of transplanting. Therefore, in this embodiment, the crop classification in April and May is defined as early crop mapping, and the classification from June to September is defined as in-season crop mapping. In the (b) figure of Figure 4 , the spectral profiles of different crops highly overlap, especially the spectral profiles of corn and soybeans, indicating that this poses a great challenge to early and in-season crop mapping.
[0078] S102. Calculate the eigenvalue of the initial feature, and perform binary classification on the eigenvalue of the initial feature according to a preset feature threshold;
[0079] Specifically, by decomposing the multi-classification task into multiple binary-classification tasks, Genetic Programming (GP) can generate more accurate and interpretable features.
[0080] S103. Obtain the classification label of the ground sample according to the initial feature, combine it with the true label of the ground sample to obtain the accuracy of the binary classification, and obtain the fitness value of the initial feature according to the accuracy;
[0081] S104. Iterate the initial population through the selection method and genetic operators to obtain the customized features of the target crop;
[0082] S105. Classify target crops based on customized features, and obtain the classification mapping results of early crops or in-season crops according to the classification results.
[0083] In this embodiment, preferably, obtain the initial image of the target area and the ground samples collected in the field, generate the initial features of the target crops using the spectral bands of the initial image, and generate the initial population according to the initial features of the target crops, including:
[0084] Obtain the initial image of the target area, and collect multiple ground samples in the field within the target area;
[0085] Collect the values of the visible light band, near-infrared band, and short-wave infrared band in the initial image;
[0086] Use the visible light band, near-infrared band, and short-wave infrared band as leaf nodes, and obtain the individual of the tree-like structure corresponding to the initial features according to the leaf nodes;
[0087] Select a part of the initial features and generate the first population using the full method;
[0088] Select another part of the initial features and generate the second population using the grow method;
[0089] Use the first population and the second population as the components of the initial population.
[0090] Specifically, in this embodiment, the "ramped half-and-half" method is used to randomly generate the initial population, where half of the population is generated using the full method and the other half is generated using the grow method.
[0091] Specifically, the minimum initial tree depth of the individual of the tree-like structure corresponding to the initial features can be set to 2, the maximum initial tree depth to 6, and the maximum tree depth to 8 during the evolution process. This method ensures the diversity of the individual size and shape, thus facilitating the search for the optimal crop features. According to the relevant parameters defined in the following table, the genetic programming population size is always maintained at 1024 individuals during the subsequent evolution process. The population evolution process will be repeated 50 times. The optimal individual in the 50th generation is selected as the customized feature of the current target crop.
[0092]
[0093] In this embodiment, preferably, calculate the feature values of the initial features, and perform binary classification on the feature values of the initial features according to the preset feature threshold, including:
[0094] Calculate the feature values of the initial features through the following formula:
[0095]
[0096] In the formula, Fe is the eigenvalue of the initial feature, SWIR1 is the value in the short-wave infrared band, NIR is the value in the near-infrared band, R and B are the values in the red band and the blue band, and 0.86 is a random constant in the range of [-1, 1];
[0097] If the eigenvalue of the initial feature is greater than the feature threshold, the initial feature corresponding to the eigenvalue of the initial feature is marked as the target crop, otherwise it is marked as a non-target crop.
[0098] Specifically, refer to Figure 5 , which is a schematic diagram of an individual in the tree structure in genetic programming. The tree structure consists of a terminal set and a function set. The colored leaf nodes represent terminals, including spectral bands and constants [-1, 1]), and the internal nodes represent functions (+, -, ×, / , sin, cos).
[0099] In this embodiment, preferably, the classification label of the ground sample is obtained according to the initial feature, the accuracy of binary classification is obtained by combining the true label of the ground sample, and the fitness value of the initial feature is obtained according to the accuracy, including:
[0100] According to the true label of the ground sample and the obtained classification label of the ground sample, identify the number of correctly classified ground samples, the number of non-target crop ground samples classified as target crops, the number of correctly classified non-target crop ground samples, and the number of target crop ground samples classified as non-target crops;
[0101] The fitness value of the initial feature is obtained through the following formula:
[0102]
[0103] In the formula, Fit is the fitness value of the initial feature, TP is the number of correctly classified ground samples, FP is the number of non-target crop ground samples classified as target crops, TN is the number of correctly classified non-target crop ground samples, and FN is the number of target crop ground samples classified as non-target crops.
[0104] Specifically, the eigenvalue combined with the threshold can achieve simple binary classification. If the eigenvalue is greater than the threshold, the initial feature is marked as the target category, otherwise it is marked as the non-target category. Secondly, the accuracy of binary classification will vary according to the true label of the input ground sample. The true label is changed by classifying the ground sample into different target crops and the corresponding non-target crops.
[0105] For example, to customize corn characteristics, ground samples are divided into two categories: corn and non-corn samples, where non-corn samples include rice, soybeans, and other samples. In a specific implementation, a simple threshold of 0 can be selected to perform binary classification on target crops and non-target crops, and the average accuracy of the two categories is selected as the fitness function, that is, the fitness value calculation function. If the feature value is greater than 0, the ground sample is marked as the target crop; otherwise, it is marked as a non-target crop. When the target crop changes, the fitness value of each initial feature changes with the true label of the training ground samples.
[0106] In this embodiment, preferably, the initial population is iterated through selection methods and genetic operators to obtain the customized characteristics of the target crop, including:
[0107] Using the tournament selection method, several individuals are randomly selected from the initial population, and the individual with the highest fitness value is further selected from the randomly selected individuals to obtain an intermediate population of individuals;
[0108] Using replication, crossover, and mutation algorithms to iterate the intermediate population of individuals. When the number of iterations reaches the preset iteration threshold, the best individual in the last generation is selected as the customized characteristic of the target crop.
[0109] Specifically, before using the crossover and mutation operators, the tournament selection method is used to randomly select 7 individuals from the initial population, and the individual with the highest fitness value is selected for subsequent crossover or mutation operations. The selection process is repeated 1014 times. The higher the fitness value of an individual, the more times it is selected, and the greater the possibility of passing its structure to the offspring.
[0110] Specifically, replication, crossover, and mutation are the three main operators in genetic programming for generating new individuals in the next generation. Replication copies the 10 best individuals with the highest fitness values in the current generation to the next generation. The crossover operator exchanges the subtrees of two randomly selected individuals to generate two new individuals. The mutation operator randomly selects a subtree from a selected individual and replaces it with a newly generated random subtree, thus generating a new individual. The quality of the population gradually improves with iteration. The best individual in the last generation of the population is selected as the final crop customization characteristic for crop classification.
[0111] In this embodiment, preferably, after classifying the target crop based on the customized characteristics, it further includes:
[0112] Calculating the accuracy of crop classification;
[0113] When the accuracy of crop classification does not meet the preset accuracy condition, the initial image of the target area is cluster-classified to obtain a main cluster image and a secondary cluster image;
[0114] Initial feature extraction is performed on the master cluster image and the slave cluster image respectively to obtain the master cluster features and the slave cluster features;
[0115] Calculate the eigenvalues of the master cluster features, and perform binary classification on the eigenvalues of the master cluster features according to the feature threshold;
[0116] Obtain the true labels of the master cluster features, obtain the accuracy of the binary classification according to the true labels of the master cluster features, and obtain the fitness values of the master cluster features;
[0117] If the fitness value of the master cluster features is greater than the preset master fitness threshold, generate a second population according to the master cluster features and a third population according to the slave cluster features;
[0118] Use the selection method to select a second individual population from the second population;
[0119] For the second individual population, perform replication and mutation iteration, and collect individuals from the third population based on the first probability value and perform crossover iteration with the second individual population. When the number of iterations reaches the preset iteration threshold, select the best individual in the last generation as the new customized feature of the target crop;
[0120] Perform crop classification on the target crop based on the new customized feature, and obtain the classification mapping result of early crops or in-season crops according to the classification result;
[0121] If the fitness value of the master cluster features is not greater than the preset master fitness threshold, re-perform cluster classification on the initial image of the target area to obtain a new master cluster image and a slave cluster image until the fitness value of the master cluster features is greater than the preset master fitness threshold.
[0122] Specifically, the method for calculating the accuracy of crop classification includes:
[0123]
[0124] In the formula, OA is the Overall Accuracy, Kappa is the Kappa coefficient, Commission is the misclassification error, and Omission is the omission error. OA is the ratio of correctly classified samples to the total samples and is the most commonly used accuracy evaluation index. The Kappa coefficient represents the consistency between the classification label and the ground label. The Commission misclassification error refers to the percentage of samples classified as the target crop that do not belong to this category, while the Omission omission error refers to the percentage of target crop samples that are not correctly classified.
[0125] In a specific embodiment, the accuracy threshold and the accuracy determination condition can be set according to actual requirements. For example, it can be set that the accuracy threshold corresponding to any one of OA, Kappa, Commission, and Omission being exceeded satisfies the preset accuracy condition, or it can be set that the accuracy thresholds corresponding to all four parameters of OA, Kappa, Commission, and Omission being exceeded satisfy the preset accuracy condition. This embodiment does not make specific limitations.
[0126] Specifically, when the accuracy of crop classification does not meet the preset accuracy condition, it indicates that the accuracy of the customized features needs to be improved. In order to increase the diversity of genetic programming individuals under the premise of limited samples, in this embodiment, the initial images of the target area are classified into clusters. For example, 60% - 70% of the initial images are randomly selected as the main cluster images, and the remaining images are used as the subordinate cluster images, and initial feature extraction is performed separately.
[0127] Since the number of genetic programming individuals is further reduced after cluster classification, in order to reduce the influence of unstable image quality and sampling error, in this embodiment, the fitness value of the main cluster features is first verified. When the fitness value of the main cluster features is greater than the preset main fitness threshold, population update iteration is performed; if the fitness value of the main cluster features is not greater than the preset main fitness threshold, resampling is performed to form new main and subordinate cluster images, and the above fitness value verification is performed again.
[0128] After the fitness value verification is completed, a second population is generated according to the main cluster features, and a third population is generated according to the subordinate cluster features. The tournament selection method is used to select a second individual population from the second population. The subsequent replication and mutation iterations are the same as the previous method and will not be elaborated here; the crossover iteration method is as follows: individuals in the third population are collected based on the first probability value and cross-iterated with the second individual population, where the calculation method of the first probability value is as follows:
[0129]
[0130] In the formula, P1 is the first probability value, P0 is the initial crossover probability value at the first iteration, G i is the current iteration number, G max is the total iteration number.
[0131] It can be seen that the cross-iteration method provided in this embodiment can dynamically adjust the crossover probability in genetic programming, dynamically adjust the parameters of genetic crossover according to the evolutionary state of the population, so that the algorithm can maintain the balance between exploration and exploitation capabilities during the iteration process; at the same time, by smoothly adjusting the crossover probability with the number of iterations, it is possible to avoid premature convergence to a local optimal solution and increase the chance of finding the global optimal solution; as the number of iterations increases, the crossover probability can be smoothly reduced, that is, the closer the iteration result is to the optimal solution, the fewer crossover variables are introduced, thereby improving the convergence speed in the later stage of genetic programming.
[0132] In this embodiment, preferably, the target crops are classified based on the customized features, and the classification mapping results of early crops or in-season crops are obtained according to the classification results, including:
[0133] Input the customized features into the random forest classifier, and obtain the classification results through the random forest classifier and perform classification mapping.
[0134] Specifically, for each target crop, the customization of the target crop features is completed using the above process respectively. The initial populations of each target crop are the same. Due to the different corresponding fitness functions, the evolutionary directions of the initial features are different, so the meanings represented by each individual in the population are different. Input the customized feature set into the classifier, and combine the training sample set and the remote sensing image data to complete the crop classification task.
[0135] A total of two classification scenarios are set up to verify the effectiveness of the crop customized features in the classification of early and in-season crops with different time lengths. See the following table.
[0136]
[0137] In the first scenario, the spectral bands of single early and in-season images of different months are used as the input data for genetic programming. On the contrary, in the second scenario, the spectral bands of in-season images with different time lengths currently available are used as the input data for genetic programming. The purpose is to compare the mapping results of the current-season crops by adding richer phenological information. Use S i and S4 j as symbols for different experiments, where i takes values between 4 and 9 as the months of single images, and j takes values between 5 and 9 as the ending months of multiple consecutive images. S4, S5 and S 45 represent the mapping tasks of early crops with less vegetation information. Other classification schemes are used to simulate the mapping tasks of in-season crops, especially S 49 , which represents the traditional post-harvest crop mapping task.
[0138] The Random Forest (RF) classifier is selected for early and seasonal crop mapping. The overall accuracy (OA), Kappa coefficient, Commission error, and Omission error are used to evaluate the classification accuracy. The crop classification results using crop-specific features in different scenarios of single-image and multi-image are as follows Figure 6 shown, and the classification accuracy evaluation of the corresponding crop-specific features is shown in the following table.
[0139]
[0140] According to the statistical yearbook, the maize planting area is the largest in Kaiyuan City, followed by rice and soybeans. The classification results are consistent and reasonable. Maize is widely distributed in the study area, while rice and soybeans are mainly concentrated in the northern and central-eastern regions. Referring to the above table, since the OA value of S 48 is the highest, it is used as the basic reference for analyzing other results. In early crop mapping, the spatial distribution of soybeans varies greatly in S4, S5, and S 45 , but the classification results of maize and rice are highly consistent with those of S 48 . In seasonal crop mapping, the salt-and-pepper effect is more obvious in the classification results of S6 to S9 compared with those of the multi-image scenario. Compared with maize and soybeans, rice has a smaller range change and clearer boundaries due to its unique water and vegetation spectral characteristics.
[0141] Referring to the above table, as the growing season progresses, the performance of crop-specific features in early and seasonal crop mapping improves. In S4, S5, and S 45 of early crop mapping, even when only using one early image, the OA exceeds 75.00%. The misclassification and omission errors of soybeans are significantly higher than those of maize and rice. This is because the emergence characteristics of maize and soybeans are similar in April and May, and the vegetation coverage rate within 10-meter resolution pixels is relatively low. With the addition of images in the later growing season, the OA gradually increases, which is consistent with the results of other studies. In the first scenario (single image), from April (S4) to August (S8), the classification accuracy increases from 75.40% to 96.03%. Referring to Figure 2 , since the image in September shows the soil information after crop harvest and the reflectance of the three crops highly overlaps, the OA in September decreases by 8.73%. In the second scenario (multi-image), the classification errors of maize and soybeans in S 45 are reduced by 4.14% - 25.48% compared with S4 and S5. Referring to Figure 2 , due to the characteristics of water, the accuracy of rice starts to increase sharply from S 46 , which is consistent with S6. The overall accuracy starts to increase from S 45 and reaches the peak in S 48 and remains at the peak in S49 Remain unchanged. This indicates that each newly added seasonal image enriches the phenological information and improves the overall accuracy.
[0142] Furthermore, in this embodiment, two comparative experiments are also set up to compare the differences in classification performance between the customized features and the commonly used original spectral features (the aforementioned original spectral feature table) and vegetation indices (the following table).
[0143]
[0144] The above-mentioned vegetation indices describe various characteristics of vegetation, such as vegetation abundance, green chlorophyll content level, and vegetation senescence degree. For the slight difference in the number of customized features and the number of other types of features, the genetic programming in this embodiment is independently executed 3 times using different random seeds to obtain 3 customized features for each crop. These experiments use the same training samples and test samples for performance comparison. The accuracy of the results is evaluated using the OA and Kappa coefficients.
[0145] The visualization results of spectral features, vegetation indices, and crop customized features are as Figure 7 shown. Figure 2 The specific locations of six small regions are shown, and the corresponding OA and Kappa coefficients are shown in the following table.
[0146]
[0147] Since the customized feature results of S8 and S 48 have the highest OA in the two scenarios, they are used as reference figures to analyze other classification results. Compared with spectral features and vegetation indices, the misclassification error and omission error of the classification results of crop customized features under the two classification schemes are smaller. In S4, S5, and S7, spectral features and vegetation indices misclassify corn and soybeans as rice. In S6 and S 46 , spectral features miss some cultivated land where corn is planted. In S 47 , the classification results of the three features show a high degree of consistency. By comparing the results of S8 and S 48 , S9 and S 49 , the classification results using a single image are relatively scattered and are prone to misclassifying other types as crops, such as scattered vegetation and forest land in buildings. Generally speaking, under different image availability conditions, crop customized features are superior to spectral features and vegetation indices in early and in-season crop mapping.
[0148] At the same time, it can be seen from the above table that under the classification schemes of the two scenarios, the OA and Kappa values of the crop customization features are the highest, and its accuracy is significantly better than that of spectral features and vegetation indices, with the maximum differences being 9.53% and 10.31% respectively. The crop customization features show obvious advantages in the early crop mapping tasks. Using only one early image (S4) in April, the accuracy of spectral features is 9.53% lower than that of crop customization features. The vegetation index is 3.97% and 3.17% lower than the crop features in April (S4) and May (S5) respectively. In S 45 , the accuracies of spectral features and vegetation indices are not high, but lower than S5, indicating that the implicit phenological information is not effectively utilized. In contrast, the accuracy of crop features is increased to 80.16%, which is 6.35% to 7.94% higher than the other two types of features. The proposed genetic programming method can automatically capture additional phenological information, expand the variation range of crops, and provide effective discriminant information for the classifier. The overall accuracy gradually saturates in the middle and late growth seasons, with a small increase, and the customized crop features maintain the highest OA and Kappa.
[0149] Specifically, this embodiment proposes a new method for constructing crop customization features based on the genetic programming method, which has significant advantages in early and in-season crop mapping. The crop customization features first proposed in this embodiment have clear type information, solving the problem that the customization features, spectral features, and vegetation indices perform mediocrely due to similar spectral information in early crop mapping in the prior art. In addition, by decomposing the multi-classification task into multiple binary-classification tasks, genetic programming can generate more accurate and interpretable features, and at the same time provide flexible and transferable solutions for challenging classification tasks such as early crop mapping. At the same time, this embodiment also analyzes the structure and composition of the crop customization features, and compares the correlation and separability of the features with spectral features and vegetation indices.
[0150] Furthermore, the tree structure of genetic programming provides high interpretability for the crop customization features. Select S8 and S with the highest OA values in the two classification scenarios 48 as analysis examples. See Figure 8 , which is the visualization result of the crop customization features, showing the customized crop features for further analysis. These features are significantly different in size, structure, and features used. Compared with S8, S 48has fewer feature nodes, a simpler structure, and fewer spectral bands for the three crop characteristics. Since the spectral differences between crops are relatively small in a single image, the features represented by simple genetic programming trees cannot effectively distinguish target and non-target crops. Therefore, the genetic programming method tends to evolve trees with complex structures to generate more discriminative features, thereby improving the accuracy (fitness value) of identifying target crops. In contrast, in the case of multiple images, genetic programming can amplify the feature differences between target and non-target crops by combining different bands in different months, so features with simple structures can achieve high accuracy rates. In S8, the maize feature uses the same number of G, RE3, NIR, and SWIR1 nodes. In the rice feature, SWIR1 is the most used node. The soybean feature uses the most RE1 nodes. In S 48 , the R band and July are the most used band and month respectively in the maize feature. The rice feature mainly uses the B band and the R band, with a time span from May to July. The soybean feature uses the RE1 node in June. The band usage of the maize, rice, and soybean features is basically consistent with existing studies, indicating that genetic programming can find useful bands for the task of constructing features for different crops.
[0151] Furthermore, compared with commonly used vegetation indices, the customized crop features show uniqueness in terms of basis, structural composition, and usage scenarios. Vegetation indices are constructed by analyzing the spectral curves of vegetation, finding the bands that can distinguish vegetation from other types, and linearly combining them. The calculation of vegetation indices only involves several bands of contemporaneous images and requires professional knowledge and mechanism analysis. Vegetation indices are not limited to identifying specific crops, but when the crop types are diverse and complex, time series vegetation indices are often needed to extract specific phenological information to ensure the accuracy of classification. This also results in a relatively low classification accuracy rate of vegetation indices in early crop mapping. Genetic programming automatically generates and selects high-quality features that can distinguish target crops from non-target crops through a fitness function. Genetic programming can also construct features using different bands at different times based on the input time series images, so time information can be added to the features without expert knowledge. In addition, it can add crop type information to the features by changing the input samples, greatly reducing the subjectivity of constructing and selecting vegetation indices.
[0152] See Figure 9, which is the statistical result of crop customized feature nodes. By calculating the band percentages of crop customized features in two classification scenarios and analyzing the time and bands useful for early and in-season crop mapping, it can be obtained that in the case of a single image, almost all spectral bands are used to construct crop features. This indicates that it is challenging to distinguish three crops using only a few bands when the image availability is limited. Genetic programming generates various feature combinations to enhance spectral differences. In terms of bands, among the three crop features, the total percentage of SWIR1 and SWIR2 is significantly higher than that of other bands. In the multi-image scenario, the customized features of corn, rice, and soybeans show different spectral band usage trends. After adding new images to the classification task, the band usage in the corn feature has changed significantly. The spectral bands most used by the rice feature in June are S 46 、S 48 and S 49 , because rice exhibits unique moisture characteristics at this time. From S 46 to S 49 , the total band usage percentage of the soybean feature has been the lowest in April. Based on additional time information, genetic programming automatically selects bands with large spectral differences between crops, and the band types of customized features are greatly reduced.
[0153] Compared with spectral features and vegetation indices, the OA and Kappa of customized features are the highest in both single-image and multi-image classification cases. In the early crop mapping task, the spectral information of corn, soybeans, and rice is highly similar, and spectral bands and vegetation indices cannot effectively distinguish crops. Genetic programming randomly constructs a large number of alternative crop features, which can obtain the most effective band combinations to identify target crops. In the multi-image scenario, the addition of time information greatly simplifies the structure of crop customized features. Due to differences in planting time, growth conditions, and vegetation structure, crop spectra gradually show different degrees of vegetation characteristics from bare soil at the beginning of the growing season. Different from traditional vegetation indices, genetic programming can automatically select useful time bands and spectral bands and use multi-images to construct crop features. In contrast, single images do not have continuous information. The separability of crops can only be improved by the slight differences in reflectance of different bands. Therefore, customized crop features use almost all bands to expand spectral differences, and their structure is more complex compared with multi-images.
[0154] To illustrate the advantages of genetic programming features in capturing and amplifying feature differences, this embodiment also provides Figure 10 , the feature curves of April (S4) and August (S8) with the most similar spectra. The solid lines in the figure represent the feature averages, and the shaded areas represent the standard deviations. The spectral feature curve and the vegetation index curve in S4 almost completely overlap, that is Figure 10(a - b), so it is very difficult to directly and effectively distinguish corn, rice, and soybeans. The customized features of this embodiment improve the separability of crops, that is Figure 10 (c). The characteristic values of the target crops are higher than those of the non-target crops. For example, among the customized corn characteristics (Corn1 - Corn3), the characteristic values of corn are higher than those of rice and soybeans. During the critical period S8 of the crop growth season, the advantages of the genetic programming characteristics are more obvious. Since this embodiment uses 0 as the threshold to distinguish target crops and non-target crops during the feature evolution process, the curve shows an obvious dividing line, that is Figure 10 (f).
[0155] See Figure 11 , which is the t-SNE dimensionality reduction visualization result. Taking S4, S8, S 45 and S 48 as examples, the t-Distributed Stochastic Neighbor Embedding (t-SNE) is used to reduce the three types of features to two dimensions. In the first scenario, the accuracy rates of S4 and S8 are the highest, and the accuracy rates of S 45 and S 48 are the lowest; in the second scenario, the accuracy rates of S 45 and S 48 are the highest, and the accuracy rate of S 48 is the lowest. The t-SNE method is usually used for dimensionality reduction, that is, mapping high-dimensional data to low-dimensional while retaining the important structure of the original data. Since the spectra of corn, soybean, and some rice samples in S4 mainly show soil information, it is very difficult to distinguish the mixed samples. After adding only one image in May to S4, the customized features in S 45 show obvious clustering. In contrast, the spectral features and vegetation indices of crop samples are still highly mixed. The spectral features in S8 mix corn and soybean points, but when using the time series images in S 48 , the three crops can be clearly distinguished. The vegetation indices cannot distinguish corn and soybeans in S8 and S 48 . The customized features in S8, S 45 and S 48 can all clearly distinguish the three crops. This shows that the customized features constructed using genetic programming can capture the characteristic differences of different crops and expand the between-class separability of crops.
[0156] Furthermore, this embodiment uses Pearson correlation to calculate the correlation between spectral features, vegetation indices, and crop customized features for redundancy analysis. See Figure 12 . High correlations between features will lead to information redundancy, which is also one of the reasons affecting classification accuracy. Figure 12The grid values therein represent the average correlation between each feature and other features used for contemporaneous classification. Most of the samples in S4 represent soil information, so the correlation of spectral features is very high. The three crops in S6 show similar vegetation reflection characteristics, and the correlation between spectral features is also high. Except for EVI, the correlations of other vegetation indices are relatively high. The correlation between crop customization features is significantly lower than that between spectral features and vegetation indices. The reasons include that genetic programming uses two non-linear operators, sin and cos, in the process of constructing crop features; the construction processes of different features of the same crop are relatively independent.
[0157] In summary, in the embodiment of the present invention, by automatically generating initial features from the spectral bands of the initial image of the target area, features related to crops can be quickly extracted from the image data, reducing the workload of feature extraction and the dependence on a large number of images; binary classification is performed on the feature values of the initial features according to the preset feature threshold, so as to effectively identify the features that have the greatest impact on crop classification; by iterating the initial population through the selection method and genetic operators, the amount of images required can be reduced on the premise of ensuring accuracy, which is particularly beneficial for early crop or in-season crop mapping scenarios with high data collection costs or scarce data; based on the accurate customized features obtained through iteration, the classification accuracy of early and in-season crop mapping can be improved, providing more reliable information for mapping; at the same time, the method of this embodiment can also be applied to different early crops or in-season crops, with good generality and adaptability, and can be widely applied to different agricultural regions and crop types; therefore, this embodiment can obtain accurate early and in-season crop classification and mapping results while reducing the required sample size.
[0158] See Figure 13 , which is a schematic structural diagram of a crop early recognition system based on genetic programming customized features provided by an embodiment of the present invention, including:
[0159] An initialization module 201, configured to obtain an initial image of a target area and ground sample data collected on site, generate initial features of a target crop by using the spectral bands of the initial image, and generate an initial population according to the initial features of the target crop, where the target crop is an early crop or an in-season crop;
[0160] A feature classification module 202, configured to calculate the feature values of the initial features and perform binary classification on the feature values of the initial features according to a preset feature threshold;
[0161] A fitness module 203, configured to obtain the classification labels of ground samples according to the initial features, combine the true labels of the ground samples to obtain the accuracy of binary classification, and obtain the fitness value of the initial features according to the accuracy;
[0162] A customized feature module 204, which is used to iterate the initial population through selection methods and genetic operators to obtain the customized features of the target crop;
[0163] A classification mapping module 205, which is used to classify the target crop based on the customized features and obtain the classification mapping results of early crops or seasonal crops according to the classification results.
[0164] Furthermore, obtain the initial image of the target area and the ground sample data collected on-site, generate the initial features of the target crop using the spectral bands of the initial image, and generate the initial population according to the initial features of the target crop, including:
[0165] Obtain the initial image of the target area and multiple ground sample data collected on-site within the target area;
[0166] Collect the values of the visible light band, near-infrared band, and short-wave infrared band in the initial image;
[0167] Use the values of the visible light band, near-infrared band, and short-wave infrared band as leaf nodes, and obtain the tree-like structure individuals corresponding to the initial features according to the leaf nodes;
[0168] Select a part of the initial features and generate the first population using the complete method;
[0169] Select another part of the initial features and generate the second population using the growth method;
[0170] Use the first population and the second population as components of the initial population.
[0171] Furthermore, calculate the eigenvalue of the initial feature and perform binary classification on the eigenvalue of the initial feature according to the preset feature threshold, including:
[0172] Calculate the eigenvalue of the initial feature through the following formula:
[0173]
[0174] In the formula, Fe is the eigenvalue of the initial feature, SWIR1 is the value of the short-wave infrared band, NIR is the value of the near-infrared band, R and B are the values of the red band and the blue band, and 0.86 is a random constant in the range of [-1, 1];
[0175] If the eigenvalue of the initial feature is greater than the feature threshold, mark the initial feature corresponding to the eigenvalue of the initial feature as the target crop, otherwise mark it as a non-target crop.
[0176] Furthermore,
[0177] Obtain the classification labels of ground samples according to the initial features, combine with the true labels of the ground samples to obtain the accuracy of binary classification, and obtain the fitness value of the initial features, including:
[0178] According to the true labels of the ground samples and the obtained classification labels of the ground samples, identify the number of correctly classified ground samples, the number of non-target crop ground samples classified as target crops, the number of correctly classified non-target crop ground samples, and the number of target crop ground samples classified as non-target crops;
[0179] Obtain the fitness value of the initial features through the following formula:
[0180]
[0181] In the formula, Fit is the fitness value of the initial features, TP is the number of correctly classified ground samples, FP is the number of non-target crop ground samples classified as target crops, TN is the number of correctly classified non-target crop ground samples, and FN is the number of target crop ground samples classified as non-target crops.
[0182] Furthermore, iteratively process the initial population through the selection method and genetic operators to obtain the customized features of the target crop, including:
[0183] Adopt the tournament selection method, randomly select several individuals from the initial population, and further select the individual with the highest fitness value among the randomly selected individuals to obtain an intermediate population of individuals;
[0184] Adopt replication, crossover, and mutation algorithms to iteratively process the intermediate population of individuals. When the number of iterations reaches the preset iteration threshold, select the best individual in the last generation as the customized features of the target crop.
[0185] Furthermore, after classifying the target crop based on the customized features, it also includes:
[0186] Calculate the accuracy of crop classification;
[0187] When the accuracy of crop classification does not meet the preset accuracy condition, perform cluster classification on the initial image of the target area to obtain the main cluster image and the slave cluster image;
[0188] Extract the initial features from the main cluster image and the slave cluster image respectively to obtain the main cluster features and the slave cluster features;
[0189] Calculate the eigenvalue of the main cluster features, and perform binary classification on the eigenvalue of the main cluster features according to the feature threshold;
[0190] Obtain the true label of the main cluster features, obtain the accuracy of binary classification according to the true label of the main cluster features, and obtain the fitness value of the main cluster features;
[0191] If the fitness value of the main cluster features is greater than a preset main fitness threshold, a second population is generated according to the main cluster features, and a third population is generated according to the slave cluster features;
[0192] The second individual population is selected from the second population by the selection method;
[0193] For the second individual population, replication and mutation iterations are performed, and individuals in the third population are collected based on the first probability value and cross-iterated with the second individual population. When the number of iterations reaches the preset iteration threshold, the best individual in the last generation is selected as the new customized feature of the target crop;
[0194] Based on the new customized feature, crop classification of the target crop is performed, and a classification mapping result of early crops or in-season crops is obtained according to the classification result;
[0195] If the fitness value of the main cluster features is not greater than the preset main fitness threshold, the initial image of the target area is re-cluster classified to obtain a new main cluster image and a slave cluster image until the fitness value of the main cluster features is greater than the preset main fitness threshold.
[0196] Furthermore, crop classification of the target crop is performed based on the customized feature, and a classification mapping result of early crops or in-season crops is obtained according to the classification result, including:
[0197] The customized feature is input into a random forest classifier, and a classification result is obtained through the random forest classifier and classification mapping is performed.
[0198] In summary, in the embodiment of the present invention, initial features are automatically generated using the spectral bands of the initial image of the target area, which can quickly extract crop-related features from the image data, reducing the workload of feature extraction and the dependence on a large number of images; the eigenvalue of the initial feature is binary classified according to the preset feature threshold, thereby effectively identifying the features that have the greatest impact on crop classification; the initial population is iterated through the selection method and genetic operators, which can reduce the required amount of images on the premise of ensuring accuracy, which is particularly beneficial for the mapping scenarios of early crops or in-season crops with high data collection costs or scarce data; based on the accurate customized features obtained through iteration, the classification accuracy of early and in-season crop mapping can be improved, providing more reliable information for mapping; at the same time, the method of this embodiment can also be applied to different early crops or in-season crops, with good versatility and adaptability, and can be widely applied to different agricultural regions and crop types; therefore, this embodiment can obtain accurate early and in-season crop classification and mapping results while reducing the required sample size.
[0199] See Figure 14, which is a schematic diagram of a crop early recognition system based on customized features of genetic programming provided by an embodiment of the present invention. The crop early recognition system based on customized features of genetic programming in this embodiment includes: a processor 1, a memory 2, and a computer program stored in the memory 2 and executable on the processor, such as a crop early recognition program based on customized features of genetic programming. When the processor 1 executes the computer program, the steps in the above-mentioned various method embodiments of crop early recognition based on customized features of genetic programming are implemented. Alternatively, when the processor 1 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented.
[0200] Exemplarily, the computer program can be divided into one or more modules / units. One or more modules / units are stored in the memory and executed by the processor to complete the present invention. One or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the crop early recognition system based on customized features of genetic programming.
[0201] The crop early recognition system based on customized features of genetic programming may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the schematic diagram is only an example of the crop early recognition system based on customized features of genetic programming, and does not constitute a limitation on the crop early recognition system based on customized features of genetic programming. It may include more or fewer components than shown, or combine certain components, or different components. For example, the crop early recognition system based on customized features of genetic programming may also include input / output devices, network access devices, CAN buses, etc.
[0202] The embodiment of the present invention correspondingly provides a computer-readable storage medium, which is characterized in that the computer-readable storage medium includes a stored computer program, wherein when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the crop early recognition method based on customized features of genetic programming as in Embodiment 1 of the present invention.
[0203] The processor can be a Central Processing Unit (CPU), or it can also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the crop early recognition system customized based on genetic programming, and connects various parts of the entire crop early recognition system customized based on genetic programming through various interfaces and circuits.
[0204] The memory can be used to store computer programs and / or modules. By running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory, the processor realizes various functions of the crop early recognition system customized based on genetic programming. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the mobile phone (such as audio data, phone book, etc.). In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage devices.
[0205] Among them, if the modules / units integrated in the crop early recognition system customized with genetic programming features are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by a computer program instructing relevant hardware. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0206] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, in the attached drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that they have a communication connection, which can be specifically implemented as one or more communication buses or signal lines. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0207] The above are the preferred embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present invention.
Claims
1. A method for early crop recognition based on custom features of genetic programming, characterized in that Including: Obtain the initial image of the target area and the ground samples collected in the field, generate the initial features of the target crop using the spectral bands of the initial image, and generate an initial population according to the initial features of the target crop; Calculate the eigenvalue of the initial feature, and perform binary classification on the eigenvalue of the initial feature according to a preset feature threshold; Obtain the classification label of the ground sample according to the initial feature, combine it with the true label of the ground sample to obtain the accuracy of the binary classification, and obtain the fitness value of the initial feature according to the accuracy; Iterate the initial population through the selection method and genetic operators to obtain the customized features of the target crop; Classify the target crop based on the customized features, and obtain the classification mapping result of the early crop or the in-season crop according to the classification result; Among them, the obtaining the initial image of the target area and the ground samples collected in the field, generating the initial features of the target crop using the spectral bands of the initial image, and generating an initial population according to the initial features of the target crop includes: Obtain the initial image of the target area, and collect multiple ground samples in the field within the target area; Collect the values of the visible light band, the near-infrared band, and the short-wave infrared band in the initial image; Use the values of the visible light band, the near-infrared band, and the short-wave infrared band as leaf nodes, and obtain the tree-structured individual corresponding to the initial feature according to the leaf nodes; Select a part of the initial features and generate the first population using the complete method; Select another part of the initial features and generate the second population using the growth method; Use the first population and the second population as components of the initial population; Among them, the calculating the eigenvalue of the initial feature and performing binary classification on the eigenvalue of the initial feature according to a preset feature threshold includes: Calculate the eigenvalue of the initial feature through the following formula: ; In the formula, Fe is the eigenvalue of the initial feature, SWIR1 is the value of the short-wave infrared band, NIR is the value of the near-infrared band, R and B are the values of the red band and the blue band, and 0.86 is a random constant in the range of [-1, 1]; If the eigenvalue of the initial feature is greater than the feature threshold, mark the initial feature corresponding to the eigenvalue of the initial feature as the target crop, otherwise mark it as a non-target crop; Among them, the fitness value of the initial feature is obtained through the following formula: ; In the formula, Fit is the fitness value of the initial feature, TP is the number of correctly classified ground samples, FP is the number of non-target crop ground samples classified as target crops, TN is the number of correctly classified non-target crop ground samples, FN is the number of target crop ground samples classified as non-target crops; Among them, the iterating the initial population through the selection method and genetic operators to obtain the customized features of the target crop includes: Adopt the tournament selection method, randomly select several individuals from the initial population, and further select the individual with the highest fitness value among the randomly selected individuals to obtain an intermediate individual group; Iterate the intermediate individual group using the replication, crossover, and mutation algorithms. When the number of iterations reaches the preset iteration threshold, select the best individual in the last generation as the customized feature of the target crop.
2. The crop early identification method based on customizing features by genetic programming according to claim 1, characterized in that, The obtaining the classification label of the ground sample according to the initial feature, combining it with the true label of the ground sample to obtain the accuracy of the binary classification, and obtaining the fitness value of the initial feature according to the accuracy further includes: Identify the number of correctly classified ground samples, the number of non-target crop ground samples classified as target crops, the number of correctly classified non-target crop ground samples, and the number of target crop ground samples classified as non-target crops based on the true labels of the ground samples and the classified labels of the obtained ground samples.
3. The crop early identification method based on customizing features by genetic programming according to claim 1, characterized in that, After classifying the target crops based on the customized features, it further includes: Calculate the accuracy rate of the crop classification; When the accuracy rate of the crop classification does not meet the preset accuracy condition, perform cluster classification on the initial image of the target area to obtain the main cluster image and the slave cluster image; Extract initial features from the main cluster image and the slave cluster image respectively to obtain main cluster features and slave cluster features; Calculate the eigenvalue of the main cluster features, and perform binary classification on the eigenvalue of the main cluster features according to the feature threshold; Obtain the true label of the main cluster features, obtain the accuracy rate of the binary classification according to the true label of the main cluster features, and obtain the fitness value of the main cluster features; If the fitness value of the main cluster features is greater than the preset main fitness threshold, generate a second population according to the main cluster features and generate a third population according to the slave cluster features; Select a second individual population from the second population by the selection method; For the second individual population, perform replication and mutation iteration, and collect individuals from the third population based on the first probability value and perform crossover iteration with the second individual population. When the number of iterations reaches the preset iteration threshold, select the best individual in the last generation as the new customized feature of the target crop; Classify the target crops based on the new customized features and obtain the classification mapping result of early crops or in-season crops according to the classification result; If the fitness value of the main cluster features is not greater than the preset main fitness threshold, re-perform cluster classification on the initial image of the target area to obtain a new main cluster image and a slave cluster image until the fitness value of the main cluster features is greater than the preset main fitness threshold.
4. The crop early identification method based on customizing features by genetic programming according to claim 1, characterized in that Classifying the target crops based on the customized features and obtaining the classification mapping result of early crops or in-season crops according to the classification result includes: Input the customized features into a random forest classifier, and obtain the classification result and perform classification mapping through the random forest classifier.
5. A crop early recognition system based on customized features of genetic programming, characterized in that It includes: An initialization module for obtaining the initial image of the target area and the ground sample data collected on-site, generating initial features of the target crops using the spectral bands of the initial image, and generating an initial population according to the initial features of the target crops; A feature classification module for calculating the eigenvalue of the initial features and performing binary classification on the eigenvalue of the initial features according to the preset feature threshold; A fitness module for obtaining the classification label of the ground samples according to the initial features, obtaining the accuracy rate of the binary classification in combination with the true label of the ground samples, and obtaining the fitness value of the initial features according to the accuracy rate; A customized feature module for iterating the initial population through a selection method and genetic operators to obtain the customized features of the target crop; A classification mapping module for classifying the target crop based on the customized features and obtaining a classification mapping result of early crops or in-season crops according to the classification result; Among them, the crop early recognition system based on genetic programming customized features is also used to implement a crop early recognition method based on genetic programming customized features as described in any one of claims 1 to 4.
6. A crop early recognition system based on custom features of genetic programming, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a crop early recognition method based on genetic programming customized features as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program. Among them, when the computer program runs, it controls the device where the computer-readable storage medium is located to execute the crop early recognition method based on genetic programming customized features as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Calcium fertilizer and application thereof
CN101148371A
Cross-time-domain and cross-region crop classification and identification method and system
CN118470517A