Sea grass bed classification method based on feature screening under small sample limiting condition
By screening seagrass bed features with the Relief-F and KPCA algorithms and combining them with the graph attention mechanism and prototype network, the problem of feature redundancy and small sample size in seagrass bed classification was solved, and efficient seagrass bed recognition and classification was achieved.
Patent Information
- Application Number
- CN202510922797.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-07-04
AI Technical Summary
Under small sample conditions, seagrass bed classification faces problems of feature redundancy, collinearity and redundancy. Existing methods are insufficient in accuracy and generalization ability, especially in complex shallow sea environments where sample acquisition is difficult and true value verification data is scarce. Traditional methods are difficult to effectively identify seagrass beds.
The Relief-F and KPCA algorithms were used to construct a feature optimization model, screen high-contribution features and perform nonlinear dimensionality reduction. The GAT-PN model was constructed by combining the graph attention mechanism and the prototype network. Seagrass beds were classified by constructing category prototypes and calculating the distance between the query sample and the prototype.
It effectively screens out key features, improves feature expression efficiency, enhances the model's feature modeling capabilities under small sample conditions, improves classification accuracy and generalization ability, and solves the feature redundancy and small sample problems in seagrass bed classification.
Smart Images

Figure CN120708068A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of ocean surveying and mapping, and in particular relates to a seagrass bed classification method based on feature screening under small sample restriction conditions. Background Art
[0002] Seagrass beds are important marine ecosystems, maintaining biodiversity and sequestering carbon. However, due to complex ocean conditions and drastic changes in underwater light intensity, traditional seagrass bed identification methods face challenges in practical applications, including low accuracy and poor generalization. Furthermore, due to the high cost of acquiring ground-truth verification data and the difficulty of labeling, sample data with actual labels is scarce, making the small sample size issue particularly prominent.
[0003] Currently, seagrass bed classification and identification primarily rely on field surveys and remote sensing methods. With the widespread application of airborne LiDAR and hyperspectral remote sensing technologies, it is now possible to obtain multi-source, multi-dimensional, and multi-scale observational features, providing rich data support for seagrass bed classification. However, cross-modal fusion features are high-dimensional and lack specificity, potentially exhibiting significant collinearity and redundancy. For example, hyperspectral bands are highly correlated, the extracted features exhibit weak variance, and contribute little to classification. Direct application of these features to classification models without prior screening can easily lead to the "curse of dimensionality" and "overfitting" problems. Common feature optimization methods can be categorized as feature dimensionality reduction and feature selection. Feature dimensionality reduction mathematically reduces the number of features, merging multiple features into a smaller number of new features. Feature selection methods improve model performance by removing irrelevant (noisy) or redundant features, reducing computational costs. Under small sample conditions, constructing a multi-strategy feature optimization model that balances feature correlation, redundancy, and discriminability is crucial for improving feature representation quality and subsequent small sample classification performance.
[0004] Current mainstream classification methods, such as support vector machines (SVMs) and random forests (RFs), while performing well in multi-sample scenarios, often suffer from problems such as insufficient training, severe overfitting, and unstable classification accuracy under small-sample conditions. Existing small-sample classification methods can be broadly categorized into three types: model fine-tuning, data augmentation, and transfer learning. Model fine-tuning is a more traditional approach to small-sample learning. It typically pre-trains the model on large-scale data and then fine-tunes the parameters of the fully connected layers or the top few layers of the neural network model on the target small-sample dataset to obtain the fine-tuned model. When data is limited, data augmentation can be used to expand the sample size and improve sample diversity, transforming the small-sample problem into a general classification problem. Transfer learning is currently a cutting-edge approach and can be further categorized into metric learning, meta-learning, and graph neural network-based methods. Since small-sample learning algorithms must fully exploit the relationship between the support set and the query set, graph neural networks iteratively aggregate features from neighbors through a message passing mechanism, enabling them to express complex interactions between data instances. Furthermore, their excellent performance and interpretability have made graph neural networks a hot topic in small-sample learning. Therefore, it is necessary to combine the advantages of different small sample learning algorithms and alleviate the model training difficulties caused by data scarcity through combined optimization of different strategies, so as to break through the limitations of traditional classification methods and single methods in small sample scenarios. Summary of the Invention
[0005] In view of the problems of feature redundancy and scarcity of true value verification sample data when cross-modal fusion features are actually applied to seagrass bed classification, the present invention proposes a seagrass bed classification method based on feature screening under the condition of small sample constraints. Based on cross-modal airborne bathymetric LiDAR and hyperspectral fusion features, the Relief-F-KPCA method is used to construct a feature optimization model, select high-contribution features and implement nonlinear dimensionality reduction through KPCA; then, a classification model (GAT-PN) combining the graph attention mechanism and the prototype network is constructed to realize seagrass bed classification under small sample conditions. In order to achieve the above purpose, the present invention adopts the following technical solutions:
[0006] A seagrass bed classification method based on feature screening under small sample constraints, characterized by comprising the following steps:
[0007] Step 1: Build a multi-strategy feature optimization model that integrates the Relief-F and KPCA algorithms, screen high-contribution features, perform nonlinear dimensionality reduction, and generate an optimized feature set;
[0008] Step 2: Use the KNN strategy to construct a graph structure between samples and build an attention network model to aggregate neighbor information;
[0009] Step 3: Detect seagrass beds by constructing category prototypes and calculating the distance between the query sample and the prototype.
[0010] In a preferred embodiment, in step 3, classification is performed by calculating the Euclidean distance between the query sample and each class prototype; there are C data sets, each class has K support samples, and the support set S is expressed as follows:
[0011]
[0012] In the formula represents the i-th sample under category C; is the corresponding category label;
[0013] Each class prototype vector center μ c The calculation is as follows:
[0014]
[0015] Where, f θ is the feature extraction function;
[0016] According to the distance between the supporting sample feature and the center, the weight ω is introduced i :
[0017]
[0018] Then the prototype vector P of category c c The dynamic weighted calculation is:
[0019]
[0020] Calculate query sample x q The Euclidean distance from all category prototype vectors is normalized by the Softmax function to obtain the query sample x q The probability p(y=c|x q ):
[0021]
[0022] Where d is the Euclidean distance and c' represents all possible categories.
[0023] In a preferred embodiment, the step 1 includes:
[0024] Step 1.1: Evaluate feature importance based on the Relief-F algorithm;
[0025] Step 1.2: Perform feature dimensionality reduction based on the KPCA algorithm.
[0026] In a preferred embodiment, step 1.1 includes:
[0027] For each feature f i Initialize the weights, randomly select a sample x from the training set, and for each category c, find the similar sample x closest to the sample x (Hc) and heterogeneous samples x (Mc) ;
[0028] If x and x (Hc) The distance between x and x on c is less than (Mc) If the distance between x and x is greater than , the weight of the feature is increased; otherwise, if x and x (Hc) The distance on c is greater than the distance between x and x (Mc) If the distance is greater than , the weight of the feature is reduced;
[0029] Repeat the above process several times and finally get the average weight W(f i ), sort the features according to their average weights, and select the top features for subsequent processing.
[0030] In a preferred embodiment, in step 1.2, the features after Relief-F screening are reduced in dimensionality based on KPCA. The KPCA algorithm introduces a kernel function to first map the original features to a high-dimensional feature space, and then performs principal component analysis in the high-dimensional feature space to retain the nonlinear structural information in the data.
[0031] In a preferred embodiment, step 2 includes:
[0032] ①Use pre-trained feature extraction function f θ (x) Encode the original sample data to obtain the high-dimensional feature representation h i =f θ (x i );
[0033] ② Standardize all feature vectors and use mean normalization to normalize each dimension of features to zero mean and unit variance;
[0034] ③ In the feature space, the Euclidean distance is used as the similarity measurement criterion, the feature distance of each node i to the rest of the nodes is calculated, and the K nodes closest to it are selected as its neighbor node set N (i) ;
[0035] ④ For node i and set N (i) Each node j in Build an edge to form a graph structure.
[0036] In a preferred embodiment, a graph attention mechanism is introduced to update node features. For node i and its neighboring nodes j∈N (i) , calculate its attention score e ij :
[0037] e ij =σ(a T [Wh i ||Wh j ])
[0038] Where W is the learnable weight; || is the feature concatenation, h i and h j is the node feature, a is the attention parameter, and σ is the nonlinear activation function;
[0039] The scores of neighboring nodes of each node i are normalized by softmax to obtain the normalized attention coefficient:
[0040]
[0041] The feature of node i is obtained by weighted fusion based on the features of neighboring nodes:
[0042]
[0043] In a preferred embodiment, the training of the prototype classifier is supervised using a standard cross entropy loss, and the loss function is defined as:
[0044]
[0045] Where y i For query sample x i The true label of
[0046] Combined center loss L center Adjust the category prototype so that the sample moves closer to the corresponding category prototype in the feature space:
[0047]
[0048] The final loss function is expressed as:
[0049] L=L PN +λL center ;
[0050] Where λ is a hyperparameter that adjusts the weight between cross entropy and center loss.
[0051] Compared with the prior art, the present invention has the following beneficial effects:
[0052] To address practical problems such as the difficulty in obtaining seagrass bed samples, high feature dimensionality, and strong heterogeneous interference in complex shallow-water environments, this paper proposes a seagrass bed classification method based on feature screening under small sample constraints. Compared with existing remote sensing seagrass bed detection technologies that mainly rely on large sample supervision or a single method, this paper first constructs a feature optimization strategy that integrates Relief-F and KPCA to effectively screen out key spatial terrain and spectral texture features with a high contribution rate to seagrass bed classification, and compresses the feature space through nonlinear dimensionality reduction to improve feature expression efficiency. Subsequently, to address the problems of scattered distribution of seagrass samples and fuzzy category boundaries, a K-nearest neighbor graph structure between samples is constructed based on the optimized features. A graph attention mechanism is introduced to achieve adaptive update of node features, fully explore the semantic relationships of local neighborhoods, capture local patterns of seagrass areas in spatial adjacency and spectral consistency, and enhance the model's feature modeling capabilities under small sample conditions. Finally, a metric learning classifier is constructed in combination with a prototype network. The prototype distance is used to accurately distinguish seagrass beds from other landforms, avoiding the problem of boundary drift due to sparse samples. A center loss is introduced to further optimize the intra-class aggregation characteristics, improving classification accuracy and generalization ability in small sample scenarios. This invention conducts seagrass bed classification and detection based on airborne LiDAR data and airborne hyperspectral data collected in a sea area near Qingdao, solving the problems of feature redundancy and small samples in actual seagrass bed classification applications, and providing effective technical support and solutions for further seagrass bed identification and restoration. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 Flowchart of a seagrass bed classification method based on feature screening under small sample constraints.
[0054] Figure 2 Schematic diagram of the KPCA algorithm principle in the present invention.
[0055] Figure 3 Schematic diagram of the GAT-PN model construction in the present invention.
[0056] Figure 4 This is a comparison chart of the results of seagrass bed classification using the GAT-PN model in the present invention and other classifiers. DETAILED DESCRIPTION
[0057] The present invention will be described in detail below with reference to specific embodiments. The following examples will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those skilled in the art, several changes and improvements can be made without departing from the scope of the present invention. These all fall within the scope of protection of the present invention.
[0058] The present invention provides a seagrass bed classification method based on feature screening under small sample constraints, the process is as follows: Figure 1 As shown. It includes the following steps:
[0059] Step 1: Construct a multi-strategy feature optimization model that integrates the Relief-F feature selection algorithm and the KPCA kernel principal component analysis algorithm to screen high-contribution features and perform nonlinear dimensionality reduction to generate an optimized feature set.
[0060] In order to eliminate redundancy and enhance feature discriminability, a multi-strategy feature optimization model integrating Relief-F and KPCA is constructed. High-contribution features are screened out and nonlinear dimensionality reduction is performed to further compress the feature space, retain the nonlinear structural information in the original data, and generate an optimized feature set. The schematic diagram of the KPCA algorithm principle is shown in the figure. Figure 2 shown.
[0061] In a preferred embodiment, step 1 specifically includes the following steps:
[0062] Step 1.1: Evaluate feature importance based on the Relief-F algorithm;
[0063] Relief-F is a feature selection algorithm based on neighborhood weighting. It evaluates the contribution of each feature to the classification task by finding its nearest neighbor and dissimilar samples for each sample and comparing the degree of variation of each feature among similar samples. The algorithm can be divided into the following five steps:
[0064] ① Initialize the weight vector: for each feature f i Initialize weights, usually W(f i )=0.
[0065] ② Randomly select a sample: randomly select a sample x from the training set.
[0066] ③Find the nearest neighbor: For each category c, find the similar sample x that is closest to the sample x (Hc) and heterogeneous samples x (Mc) .
[0067] ④ Update weights: If x and x (Hc) The distance between x and x on c is less than (Mc) If the distance between x and x is greater than , the weight of the feature is increased. (Hc) The distance on c is greater than the distance between x and x (Mc) If the distance is less than , the weight of the feature is reduced. The weight update formula is as follows:
[0068]
[0069] Where, f i is the i-th feature; xi , z i Represents the value of samples x and z on the i-th feature; max(f i ),min(f i ) represents the feature f i The maximum and minimum values among all samples; m is the number of iterations, that is, the total number of samples; diff(f i ,x,z) represents the difference between samples x and z on the i-th feature; P(c) represents the prior probability of category c; y j is the jth sample x j The true category label of W(f i ) represents the current feature f i The weight of For x j The most recent similar sample, For x j The nearest heterogeneous sample; P(c) is the prior probability of category c in the data; P(y j ) is the sample x j The true category label y j The prior probability of .
[0070] ⑤ Repeat the iterative process: Repeat the above process several times, and finally get the average weight W (f i ), and sort the features accordingly, and select the top several important features for subsequent processing.
[0071] Step 1.2: Perform feature dimensionality reduction based on the KPCA algorithm;
[0072] To further compress redundant information and extract feature expressions with stronger discriminative power, this paper uses KPCA to reduce the dimensionality of features filtered by Relief-F. The KPCA algorithm introduces a kernel function to first map the original features to a high-dimensional feature space and then performs principal component analysis within this space to preserve the nonlinear structural information in the data. Its core process includes the following five steps:
[0073] ① Determine the kernel function and parameters: Selecting the appropriate kernel function and parameters is one of the key steps in KPCA. Common kernel functions include Gaussian kernel and polynomial kernel. The present invention uses Gaussian kernel function to construct the kernel matrix to replace the traditional covariance matrix. The Gaussian kernel function is expressed as follows:
[0074]
[0075] Where x, y are sample points, ||xy|| 2 is the square of the Euclidean distance; б is the bandwidth parameter of the Gaussian kernel.
[0076] ②Calculate the kernel matrix: For the input sample set {x1,x2,...x n}, calculate the kernel matrix k∈R n×n , whose elements are K ij =K(x i ,x j ). To ensure data centralization, the kernel matrix is centralized:
[0077]
[0078] Where K is the original kernel matrix, 1 n is a matrix whose elements are all 1 / n.
[0079] ③Eigenvalue decomposition: the centralized kernel matrix Perform eigenvalue decomposition to extract the nonlinear characteristics of the data.
[0080] ④ Select principal components: Select the first k principal components according to the size of the eigenvalue so that their cumulative contribution rate reaches the preset threshold.
[0081] ⑤ Projection and dimensionality reduction: For a new sample x, its projection in the direction of the jth principal component is:
[0082]
[0083] Where, is the normalized eigenvector component corresponding to the jth principal component; K(x i ,x) is the kernel similarity between the i-th training sample and the new sample.
[0084] Step 2: Use the KNN strategy to construct a graph structure between samples and build an attention network model to aggregate neighbor information.
[0085] Similar samples in remote sensing data exhibit certain local consistency and spatial structural characteristics. This potential structural relationship between samples is often underutilized by traditional methods. Therefore, a KNN strategy is used to construct a graph structure between samples. Edge connections are established based on similarities in the feature space, thereby characterizing the local topological relationships between samples. Furthermore, a graph attention network is introduced as a feature update module. This dynamically aggregates neighbor information through an adaptive weighting mechanism, improving the discriminative power of feature representation and the model's structural perception capabilities.
[0086] In a further embodiment, step 2 specifically includes the following steps:
[0087] In order to effectively model the potential similarity relationship between samples, a graph structure G = (V, E) is constructed based on the KNN strategy, where V represents a set of nodes and each node corresponds to an input sample x i, E represents the set of edges between nodes established by similarity measurement. The process includes the following four steps:
[0088] ①Use pre-trained feature extraction function f θ (x) Feature encode the original sample data to obtain sample x i The high-dimensional feature representation h i =f θ (x i ), θ is a parameter.
[0089] ② Normalize all feature vectors and use z-score normalization to normalize each dimension of features to zero mean and unit variance. The normalization formula is:
[0090]
[0091] Where, is the standardized feature, μ represents the mean vector of the sample feature; б represents the standard deviation vector of the sample feature.
[0092] ③ In the feature space, the Euclidean distance is used as the similarity measurement criterion, the feature distance of each node i to the rest of the nodes is calculated, and the K nodes closest to it are selected as its neighbor node set N (i) .
[0093] ④ For node i and set N (i) Each node j in Build an edge to form a graph structure.
[0094] In order to fully explore the complex relationship features between samples, the graph attention mechanism is further introduced to update the node features. For node i and its neighbor node j∈N (i) , calculate its attention score e ij :
[0095] e ij =σ(a T [Wh i ||Wh j ]) (7)
[0096] Where W is the learnable weight; || is the feature concatenation, h i and h j is the node feature, a is the attention parameter, and σ is the nonlinear activation function. In order to ensure the comparability of scores between neighboring nodes, the scores of neighboring nodes of each node i are normalized by softmax to obtain the normalized attention coefficient:
[0097]
[0098] eij is the attention score of node i and node j; e ik is the attention score of node i and node k;
[0099] Finally, the feature h′ of node i is obtained by weighted fusion based on the features of neighboring nodes i :
[0100]
[0101] Step 3: Detect seagrass beds by constructing category prototypes and calculating the distance between the query sample and the prototype.
[0102] In complex offshore environments, the distribution of seagrass beds exhibits strong heterogeneity and spatial discontinuity. Traditional classification models face problems such as blurred category boundaries and unstable classification accuracy in practical applications. Therefore, without relying on complex model parameter training, a simple and fast seagrass bed classification detection is achieved by constructing category prototypes and calculating the distance between query samples and prototypes. The schematic diagram of the GAT-PN model construction is shown in the figure. Figure 3 shown.
[0103] In a further embodiment, step 3 specifically includes the following steps:
[0104] Step 3.1: Prototype classification and small sample modeling;
[0105] The prototype network classifies by calculating the Euclidean distance between the query sample and the prototype of each category. Suppose there are C types of data sets, each with K support samples, then the support set S is expressed as follows:
[0106]
[0107] Where, represents the i-th sample under category c; is the corresponding category label. In order to represent the central feature of each category, the category prototype vector is introduced. The center of each category prototype vector is calculated as follows:
[0108]
[0109] Where, f θ (x) is the feature extraction function, and S is the support set. Then, based on the distance between the support sample feature and the center, the weight is introduced:
[0110]
[0111] Then the dynamic weighted calculation of the prototype vector of category c is:
[0112]
[0113] Usually, all samples in the prototype network contribute the same amount to the category prototype, and it is impossible to distinguish between good and bad quality. In addition, the heterogeneity of seagrass bed remote sensing samples is very high, and common prototypes are easily "offset". Therefore, formulas (12) and (13) propose a dynamic weighted prototype vector calculation method based on the characteristics of small sample classification of seagrass beds. By introducing sample weights when constructing category prototypes, high-confidence samples can have a greater impact on the prototype, thereby improving the classification performance and robustness of the model in a small sample environment.
[0114] For a given query sample x q , calculate its Euclidean distance with all category prototype vectors, normalize it through the Softmax function, and get the query sample x q The probability of belonging to category c is:
[0115]
[0116] Where d is the Euclidean distance. c indicates the probability of the sample belonging to class c being calculated. c' represents all possible classes. For example, when classifying seaweed and other classes, c represents the seaweed class and c' represents the seaweed and other classes.
[0117] Step 3.2: Loss function design;
[0118] In order to optimize the discriminative performance of the prototype classifier, the present invention adopts the standard cross entropy loss to supervise the training of the prototype classifier. The loss function is defined as:
[0119]
[0120] Where y i For query sample x i The true label of . Relying solely on cross entropy loss may cause the distribution of category prototypes in the feature space to be not compact enough, affecting the accuracy of small sample classification. In order to further optimize the expressive power of category prototypes, the center loss L center Adjust the category prototype so that the sample moves closer to the corresponding category prototype in the feature space:
[0121]
[0122] L=L PN +λL center (17)
[0123] Where λ is a hyperparameter that adjusts the weight between cross entropy and center loss.
[0124] Field experiments: To validate the proposed feature-based seagrass bed classification method under small sample size constraints, we used airborne LiDAR bathymetric and hyperspectral data from a coastal region. The ALB instrument used was a Mapper20KU developed by a research institute of optical precision instruments. It features a laser center wavelength of 532 nm, a repetition rate of 20 kHz, a scanning angle of ±20°, a laser divergence of 1 mrad, and weighs 6 kg. The instrument integrates a company's EG370N high-precision inertial navigation system. The aircraft was a RY-V50 vertical take-off and landing fixed-wing UAV. The hyperspectral instrument used was a company's S185, with a 4 nm band spacing, a band range of 450 nm to 950 nm, 125 bands, and a spectral resolution of 8 nm at 532 nm. The aircraft was a multi-rotor DJI M300.
[0125] To validate the method's ability to classify and extract seagrass beds using small sample sizes, validation data were collected along a coastal region in November 2024. ALB acquisition was conducted at an altitude of 120 meters, while hyperspectral acquisition was conducted at an altitude of 100 meters. The aircraft's heading overlap was 70%, and its lateral overlap was 80%. Twenty samples of each type were also collected manually.
[0126] Qualitative analysis of small sample classification and extraction results of different classifiers: Using coastal data from a certain area, the proposed method was used to perform small sample classification and extraction on the fused data, and the results were compared with those of the other three classifiers. The comparison of the results of seagrass bed classification using the GAT-PN model and other classifiers is shown in Figure 4 , Figure 4 The green part is the classification detection result, that is, the green part is the location prediction of the seagrass bed distribution. Figure 4 As shown in the figure, the classification results of the proposed method eliminate the erroneous classifications of the previous methods, especially the typical erroneous predictions in areas such as walking paths, and are more consistent with the seagrass bed distribution results in the orthophoto. Extracting seagrass beds from fused data can better avoid erroneous classification results and improve classification accuracy.
[0127] Quantitative analysis of small sample classification and extraction results of different classifiers: In order to quantitatively evaluate the small sample seagrass bed classification and extraction results of the proposed method and the other three classifiers on the fusion data, the confusion matrix was used for accuracy assessment. The accuracy comparison results of the proposed method with SVM, random forest and neural network are shown in Table 1.
[0128] Table 1 Accuracy comparison of the present invention with SVM, random forest, and neural network
[0129]
[0130]
[0131] Depend on Figure 4As can be seen, the distribution of seagrass beds in the proposed method is more consistent with the actual orthophoto image, and the misclassification of coastal areas is improved. Table 1 shows that the proposed method outperforms the other three commonly used classification methods in terms of accuracy and Kappa coefficient, with an overall classification accuracy of 96.2% and a Kappa coefficient of 0.908. This demonstrates that the proposed method has good practical application results.
[0132] In summary, the present invention aims to solve practical problems such as the difficulty in obtaining seagrass bed samples, high feature dimensionality, and strong heterogeneous interference in shallow water complex environments, and proposes a seagrass bed classification method based on feature screening under small sample constraints. Compared with the existing remote sensing seagrass bed detection technology that mainly relies on large sample supervision or a single means, the present invention first constructs a feature optimization strategy that integrates Relief-F and KPCA to effectively screen out key spatial topography and spectral texture features with a high contribution rate to seagrass bed classification, and compresses the feature space through nonlinear dimensionality reduction to improve the feature expression efficiency; then, for the scattered distribution and classification of seagrass samples, the present invention selects the best feature for the seagrass bed classification. In order to solve the problem of blurred boundaries, a K-nearest neighbor graph structure between samples is constructed based on the preferred features, and a graph attention mechanism is introduced to realize the adaptive update of node features, fully explore the semantic relationship of local neighborhoods, capture the local patterns of seagrass areas in spatial adjacency and spectral consistency, and enhance the feature modeling ability of the model under small sample conditions; finally, a metric learning classifier is constructed in combination with the prototype network, and the prototype distance is used to realize the accurate discrimination of seagrass beds and other landforms, avoiding the problem of boundary drift due to sparse samples, and introducing the center loss to further optimize the intra-class aggregation characteristics, thereby improving the classification accuracy and generalization ability in small sample scenarios. The present invention conducts seagrass bed classification detection based on airborne LiDAR data and airborne hyperspectral data collected in a sea area near Qingdao, which solves the problems of feature redundancy and small samples in actual seagrass bed classification applications, and provides effective technical support and solutions for further seagrass bed identification, restoration and other fields.
[0133] The above describes specific embodiments of the present invention. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art may make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. The embodiments of this application and the features in the embodiments may be combined with each other in any manner unless there is a conflict.
Claims
1. A seagrass bed classification method based on feature screening under small sample constraints, characterized by: Step 1: Build a multi-strategy feature optimization model that integrates the Relief-F and KPCA algorithms, screen high-contribution features, perform nonlinear dimensionality reduction, and generate an optimized feature set; Step 2: Use the KNN strategy to construct a graph structure between samples and build an attention network model to aggregate neighbor information; Step 3: Detect seagrass beds by constructing category prototypes and calculating the distance between the query sample and the prototype.
2. A seagrass bed classification method based on feature screening under small sample constraints according to claim 1, characterized in that: In step 3, classification is performed by calculating the Euclidean distance between the query sample and the prototype of each category. There are C types of data sets, each category has K support samples, and the support set S is expressed as follows: Where, represents the i-th sample under category c; for The corresponding category label; The prototype vector center μ for each category c c for: Where, f θ is the feature extraction function; According to the distance between the supporting sample feature and the center, the weight ω is introduced i : Then the prototype vector p of category c is c The dynamic weighted calculation is: Calculate query sample x q The Euclidean distance d from all category prototype vectors is normalized by the Softmax function to obtain the query sample x q The probability p(y=c|x q ): Here, c' represents all possible categories.
3. The seagrass bed classification method based on feature screening under small sample constraints according to claim 2, characterized in that: Said step 1 comprises: Step 1.1: Evaluate feature importance based on the Relief-F algorithm; Step 1.2: Perform feature dimensionality reduction based on the KPCA algorithm.
4. The method for classifying seagrass beds based on feature screening under small sample size constraints according to claim 3, characterized in that: The step 1.1 includes: For each feature f i Initialize the weights, randomly select a sample x from the training set, and for each category c, find the similar sample x closest to the sample x (Hc) and heterogeneous samples x (Mc) ; If x and x (Hc) The distance between x and x on c is less than (Mc) If the distance between x and x is greater than , the weight of the feature is increased; otherwise, if x and x (Hc) The distance on c is greater than the distance between x and x (Mc) If the distance is greater than , the weight of the feature is reduced; Repeat the above process several times and finally get the average weight W(f i ), sort the features according to their average weights, and select the top features for subsequent processing.
5. The method for classifying seagrass beds based on feature screening under small sample size constraints according to claim 3, characterized in that: In step 1.2, the features after Relief-F screening are reduced in dimensionality based on KPCA. The KPCA algorithm introduces a kernel function to first map the original features to a high-dimensional feature space, and then performs principal component analysis in the high-dimensional feature space to retain the nonlinear structural information in the data.
6. The method for classifying seagrass beds based on feature screening under small sample size constraints according to claim 1, characterized in that: The step 2 includes: ①Use pre-trained feature extraction function f θ (x) Encode the original sample data to obtain the high-dimensional feature representation h i =f θ (x i ); ② Standardize all feature vectors and use mean normalization to normalize each dimension of features to zero mean and unit variance; ③ In the feature space, the Euclidean distance is used as the similarity measurement criterion, the feature distance of each node i to the rest of the nodes is calculated, and the K nodes closest to it are selected as its neighbor node set N (i) ; ④ For node i and set N (i) Each node j in Build an edge to form a graph structure.
7. The method for classifying seagrass beds based on feature screening under small sample size constraints according to claim 6, characterized in that: Introduce the graph attention mechanism to update the node features, for node i and its neighbor node j∈N (i) , calculate its attention score e ij : e ij =σ(a T [Wh i ||Wh j ]) Where W is the learnable weight; || is the feature concatenation, h i and h j is the node feature, a is the attention parameter, and σ is the nonlinear activation function; The scores of neighboring nodes of each node i are normalized by softmax to obtain the normalized attention coefficient: The feature h′ of node i is obtained by weighted fusion based on the features of neighboring nodes i :
8. The method for classifying seagrass beds based on feature screening under small sample size constraints according to claim 2, characterized in that: The standard cross entropy loss is used to supervise the training of the prototype classifier, and the loss function L PN Defined as: Where y i For query sample x i The true label of Combined center loss L center Adjust the category prototype so that the sample moves closer to the corresponding category prototype in the feature space: For category y i The vector center of ; then the final loss function L is expressed as: L=L PN +λL center ; Where λ is a hyperparameter that adjusts the weight between cross entropy and center loss.
Citation Information
Patent Citations
Small sample radiation source individual identification method based on multi-optimization dual-channel prototype network
CN116522129A
Target detection method based on pyramid pooling graph neural network
CN118196393A
Cited By
Open set underwater acoustic communication modulation identification method based on multipath residual network
CN121770948A