Crop recognition method and system based on open pcs and deep learning

By combining Transformer and PCA models, this crop identification method solves the problems of insufficient model generalization and imperfect feature extraction in existing crop identification technologies. It achieves high-precision crop identification, adapts to different environments and growth conditions, and improves the stability and practicality of identification.

CN121600414BActive Publication Date: 2026-04-28XIAN CENT OF GEOLOGICAL SURVEY CGS
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAN CENT OF GEOLOGICAL SURVEY CGS
Filing Date
2026-01-30
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing deep learning-based crop identification methods suffer from problems such as insufficient model generalization, imperfect feature extraction, information loss due to non-end-to-end dimensionality reduction, and rigid threshold settings in multi-temporal remote sensing image processing, which affect identification accuracy and efficiency.

Method used

By combining the Transformer model and the PCA model, and through preprocessing, feature extraction, dynamic dimensionality reduction, and contribution scoring of multi-temporal remote sensing image samples, accurate classification of known and unknown crops is achieved. Crop identification is performed using OpenPCS and deep learning methods.

Benefits of technology

It improves the accuracy and efficiency of crop identification, can accurately distinguish between known and unknown crops in an open set environment, dynamically adapts to changes in feature distribution, and enhances the reliability and applicability of identification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121600414B_ABST
    Figure CN121600414B_ABST
Patent Text Reader

Abstract

The present application relates to the field of satellite remote sensing image processing, and particularly relates to a crop recognition method and system based on OpenPCS and deep learning; a multi-temporal remote sensing image sample is acquired; the multi-temporal remote sensing image sample is preprocessed, the sample data structure after processing is input into a Transform model for feature extraction, and a high-dimensional feature vector is obtained; a PCA model is dynamically generated based on the high-dimensional feature vector; the high-dimensional feature vector is reduced in dimension by using the PCA model, and a low-dimensional feature is obtained; the contribution score is calculated based on the low-dimensional feature, and the classification and recognition of known class crops and unknown class crops are realized; the present application realizes the improvement of crop recognition precision and efficiency in multi-temporal remote sensing images, uses the Transform model for feature extraction, dynamically generates the PCA model for dimension reduction and contribution score calculation, and accurately distinguishes known class crops and unknown class crops in an open set environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of satellite remote sensing image processing, specifically to a crop identification method and system based on OpenPCS and deep learning. Background Technology

[0002] Multi-temporal remote sensing imagery, with its ability to observe multiple time points, has become a key data support for the precise identification of crops and has important application value in the field of agricultural remote sensing.

[0003] However, existing deep learning-based identification methods face many technical problems when processing multi-temporal remote sensing images, such as insufficient model generalization and imperfect feature extraction, which seriously limit the accuracy and efficiency of crop identification.

[0004] Currently, the technical solutions for solving the problem of precise crop identification mainly rely on deep learning models. For example, convolutional neural networks are trained on closed sets to extract spatial features from multi-temporal images. At the same time, dimensionality reduction methods such as principal component analysis are used to compress high-dimensional data. These dimensionality reduction models are usually independent of the deep learning training process, i.e., they adopt an offline training mode. In addition, a fixed threshold is set to distinguish unknown categories to differentiate between known and unknown crop types. The above solutions aim to capture the temporal changes of crop growth through multi-temporal data and simplify the feature processing process.

[0005] While the aforementioned methods have been applied to crop identification to some extent, they still have significant limitations. First, the models are trained on a closed set, making it impossible to learn and identify unknown crop types outside the training set, thus limiting the models' scalability and practicality. Second, PCA (Principal Component Analysis) dimensionality reduction is mostly trained offline, disconnected from the deep learning model training process. This non-end-to-end approach makes it impossible to dynamically adapt to changes in feature distribution, and phenological information is easily lost during dimensionality reduction, affecting identification accuracy. Third, traditional models are insufficient in feature fusion, struggling to consider both spatial details and multi-temporal features, resulting in single-feature acquisition and low model fit. Fourth, the threshold setting for unknown classes is rigid, lacking quantitative basis based on data distribution, making it difficult to adapt to the feature differences of different crop types, thereby reducing the discrimination effect. Summary of the Invention

[0006] To address the problems mentioned in the prior art, this invention proposes a crop identification method and system based on OpenPCS (Open Set Principal Component Score) and deep learning. By combining the Transformer model and the PCA model, the accuracy of model identification and prediction is further improved, thus solving the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention adopts the following technical solution:

[0008] This invention proposes a crop identification method based on OpenPCS and deep learning, comprising the following steps:

[0009] S1. Acquire multi-temporal remote sensing image samples;

[0010] S2. Preprocess the multi-temporal remote sensing image samples to obtain the processed sample data structure;

[0011] S3. Input the processed sample data structure into the Transformer model for feature extraction to obtain high-dimensional feature vectors; dynamically generate a PCA model based on the high-dimensional feature vectors.

[0012] S4. Use the PCA model to reduce the dimensionality of the high-dimensional feature vector to obtain low-dimensional features; calculate the contribution score based on the low-dimensional features.

[0013] S5. Based on a preset scoring threshold, the system classifies and identifies known and unknown crop types by judging the contribution score and the classification output probability of the Transformer model.

[0014] As a further improvement of the present invention, the multi-temporal remote sensing image sample in S1 is 224×224 pixels, containing 3 temporal phases, and each temporal phase contains 6 channels.

[0015] As a further improvement of the present invention, step S2 involves preprocessing the multi-temporal remote sensing image samples to obtain a processed sample data structure, including:

[0016] Correct the multi-temporal remote sensing image samples to obtain the corrected samples;

[0017] The corrected samples are then standardized to obtain standardized samples.

[0018] The standardized samples were time-series aligned based on key phenological periods to obtain aligned samples.

[0019] Data augmentation is performed on the aligned samples to obtain the processed sample data structure.

[0020] As a further improvement of the present invention, the parameters of the Transformer model in S3 include:

[0021] The Transformer model has 24 encoder layers and outputs four feature maps from the encoder layers 5, 11, 17, and 23, respectively; the Transformer model has 24 multi-head attention heads.

[0022] The Transformer model also includes a classification head for outputting classification probabilities, wherein the classification head categories are matched with the known number of crops;

[0023] The high-dimensional feature vector is formed by concatenating the features extracted from the four feature maps and then upsampling them.

[0024] As a further improvement of the present invention, the PCA model in S3 includes:

[0025] Calculating the covariance matrix using high-dimensional eigenvectors C The calculation formula is as follows:

[0026]

[0027] In the formula: The characteristic matrix; The mean vector is N; N is the number of samples. Characteristic matrix transpose;

[0028] Singular value decomposition is performed on the covariance matrix to obtain the principal component matrix, and the first 110 principal components are retained.

[0029] The principal component matrix is ​​updated using the exponential moving average method, and its calculation formula is as follows:

[0030]

[0031] In the formula: P current This is the current principal component matrix; α The smoothing coefficient is set to 0.9. P new This is the updated principal component matrix; P old This is the principal component matrix from the previous round;

[0032] Repeat the above steps until the principal component matrix is ​​stable.

[0033] As a further improvement of the present invention, in step S4, the high-dimensional feature vector is reduced in dimensionality using a PCA model to obtain low-dimensional features; the contribution score is calculated based on the low-dimensional features, including:

[0034] The PCA model is used to linearly project high-dimensional feature vectors to obtain low-dimensional features, and the calculation formula is as follows:

[0035]

[0036] In the formula: raw is a high-dimensional feature vector; red represents a low-dimensional feature; PPrincipal component matrix; It is the mean vector;

[0037] Assuming the low-dimensional features follow a multivariate normal distribution, calculate the log-likelihood value of the low-dimensional features. ( red The calculation formula is as follows:

[0038]

[0039] In the formula: Σ is the feature mean vector; Σ is the covariance matrix; It is the inverse of the covariance matrix Σ; Low-dimensional features The dimension;

[0040] After normalizing the log-likelihood value, the contribution score S is obtained, which is calculated as follows:

[0041]

[0042] In the formula: Let be the log-likelihood value to be normalized. The minimum log-likelihood value in the original dataset. It represents the maximum log-likelihood value in the original dataset.

[0043] As a further improvement of the present invention, in step S5, based on a preset scoring threshold, the classification and identification of crops of known and unknown classes are achieved by judging the contribution score and the classification output probability of the Transformer model, including:

[0044] A scoring threshold is generated based on the distribution of contribution scores. The calculation formula is as follows:

[0045]

[0046] In the formula: The proportion of quantiles 0 < <1;S val This is a dataset for calculating quantiles; quantile is the quantile function.

[0047] If the contribution score of the multi-temporal remote sensing image samples is not lower than the scoring threshold, and the classification output probability of the Transformer model is not lower than 0.5, then the crop is identified as a known crop and the crop category is output; otherwise, it is identified as an unknown crop.

[0048] This invention proposes a crop identification system based on OpenPCS and deep learning, comprising:

[0049] The acquisition module is used to acquire multi-temporal remote sensing image samples;

[0050] The preprocessing module is used to preprocess multi-temporal remote sensing image samples to obtain the processed sample data structure.

[0051] The generation module is used to input the processed sample data structure into the Transformer model for feature extraction to obtain high-dimensional feature vectors; and dynamically generate a PCA model based on the high-dimensional feature vectors.

[0052] The contribution score calculation module is used to reduce the dimensionality of the high-dimensional feature vector using the PCA model to obtain low-dimensional features; and to calculate the contribution score based on the low-dimensional features.

[0053] The identification module is used to classify and identify known and unknown types of crops based on a preset scoring threshold by judging the contribution score and the classification output probability of the Transformer model.

[0054] This invention proposes a crop identification device based on OpenPCS and deep learning, comprising a processor and a memory, wherein the processor executes a computer program stored in the memory to implement the crop identification method based on OpenPCS and deep learning as described above.

[0055] This invention proposes a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the crop identification method based on OpenPCS and deep learning as described above.

[0056] Compared with the prior art, the present invention achieves the following technical effects:

[0057] This invention improves the accuracy and efficiency of crop identification in multi-temporal remote sensing images. It uses the Transformer model for feature extraction and generates a PCA model for dimensionality reduction and contribution score calculation, thereby accurately distinguishing between known and unknown crop types in an open set environment. This solves the problem that traditional models cannot identify unknown crop types. In addition, end-to-end dynamic PCA training avoids information loss caused by offline dimensionality reduction, greatly improving the reliability and applicability of the identification results.

[0058] This invention ensures the consistency of input data by employing a sample data structure of 224×224 pixels, containing 3 time phases and 6 channels, providing a multi-dimensional information foundation for the Transformer model and effectively improving the stability of subsequent feature extraction and classification processes. The preprocessing step not only eliminates the influence of external factors such as illumination and terrain, but also enhances temporal consistency through phenological period alignment, while data augmentation improves the Transformer model's adaptability to different environments and growth conditions.

[0059] The Transformer model of this invention employs a 24-layer encoder and a 24-head multi-head attention mechanism, and outputs feature maps from specific layers to achieve multi-level feature extraction and fusion. By concatenating and upsampling, a high-dimensional feature vector is formed, providing a foundation for subsequent dimensionality reduction and contribution scoring. The generation and updating of the PCA model are achieved through the exponential moving average method, ensuring the stability and adaptability of the principal component matrix. It can respond to changes in feature distribution in real time and avoid the lag problem of traditional offline PCA.

[0060] The contribution score is calculated using the PCA model based on the assumption of a multivariate normal distribution. Through log-likelihood and normalization, the PCA model can objectively evaluate the similarity of each sample to known crop classes, providing a basis for classification decisions. By using a preset scoring threshold and combining it with the classification output probability of the Transformer model, the method can effectively detect unknown crop classes while ensuring the accuracy of known class identification, thus improving the practicality of the method. Attached Figure Description

[0061] Figure 1 This is a schematic diagram of the overall process of this embodiment;

[0062] Figure 2 This is a schematic diagram of the sample data structure in this embodiment;

[0063] Figure 3 This is a schematic diagram of the ROC (Receiver Operating Characteristic) curve in this embodiment;

[0064] Figure 4 This is the classification result of known and unknown types of crops in this embodiment. Detailed Implementation

[0065] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0066] See Figure 1 This embodiment proposes a crop identification method based on OpenPCS and deep learning, including the following steps:

[0067] S1. Acquire multi-temporal remote sensing image samples;

[0068] S2. Preprocess the multi-temporal remote sensing image samples to obtain the processed sample data structure;

[0069] S3. Input the processed sample data structure into the Transformer model for feature extraction to obtain high-dimensional feature vectors; dynamically generate a PCA model based on the high-dimensional feature vectors.

[0070] S4. Use the PCA model to reduce the dimensionality of the high-dimensional feature vector to obtain low-dimensional features; calculate the contribution score based on the low-dimensional features.

[0071] S5. Based on a preset scoring threshold, the system classifies and identifies known and unknown crop types by judging the contribution score and the classification output probability of the Transformer model.

[0072] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:

[0073] Step 1: In this embodiment, a multi-temporal remote sensing image sample with a pixel size of 224×224 is obtained. Specifically, the multi-temporal remote sensing image sample is derived from satellite data of the same region during three time periods (such as sowing period, jointing period, and harvest period). In addition, each time period includes 6 channels: blue band (B2), green band (B3), red band (B4), near-infrared band (B8), red edge band (B5), and shortwave infrared band (B11).

[0074] Step 2: Preprocess the multi-temporal remote sensing image samples to construct a 3-temporal, 6-channel sample data structure. The preprocessing process includes:

[0075] See Figure 2 First, radiometric correction is performed on the multi-temporal remote sensing image samples, including atmospheric correction and topographic correction, to eliminate the influence of illumination and topography and obtain the corrected samples.

[0076] The corrected samples are then standardized by normalizing the pixel values ​​of each channel according to the band mean and standard deviation, as shown in the following expression:

[0077]

[0078] In the formula: These are the original pixel values; For the first The mean of the channel; For the first The standard deviation of the channel; ′ represents the standardized sample.

[0079] The standardized samples were time-aligned. The images of the three time phases were time-aligned according to the planting period to ensure that they corresponded to the same growth stage, resulting in aligned samples.

[0080] Data augmentation is performed on the aligned samples by randomly flipping (horizontal / vertical), rotating (±15°), and perturbing the brightness (±10%). Finally, the processed sample data structure is constructed, which is a 3×6×224×224 tensor (phase×channel×height×width).

[0081] Step 3: In this embodiment, the parameters of the Transformer model include an input resolution of 224×224, 24 encoder layers, and 24 multi-head attention heads. Four feature maps are output from the encoders at layers 5, 11, 17, and 23, respectively. The classification head in the Transformer model is used to output the classification probability, and the number of categories in the classification head is matched with the known crop types.

[0082] In this embodiment, the Transformer model extracts four feature maps (F1 to F4) from the encoders at layers 5, 11, 17, and 23, respectively. Each feature map has a feature dimension of 1024. After concatenation, they form a feature vector with a dimension of 4096. The feature vector is then upsampled to form a high-dimensional feature vector with a dimension of 1024.

[0083] During the training phase of the Transformer model, the PCA model is dynamically updated using the current high-dimensional feature vector with a dimension of 1024. The process is as follows:

[0084] Calculating the covariance matrix using high-dimensional eigenvectors C The calculation formula is as follows:

[0085]

[0086] In the formula: The characteristic matrix; The mean vector is N; N is the number of samples. Characteristic matrix transpose;

[0087] Singular value decomposition is performed on the covariance matrix to obtain the principal component matrix. The first 110 principal components are retained to ensure that the cumulative variance explained is ≥90%.

[0088] The principal component matrix is ​​updated using the exponential moving average method, and its calculation formula is as follows:

[0089]

[0090] In the formula: P current This is the current principal component matrix; α The smoothing coefficient is set to 0.9. P new is the updated principal component matrix; Pold is the principal component matrix from the previous round.

[0091] Step 4: Reduce the dimensionality of the high-dimensional feature vector using the trained PCA model, specifically to 110 dimensions. The calculation formula is as follows:

[0092]

[0093] In the formula: raw is a high-dimensional feature vector; red represents a low-dimensional feature; P Principal component matrix; It is the mean vector.

[0094] Assume that the low-dimensional features follow a multivariate normal distribution. ( ,Σ), calculate the log-likelihood value of the low-dimensional feature. ( (red), the calculation formula is as follows:

[0095]

[0096] In the formula: Σ is the feature mean vector; Σ is the covariance matrix; It is the inverse of the covariance matrix Σ; Features Dimensions.

[0097] After normalizing the log-likelihood value, the contribution score S is obtained, which is calculated as follows:

[0098]

[0099] In the formula: Let be the log-likelihood value to be normalized. The minimum log-likelihood value in the original dataset. It represents the maximum log-likelihood value in the original dataset.

[0100] In the embodiments ∈[0,1], the higher the value, the better it matches the distribution of known crop characteristics.

[0101] Step 5: In this embodiment, the contribution score distribution of the validation set is used to calculate the corresponding score threshold according to a preset quantile list. Specifically, the quantile list ranges from [0.00, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95]. For example, 0.05 corresponds to the 5th percentile.

[0102] The formula for calculating the scoring threshold is as follows:

[0103]

[0104] In the formula: The proportion of quantiles (0 < <1); S val This is the dataset for calculating quantiles; quantile is the quantile function.

[0105] The example demonstrates how to determine the contribution score of input multi-temporal remote sensing image samples:

[0106] If the contribution score is not lower than the score threshold and the classification output probability of the Transformer model is not lower than 0.5, then it is determined to be a known crop and the crop category is output; otherwise, it is determined to be an unknown crop.

[0107] See Figure 3 , Figure 3 The ROC curve in the graph uses the false positive rate (FPR) on the horizontal axis and the true positive rate (TPR) on the vertical axis. Figure 3 As can be seen, the area under the curve (AUC) of the method in this embodiment is 0.85, indicating that the present invention has a strong recognition capability.

[0108] See Figure 4 This embodiment proposes a specific application of a crop identification method based on OpenPCS and deep learning, including the following steps:

[0109] Step 1: Obtain 224×224 pixel multi-temporal remote sensing image samples from March, May and September 2024, 6 channels (B2 / B3 / B4 / B5 / B8 / B11).

[0110] Known categories: wheat, corn, cotton (3 time phases), a total of 10,000 training samples, and 2,000 validation samples; configuration parameters: the OpenPCS quantile list is set according to user specifications, the Transformer model encoder has 24 layers, and it outputs 4 feature maps (layers 5, 11, 17, and 23).

[0111] Step 2: Mean values ​​of each channel in multi-temporal remote sensing image samples The range is [300, 1800] (reflectivity × 10000), with a standard deviation of [missing value]. The range is [50, 300]; three time phases correspond to the key phenological periods of crops; and multi-temporal remote sensing image samples are enhanced.

[0112] Step 3: Four feature maps are concatenated and upsampled to form a high-dimensional feature vector of dimension 1024. A PCA model is generated based on the high-dimensional feature vector, and the PCA model converges after 50 rounds of training. The smoothing coefficients are updated using the principal component matrix to ensure the stability of the PCA model.

[0113] Step 4: The high-dimensional feature vector is reduced to a low-dimensional feature vector of 110 using the PCA model, and the contribution score is obtained by calculating the multivariate likelihood value. The distribution range is [0.2, 0.95], with a mean of 0.62.

[0114] Step 5: Calculate the threshold based on quantiles, where 0.05 = 0.32 0.10 = 0.38; This is used to classify crops and identify known and unknown types of crops.

[0115] Based on the same inventive concept, this invention also provides a crop identification system based on OpenPCS and deep learning. Since the principle of solving the problem by this crop identification system based on OpenPCS and deep learning is similar to that of the aforementioned crop identification method based on OpenPCS and deep learning, the implementation of this crop identification system based on OpenPCS and deep learning can refer to the implementation of the crop identification method based on OpenPCS and deep learning, and the repeated parts will not be described again.

[0116] In specific implementation, the crop identification system based on OpenPCS and deep learning provided in this embodiment of the invention specifically includes:

[0117] The acquisition module is used to acquire multi-temporal remote sensing image samples;

[0118] The preprocessing module is used to preprocess multi-temporal remote sensing image samples to obtain the processed sample data structure.

[0119] The generation module is used to input the processed sample data structure into the Transformer model for feature extraction to obtain high-dimensional feature vectors; and dynamically generate a PCA model based on the high-dimensional feature vectors.

[0120] The contribution score calculation module is used to reduce the dimensionality of the high-dimensional feature vector using the PCA model to obtain low-dimensional features; and to calculate the contribution score based on the low-dimensional features.

[0121] The identification module is used to classify and identify known and unknown types of crops based on a preset scoring threshold by judging the contribution score and the classification output probability of the Transformer model.

[0122] Accordingly, this embodiment of the invention also provides a crop identification device based on OpenPCS and deep learning, including a processor and a memory, wherein the processor executes a computer program stored in the memory to implement the crop identification method based on OpenPCS and deep learning provided in this embodiment of the invention.

[0123] For more detailed information on the above methods, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0124] Accordingly, embodiments of the present invention also provide a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the above-described crop identification method based on OpenPCS and deep learning provided in the embodiments of the present invention.

[0125] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the systems, devices, and storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.

[0126] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0127] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0128] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0129] The above provides a detailed description of the crop identification method, system, device, and storage medium based on OpenPCS and deep learning provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A crop identification method based on OpenPCS and deep learning, characterized in that, Includes the following steps: S1. Acquire multi-temporal remote sensing image samples; S2. Preprocess the multi-temporal remote sensing image samples to obtain the processed sample data structure; S3. Input the processed sample data structure into the Transformer model for feature extraction to obtain high-dimensional feature vectors; dynamically generate a PCA model based on the high-dimensional feature vectors. S4. Use the PCA model to reduce the dimensionality of the high-dimensional feature vector to obtain low-dimensional features; calculate the contribution score based on the low-dimensional features. The PCA model is used to linearly project high-dimensional feature vectors to obtain low-dimensional features, and the calculation formula is as follows: In the formula: raw is a high-dimensional feature vector; red represents a low-dimensional feature; P Principal component matrix; It is the mean vector; Assuming the low-dimensional features follow a multivariate normal distribution, calculate the log-likelihood value of the low-dimensional features. ( red The calculation formula is as follows: In the formula: Σ is the feature mean vector; Σ is the covariance matrix; It is the inverse of the covariance matrix Σ; Low-dimensional features The dimension; After normalizing the log-likelihood value, the contribution score S is obtained, which is calculated as follows: In the formula: Let be the log-likelihood value to be normalized. The minimum log-likelihood value in the original dataset. The maximum value of the log-likelihood in the original dataset; S5. Based on a preset scoring threshold, the system classifies and identifies known and unknown crop types by judging the contribution score and the classification output probability of the Transformer model.

2. The crop identification method based on OpenPCS and deep learning according to claim 1, characterized in that, The multi-temporal remote sensing image sample in S1 is 224×224 pixels, containing 3 temporal phases, and each temporal phase contains 6 channels.

3. The crop identification method based on OpenPCS and deep learning according to claim 1, characterized in that, In step S2, the multi-temporal remote sensing image samples are preprocessed to obtain the processed sample data structure, including: Correct the multi-temporal remote sensing image samples to obtain the corrected samples; The corrected samples are then standardized to obtain standardized samples. The standardized samples were time-series aligned based on key phenological periods to obtain aligned samples. Data augmentation is performed on the aligned samples to obtain the processed sample data structure.

4. The crop identification method based on OpenPCS and deep learning according to claim 1, characterized in that, The parameters of the Transformer model in S3 include: The Transformer model has 24 encoder layers and outputs four feature maps from the encoder layers 5, 11, 17, and 23, respectively. The Transformer model has 24 multi-head attention heads. The Transformer model also includes a classification head for outputting classification probabilities, wherein the classification head categories are matched with the known number of crops; The high-dimensional feature vector is formed by concatenating the features extracted from the four feature maps and then upsampling them.

5. The crop identification method based on OpenPCS and deep learning according to claim 1, characterized in that, The PCA model in S3 includes: Calculating the covariance matrix using high-dimensional eigenvectors C The calculation formula is as follows: In the formula: The characteristic matrix; The mean vector is N; N is the number of samples. Characteristic matrix transpose; Singular value decomposition is performed on the covariance matrix to obtain the principal component matrix, and the first 110 principal components are retained. The principal component matrix is ​​updated using the exponential moving average method, and its calculation formula is as follows: In the formula: P current This is the current principal component matrix; α The smoothing coefficient is set to 0.

9. P new This is the updated principal component matrix; P old This is the principal component matrix from the previous round; Repeat the above steps until the principal component matrix is ​​stable.

6. The crop identification method based on OpenPCS and deep learning according to claim 1, characterized in that, In step S5, based on a preset scoring threshold, the classification and identification of crops of known and unknown classes are achieved by judging the contribution score and the classification output probability of the Transformer model, including: A scoring threshold is generated based on the distribution of contribution scores. The calculation formula is as follows: In the formula: The proportion of quantiles 0 < <1;S val This is a dataset for calculating quantiles; quantile is the quantile function. If the contribution score of the multi-temporal remote sensing image samples is not lower than the scoring threshold, and the classification output probability of the Transformer model is not lower than 0.5, then the crop is identified as a known crop and the crop category is output; otherwise, it is identified as an unknown crop.

7. A crop identification system based on OpenPCS and deep learning, characterized in that, include: The acquisition module is used to acquire multi-temporal remote sensing image samples; The preprocessing module is used to preprocess multi-temporal remote sensing image samples to obtain the processed sample data structure. The generation module is used to input the processed sample data structure into the Transformer model for feature extraction to obtain high-dimensional feature vectors; and dynamically generate a PCA model based on the high-dimensional feature vectors. The contribution score calculation module is used to reduce the dimensionality of the high-dimensional feature vector using the PCA model to obtain low-dimensional features; and to calculate the contribution score based on the low-dimensional features. The PCA model is used to linearly project high-dimensional feature vectors to obtain low-dimensional features, and the calculation formula is as follows: In the formula: raw is a high-dimensional feature vector; red represents a low-dimensional feature; P Principal component matrix; It is the mean vector; Assuming the low-dimensional features follow a multivariate normal distribution, calculate the log-likelihood value of the low-dimensional features. ( red The calculation formula is as follows: In the formula: Σ is the feature mean vector; Σ is the covariance matrix; It is the inverse of the covariance matrix Σ; Low-dimensional features The dimension; After normalizing the log-likelihood value, the contribution score S is obtained, which is calculated as follows: In the formula: Let be the log-likelihood value to be normalized. The minimum log-likelihood value in the original dataset. The maximum value of the log-likelihood in the original dataset; The identification module is used to classify and identify known and unknown types of crops based on a preset scoring threshold by judging the contribution score and the classification output probability of the Transformer model.

8. A crop identification device based on OpenPCS and deep learning, characterized in that, It includes a processor and a memory, wherein the processor executes a computer program stored in the memory to implement the crop identification method based on OpenPCS and deep learning as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the crop identification method based on OpenPCS and deep learning as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Fine-grained Chinese calligraphy style recognition model construction method, system and device and storage medium

    CN119027963A

  • Tea variety and quality classification method based on deep learning Teformer

    CN119691515A