Crop early-stage identification method and system based on genetic programming customization characteristics, and medium
Through customized feature construction methods based on genetic planning, the problems of limited image information and sample dependence in early and seasonal crop mapping are solved, and high-precision crop classification and mapping are achieved, which is suitable for diversified agricultural areas.
Patent Information
- Application Number
- CN202510117826.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2045-01-24
AI Technical Summary
The prior art has problems with limited image information and sample dependence in early and seasonal crop mapping, which leads to low classification accuracy and difficulty in adapting to crop rotation areas with large differences in crop types and proportions.
Using a customized feature construction method based on genetic planning, the initial images and ground samples of the target area are obtained, initial features are generated and iteratively optimized to obtain accurate crop custom features to achieve high-precision classification of early and seasonal crops.
While reducing the required sample size, it achieves accurate classification and mapping of early and seasonal crops, improves classification accuracy, and is applicable to different agricultural areas and crop types.
Smart Images

Figure CN120047826A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of crop recognition, and in particular, to a method, a system, and a 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 of 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, prior knowledge and historical images have been used for early and in-season crop mapping tasks. Some studies have used incremental classification methods 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 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 difference 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 to 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 custom 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 custom 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 feature values of the initial features, and perform binary classification on the feature values of the initial features according to a preset feature threshold;
[0011] Obtain the classification labels of the ground samples according to the initial features, combine with the true labels of the ground samples to obtain the accuracy of the binary classification, and obtain the fitness value of the initial features according to the accuracy;
[0012] Iterate the initial population through selection methods and genetic operators to obtain the custom features of the target crop;
[0013] Perform crop classification on the target crop based on the custom features, and obtain the classification mapping results of early crops or in-season crops according to the classification results.
[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, the following steps are further included:
[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 secondary cluster image;
[0037] Extract initial features from the main cluster image and the secondary cluster image respectively to obtain the main cluster features and the secondary 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, get 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 generate a third population according to the secondary 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 to 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 seasonal 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 secondary 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 the classification mapping result of early crops or in-season crops according to the classification result includes:
[0046] Inputting the customized features into a random forest classifier, obtaining the 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 of genetic programming, including:
[0048] An initialization module, configured to 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 an initial population according to the initial features of the target crop;
[0049] A feature classification module, 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;
[0050] A fitness module, configured to obtain the classification labels of the ground samples according to the initial features, combine the true labels of the ground samples to obtain the accuracy rate of binary classification, and obtain the 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 the customized features of the target crop;
[0052] A classification mapping module, configured to classify the target crop based on the customized features and obtain the 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 of 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, it implements the crop early recognition method based on customized features of genetic programming described in the above embodiment of the present invention.
[0054] Another embodiment of the present invention provides a computer-readable storage medium, which 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 of 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 the dependence on a large number of images; the eigenvalue of the initial feature is binary classified according to a preset feature threshold, thereby effectively identifying the features that have the greatest impact on crop classification; the initial population is iterated through a selection method and genetic operators, which can reduce the required amount of images while 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 versatility and adaptability, and can be widely applied to different agricultural regions and crop types; in summary, this embodiment can obtain accurate early and in-season crop classification and mapping results while reducing the required sample size. Description of the Drawings
[0056] Figure 1 is a schematic flowchart of a method for early crop recognition based on genetic programming customized features provided by an embodiment of the present invention;
[0057] Figure 2 is a schematic diagram of the geographical location of the research area provided by an embodiment of the present invention;
[0058] Figure 3 is the phenological calendar of the main crops in Kaiyuan City provided by an embodiment of the present invention;
[0059] Figure 4 is a schematic diagram of the spectral information of corn, rice and soybeans provided by an embodiment of the present invention;
[0060] Figure 5 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 is the original image and the corresponding customized feature crop classification result provided by an embodiment of the present invention;
[0062] Figure 7 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 is a schematic diagram of the visualization result of crop customized features provided by an embodiment of the present invention;
[0064] Figure 9 is the statistical result of crop customized feature nodes provided by an embodiment of the present invention;
[0065] Figure 10 is the S provided by an embodiment of the present invention 4 and S 8 are the characteristic values of different crop types in
[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 recognition 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 recognition 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] Referring to Figure 1 , which is a schematic flowchart of a crop early recognition 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, referring to 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, mainly planting corn, rice, and soybeans. The phenological information of the above main crops can be referred to 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 recognition method based on customized features by genetic programming 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. Refer to Figure 4 which shows the spectral characteristics of the three main crops, 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 Figure 4 (a), 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 dark 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 Figure 4 (b), the spectral profiles of different crops highly overlap, especially those of corn and soybeans, indicating that this poses a great challenge to early and in-season crop mapping.
[0078] S102. Calculate the eigenvalues of the initial features, and perform binary classification on the eigenvalues of the initial features 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 labels of the ground samples based on the initial features, combine them with the true labels of the ground samples to obtain the accuracy of the binary classification, and obtain the fitness value of the initial features 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 crops;
[0082] S105. Classify the target crops based on the 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] Take 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] Take 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 is composed 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 corresponding non-target crops.
[0105] For example, to customize maize characteristics, ground samples are classified into two categories: maize and non - maize samples, where non - maize 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 fitting 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 the selection method 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 the 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 sub - trees of two randomly selected individuals to generate two new individuals. The mutation operator randomly selects a sub - tree from a selected individual and replaces it with a newly generated random sub - tree, thereby generating a new individual. The quality of the population gradually improves with iteration. The best individual in the last - generation 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 subjected to cluster classification 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, get the accuracy of the binary classification according to the true labels of the master cluster features, and obtain the fitness value 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] Select a second individual population from the second population by the selection method;
[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 implementation, the accuracy threshold and accuracy judgment condition can be set according to actual needs. For example, it can be set to be greater than the accuracy threshold corresponding to one of OA, Kappa, Commission, and Omission to meet the preset accuracy condition. It can also be set to be greater than the accuracy thresholds corresponding to the four parameters of OA, Kappa, Commission, and Omission to meet 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 customized features needs to be improved. In order to improve the diversity of genetic planning individuals under the premise of limited samples, this embodiment clusters the initial images of the target area, for example, randomly selects 60% to 70% of the initial images as the main cluster images, and the remaining images as the slave cluster images, and performs initial feature extraction on each of them.
[0127] After cluster classification, the number of individuals in genetic planning is further reduced. In order to reduce the impact of unstable image quality and sampling errors, this embodiment first verifies the fitness value of the main cluster feature. When the fitness value of the main cluster feature is greater than the preset main fitness threshold, the population update iteration is performed; if the fitness value of the main cluster feature is not greater than the preset main fitness threshold, resampling is performed to form a new master-slave cluster image, and the above-mentioned fitness value verification is re-executed.
[0128] After completing the fitness value verification, the second population is generated according to the main cluster characteristics, and the third population is generated according to the secondary cluster characteristics. The second population is selected from the second population using the tournament selection method. The subsequent replication and mutation iterations are the same as the above method and will not be described here. The crossover iteration method is: based on the first probability value, individuals in the third population are collected and crossover iterated with the second population, where the first probability value is calculated as follows:
[0129]
[0130] Where P 1 is the first probability value, P 0 is the initial crossover probability value at the first iteration, G i is the current iteration number, G max is the total number of iterations.
[0131] It can be seen that the cross-iteration method provided in this embodiment can dynamically adjust the crossover probability in genetic programming, and can 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 the 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 the 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 conduct classification mapping.
[0134] Specifically, for each target crop, the customization of the target crop features is completed respectively using the above process. 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 set of customized features 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, as shown in 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 available time lengths are used as the input data for genetic programming. The purpose is to compare the mapping results of the current season's crops by adding richer phenological information. Use S i and S4 j as the 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. S 4 、S 5 and S 45 represent the early crop mapping tasks with less vegetation information. Other classification schemes are used to simulate the in-season crop mapping tasks, especially S 49 , which represents the traditional post-harvest crop mapping task.
[0138] The Random Forest (RF) classifier was selected for early and in-season crop mapping. The overall accuracy (OA), Kappa coefficient, commission error, and omission error were used to evaluate the classification accuracy. The crop classification results using crop-specific features in different scenarios of single and multiple images 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 S 4 , S 5 and S 45 , but the classification results of maize and rice are highly consistent with those of S 48 . In in-season crop mapping, the salt-and-pepper effect is more obvious in the classification results of S 6 to S 9 compared with the results of the multiple-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 in-season crop mapping improves. In S 4 , S 5 and S 45 of early crop mapping, even when only one early image is used, the OA exceeds 75.00%. The commission 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 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 (S 4 ) to August (S 8 ), 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 overlaps highly, the OA in September decreases by 8.73%. In the second scenario (multiple images), the classification errors of maize and soybeans in S 45 are higher than those in S 4 and S 5It decreased by 4.14% - 25.48%. See Figure 2 , due to the characteristics of water, the accuracy of rice started to rise sharply from S 46 , which is consistent with S 6 . The overall accuracy started to increase from S 45 , reached the peak at S 48 , and remained unchanged at S 49 . This indicates that each newly added seasonal image enriches the phenological information and improves the overall accuracy.
[0142] Furthermore, this embodiment also sets up two comparative experiments 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 of 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 OA of the customized feature results of S 8 and S 48 is the highest in two scenarios, it is used as a reference figure to analyze other classification results. Compared with spectral features and vegetation indices, the misclassification error and omission error of the crop customized feature classification results under the two classification schemes are smaller. In S 4 , S 5 and S 7 , spectral features and vegetation indices misclassify corn and soybeans as rice. In S 6 and S 46 , spectral features omit 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 S 8 and S 48 , S 9 and S 49As for the results, the classification results using a single image are rather scattered, and it is easy to misclassify 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 crop-customized 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. Crop-customized features show obvious advantages in early crop mapping tasks. Using only one early image in April (S 4 ), the accuracy of spectral features is 9.53% lower than that of crop-customized features. The vegetation index is 3.97% and 3.17% lower than crop features in April (S 4 ) and May (S 5 ) respectively. In S 45 , the accuracy of spectral features and vegetation indices is not high, but lower than that of 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 stages of the growing season, 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-customized features based on the genetic programming method, which has significant advantages in early and in-season crop mapping. The crop-customized features first proposed in this embodiment have clear type information, solving the problem that the customized 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 crop-customized 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 crop-customized features. Select S 8 and S 48 with the highest OA values in the two classification scenarios as analysis examples. Refer to Figure 8 , which is the visualization result of crop-customized features, showing the customized crop features for further analysis. These features are significantly different in size, structure, and features used. Compared with S8 In contrast, S 48 has fewer characteristic 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 characteristics 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 characteristics, thereby improving the accuracy (fitness value) of identifying target crops. In contrast, in the case of multiple images, genetic programming can amplify the characteristic differences between target and non-target crops by combining different bands in different months. Therefore, characteristics with a simple structure can achieve a high accuracy rate. In S 8 , the maize characteristics use the same number of G, RE3, NIR, and SWIR1 nodes. In the rice characteristics, SWIR1 is the most used node. The soybean characteristics use the RE1 node the most. In S 48 , the R node and July are the most used band and month respectively in the maize characteristics. The rice characteristics mainly use the B node and the R node, with a time span from May to July. The soybean characteristics use the RE1 node in June. The band usage of the maize, rice, and soybean characteristics is basically consistent with existing research, indicating that genetic programming can find useful bands for the task of constructing characteristics of different crops.
[0151] Furthermore, compared with commonly used vegetation indices, the customized crop characteristics show uniqueness in terms of basis, structural composition, and usage scenarios. Vegetation indices are constructed by analyzing the spectral curves of vegetation, finding distinguishable bands between vegetation and other types, and linearly combining them. The calculation of vegetation indices only involves several bands of synchronous 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 required to extract specific phenological information to ensure the accuracy of classification. This also results in a relatively low classification accuracy of vegetation indices in early crop mapping. Genetic programming automatically generates and selects high-quality characteristics that can distinguish target crops from non-target crops through the fitness function. Genetic programming can also construct characteristics using different bands at different times based on the input time-series images, so time information can be added to the characteristics without expert knowledge. In addition, it can add crop type information to the characteristics by changing the input samples, greatly reducing the subjectivity in 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. From the perspective of bands, among the three crop features, the total percentages of SWIR1 and SWIR2 are significantly higher than those 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 usage of bands in corn features has changed significantly. The spectral bands most used by rice features 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 percentage of band usage in soybean features 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 structures are 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 characteristic curves of April (S 4 ) and August (S 8 ) with the most similar spectra. The solid lines in the figure represent the feature averages, and the shadows represent the standard deviations. The spectral feature curves and vegetation index curves in S 4 almost completely overlap, that is Figure 10(a - b), so it is 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 features (Corn1 - Corn3), the characteristic values of corn are higher than those of rice and soybeans. At the critical period S of the crop growth season 8 , the advantages of the genetic programming features 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 S 4 , S 8 , 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 accuracies of S 4 and S 8 are the highest, and the accuracies of S 45 and S 48 are the lowest; in the second scenario, the accuracies of S 45 and S 48 are the highest, and the accuracy 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 preserving the important structure of the original data. Since the spectra of corn, soybean, and some rice samples in S 4 mainly show soil information, it is difficult to distinguish the mixed samples. Only after adding an image in May to S 4 , 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 S 8 mix corn and soybean samples, 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 S 8 and S 48 . The customized features in S 8 , S 45 and S 48 can all clearly distinguish the three crops. This indicates 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] Further, in this embodiment, the Pearson correlation is used to calculate the correlations among spectral features, vegetation indices, and crop customization features for redundancy analysis. Refer to Figure 12 . High correlations between features can lead to information redundancy, which is also one of the reasons affecting classification accuracy. Figure 12 The grid values in it represent the average correlation between each feature and other features used for contemporaneous classification. S 4 Most of the samples in it represent soil information, so the correlations of spectral features are very high. S 6 The three crops in it show similar vegetation reflection characteristics, and the correlations between spectral features are also high. Except for EVI, the correlations of other vegetation indices are relatively high. The correlations between crop customization features are significantly lower than those 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, initial features can be 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 feature values of the initial features are binary-classified according to a preset feature threshold, so as to effectively identify 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 early crop or in-season crop mapping scenarios with high data collection costs or scarce data; based on the accurate customization 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, having 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] Refer to 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 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 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] The fitness module 203 is used to 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 according to the accuracy;
[0162] The customized feature module 204 is used to iterate the initial population through the selection method and genetic operators to obtain the customized features of the target crop;
[0163] The classification mapping module 205 is used to classify the target crop based on the customized features, and obtain the classification mapping results of early crops or in-season crops according to the classification results.
[0164] Furthermore, obtaining the initial image of the target area and the ground sample data collected in the field, generating the initial features of the target crop by using the spectral bands of the initial image, and generating the initial population according to the initial features of the target crop, including:
[0165] Obtaining the initial image of the target area and multiple ground sample data collected in the field within the target area range;
[0166] Collecting the values of the visible light band, near-infrared band, and short-wave infrared band in the initial image;
[0167] Taking the values of the visible light band, near-infrared band, and short-wave infrared band as leaf nodes, and obtaining the tree-structured individuals corresponding to the initial features according to the leaf nodes;
[0168] Selecting a part of the initial features and generating the first population by the complete method;
[0169] Selecting another part of the initial features and generating the second population by the growth method;
[0170] Taking the first population and the second population as components of the initial population.
[0171] Furthermore, calculating the eigenvalue of the initial feature, and performing binary classification on the eigenvalue of the initial feature according to the preset feature threshold, including:
[0172] Calculating the eigenvalue of the initial feature by 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, 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.
[0176] Furthermore,
[0177] 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 binary classification, and obtain the fitness value of the initial feature according to the accuracy, including:
[0178] 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;
[0179] The fitness value of the initial feature is obtained by the following formula:
[0180]
[0181] 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.
[0182] Furthermore, the initial population is iterated 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 individual group;
[0184] Adopt the replication, crossover, and mutation algorithms to iterate the intermediate individual group. 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.
[0185] Furthermore, after classifying the target crop based on the customized feature, 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 eigenvalues of the main cluster features and perform binary classification on the eigenvalues of the main cluster features according to the feature threshold;
[0190] Obtain the true labels of the main cluster features, calculate the accuracy of the binary classification based on the true labels 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 the preset main fitness threshold, generate a second population based on the main cluster features and a third population based on the subordinate cluster features;
[0192] Select a second individual population from the second population using the selection method;
[0193] For the second individual population, perform replication 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. 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;
[0194] 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;
[0195] 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 subordinate cluster image until the fitness value of the main cluster features is greater than the preset main fitness threshold.
[0196] Furthermore, perform crop classification on the target crop based on the customized feature and obtain the classification mapping result of early crops or in-season crops according to the classification result, including:
[0197] Input the customized feature into a random forest classifier, and obtain the classification result and perform classification mapping through the random forest classifier.
[0198] In summary, in the embodiments 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, 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 required amount of images can be reduced while ensuring the 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 accurate 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 versatility and adaptability, and can be widely applied to different agricultural regions and crop types. Therefore, this embodiment can obtain accurate early-season 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 genetic programming customized features provided by an embodiment of the present invention. The crop early recognition system based on genetic programming customized features 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 genetic programming customized features. When the processor 1 executes the computer program, the steps in the above-mentioned various embodiments of the crop early recognition method based on genetic programming customized features 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 the instruction segments are used to describe the execution process of the computer program in the crop early recognition system based on genetic programming customized features.
[0201] The crop early recognition system based on genetic programming customized features 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 genetic programming customized features, and does not constitute a limitation on the crop early recognition system based on genetic programming customized features. It may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the crop early recognition system based on genetic programming customized features may also include input / output devices, network access devices, CAN buses, etc.
[0202] An embodiment of the present invention correspondingly provides a computer-readable storage medium, 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 genetic programming customized features as in Embodiment 1 of the present invention.
[0203] The processor can be a Central Processing Unit (CPU), or 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 the processor can also be any conventional processor, etc. The processor is the control center of the crop early recognition system based on genetic programming customized features, and uses various interfaces and circuits to connect all parts of the crop early recognition system based on genetic programming customized features.
[0204] The memory can be used to store computer programs and / or modules. The processor realizes various functions of the crop early recognition system based on genetic programming customized features by running or executing the computer programs and / or modules stored in the memory, and by calling the data stored in the memory. 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 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-mentioned embodiment methods of the present invention, it can also be completed by instructing relevant hardware through a computer program. 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-mentioned 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 disk, 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 only 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 is the preferred implementation manner of the present invention. It should be noted 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 identification based on customized features of genetic programming, characterized in that: include: Acquire an initial image of the target area and ground samples collected on site, generate initial features of the target crop using spectral bands of the initial image, and generate an initial population based on the initial features of the target crop; Calculating the feature value of the initial feature, and performing binary classification on the feature value of the initial feature according to a preset feature threshold; Obtaining classification labels of ground samples according to the initial features, obtaining the accuracy of binary classification in combination with the real labels of the ground samples, and obtaining the fitness value of the initial features according to the accuracy; Iterating the initial population through selection method and genetic operator to obtain customized characteristics of the target crop; The target crops are classified based on the customized features, and classification mapping results of early crops or seasonal crops are obtained according to the classification results.
2. The method for early crop identification based on genetic programming customized features as claimed in claim 1, characterized in that: The step of acquiring an initial image of the target area and ground samples collected on site, generating initial features of the target crop using spectral bands of the initial image, and generating an initial population according to the initial features of the target crop includes: Obtain an initial image of the target area and collect multiple ground samples on site within the target area; Collecting the values of the visible light band, the near infrared band and the short-wave infrared band in the initial image; The values of the visible light band, the near infrared band, and the short-wave infrared band are used as leaf nodes, and the tree structure individuals corresponding to the initial features are obtained according to the leaf nodes; Selecting a portion of the initial features and using a complete method to generate a first population; Selecting the initial features described in another part, and using the growth method to generate a second population; The first population and the second population are taken as components of the initial population.
3. The method for early crop identification based on genetic programming customized features as claimed in claim 2, characterized in that: The calculating the feature value of the initial feature and performing binary classification on the feature value of the initial feature according to a preset feature threshold comprises: The eigenvalue of the initial feature is calculated by the following formula: Wherein, Fe is the characteristic value of the initial characteristic, 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 feature value of the initial feature is greater than the feature threshold, the initial feature corresponding to the feature value of the initial feature is marked as a target crop, otherwise it is marked as a non-target crop.
4. The method for early crop identification based on customized features of genetic programming as claimed in claim 3, characterized in that: The step of obtaining the classification labels of the ground samples according to the initial features, obtaining the accuracy of the binary classification in combination with the real labels of the ground samples, and obtaining the fitness value of the initial features according to the accuracy includes: According to the true labels of the ground samples and the classification labels of the obtained ground samples, 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 are identified; The fitness value of the initial feature is obtained by the following formula: Wherein, 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.
5. The method for early crop identification based on genetic programming customized features as claimed in claim 1, characterized in that: The initial population is iterated by the selection method and the genetic operator to obtain the customized characteristics of the target crop, including: A tournament selection method is used to randomly select a number of individuals from the initial population, and individuals with the highest fitness values are further selected from the randomly selected individuals to obtain an intermediate individual group; The intermediate individual group is iterated by using replication, crossover and mutation algorithms. When the number of iterations reaches a preset iteration threshold, the best individual in the last generation is selected as the customized feature of the target crop.
6. The method for early crop identification based on genetic programming customized features as claimed in claim 1, characterized in that: After classifying the target crop based on the customized features, the method further includes: Calculating the accuracy of the crop classification; When the accuracy of the crop classification does not meet the preset accuracy condition, clustering the initial image of the target area to obtain a main cluster image and a slave cluster image; Performing initial feature extraction on the main cluster image and the slave cluster image respectively to obtain main cluster features and slave cluster features; Calculating the feature value of the main cluster feature, and performing binary classification on the feature value of the main cluster feature according to the feature threshold; Obtaining the true label of the main cluster feature, obtaining the accuracy of binary classification according to the true label of the main cluster feature, and obtaining the fitness value of the main cluster feature; If the fitness value of the main cluster feature is greater than a preset main fitness threshold, a second population is generated according to the main cluster feature, and a third population is generated according to the slave cluster feature; A second population is obtained by selecting from the second population using a selection method; The second individual population is replicated and mutated iteratively, and individuals in the third population are collected based on the first probability value, and cross-iterated with the second individual population, and when the number of iterations reaches a preset iteration threshold, the best individual in the last generation is selected as a new customized feature of the target crop; Classifying the target crop based on the new customized features, and obtaining classification mapping results of early crops or seasonal crops according to the classification results; If the fitness value of the main cluster feature is not greater than the preset main fitness threshold, the initial image of the target area is re-clustered to obtain a new main cluster image and a slave cluster image until the fitness value of the main cluster feature is greater than the preset main fitness threshold.
7. The method for early crop identification based on genetic programming customized features as claimed in claim 1, characterized in that: The crop classification of the target crop based on the customized features and obtaining classification mapping results of early crops or seasonal crops according to the classification results include: The customized features are input into a random forest classifier, and a classification result is obtained through the random forest classifier and classification mapping is performed.
8. A crop early identification system based on customized features of genetic programming, characterized in that: include: An initialization module, used to obtain an initial image of a target area and ground sample data collected on site, generate initial features of the target crop using spectral bands of the initial image, and generate an initial population based on the initial features of the target crop; A feature classification module, used to calculate the feature value of the initial feature and perform binary classification on the feature value of the initial feature according to a preset feature threshold; A fitness module, used to obtain the classification label of the ground sample according to the initial feature, obtain the accuracy of binary classification in combination with the real label of the ground sample, and obtain the fitness value of the initial feature according to the accuracy; A customized feature module, used for iterating the initial population through a selection method and a genetic operator to obtain customized features of the target crop; A classification mapping module is used to classify the target crops based on the customized features, and obtain classification mapping results of early crops or seasonal crops according to the classification results.
9. A crop early identification system based on customized features of genetic programming, characterized in that: It comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements a method for early crop identification based on customized characteristics of genetic planning as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the early crop identification method based on genetic planning customized features as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Calcium fertilizer and application thereof
CN101148371A
Crop high-precision drawing method and system
CN114419367A
Crop remote sensing recognition method and device based on multi-classification probability
CN116071600A
Cross-time-domain and cross-region crop classification and identification method and system
CN118470517A
Automated process for dynamic material classification in remotely sensed imagery
US20210150183A1