A method for classifying seagrass beds under small sample size restriction based on feature screening
By using Relief-F-KPCA and graph attention mechanisms to filter seagrass bed features and combining them with a prototype network for small-sample seagrass bed classification, the problems of feature redundancy and small sample size in seagrass bed classification are solved, thereby improving classification accuracy and generalization ability.
Patent Information
- Application Number
- CN202510922797.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2026-01-20
- Estimated Expiration
- 2045-07-04
AI Technical Summary
Under small sample conditions, seagrass bed classification and identification faces problems of feature redundancy, collinearity and redundancy. Existing methods are insufficient in terms of accuracy and generalization ability, and ground truth verification data is scarce, resulting in unstable classification accuracy.
The Relief-F-KPCA method was used to screen high contribution features and perform nonlinear dimensionality reduction. Combined with graph attention mechanism and prototype network, the GAT-PN model was constructed. Seagrass bed classification was performed by constructing category prototypes and calculating the distance between query samples and prototypes.
It effectively filters out key features, improves feature expression efficiency, enhances the model's feature modeling ability under small sample conditions, improves classification accuracy and generalization ability, and solves the problems of feature redundancy and small sample size in seagrass bed classification.
Smart Images

Figure CN120708068B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of marine mapping, and particularly relates to a seagrass bed classification method based on feature screening under small sample restriction. BACKGROUND
[0002] As an important marine ecosystem, seagrass bed has the ecological functions of maintaining biodiversity and carbon fixation. However, due to the influence of factors such as complex sea conditions and drastic underwater light changes, the traditional seagrass bed recognition method has problems such as low precision and poor generalization ability in practical application. In addition, due to the high cost of obtaining true value verification data and the difficulty of labeling, the sample data with actual labels are rare, and the small sample problem is particularly prominent.
[0003] At present, seagrass bed classification and recognition mainly includes field investigation method and remote sensing method. With the wide application of airborne LiDAR and hyperspectral remote sensing technology, it is possible to obtain multi-source, multi-dimensional and multi-scale observation features, which provides rich data support for seagrass bed classification. However, the cross-modal fusion features have high dimension and lack of pertinence, and there may be significant collinearity and redundancy, such as high correlation between hyperspectral bands, weak change of extracted features, no contribution to classification, etc. Without screening, direct application to classification model may easily lead to "dimension disaster" and "overfitting" problem. The common feature optimization methods can be divided into feature dimension reduction and feature selection. Among them, feature dimension reduction reduces the number of features through mathematical methods, and combines multiple features into fewer new features. Feature selection method removes irrelevant (noise) or redundant features, reduces the calculation cost, and improves the performance of the model. Under the condition of small sample, it is of great significance to improve the feature expression quality and the subsequent small sample classification performance to construct a multi-strategy feature optimization model considering feature correlation, redundancy and discriminability.
[0004] Although the current mainstream classification methods such as support vector machine (SVM) and random forest (RF) perform well in the multi-sample scene, they often have problems such as insufficient training, serious overfitting and unstable classification accuracy under the condition of small sample. The existing small sample classification methods can be divided into three categories: model fine-tuning, data augmentation and transfer learning. Among them, the model fine-tuning method is a traditional method of small sample learning. Usually, the model is pre-trained on a large amount of data, and the parameters of the fully connected layer or the top few layers of the neural network model are fine-tuned on the target small sample dataset to obtain the fine-tuned model. In the case of limited data, data augmentation can be used to expand the amount of sample data and improve sample diversity, converting the small sample problem into an ordinary classification problem. The transfer learning method is a relatively advanced method at present, which can be divided into three categories: metric learning, meta-learning and graph neural network. Since the small sample learning algorithm needs to make full use of the relationship between the support set and the query set, and the graph neural network iteratively performs feature aggregation from the neighbor through the message passing mechanism, it can express the complex interaction between data instances. In addition, due to the good performance and interpretability of the graph neural network, it has become a hot spot in small sample learning. Therefore, it is necessary to combine the advantages of different small sample learning algorithms and optimize through the combination of different strategies to alleviate the model training difficulties caused by data scarcity and break through the limitations of traditional classification methods and single methods in the small sample scene. SUMMARY
[0005] In view of the problems of feature redundancy and few true value verification sample data when the cross-modal fusion features are actually applied to the classification of seagrass beds, the application provides a seagrass bed classification method based on feature screening under the condition of small sample restriction. Based on the fusion features of cross-modal airborne LiDAR and hyperspectrum, a feature optimization model is constructed by using the Relief-F-KPCA method, high contribution rate features are selected, and nonlinear dimension reduction is realized through KPCA; then a classification model (GAT-PN) combining a graph attention mechanism and a prototype network is constructed to realize the classification of seagrass beds under the condition of small sample. In order to realize the above purpose, the application adopts the following technical scheme:
[0006] A seagrass bed classification method based on feature screening under the condition of small sample restriction, characterized in that it comprises the following steps:
[0007] Step 1: Construct a multi-strategy feature optimization model combining Relief-F and KPCA algorithm, select high contribution rate features and perform nonlinear dimension reduction to generate an optimized feature set;
[0008] Step 2: Use KNN strategy to construct the graph structure between samples and build an attention network model to aggregate neighbor information;
[0009] Step 3: The classification of the seagrass bed is realized by constructing the category prototype and calculating the distance between the query sample and the prototype.
[0010] In the preferred embodiment, in step 3, the classification is realized by calculating the Euclidean distance between the query sample and the prototype of each category; assuming that there are C data sets, each of which has K support samples, the support set S is expressed as follows:
[0011]
[0012] In the formula, x represents the i-th sample under category C; is the corresponding category label;
[0013] The prototype vector center μ c is calculated as follows:
[0014]
[0015] In the formula, f θ is a feature extraction function;
[0016] According to the distance between the support sample features and the center, a weight ω i is introduced:
[0017]
[0018] Then the prototype vector P c of category c is calculated as follows:
[0019]
[0020] The Euclidean distance between the query sample x q and all category prototype vectors is calculated, and the Softmax function is used for normalization to obtain the probability p(y=c|x q ) that the query sample x q belongs to category c:
[0021]
[0022] In the formula, d is the Euclidean distance; c' represents all possible categories.
[0023] In the preferred embodiment, step 1 includes:
[0024] Step 1.1: Evaluate feature importance based on the Relief-F algorithm;
[0025] Step 1.2: Perform feature dimension reduction based on the KPCA algorithm.
[0026] In the preferred embodiment, step 1.1 includes:
[0027] For each feature f i Initialize the weight, randomly select a sample x from the training set, find the nearest sample x (Hc) of the same class and the nearest sample x (Mc) of the different class for each class c respectively.
[0028] If the distance between x and x (Hc) in c is less than the distance between x and x (Mc) , increase the weight of the feature; otherwise, if the distance between x and x (Hc) in c is greater than the distance between x and x (Mc) , decrease the weight of the feature.
[0029] Repeat the above process several times to finally obtain the average weight W(f i ) of each feature, sort the features according to the average weight, and select the top several features for subsequent processing.
[0030] In the preferred embodiment, in step 1.2, the features screened by Relief-F are reduced in dimension based on KPCA, and the KPCA algorithm first maps the original features to a high-dimensional feature space by introducing a kernel function, and then performs principal component analysis in the high-dimensional feature space to preserve the nonlinear structure information in the data.
[0031] In the preferred embodiment, the step 2 includes:
[0032] ① Use the pre-trained feature extraction function f θ (x) to encode the original sample data to obtain a high-dimensional feature representation h i =f θ (x i );
[0033] ② Standardize all feature vectors, and normalize each dimension of the feature to zero mean and unit variance;
[0034] ③ In the feature space, use the Euclidean distance as the similarity measurement criterion, calculate the feature distance of the remaining nodes for each node i, and select the K nodes with the closest distance as the neighbor node set N (i) ;
[0035] ④ Build an edge between node i and each node j in set N (i) to form a graph structure.
[0036] In the preferred embodiment, a graph attention mechanism is introduced to update the node features. For node i and its neighbor nodes j∈N (i) , calculate its attention score e ij :
[0037] e ij = σ(a T [Wh i ||Wh j ])
[0038] where W is a learnable weight, || is feature concatenation, h i and h j are node features, a is an attention parameter, and σ is a nonlinear activation function.
[0039] The neighbor node score of each node i is normalized by softmax to obtain the normalized attention coefficient:
[0040]
[0041] The feature of node i is obtained by weighted fusion based on neighbor node features:
[0042]
[0043] In the preferred embodiment, the training of the prototype classifier is supervised by using the standard cross-entropy loss, and the loss function is defined as:
[0044]
[0045] where y i is the true label of the query sample x i .
[0046] The class prototype is adjusted in combination with the center loss L center , so that the sample is closer to the corresponding class prototype in the feature space:
[0047]
[0048] The final loss function is represented as:
[0049] L = L PN + λL center .
[0050] where λ is a hyperparameter for adjusting the weight between cross-entropy and center loss.
[0051] Compared with the prior art, the present application has the following beneficial effects:
[0052] The present application aims at the actual problems of sample acquisition difficulty, high feature dimension, and strong heterogeneous interference of seagrass bed in shallow complex environment, and proposes a seagrass bed classification method based on feature screening under small sample restriction, compared with the existing remote sensing seagrass bed detection technology which mainly relies on large sample supervision or single means, the present application firstly constructs a feature optimization strategy fusing Relief-F and KPCA, effectively screens out key spatial terrain and spectral texture features with high contribution rate to seagrass bed classification, and compresses the feature space through nonlinear dimension reduction, and improves the feature expression efficiency; then, aiming at the problems of scattered sample distribution and fuzzy class boundary of seagrass, the K nearest neighbor graph structure between samples is constructed based on the optimized features, the graph attention mechanism is introduced to realize adaptive update of node features, the semantic relationship of local neighborhood is fully mined, the local mode of seagrass area in spatial adjacency and spectral consistency is captured, and the feature modeling ability of the model under small sample condition is enhanced; finally, a metric learning classifier is constructed combined with the prototype network, the accurate discrimination of seagrass bed and other ground objects is realized through prototype distance, the problem of boundary drift due to sample sparseness is avoided, and the center loss is introduced to further optimize the class cohesion characteristics, and the classification accuracy and generalization ability under small sample scene are improved. The present application takes airborne LiDAR data and airborne hyperspectral data collected in a sea area near Qingdao as the basis to detect seagrass bed classification, solves the problems of feature redundancy and small sample in actual seagrass bed classification application, and provides effective technical support and solution for further seagrass bed recognition, repair and other fields. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 It is a small sample restriction based on feature screening seagrass bed classification method flow chart.
[0054] Figure 2 It is a KPCA algorithm principle diagram in the present application.
[0055] Figure 3 It is a GAT-PN model construction diagram in the present application.
[0056] Figure 4 It is a comparison diagram of GAT-PN model and other classifiers for seagrass bed classification in the present application. DETAILED DESCRIPTION
[0057] The present application will be described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be pointed out that those skilled in the art can make several changes and improvements without departing from the concept of the present application. These all belong to the protection scope of the present application.
[0058] The application provides a seagrass bed classification method based on feature screening under small sample restriction, and a flowchart is shown in the figure. Figure 1 The method comprises the following steps:
[0059] Step 1: a multi-strategy feature optimization model is constructed by fusing a Relief-F feature selection algorithm and a KPCA kernel principal component analysis algorithm, high-contribution-rate features are screened, nonlinear dimension reduction is performed, and an optimized feature set is generated.
[0060] In order to eliminate redundancy and enhance feature discrimination, a multi-strategy feature optimization model is constructed by fusing Relief-F and KPCA. High-contribution-rate features are screened, nonlinear dimension reduction is performed, the feature space is further compressed, the nonlinear structure information in the original data is retained, and an optimized feature set is generated. The principle diagram of the KPCA algorithm is shown in the figure. Figure 2
[0061] In the preferred embodiment, step 1 specifically comprises the following steps:
[0062] Step 1.1: evaluating feature importance based on the Relief-F algorithm;
[0063] Relief-F is a feature selection algorithm based on the neighborhood weighting idea. By finding the nearest neighbor sample and the different class sample of each sample, comparing the change degree of each feature between similar samples, and evaluating the contribution of the feature to the classification task. The algorithm can be divided into the following 5 steps:
[0064] ① Initialize the weight vector: initialize the weight of each feature f i , 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 class c, find the nearest same-class sample x (Hc) and the different-class sample x (Mc) .
[0067] ④ Update the weight: if the distance between x and x (Hc) in c is less than the distance between x and x (Mc) , increase the weight of the feature. On the contrary, if the distance between x and x (Hc) in c is greater than the distance between x and x (Mc) , decrease the weight of the feature. The weight update formula is as follows:
[0068]
[0069] In the formula, f i is the i-th feature; xi , z i represents the value of sample x and z on the i-th feature; max(f i ), min(f i ) represents the maximum and minimum values of feature f i in all samples; m is the number of iteration rounds, that is, the total number of samples; diff(f i , x, z) represents the difference between sample x and z on the i-th feature; P(c) represents the prior probability of class c; y j is the true class label of the j-th sample x j ; W(f i ) represents the weight of the current feature f i ; is the nearest same-class sample of x j , is the nearest different-class sample of x j ; P(c) is the prior probability of class c in the data; P(y j ) is the prior probability of the true class label y j to which sample x j belongs.
[0070] 5. Repeat the iteration process: repeat the above process several times to finally obtain the average weight W(f i ) of each feature, and sort the features according to the average weight W(f i ) to select the top several important features for subsequent processing.
[0071] Step 1.2: Dimensionality reduction based on KPCA algorithm;
[0072] In order to further compress redundant information and extract features with stronger discriminative ability, the present application performs dimensionality reduction on the features screened by Relief-F based on KPCA. The KPCA algorithm first maps the original features to a high-dimensional feature space by introducing a kernel function, and then performs principal component analysis in the space to preserve the nonlinear structure information in the data. The core process includes the following 5 steps:
[0073] ① Determine the kernel function and parameters: selecting appropriate kernel function and parameters is one of the key steps of KPCA. Commonly used kernel functions include Gaussian kernel, polynomial kernel, etc. The present application uses Gaussian kernel function to construct kernel matrix instead of traditional covariance matrix. The Gaussian kernel function is expressed as follows:
[0074]
[0075] where x, y are sample points, and ||x-y|| 2 is the square of the Euclidean distance; б is the bandwidth parameter of the Gaussian kernel.
[0076] Step 2: A KNN strategy is used to construct a graph structure between samples, and an attention network model is built to aggregate neighbor information. n} to calculate a kernel matrix k e R n×n , whose elements are K ij = K(x i , x j ). To ensure data centralization, the kernel matrix is centrally processed:
[0077]
[0078] In the formula, K is the original kernel matrix, and 1 n is a matrix with elements of 1 / n.
[0079] Step 3: Eigenvalue decomposition: the kernel matrix K is decomposed to extract the nonlinear features of the data.
[0080] Step 4: Select principal components: select the first k principal components according to the size of the eigenvalue, so that the cumulative contribution rate reaches the preset threshold.
[0081] Step 5: Projection and dimensionality reduction: for a new sample x, its projection in the jth principal component direction is:
[0082]
[0083] In the formula, is the normalized feature vector component corresponding to the jth principal component; K(x i , x) is the kernel similarity between the ith training sample and the new sample.
[0084] Step 2: A KNN strategy is used to construct a graph structure between samples, and an attention network model is built to aggregate neighbor information.
[0085] There is a certain local consistency and spatial structure feature between the same samples in remote sensing data. This potential structure relationship between samples is often not fully utilized by traditional methods, so a KNN strategy is used to construct a graph structure between samples, and an edge connection is established based on the similarity in the feature space, so as to describe the local topological relationship between samples. On this basis, a graph attention network is introduced as a feature updating module, which dynamically aggregates neighbor information through an adaptive weight mechanism, and improves the discrimination ability of feature expression and the structure perception ability of the model.
[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 the node set, and each node corresponds to an input sample x i Let E represent the set of edges established between nodes using a similarity metric. The process includes the following four steps:
[0088] ① Utilizing the pre-trained feature extraction function f θ (x) Perform feature encoding on the original sample data to obtain sample x i High-dimensional feature representation h i =f θ (x i ), where θ is a parameter.
[0089] ② Standardize all feature vectors using z-score normalization to normalize each feature dimension to zero mean and unit variance. The standardization formula is:
[0090]
[0091] In the formula, For the standardized features, μ represents the mean vector of the sample features; б represents the standard deviation vector of the sample features.
[0092] ③ In the feature space, Euclidean distance is used as the similarity criterion. For each node i, the feature distances to the remaining nodes are calculated, and the K nearest nodes are selected as its neighbor node set N. (i) .
[0093] ④ For node i and set N (i) Each node j in the graph is connected to an edge to form a graph structure.
[0094] To fully explore the complex relationships between samples, a graph attention mechanism is further introduced to update node features. For node i and its neighboring nodes j∈N... (i) Calculate its attention score e ij :
[0095] e ij =σ(a T [Wh i ||Wh j (7)
[0096] In the formula, W represents the learnable weights; || represents feature concatenation, and h i and h j Let be the node feature, 'a' be the attention parameter, and σ be the non-linear activation function. To ensure the comparability of scores between neighboring nodes, the scores of each node i's neighboring nodes are normalized using softmax, resulting in normalized attention coefficients:
[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 neighbor node features i :
[0100]
[0101] Step 3: Realize the classification detection of the seagrass bed by constructing the category prototype and calculating the distance between the query sample and the prototype.
[0102] In the complex offshore environment, the distribution of the seagrass bed presents strong heterogeneity and spatial discontinuity. The traditional classification model faces problems such as fuzzy class boundary and unstable classification accuracy in actual application. Therefore, without relying on complex model parameter training, simple and rapid classification detection of the seagrass bed is realized by constructing the category prototype and calculating the distance between the query sample and the prototype. The GAT-PN model construction diagram is shown in Figure 3 .
[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 each category prototype. Assuming that there are C data sets, each category has K support samples, and the support set S is represented as follows:
[0106]
[0107] In the formula, represents the i-th sample under category c; is the corresponding category label. In order to represent the center feature of each category, the category prototype vector is introduced, and the center of each prototype vector is calculated as follows:
[0108]
[0109] In the formula, f θ (x) is a feature extraction function, and S is a support set. Then, according to the distance between the support sample feature and the center, the weight is introduced:
[0110]
[0111] Then, the prototype vector of category c is dynamically weighted and calculated as:
[0112]
[0113] Generally, all samples in the prototype network contribute to the category prototype, which cannot distinguish good and bad quality, and the heterogeneity of seagrass bed remote sensing samples is high, so the common prototype is easy to be "offset". Therefore, formula (12), (13) is proposed for the characteristics of small sample classification of seagrass bed, and a dynamic weighted prototype vector calculation method is proposed. By introducing the sample weight when constructing the category prototype, the high reliable sample can affect the prototype to a greater extent, and the classification performance and robustness of the model in the small sample environment are improved.
[0114] For a given query sample x q , calculate the Euclidean distance between it and all category prototype vectors, and normalize it by the Softmax function to get the probability of query sample x q belongs to category c:
[0115]
[0116] In the formula, d is the Euclidean distance. C represents the probability of "sample belonging to the c-th category". C' represents all possible categories. For example, when classifying seagrass and other categories, then c is the seagrass category, and c' is the seagrass and other categories.
[0117] Step 3.2: Loss function design;
[0118] In order to optimize the discriminant performance of the prototype classifier, the standard cross-entropy loss is used to supervise the training of the prototype classifier, and the loss function is defined as:
[0119]
[0120] In the formula, y i is the true label of query sample x i . Relying on cross-entropy loss alone may cause the category prototype to be not compact enough in the feature space, affecting the small sample classification accuracy. In order to further optimize the expression ability of the category prototype, the center loss L center is combined to adjust the category prototype, so that the sample is close to the corresponding category prototype in the feature space:
[0121]
[0122] L=L PN +λL center (17)
[0123] In the formula, λ is a hyperparameter that adjusts the weight between cross-entropy and center loss.
[0124] Field experiment: To verify the performance of the proposed feature-based classification method for seagrass bed under small sample constraints, airborne LiDAR bathymetric data and hyperspectral data of a certain coastal area were used for verification. The ALB equipment used in the experiment is Mapper20KU developed by an optical precision instrument research institute, with a laser center wavelength of 532 nm, a laser repetition frequency of 20 kHz, a scanning angle of ±20°, a laser divergence angle of 1 mrad, and a weight of 6 kg. The equipment integrates EG370N high-precision inertial navigation developed by a certain company, and the flight carrier is a vertical take-off and landing fixed-wing unmanned aerial vehicle RY-V50. The hyperspectral equipment used in the experiment is S185 developed by a certain company, with a band interval of 4 nm, a band range of 450 nm-950 nm, a band number of 125, and a spectral resolution of 8 nm@532 nm. The flight carrier is a multi-rotor DJI M300.
[0125] To verify the effect of the method on seagrass bed classification and extraction under small sample conditions, verification data were collected in a certain coastal area in November 2024. The flight altitude of ALB acquisition was 120 m, and the flight altitude of hyperspectral acquisition was 100 m. The aircraft heading overlap rate was 70%, and the lateral overlap rate was 80%. At the same time, 20 sample data were collected manually.
[0126] Qualitative analysis of small sample classification and extraction results of different classifiers: Using data from a certain coastal area, the fusion data were classified and extracted under small sample conditions according to the proposed method, and the results were compared with those of other three classifiers. The comparison of seagrass bed classification results of GAT-PN model and other classifiers is shown in Figure 4 , Figure 4 The green part is the classification detection result, i.e. the green part is the position prediction of seagrass bed distribution. As shown in Figure 4 , the classification results of the proposed method eliminate the false classification of the previous methods, especially the typical false prediction of walkways and other areas, which is more consistent with the seagrass bed distribution results in the orthophoto. Seagrass bed extraction from fusion data can better avoid false classification results and improve the accuracy of classification.
[0127] Quantitative analysis of small sample classification and extraction results of different classifiers: To quantitatively evaluate the small sample seagrass bed classification and extraction results of the proposed method and other three classifiers on fusion data, the precision was evaluated using the confusion matrix. The precision comparison results of the present invention, SVM, random forest and neural network are shown in Table 1.
[0128] Table 1 Precision comparison of the present invention, SVM, random forest and neural network
[0129]
[0130]
[0131] From Figure 4It can be seen that the method is more in line with the actual orthographic image, and the misclassification phenomenon in the coastal area is improved. As shown in Table 1, the accuracy and Kappa coefficient of the method are better than those of the other three commonly used classification methods, the overall classification accuracy is 96.2%, and the Kappa coefficient is 0.908. It can be seen that the method has good practical application effect.
[0132] In summary, the present application proposes a feature screening-based seagrass bed classification method under the condition of small sample limitation, aiming at the practical problems of seagrass bed sample acquisition difficulty, high feature dimension, and strong heterogeneity interference in shallow complex environment. Compared with the existing remote sensing seagrass bed detection technology which mainly relies on large sample supervision or single means, the present application first constructs a feature optimization strategy combining Relief-F and KPCA, effectively selects key spatial terrain and spectral texture features with high contribution rate to seagrass bed classification, and compresses the feature space through nonlinear dimension reduction to improve the feature expression efficiency. Then, aiming at the problem of scattered seagrass sample distribution and fuzzy class boundary, the K nearest neighbor graph structure between samples is constructed based on the optimized features, the graph attention mechanism is introduced to realize adaptive update of node features, the semantic relationship of local neighborhood is fully mined, the local mode of seagrass area in spatial adjacency and spectral consistency is captured, and the feature modeling ability of the model in the small sample condition is enhanced. Finally, a prototype network is combined to construct a metric learning classifier, the prototype distance is used to realize accurate discrimination of seagrass bed and other ground objects, the problem of boundary drift due to sample sparseness is avoided, and the center loss is introduced to further optimize the intra-class aggregation characteristics, and the classification accuracy and generalization ability in the small sample scene are improved. The present application uses airborne LiDAR data and airborne hyperspectral data collected in a sea area near Qingdao for seagrass bed classification and detection, solves the problems of feature redundancy and small sample in actual seagrass bed classification application, and provides effective technical support and solutions for further seagrass bed identification, repair and other fields.
[0133] The specific embodiments of the present application are described above. It should be understood that the present application is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essential content of the present application. The embodiments of the present application and the features in the embodiments can be arbitrarily combined without conflict.
Claims
1. A method for classifying seagrass beds based on feature screening under small sample size constraints, characterized by: Step 1: Construct a multi-strategy feature optimization model combining Relief-F and KPCA algorithms, screen high-contribution-rate features and perform nonlinear dimension reduction to generate an optimized feature set; Step 2: Build a graph structure between samples using the KNN strategy and build an attention network model to aggregate neighbor information; Step 3: Classify and detect seagrass beds by constructing class prototypes and calculating the distance between the query sample and the prototype; Classify by calculating the Euclidean distance between the query sample and each class prototype; assuming there are C data sets, each with K support samples, the support set S is represented as follows: In the formula, represents the i-th sample under the category c; is the corresponding category label; Prototype vector center μ for each category c c is: In the formula, f θ is a feature extraction function; According to the distance between the support sample feature and the center, a weight ω is introduced i : Prototype vector p of the class c is then c The dynamic weighting calculation is: Compute query sample x q Euclidean distance d to all class prototype vectors, normalized by Softmax function, resulting in query sample x q Probability p(y = c | x q ) that x belongs to class c Where c' represents all possible classes.
2. The method according to claim 1, wherein, Step 1 includes: Step 1.1: Evaluate feature importance based on the Relief-F algorithm; Step 1.2: Perform feature dimension reduction based on the KPCA algorithm.
3. The method according to claim 2, wherein the method is characterized by: Step 1.1 includes: For each feature f i Initialize weights, randomly select a sample x from the training set, for each class c, find the nearest same-class sample x (Hc) and the nearest different-class sample x (Mc) ; If the distance between x and x (Hc) is less than the distance between x and x (Mc) , then the weight of the feature is increased; otherwise, if the distance between x and x (Hc) is greater than the distance between x and x (Mc) , then the weight of the feature is decreased. The above process is repeated several times, and finally the average weight W(f i ) of each feature is obtained. The features are sorted according to the average weight, and the top several features are selected for subsequent processing.
4. The method according to claim 2, wherein the method is characterized by: In Step 1.2, KPCA is used to reduce the dimension of features screened by Relief-F. KPCA algorithm introduces kernel function, first maps the original features to high-dimensional feature space, then performs principal component analysis in the high-dimensional feature space, and preserves the nonlinear structure information of the data.
5. The method according to claim 1, wherein the method is characterized by: Step 2 includes: θ (x) using a pre-trained feature extraction function f i θ (x i ) = f θ (x i ) ② Standardize all feature vectors, normalize each dimension to zero mean and unit variance using mean standardization; ③In the feature space, the Euclidean distance is used as the similarity measurement criterion, and the feature distance of each node i to the rest of the nodes is calculated, and the K nodes with the shortest distance are selected as the neighbor node set N of node i (i) ; (4) Construct edges between node i and each node j in set N (i) to form a graph structure.
6. The method according to claim 5, wherein the method is characterized by: The graph attention mechanism is introduced to update the node features, for node i and its neighbor nodes j ∈ N (i) , the attention score e ij of which is calculated: e ij = σ(a T [Wh i ||Wh j ]) where W is a learnable weight; || is feature concatenation, h i and h j are node features, a is an attention parameter, and σ is a nonlinear activation function. The neighbor node score of each node i is normalized using softmax normalization to obtain the normalized attention coefficient: weighting and fusing based on neighbor node features to obtain the feature h of node i i :
7. The method according to claim 1, wherein the method is characterized by: Training of the supervised prototype classifier using standard cross-entropy loss, loss function L PN is defined as: In the formula, y i is the true label of the query sample x i . The center loss L center Adjust the class prototypes so that the samples move closer to the corresponding class prototypes in the feature space: is the vector center for the class y i ; then the final loss function L is represented 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