Hyperspectral image ground object category detection method and device, and computer equipment

CN122510744BActive Publication Date: 2026-10-20QUANZHOU INST OF INFORMATION ENG +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610995937.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-06
Publication Date
2026-10-20
Estimated Expiration
2046-07-06

AI Technical Summary

Technical Problem

像素级方法以单个像素为基本处理单元,通过卷积运算、多尺度滤波等方式提取局部纹理与光谱细节特征,具备较强的细粒度分辨能力,但易受高光谱数据噪声干扰,且缺乏大范围区域上下文的感知能力

Benefits of technology

第一,强化超像素空间上下文的高阶建模能力。以超像素划分结果构建的邻接图为基础,利用切比雪夫多项式依次执行一阶、二阶、三阶谱图卷积,逐层扩展超像素的空间感受野,有效捕获地物分布中广泛存在的复杂高阶空间结构关系,弥补了传统简单邻接图仅能建模一阶成对交互关系的缺陷;通过残差连接实现低阶与高阶谱图特征的交互融合,兼顾局部相邻关联与全局结构信息;再经多头分组注意力机制对通道维度进行加权增强,进一步提升超像素区域特征的判别性与表达丰富度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122510744B_ABST
    Figure CN122510744B_ABST
Patent Text Reader

Abstract

The application provides a ground object category detection method and device for a hyperspectral image, and a computer device, comprising: acquiring a hyperspectral image and performing superpixel division processing on the hyperspectral image to obtain a superpixel division result and a spatial mapping relationship between pixels and superpixels; performing feature extraction on the superpixel division result to obtain superpixel region features; performing feature extraction on the pixels of the hyperspectral image to obtain pixel fine features; mapping the superpixel region features to the pixel space according to the spatial mapping relationship to obtain superpixel region features at the pixel scale; using a cross-attention mechanism guided by an adaptive threshold to deeply fuse the pixel fine features and the superpixel region features at the pixel scale to obtain fusion features; and outputting a ground object category prediction result of the hyperspectral image based on the fusion features. The application can take into account both region semantics and pixel details, and improve the hyperspectral ground object classification accuracy and edge region recognition effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of image processing and computer vision technology, and in particular to a method and apparatus for detecting land cover categories in hyperspectral images, as well as computer equipment. Background Technology

[0002] Hyperspectral image land cover category detection is one of the core research directions in the field of remote sensing information processing. It assigns a corresponding land cover category to each pixel in the image by mining the spectral and spatial structure features of the image. It has wide application value in scenarios such as agricultural resource monitoring, ecological environment assessment, mineral resource exploration, and land spatial planning.

[0003] Existing hyperspectral image classification techniques mainly fall into two categories: pixel-level processing and superpixel-level processing. Pixel-level methods use individual pixels as the basic processing unit, extracting local texture and spectral detail features through convolution operations and multi-scale filtering, possessing strong fine-grained resolution capabilities. However, they are susceptible to noise interference in hyperspectral data and lack the ability to perceive large-scale regional context. Superpixel-level methods aggregate pixels with similar spectral and spatial attributes into regional units through superpixel segmentation, constructing graph structures with superpixels as nodes for feature modeling. This effectively reduces computational complexity and improves the consistency of regional features. However, existing adjacency graph-based superpixel modeling methods mostly only capture first-order pairwise interactions between adjacent nodes, making it difficult to fully represent the complex high-order spatial structures widely present in ground cover distribution, and the depth of utilization of spatial context information is insufficient. Summary of the Invention

[0004] This application provides a method and apparatus for detecting land cover categories in hyperspectral images, as well as a computer device. By constructing a hypergraph network to model the high-order spatial relationship between superpixels, and extracting multi-scale features from pixel fine features and superpixel region features respectively, the superpixel region features are mapped to the pixel space. A cross-attention mechanism is used to deeply fuse the two types of features, thereby taking into account both detail recognition ability and global context awareness ability, effectively improving classification accuracy.

[0005] In a first aspect, embodiments of this application provide a method for detecting land cover categories in hyperspectral images, the method comprising: A hyperspectral image is acquired and superpixel segmentation is performed on the hyperspectral image to obtain the superpixel segmentation result and the spatial mapping relationship between pixels and superpixels; Feature extraction is performed on the superpixel segmentation results to obtain superpixel region features, specifically including: A superpixel adjacency graph is constructed based on the superpixel partitioning results, and the normalized Laplacian matrix of the superpixel adjacency graph is calculated. Chebyshev polynomials are used to perform first-order, second-order, and third-order spectral convolutions on the normalized Laplacian matrix to obtain superpixel features corresponding to different orders, thereby expanding the spatial receptive field of the superpixel layer by layer and capturing the spatial high-order structural relationships between different superpixels. By performing low-order and high-order spectral feature interaction fusion on the superpixel features corresponding to different orders through residual connections, fused superpixel features are obtained; and The fused superpixel features are enhanced by channel grouping and weighting using a multi-head grouping attention mechanism to obtain the superpixel region features; Feature extraction is performed on the pixels of the hyperspectral image to obtain fine pixel features; Based on the spatial mapping relationship, the superpixel region features are mapped to the pixel space to obtain the superpixel region features at the pixel scale. An adaptive threshold-guided cross-attention mechanism is used to deeply fuse the fine-grained features of the pixel and the superpixel region features at the pixel scale to obtain fused features, specifically including: Adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation are performed on the pixel fine features respectively to obtain pixel channel interaction weights and pixel spatial interaction weights respectively; Adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation are performed on the superpixel region features at the pixel scale to obtain the superpixel channel interaction weight and the superpixel spatial interaction weight, respectively. The pixel fine features are enhanced by multiplying element-wise with the pixel channel interaction weights and pixel space interaction weights to obtain enhanced pixel fine features. The superpixel region features at the pixel scale are enhanced by element-wise multiplication and weighted enhancement based on the superpixel channel interaction weights and superpixel spatial interaction weights, resulting in enhanced superpixel region features; and Using the enhanced pixel fine features as the query vector and the enhanced superpixel region features as the key vector and value vector, cross-scale feature cross-attention calculation is performed to obtain the fused features; Based on the fusion features, the predicted land cover categories of the hyperspectral image are output.

[0006] Secondly, embodiments of this application provide a land cover category detection device for hyperspectral images. The device includes a superpixel segmentation module, a superpixel feature extraction module, a pixel feature extraction module, a cross-scale feature fusion module, and a classification output module. The superpixel segmentation module acquires the hyperspectral image and performs superpixel segmentation processing on it to obtain superpixel segmentation results and spatial mapping relationships between pixels and superpixels. The superpixel feature extraction module extracts features from the superpixel segmentation results to obtain superpixel region features, specifically including: constructing a superpixel adjacency graph based on the superpixel segmentation results and calculating the normalization of the superpixel adjacency graph. The normalized Laplacian matrix is ​​processed; first-order, second-order, and third-order spectral convolutions are performed sequentially on the normalized Laplacian matrix using Chebyshev polynomials to obtain superpixel features corresponding to different orders, thereby expanding the spatial receptive field of the superpixel layer by layer and capturing the high-order spatial structural relationships between different superpixels; low-order and high-order spectral feature interaction fusion is performed on the superpixel features corresponding to different orders through residual connections to obtain fused superpixel features; and channel grouping weighted enhancement is performed on the fused superpixel features through a multi-head grouping attention mechanism to obtain the superpixel region features; a pixel feature extraction module is used to extract features from the pixels of the hyperspectral image to obtain fine pixel features; a feature mapping module... The first block maps the superpixel region features to the pixel space based on the spatial mapping relationship, obtaining superpixel region features at the pixel scale. The second block uses an adaptive threshold-guided cross-attention mechanism to deeply fuse the pixel fine features and the superpixel region features at the pixel scale, obtaining fused features. Specifically, this includes: performing adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation on the pixel fine features to obtain pixel channel interaction weights and pixel space interaction weights, respectively; and performing adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation on the superpixel region features at the pixel scale to obtain superpixel region features, respectively. The system employs pixel channel interaction weights and superpixel spatial interaction weights. Based on these weights, the pixel fine features are multiplied element-wise and weighted to obtain enhanced pixel fine features. Similarly, based on these weights, the superpixel region features at the pixel scale are multiplied element-wise and weighted to obtain enhanced superpixel region features. Furthermore, using the enhanced pixel fine features as a query vector and the enhanced superpixel region features as both key and value vectors, cross-scale feature cross-attention calculation is performed to obtain the fused features. A classification output module is used to output the land cover category prediction results of the hyperspectral image based on the fused features.

[0007] Thirdly, embodiments of this application provide a computer device, the computer device including a memory and a processor, the memory being used to store a computer program; the processor being used to execute the computer program to implement the above-described method for detecting land cover categories in hyperspectral images.

[0008] The aforementioned method and apparatus for detecting land cover categories in hyperspectral images, as well as the computer equipment, have been improved in multiple dimensions, including superpixel spatial relationship modeling, fine pixel feature extraction, multi-scale feature fusion, and training optimization, achieving the following technical effects: First, it enhances the high-order modeling capability of superpixel spatial context. Based on the adjacency graph constructed from the superpixel partitioning results, it uses Chebyshev polynomials to sequentially perform first-order, second-order, and third-order spectral convolutions, expanding the spatial receptive field of superpixels layer by layer. This effectively captures the complex high-order spatial structural relationships widely present in the distribution of ground features, overcoming the deficiency of traditional simple adjacency graphs that can only model first-order pairwise interactions. Through residual connections, it achieves interactive fusion of low-order and high-order spectral graph features, taking into account both local adjacency associations and global structural information. Then, a multi-head grouping attention mechanism is used to weight and enhance the channel dimension, further improving the discriminativeness and expressive richness of superpixel region features.

[0009] Second, it achieves deep collaborative enhancement of pixel and superpixel features. On the pixel side, local features under different receptive fields are extracted through multi-scale differential filtering, and key features are enhanced by attention mechanism to improve the fine-grained recognition ability and noise resistance of pixel-level features. According to the spatial mapping relationship, the superpixel region features are aligned to the pixel space to achieve dimensional unification of cross-scale features. Before fusion, adaptive threshold-guided channel and spatial dual attention is introduced to dynamically select discriminative spectral channels and key spatial regions to suppress the negative impact of redundant bands and background interference information. Finally, the semantic alignment and deep information interaction of the two types of features are completed through cross-scale cross-attention mechanism, which overcomes the limitation of the lack of deep collaboration in the simple splicing and superposition fusion method in the existing technology. This enables the fused features to have both pixel-level detail resolution and superpixel-level regional semantic perception ability, effectively improving the overall land cover classification accuracy and significantly improving the classification accuracy of land cover edge areas.

[0010] Third, improve the stability and generalization performance of model training. A multi-loss joint training strategy is adopted, which applies supervised constraints to the three stages of superpixel feature extraction, pixel feature extraction and feature fusion respectively, to guide the network branches to optimize collaboratively. Combined with an early stopping mechanism, training is dynamically terminated based on the classification accuracy of the validation set, which effectively avoids the risk of overfitting and improves the model's generalization and adaptation ability on different hyperspectral datasets. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.

[0012] Figure 1 This is a first flowchart of a method for detecting land cover categories in hyperspectral images provided in an embodiment of this application.

[0013] Figure 2 A flowchart of step S102 provided in the embodiments of this application.

[0014] Figure 3 A flowchart of step S105 provided in the embodiments of this application.

[0015] Figure 4 A flowchart of step S101 provided for an embodiment of this application.

[0016] Figure 5 A flowchart of step S103 provided in the embodiments of this application.

[0017] Figure 6 A flowchart of step S106 provided in the embodiments of this application.

[0018] Figure 7 The second flowchart is a method for detecting land cover categories in hyperspectral images provided in the embodiments of this application.

[0019] Figure 8 A flowchart of step S203 provided in the embodiments of this application.

[0020] Figure 9 A flowchart of step S205 provided for an embodiment of this application.

[0021] Figure 10 This is a first schematic diagram of the output land cover category prediction results provided in an embodiment of this application.

[0022] Figure 11 This is a second schematic diagram illustrating the output land cover category prediction results provided in an embodiment of this application.

[0023] Figure 12 This is a third schematic diagram illustrating the output land cover category prediction results provided in an embodiment of this application.

[0024] Figure 13 This is a structural block diagram of the hyperspectral image land cover category detection device provided in the embodiments of this application.

[0025] Figure 14 This is a schematic diagram of the internal structure of a computer device used for a method of detecting land cover categories using hyperspectral images, as provided in an embodiment of this application.

[0026] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0028] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar planned objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data are interchangeable where appropriate; in other words, the described embodiments are implemented according to a sequence other than that illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, may also include other content; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] It should be noted that the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of a person skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.

[0030] Please refer to Figure 1This is the first flowchart of the hyperspectral image land cover category detection method provided in this application embodiment. This application provides a hyperspectral image land cover category detection method for accurate pixel-by-pixel prediction of land cover categories in hyperspectral images. Hyperspectral images contain tens to hundreds of continuous narrowband spectral bands, capable of accurately capturing the spectral response characteristics of different land covers, while also carrying rich spatial structure and distribution information, making them valuable in remote sensing applications such as agricultural resource monitoring, ecological environment assessment, mineral resource exploration, and land spatial planning. The core objective of land cover category detection is to assign a corresponding land cover category prediction label to each pixel in the hyperspectral image, a crucial step in the intelligent interpretation of hyperspectral remote sensing information. This application employs a superpixel and pixel dual-branch parallel feature extraction architecture, combined with an adaptive threshold-guided cross-scale cross-attention fusion mechanism, to simultaneously mine spatial high-order structural semantics and fine-grained spectral texture details, effectively solving the problems of insufficient utilization of spatial context and insufficient depth of cross-level feature fusion in existing technologies, significantly improving the overall accuracy of land cover classification and edge region recognition. The hyperspectral image land cover category detection method includes steps S101-S106.

[0031] Step S101: Acquire a hyperspectral image and perform superpixel segmentation on the hyperspectral image to obtain the superpixel segmentation result and the spatial mapping relationship between pixels and superpixels.

[0032] In step S101, superpixels are regional units formed by clustering. Pixels within a superpixel satisfy the constraints of spatial proximity and similar spectral features. Compared to processing individual pixels, superpixels naturally carry the semantic attributes of local regions, suppressing the interference of random noise in hyperspectral data, improving the consistency of local regional features, and effectively reducing the node size of subsequent graph structure calculations, thus lowering computational complexity. Superpixel partitioning is a process that uses a hyperspectral image as input, comprehensively considers the differences in spectral features and spatial distances between pixels, and divides the entire image into several non-overlapping regional blocks through clustering operations. Superpixel partitioning aims to convert the image from pixel-level granularity to region-level granularity while preserving the boundary information of ground features. The superpixel partitioning result is the output data of the superpixel partitioning process, containing core information such as the spatial coverage and regional attributes of each superpixel, and serves as the direct input basis for subsequent construction of superpixel adjacency graphs and extraction of superpixel regional features. Spatial mapping relationships are used to establish the correspondence between pixels and superpixels, representing the superpixel unit to which each pixel belongs. This is the core basis for realizing the conversion of superpixel region features to pixel spatial scale alignment, ensuring accurate spatial matching of the two types of features during subsequent cross-scale feature fusion, and avoiding classification accuracy loss caused by feature misalignment. The superpixel partitioning results and spatial mapping relationships will be elaborated in detail below.

[0033] Step S102: Extract features from the superpixel segmentation results to obtain superpixel region features.

[0034] In step S102, the superpixel region feature is the fusion encoding result of the spectral attributes, spatial neighborhood relationships, and high-order structural information of each superpixel, which can characterize the overall category attributes and spatial distribution characteristics of the corresponding land cover region. Compared with single-pixel features, superpixel region features have stronger robustness and semantic generalization, can effectively weaken local noise interference, and provide global context support for subsequent cross-scale feature fusion. This application constructs a graph topology structure based on the superpixel partitioning results, uses multi-order spectral graph convolution to achieve layer-by-layer aggregation of neighborhood information, expands the spatial receptive field of superpixels, and captures spatial structural relationships at different levels; then, through feature interaction fusion and channel weighted enhancement, it completes the information complementarity between low-order local associations and high-order global structures, and finally obtains superpixel region features with stronger discriminative power. The feature extraction of the superpixel partitioning results to obtain superpixel region features will be described in detail below.

[0035] Step S103: Extract features from the pixels of the hyperspectral image to obtain fine pixel features.

[0036] In step S103, feature extraction of pixels in the hyperspectral image is performed. This involves using the pixels of the original hyperspectral image as the basic processing unit and conducting a multi-level feature encoding process around the spectral differences, texture structure, and edge boundary information of local regions. The aim is to extract pixel-level feature representations with class discriminative capabilities while preserving spatial detail accuracy. Pixel-level fine features are high-resolution feature representations output pixel-by-pixel, carrying the fine spectral features of ground objects, local texture changes, and edge abrupt changes. They possess strong fine-grained recognition capabilities, accurately depicting the boundary contours of different ground objects, small ground objects, and detailed differences in spectrally heterogeneous regions, effectively compensating for the limitations of superpixel-level features in fine-grained resolution. This application first completes preliminary denoising and channel dimension adaptation through pixel-by-pixel convolution, then extracts local features under different receptive fields through multi-scale differential filtering, achieves deep feature extraction through multi-level cascade stacking, and finally combines a channel attention mechanism to complete the weighted enhancement of key features, obtaining pixel-level fine features. The feature extraction of pixels in the hyperspectral image to obtain pixel-level fine features will be described in detail below.

[0037] Step S104: Based on the spatial mapping relationship, the superpixel region features are mapped to the pixel space to obtain the superpixel region features at the pixel scale.

[0038] In step S104, mapping superpixel region features to pixel space is based on the pixel-to-superpixel correspondence rules in the spatial mapping relationship. The region features corresponding to each superpixel are assigned to all pixels covered by that superpixel, completing the scale transformation of features from superpixel region granularity to pixel granularity. Superpixel region features at the pixel scale are feature representations whose spatial resolution perfectly matches the original hyperspectral image and pixel fine features. Each pixel location under the superpixel region features carries the regional semantics and global context information of its superpixel, realizing the downward transmission of regional structural semantics to pixel granularity. While preserving pixel-level spatial detail resolution, it injects perceptual information from a large neighborhood into each pixel. Scale alignment eliminates the granularity differences between the two types of features, ensuring a one-to-one spatial correspondence between pixel fine features and superpixel region features during subsequent fusion, providing a prerequisite for deep information interaction under the cross-attention mechanism.

[0039] Step S105: An adaptive threshold-guided cross-attention mechanism is used to deeply fuse pixel fine features and superpixel region features at the pixel scale to obtain fused features.

[0040] In step S105, the adaptive threshold is a dynamically generated filtering threshold based on the global statistical information of the input features themselves during the attention weight calculation process, rather than a fixed value preset manually. The adaptive threshold is used to dynamically filter the attention weights in the channel and spatial dimensions, suppressing redundant spectral channels and background interference regions that contribute little to the classification task, strengthening the expression of discriminative features, and improving the adaptive adaptability of the attention mechanism to different hyperspectral data. The cross-attention mechanism is an attention calculation mechanism that enables bidirectional information interaction between two sets of heterogeneous features. In this embodiment, the enhanced pixel fine features are used as the query vector, and the enhanced superpixel region features are used as the key and value vectors, enabling pixel-level features to actively associate and match the corresponding regional context information. Simultaneously, the semantics of the superpixel-level region guides the optimization and calibration of pixel detail features, breaking through the limitation of traditional self-attention only interacting within a single feature.

[0041] Deep fusion differs from shallow fusion methods such as simple feature concatenation and element-wise weighted superposition. It first enhances two sets of features separately through dual-dimensional adaptive attention, and then completes a multi-level fusion process of semantic alignment and information interaction through cross-attention. Deep fusion fully leverages the complementarity of the two types of features, achieving deep synergy between local details and global semantics, rather than a simple superposition of the two types of features. The fused feature is a unified feature representation output after cross-scale deep fusion, possessing both the fine-grained texture and edge discrimination capabilities of pixel-level features and the global context and regional semantic perception capabilities of superpixel region features. Feature discriminability and robustness are significantly improved, providing a core basis for subsequent pixel-wise land cover category prediction. The process of obtaining fused features will be elaborated in detail below.

[0042] Step S106: Based on the fusion features, output the land cover category prediction results of the hyperspectral image.

[0043] In step S106, the land cover category prediction result is a pixel-by-pixel category determination set that corresponds one-to-one with the spatial dimensions of the original hyperspectral image. Using the predicted land cover category label of each pixel as the basic unit, it fully represents the land cover category attribution of each pixel in the image. The land cover category prediction result can be stored in the form of a category index matrix to support subsequent quantitative calculations, or it can be generated as a visual classification map through color mapping rules. The visual classification map distinguishes typical land cover categories such as crops, woodlands, grasslands, water bodies, buildings, and bare soil using different colors, clearly presenting the spatial distribution range, boundary contours, and regional contiguous features of various land cover types, meeting the visualization and analysis needs of remote sensing image interpretation. The land cover category prediction results of the output hyperspectral image will be described in detail below.

[0044] Please refer to Figure 4 The flowchart below shows step S101, which is a sub-step provided in the embodiments of this application. Acquiring a hyperspectral image and performing superpixel segmentation processing on the hyperspectral image to obtain the superpixel segmentation result and the spatial mapping relationship between pixels and superpixels includes steps S1011-S1013.

[0045] Step S1011: Perform min-max normalization on the hyperspectral image.

[0046] In step S1011, min-max normalization is a linear standardization operation that maps the original pixel values ​​of each band of the hyperspectral image to a preset numerical range through linear transformation. Since the radiometric response values ​​of different bands in a hyperspectral image often exhibit significant differences in numerical range, this can easily lead to numerical scale imbalances in subsequent feature extraction and model training. Min-max normalization eliminates the dimensional differences between different spectral bands, ensuring that the data in each band are at a uniform numerical scale, improving the accuracy of subsequent superpixel segmentation and the stability of the feature extraction process, and accelerating network convergence.

[0047] Step S1012: Perform principal component analysis on the normalized hyperspectral image, select a preset number of principal components from all principal components and retain them to obtain the dimension-reduced hyperspectral image.

[0048] In step S1012, principal component analysis (PCA) is an unsupervised linear dimensionality reduction method that projects high-dimensional spectral data into an orthogonal low-dimensional feature space through orthogonal transformation. This removes redundant information and random noise between spectral bands while preserving the main spectral distribution features of the data. The preset number of principal components can be flexibly set according to the total number of bands in the hyperspectral image and the accuracy requirements of the task. The top few principal components with the highest variance contribution can be selected. While fully preserving the core spectral discrimination information, this significantly compresses the data dimensionality, reduces the computational complexity of subsequent superpixel segmentation and feature extraction, and improves processing efficiency.

[0049] Step S1013: For the dimensionality-reduced hyperspectral image, a simple linear iterative clustering algorithm is used to perform superpixel partitioning to generate superpixel partitioning results, and a spatial mapping relationship is constructed.

[0050] In step S1013, the simple linear iterative clustering algorithm is a superpixel generation algorithm based on local clustering. It uses the spatial coordinates and spectral features of pixels as the clustering basis, and iteratively optimizes the aggregation of spatially adjacent and spectrally similar pixels into homogeneous superpixel regions. The simple linear iterative clustering algorithm has advantages such as high computational efficiency, regular and compact superpixel shapes, and good fit to ground object boundaries. The granularity of the division can be flexibly controlled by preset superpixel numbers, simplifying the image structure while accurately preserving the edge contour information of ground objects. Based on the divided superpixel regions, this application simultaneously establishes a one-to-one spatial mapping relationship between pixel coordinates and superpixel indices, recording the superpixel to which each pixel belongs, providing a precise basis for subsequent scale conversion of superpixel region features to pixel space.

[0051] Please refer to Figure 2 This is a flowchart of sub-step S102 provided in the embodiments of this application. Extracting features from the superpixel segmentation results to obtain superpixel region features includes steps S1021-S1024.

[0052] Step S1021: Construct a superpixel adjacency graph based on the superpixel partitioning results, and calculate the normalized Laplacian matrix of the superpixel adjacency graph.

[0053] In step S1021, the superpixel adjacency graph is a graph topology structure built with superpixels as nodes and spatial adjacency relationships and spectral similarity between superpixels as edges. It is used to structurally model the spatial relationships between superpixels. When constructing the superpixel adjacency graph, if two superpixels share a common boundary in space, they are determined to be adjacent nodes, and an edge is established between them. Simultaneously, the edge weights can be adjusted based on spectral feature similarity to make the graph structure of the superpixel adjacency graph more accurately reflect the degree of association between ground features. The normalized Laplacian matrix is ​​a matrix form obtained by standardizing the superpixel adjacency graph. By normalizing the adjacency matrix and degree matrix, the numerical scale imbalance caused by differences in the degree of different superpixel nodes is eliminated, enabling subsequent spectral graph convolution to be performed stably at a uniform scale. This ensures the consistency and convergence of feature extraction and serves as the fundamental mathematical basis for performing spectral graph convolution operations.

[0054] Step S1022: Using Chebyshev polynomials, first-order, second-order, and third-order spectral convolutions are performed on the normalized Laplacian matrix to obtain superpixel features corresponding to different orders, thereby expanding the spatial receptive field of the superpixel layer by layer and capturing the high-order spatial structural relationships between different superpixels.

[0055] In step S1022, Chebyshev polynomials are mathematical tools used to approximate spectral graph convolutions using polynomials. By fitting the frequency domain filtering operation of graph convolutions through recursive expansion, the eigenvalue decomposition of the Laplacian matrix is ​​avoided, which can significantly reduce computational complexity and improve the computational efficiency of graph feature extraction while ensuring the convolution effect.

[0056] First-order, second-order, and third-order spectral graph convolutions correspond to the aggregation of one-hop, two-hop, and three-hop neighborhood information of superpixels, respectively: first-order spectral graph convolution only aggregates feature information of directly adjacent superpixels, corresponding to the local receptive field; second-order spectral graph convolution can cover two layers of indirectly adjacent neighborhood superpixels; and third-order spectral graph convolution further extends to a three-layer neighborhood range. As the convolution order increases, the spatial receptive field of the superpixel expands layer by layer, and the captured spatial correlation levels deepen progressively. Superpixel features corresponding to different orders carry different levels of spatial structural information: low-order features retain fine local adjacency relationships, while high-order features contain broader regional distribution patterns. By expanding the receptive field layer by layer through multi-order convolution, it is possible to effectively capture high-order spatial structural relationships widely existing in the distribution of ground features, such as indirect neighborhood dependencies, long-distance spatial constraints, and regional contiguous distribution patterns, thus overcoming the limitation of traditional single-order graph convolution, which can only model first-order pairwise interactions. The Chebyshev polynomial can be defined using the following recursive form: T0(x)=1, T1(x) = x, ..., T k (x)=2x*T k-1(x)-T k-2 (x), Among them, T k (x) represents the k-th order Chebyshev polynomial, used for polynomial expansion approximation of spectral graph convolution. x represents the normalized Laplacian matrix input variable after normalization, used to map graph structure data to the polynomial computable space. k represents the order of the polynomial, which in this application is taken as first, second, and third order, corresponding to first, second, and third order spectral graph convolutions, respectively, i.e., corresponding to one-hop, two-hop, and three-hop neighborhood information aggregation of superpixels. T k-1 (x), T k-2 (x) represent the (k-1)th and (k-2)th order Chebyshev polynomials, respectively, used for recursive computation of higher-order polynomials. By decomposing the spectral convolution into Chebyshev polynomial expansion, the computational complexity is reduced by avoiding direct eigenvalue decomposition of the Laplace matrix.

[0057] Step S1023: Low-order and high-order spectral features of superpixel features corresponding to different orders are interactively fused through residual connection to obtain fused superpixel features.

[0058] In step S1023, the residual connection serves as the structural carrier for achieving multi-order feature superposition and fusion. By connecting across orders, low-order features are directly transferred to higher-order feature layers. This avoids the gradient vanishing problem caused by increased network depth while fusing multi-order information, ensuring the integrity of feature transfer and training stability. The low-order-high-order spectral feature interaction fusion involves information complementarity and interactive calibration between low-order spectral features representing local details and high-order spectral features representing global structure. Specifically, low-order features supplement high-order features with local boundary and fine-grained neighborhood information, while high-order features inject global context and regional semantic guidance into low-order features. The resulting fused superpixel feature combines the fineness of local neighborhoods with the generalization of large-scale spatial structures, significantly improving the richness and discriminative power of feature representation.

[0059] Step S1024: The fused superpixel features are enhanced by channel grouping and weighting through a multi-head grouping attention mechanism to obtain superpixel region features.

[0060] In step S1024, the multi-head group attention mechanism divides the channel dimension of the fused superpixel features into multiple independent groups, and calculates attention weights in parallel for each group. This parallel grouping approach reduces computational overhead while maintaining the receptive field of attention, and the multiple independent attention spaces can capture more dimensional feature relationships, improving the diversity of feature representation. Channel group weighted enhancement adaptively weights the features of the corresponding channel dimension based on the calculation results of each group's attention. Specifically, channel group weighted enhancement assigns higher weights to spectral channels with strong class discriminative power to strengthen their expression, and assigns lower weights to channels with high information redundancy and noise content to suppress their interference. After channel group weighted enhancement, the effective information content of the fused superpixel features is further improved, ultimately resulting in superpixel region features with stronger discriminative power and higher robustness.

[0061] Please refer to Figure 5 This is a flowchart of sub-step S103 provided in the embodiments of this application. Extracting features from pixels of the hyperspectral image to obtain fine pixel features includes steps S1031-S1034.

[0062] Step S1031: Perform convolution processing on the pixels of the hyperspectral image using 1×1 convolution to obtain the denoised pixel features.

[0063] In step S1031, the 1×1 convolution is a convolution operation with a kernel size of 1×1. It can perform linear transformations and feature mapping on the spectral channel dimensions without changing the spatial resolution of the feature map. By processing the original hyperspectral pixels point by point through 1×1 convolution, it can initially smooth and suppress random noise and spectral fluctuations in the hyperspectral data, improving the purity of pixel features; at the same time, it can complete the adaptive adjustment of the channel dimensions, providing dimension-matched input features for the subsequent multi-scale differential filtering module, ensuring the stability of subsequent feature extraction.

[0064] Step S1032: Input the denoised pixel features into the multi-scale differential filtering module to extract multi-scale features under different receptive fields.

[0065] In step S1032, the multi-scale differential filtering module is equipped with multiple convolutional kernels, each corresponding to a spatial size. The multi-scale differential filtering module extracts local discriminative information such as texture abrupt changes and edge contours in the image through differential operations on convolutional kernels of different sizes; convolutional kernels of different spatial sizes correspond to receptive fields of different sizes. Specifically, small-sized convolutional kernels focus on capturing subtle textures and details of small ground features, while large-sized convolutional kernels focus on extracting regional contours and macroscopic structures, thereby simultaneously acquiring multi-level spatial features to adapt to the diverse distribution characteristics of ground features at different scales in hyperspectral images. The multi-scale features under different receptive fields encompass multi-level local information from fine-grained to coarse-grained, providing a multi-dimensional feature foundation for subsequent deep feature extraction.

[0066] Step S1033: Cascade and stack multiple multi-scale differential filtering modules to extract deep features, and fuse the multi-scale features output by each multi-scale differential filtering module in the channel dimension to obtain fused multi-scale pixel features.

[0067] In step S1033, cascading multiple multi-scale differential filtering modules can progressively deepen the network, refining multi-level representations from shallow surface features to deep semantic features layer by layer, continuously expanding the effective receptive field of pixels, and enhancing the abstract expressive power and class discriminative ability of features. Channel dimension fusion integrates multi-scale features output from different levels and receptive fields along the channel dimension, achieving information complementarity between shallow details and deep semantics. This allows the fused features to simultaneously contain multi-dimensional information such as fine texture, edge structure, and regional semantics, improving the integrity and robustness of pixel features.

[0068] Step S1034: The fused multi-scale pixel features are enhanced by channel grouping weighting through a multi-head grouping attention mechanism to obtain fine pixel features.

[0069] In step S1034, the multi-head grouping attention mechanism divides the fused multi-scale pixel features into multiple independent groups along the channel dimension. Attention weights are calculated in parallel for each group, reducing computational complexity while expanding the feature expression space and capturing the differential correlations between different channel groups. Channel grouping weighted enhancement adaptively assigns weights to each channel feature based on the attention calculation results, strengthening discriminative channels with high classification contribution, suppressing redundant noise and invalid information channels, and further highlighting key details in the pixel features. The resulting fine-grained pixel features after weighted enhancement possess excellent fine-grained recognition capabilities, providing accurate local detail support for subsequent cross-scale fusion.

[0070] Please refer to Figure 3This is a flowchart of step S105 provided in the embodiments of this application. An adaptive threshold-guided cross-attention mechanism is used to deeply fuse pixel-level fine features and superpixel region features at the pixel scale to obtain fused features, including steps S1051-S1055.

[0071] Step S1051: Perform adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation on the pixel fine features respectively to obtain pixel channel interaction weights and pixel spatial interaction weights respectively.

[0072] In step S1051, adaptive threshold channel attention calculation evaluates the classification contribution of each spectral band along the channel dimension, while adaptive threshold spatial attention calculation evaluates the class discrimination value of each pixel location along the spatial dimension. Both selection thresholds are dynamically generated from the global statistical information of the input features themselves, eliminating the need for manually preset fixed thresholds and allowing for adaptive adaptation to the distribution characteristics of different hyperspectral data. Pixel channel interaction weights characterize the importance of each spectral channel in the pixel's fine features, while pixel spatial interaction weights characterize the discrimination value of each spatial location in the pixel's fine features. Through dual-dimensional adaptive attention calculation, effective information can be pre-filtered from pixel-side features, removing redundant bands and background interference, thus refining the input information for subsequent deep fusion.

[0073] Step S1052: Perform adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation on the superpixel region features at the pixel scale to obtain the superpixel channel interaction weight and the superpixel spatial interaction weight respectively.

[0074] In step S1052, importance assessments are simultaneously performed on the superpixel region features in both channel and spatial dimensions. Superpixel channel interaction weights are used to filter discriminative spectral bands at the semantic level, while superpixel spatial interaction weights are used to highlight the main feature region and mitigate the feature contributions of edge noise and background interference regions. This application ensures that both feature paths undergo effective information enhancement before entering the cross-attention calculation by simultaneously performing adaptive threshold filtering on the superpixel side features, thereby improving the information density and computational efficiency of the subsequent fusion process.

[0075] Step S1053: The pixel fine features are enhanced by multiplying element-wise based on the pixel channel interaction weight and the pixel space interaction weight to obtain the enhanced pixel fine features.

[0076] In step S1053, the element-wise multiplication weighted enhancement involves jointly constraining the channel dimension weights and spatial dimension weights, and then multiplying them by the corresponding positions of the original pixel fine features to achieve point-by-point calibration of the features. After weighting, the features of highly discriminative spectral channels and key spatial locations are significantly enhanced, while redundant noise and invalid region features are effectively suppressed. The final output enhanced pixel fine features have significantly improved information density and class discrimination ability compared to the original features, making them a better input for cross-attention queries.

[0077] Step S1054: Based on the superpixel channel interaction weight and the superpixel spatial interaction weight, the superpixel region features at the pixel scale are multiplied element-wise and weighted to obtain enhanced superpixel region features.

[0078] In step S1054, the superpixel region features are adaptively calibrated and enhanced through the combined effect of channel and spatial weights, highlighting the semantic information of the region strongly correlated with the land cover category and weakening the negative impact of irrelevant interference. The resulting enhanced superpixel region features have a more accurate global contextual expression capability and can serve as a contextual information carrier in cross-attention calculation, providing effective regional semantic guidance for pixel features.

[0079] Step S1055: Using enhanced pixel fine features as the query vector and enhanced superpixel region features as the key vector and value vector, perform cross-scale feature cross-attention calculation to obtain fused features.

[0080] In step S1055, the cross-scale feature cross-attention computation establishes a bidirectional association between pixel-level details and superpixel-level region semantics through a query-key-value matching mechanism. Specifically, using pixel-side features as query vectors, it actively retrieves and matches the corresponding region context information; using superpixel-side features as key and value vectors, it provides global semantic guidance information. Cross-scale feature cross-attention computation overcomes the limitations of traditional shallow fusion methods such as simple concatenation and element-wise overlay, enabling semantic alignment and deep information interaction between the two types of features. The final output fused features possess both pixel-level fine-grained detail resolution and superpixel-level global context awareness, providing a reliable feature foundation for subsequent high-precision land cover classification.

[0081] Furthermore, when performing adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation, corresponding adaptive thresholds are generated for pixel-level fine features and pixel-scale superpixel region features, respectively. The threshold generation logic for the two types of input features is consistent, and both are dynamically calculated based on the statistical properties of the features themselves. Specifically, this includes: For any input feature, the global average feature value of the corresponding input feature in the channel dimension is calculated, and combined with preset coefficients to generate the channel adaptive threshold corresponding to the input feature. The global average feature value in the channel dimension is the feature mean of the input feature at all spatial locations in the corresponding channel, which can reflect the overall response intensity of a single channel. The preset coefficients are used to adjust the strictness of the threshold selection and can be flexibly configured according to the characteristics of the dataset and the accuracy requirements of the task. Taking pixel-level fine features as an example, some bands in hyperspectral images are easily affected by atmospheric scattering and sensor noise interference, resulting in weak overall feature response and low class discrimination; while the core band feature response of the corresponding ground object spectral absorption peak is strong and has high class discrimination. The channel adaptive threshold generated by combining the global average feature value with the preset coefficients can automatically distinguish between effective discrimination bands and redundant noise bands, without the need to manually set fixed thresholds for different hyperspectral data, and has stronger data adaptability. The same applies to superpixel region features at the pixel scale. Different channels carry different regional semantic information intensities, and the adaptive threshold can accurately select feature channels that contribute highly to the regional class determination.

[0082] For any input feature, the global average feature value of the corresponding input feature in the spatial dimension is calculated, and a spatial adaptive threshold corresponding to the input feature is generated by combining it with preset coefficients. The global average feature value in the spatial dimension is the feature mean of all channels of the input feature at each spatial location, used to characterize the overall feature significance of the corresponding spatial location. For example, in hyperspectral images containing various land features such as woodland, farmland, and buildings, large areas of homogeneous background regions have flat spatial feature responses and low classification value; while the spatial location features of land feature boundaries, small land feature targets, and heterogeneous land feature patches are significantly different and have high classification contribution. The adaptive spatial threshold can dynamically locate highly discriminative spatial regions, weaken the invalid information in homogeneous background regions, and concentrate attention resources on key classification regions.

[0083] For any input feature, the initial attention weights for each corresponding dimension are processed by suppressing weights below the corresponding adaptive threshold and retaining and enhancing weights above the threshold, thus obtaining the interaction weights for the corresponding input feature dimension. Sparsity processing of the attention weights is achieved through threshold filtering: weights below the threshold (corresponding to redundant spectral channels and background interference regions) are attenuated to reduce the interference of invalid information on subsequent fusion processes; weights above the threshold (corresponding to core discrimination channels and key feature regions) are enhanced to amplify the contribution of effective features. After this filtering and enhancement process, the output interaction weights are more targeted, significantly improving the information density and computational efficiency of subsequent feature weighting enhancement and cross-attention calculation.

[0084] Please refer to Figure 6This is a flowchart of step S106, provided in the embodiments of this application. Based on the fusion features, the predicted land cover category of the hyperspectral image is output, including steps S1061-S1063.

[0085] Step S1061: The fused features are fed into the fully connected classification layer, and the predicted probability value of each pixel in the hyperspectral image corresponding to the local land cover category is output.

[0086] In step S1061, the fully connected classification layer is a network component that maps the feature space to the category space. Through a nonlinear transformation, it projects the fused features to a dimension consistent with the total number of land cover categories, generating a confidence score for each pixel corresponding to its category. After normalization, a predicted probability value is obtained. The predicted probability value characterizes the confidence level of the current pixel belonging to a specific land cover category; a higher predicted probability value indicates a higher confidence level in classifying the pixel. By transforming the abstract deep fusion features into a quantifiable category probability distribution, the crucial transformation from feature representation to category determination is completed, providing a quantitative basis for the subsequent generation of pixel-by-pixel category labels.

[0087] Step S1062: For each pixel, determine the land cover category with the highest predicted probability value as the predicted land cover category label for the corresponding pixel.

[0088] In step S1062, the maximum probability determination rule is used to complete the pixel-by-pixel category assignment. Specifically, the land cover category with the highest predicted probability value is selected as the final determination result for that pixel, generating the corresponding land cover category prediction label. This determination rule is logically clear and computationally efficient, ensuring the consistency and stability of the classification results and achieving rapid label mapping while maintaining classification accuracy. The land cover category prediction label is a pixel-level category identifier and is the basic unit constituting the final land cover category prediction result.

[0089] Step S1063: Based on the land cover category prediction labels of all pixels, generate and output land cover category prediction results containing the prediction labels of each land cover category.

[0090] In step S1063, the pixel-by-pixel generated land cover category prediction labels are arranged and integrated according to the spatial coordinate order of the original hyperspectral image to form a complete land cover category prediction result. This result can be stored in the form of a category index matrix for subsequent quantitative statistics, accuracy verification, and other numerical calculations; or it can be converted into a visual classification map using preset color mapping rules, visually distinguishing the spatial distribution, boundary contours, and contiguous areas of various land cover types using different colors. To verify the category prediction effect of this method, tests were conducted on three publicly available standard hyperspectral datasets: the Indian Pines dataset, the University of Pavia dataset, and the Kennedy Space Center dataset. The visualization effects of the corresponding land cover category prediction results can be found by referring to [reference needed]. Figure 10 , Figure 11 and Figure 12 The visualization of land cover category prediction results uses different colors to distinguish different land cover categories, clearly presenting the spatial distribution and boundary contours of typical land cover such as crops, forest land, grassland, water bodies, buildings, bare soil, swamps, and salt marshes. This visually verifies that the land cover category detection method for hyperspectral images provided in this application can accurately identify various land cover types, maintain regional consistency and edge integrity, and possesses excellent classification performance and practical value. The output land cover category prediction results can directly support the remote sensing image interpretation and analysis needs of practical application scenarios such as agricultural resource monitoring, ecological environment assessment, and mineral resource exploration.

[0091] Please refer to Figure 7 This is a second flowchart of the hyperspectral image land cover category detection method provided in the embodiments of this application. The hyperspectral image land cover category detection method further includes steps S201-S205.

[0092] Step S201: Obtain the ground cover category true value label corresponding to the hyperspectral image.

[0093] In step S201, the ground truth labels for land cover categories are pixel-level true land cover category identifiers confirmed by manual annotation. These serve as standard supervision signals during model training, measuring the degree of deviation between the model's predictions and the actual land cover distribution. Each ground truth label corresponds one-to-one with the spatial dimensions of the input hyperspectral image, ensuring each pixel has a clearly defined category, providing a gold standard for subsequent loss function construction and parameter updates.

[0094] Step S202: Perform classification prediction on the superpixel region features, pixel fine features and fusion features at the pixel scale respectively to obtain the classification prediction results corresponding to each feature.

[0095] In step S202, prediction results are generated by generating prediction results from the superpixel branch output, pixel branch output, and fusion output respectively. This enables segmented supervision of the entire feature extraction chain, forcing the two feature extraction branches to learn feature representations with class discriminative power. This avoids the problem of a single branch depending on the other branch and the degradation of feature extraction capabilities, and provides high-quality dual-path input for subsequent cross-scale deep fusion.

[0096] Step S203: Combine the classification prediction results corresponding to each feature with the ground value labels of land cover categories to construct the total loss function.

[0097] In step S203, a multi-loss weighted joint construction strategy is adopted. For the three features, corresponding supervision losses are set and integrated into a total loss to achieve synergistic constraints on the three stages of superpixel feature extraction, pixel feature extraction and cross-scale feature fusion.

[0098] Please refer to Figure 8 This is a flowchart of step S203 provided in the embodiments of this application. Combining the classification prediction results corresponding to each feature and the ground truth labels of land cover categories, the total loss function is constructed, including steps S2031-S2034.

[0099] Step S2031: Construct a first loss function for the extraction process of superpixel region features under constrained pixel scale.

[0100] In step S2031, the first loss function is calculated based on the cross-entropy difference between the classification prediction result corresponding to the superpixel region features at the pixel scale and the ground truth label of the land cover category. The cross-entropy loss can accurately quantify the difference between the predicted category probability distribution and the true category distribution; the greater the difference, the higher the loss value. In this application, the first loss function is specifically applied to the superpixel feature branch, supervising the entire process of superpixel adjacency graph modeling, multi-order spectral graph convolution, and feature fusion enhancement, forcing the superpixel branch to learn feature representations with regional semantic discrimination capabilities, and strengthening the effectiveness of its high-order spatial structure modeling.

[0101] Step S2032: Construct a second loss function to constrain the extraction process of fine pixel features.

[0102] In step S2032, the second loss function is calculated based on the cross-entropy difference between the classification prediction result corresponding to the pixel fine features and the ground truth label of the land cover category. In this application, the second loss function is specifically applied to the pixel feature branch, supervising the entire process of multi-scale differential filtering, deep feature stacking, and channel attention enhancement, guiding the pixel branch to focus on the extraction of fine-grained discrimination information such as local texture and edge contours, ensuring that the pixel-level features themselves have independent category discrimination capabilities, and providing reliable detailed support for subsequent cross-scale fusion.

[0103] Step S2033: Construct a third loss function to constrain the fusion process of the fusion features.

[0104] In step S2033, the third loss function is calculated based on the cross-entropy difference between the classification prediction result corresponding to the fused features and the ground truth label of the land cover category. In this application, the third loss function is the master supervision loss among the three-way losses, corresponding to the final classification output of the model. It is used to constrain the entire process of adaptive threshold selection and cross-scale cross-attention fusion, guiding the network to optimally integrate the semantics of the superpixel region and the pixel detail information, thereby maximizing the classification performance of the fused features. It is the core objective of the entire model optimization.

[0105] Step S2034: Based on the preset weight coefficients corresponding to each loss function, the first loss function, the second loss function, and the third loss function are weighted and summed to obtain the total loss function.

[0106] In step S2034, preset weight coefficients are used to adjust the intensity ratio of the three supervision signals, which can be flexibly configured according to the specific task's focus. Specifically, if the focus is on improving regional consistency, the weight of the first loss function can be appropriately increased; if the focus is on improving edge detail accuracy, the weight of the second loss function can be appropriately increased; the third loss function is usually configured with the highest weight to ensure that the final classification performance is the core optimization objective. By forming a unified total loss function through weighted summation, multi-objective collaborative optimization can be achieved, enabling the superpixel branch, pixel branch, and fusion module to iterate synchronously towards the optimal direction, avoiding the one-sidedness of optimization guided by a single loss function.

[0107] Step S204: Update network parameters through backpropagation based on the total loss function.

[0108] In step S204, backpropagation is the core optimization mechanism for training deep learning models. Specifically, based on the output value of the total loss function, the gradient of each parameter is calculated layer by layer in reverse along the network, and the network weights are updated according to a preset optimization algorithm. Through iterative backpropagation updates, the difference between the model's prediction results and the ground truth labels can be gradually reduced, enabling a synergistic improvement in the ability to model superpixel high-order structures, extract pixel details, and fuse cross-scale attention, thus achieving end-to-end optimization of the entire detection network.

[0109] Step S205: Introduce an early stopping mechanism to control the training process until the preset convergence condition is met.

[0110] In step S205, the early stopping mechanism is a training management strategy used to suppress model overfitting and improve generalization ability. Unlike training with a fixed number of iterations, the early stopping mechanism dynamically terminates training based on the actual performance on the validation set. It can stop iteration in time when the model reaches its optimal generalization performance, avoiding problems such as the model fitting training set noise and declining performance on unknown data due to overtraining. The specific execution process of the early stopping mechanism will be described in detail in the following sub-steps.

[0111] Please refer to Figure 9 This is a flowchart of step S205 provided in the embodiments of this application. An early stopping mechanism is introduced until a preset convergence condition is met, including steps S2051-S2052.

[0112] Step S2051: After each training iteration, calculate the classification accuracy on the preset validation dataset.

[0113] In step S2051, the preset validation dataset is a sample set independent of the training set. The data in the preset validation dataset does not participate in the network parameter update process but is used to objectively evaluate the model's generalization ability. Classification accuracy typically includes core metrics such as overall classification accuracy and average classification accuracy, which can truly reflect the model's actual classification performance on unseen hyperspectral data. Syncing the validation set accuracy after each training round allows for real-time tracking of changes in the model's generalization performance, providing a quantitative basis for early stopping determination.

[0114] Step S2052: If the classification accuracy on the preset validation dataset does not improve in a preset number of consecutive training iterations, then the preset convergence condition is met, and training is terminated.

[0115] In step S2052, the predetermined number of consecutive training iterations serves as the criterion for the early stopping mechanism, which can be flexibly set according to the training scale and data characteristics. Specifically, when the classification accuracy on the validation set no longer improves in multiple consecutive iterations, it indicates that the model's generalization performance has reached its peak. Continuing training will lead to overfitting, meaning that the accuracy on the training set continues to rise while the performance on the validation set declines. Terminating training at this point preserves the model parameters with the optimal generalization ability, effectively avoiding the risk of overfitting and improving the model's adaptability and robustness in different hyperspectral datasets and real-world remote sensing scenarios.

[0116] Please refer to Figure 13 This is a structural block diagram of the hyperspectral image land cover category detection device provided in the embodiments of this application. This application also provides a hyperspectral image land cover category detection device 11. The hyperspectral image land cover category detection device 11 includes a superpixel segmentation module 110, a superpixel feature extraction module 111, a pixel feature extraction module 112, a feature mapping module 113, a cross-scale feature fusion module 114, and a classification output module 115.

[0117] The superpixel segmentation module 110 is used to acquire hyperspectral images and perform superpixel segmentation processing on the hyperspectral images to obtain superpixel segmentation results and spatial mapping relationships between pixels and superpixels.

[0118] The superpixel feature extraction module 111 is used to extract features from the superpixel partitioning results to obtain superpixel region features. Specifically, it includes: constructing a superpixel adjacency graph based on the superpixel partitioning results and calculating the normalized Laplacian matrix of the superpixel adjacency graph; performing first-order, second-order, and third-order spectral convolutions on the normalized Laplacian matrix using Chebyshev polynomials to obtain superpixel features corresponding to different orders, thereby expanding the spatial receptive field of the superpixel layer by layer and capturing the high-order spatial structural relationships between different superpixels; performing low-order-high-order spectral feature interaction fusion on the superpixel features corresponding to different orders through residual connections to obtain fused superpixel features; and performing channel grouping weighted enhancement on the fused superpixel features through a multi-head grouping attention mechanism to obtain superpixel region features.

[0119] The pixel feature extraction module 112 is used to extract features from pixels in a hyperspectral image to obtain fine pixel features.

[0120] The feature mapping module 113 is used to map the superpixel region features to the pixel space according to the spatial mapping relationship, so as to obtain the superpixel region features at the pixel scale.

[0121] The cross-scale feature fusion module 114 is used to perform deep fusion of pixel-level fine features and pixel-scale superpixel region features using an adaptive threshold-guided cross-attention mechanism to obtain fused features. Specifically, it includes: performing adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation on pixel-level fine features to obtain pixel channel interaction weights and pixel spatial interaction weights respectively; performing adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation on pixel-scale superpixel region features to obtain superpixel channel interaction weights and superpixel spatial interaction weights respectively; performing element-wise multiplication and weighted enhancement of pixel-level fine features based on pixel channel interaction weights and pixel spatial interaction weights to obtain enhanced pixel-level fine features; performing element-wise multiplication and weighted enhancement of pixel-scale superpixel region features based on superpixel channel interaction weights and superpixel spatial interaction weights to obtain enhanced superpixel region features; and performing cross-scale feature cross-attention calculation using the enhanced pixel-level fine features as the query vector and the enhanced superpixel region features as the key vector and value vector to obtain fused features.

[0122] The classification output module 115 is used to output the predicted land cover categories of the hyperspectral image based on the fusion features.

[0123] Please refer to Figure 14This is a schematic diagram of the internal structure of the computer device used in the method for detecting land cover categories using hyperspectral images, as provided in the embodiments of this application.

[0124] like Figure 14 As shown, the computer device 100 includes a memory 901 and a processor 902. The processor 902 is used to run computer program instructions stored in the memory 901 to implement a method for detecting land cover categories in hyperspectral images.

[0125] The memory 901 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 901 can be an internal storage unit of a computer device, such as a hard disk. In other embodiments, the memory 901 can be an external storage device of a computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., configured in the computer device. Furthermore, the memory 901 can include both internal and external storage units of a computer device. The memory 901 can be used not only to store application software and various types of data installed on the computer device, such as code for hyperspectral image feature classification detection methods, but also to temporarily store data that has been output or will be output.

[0126] Furthermore, the computer device 100 also includes a bus 903. The bus 903 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 14 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0127] Furthermore, the computer device 100 may also include a display component 904. The display component 904 may be an LED display, a liquid crystal display, a touch-screen liquid crystal display, or an organic light-emitting diode (OLED) touchscreen, etc. The display component 904 may also be appropriately referred to as a display device or display unit, used to display information processed in the computer device 100 and to display a visual user interface.

[0128] Furthermore, the computer device 100 may also include a communication component 905. The communication component 905 may optionally include a wired communication component and / or a wireless communication component (such as a Wi-Fi communication component, a Bluetooth communication component, etc.), which is typically used to establish a communication connection between the computer device 100 and other computer devices.

[0129] Figure 14 Only a partial computer device 100 with components and a method for detecting land cover categories using hyperspectral images is shown. Those skilled in the art will understand that... Figure 14 The structure shown does not constitute a limitation on the computer device 100 and may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0130] In the above embodiments, the implementation can be achieved, in whole or in part, through software, hardware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, in the form of a computer program product.

[0131] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to embodiments of the present invention is generated. The computer device may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0132] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0133] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.

[0134] The unit described as a separate component may or may not be physically separate. The component shown as a unit may or may not be a physical unit; that is, it may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0135] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist independently, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0136] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes: USB flash drives, portable hard disks, read-only storage media (ROM), random access storage media (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0137] In the above embodiments, improvements were made from multiple dimensions, including superpixel spatial relationship modeling, pixel fine feature extraction, multi-scale feature collaborative fusion, and training optimization, achieving the following technical effects: First, it enhances the high-order modeling capability of superpixel spatial context. Based on the adjacency graph constructed from the superpixel partitioning results, it uses Chebyshev polynomials to sequentially perform first-order, second-order, and third-order spectral convolutions, expanding the spatial receptive field of superpixels layer by layer. This effectively captures the complex high-order spatial structural relationships widely present in the distribution of ground features, overcoming the deficiency of traditional simple adjacency graphs that can only model first-order pairwise interactions. Through residual connections, it achieves interactive fusion of low-order and high-order spectral graph features, taking into account both local adjacency associations and global structural information. Then, a multi-head grouping attention mechanism is used to weight and enhance the channel dimension, further improving the discriminativeness and expressive richness of superpixel region features.

[0138] Second, it achieves deep collaborative enhancement of pixel and superpixel features. On the pixel side, local features under different receptive fields are extracted through multi-scale differential filtering, and key features are enhanced by attention mechanism to improve the fine-grained recognition ability and noise resistance of pixel-level features. According to the spatial mapping relationship, the superpixel region features are aligned to the pixel space to achieve dimensional unification of cross-scale features. Before fusion, adaptive threshold-guided channel and spatial dual attention is introduced to dynamically select discriminative spectral channels and key spatial regions to suppress the negative impact of redundant bands and background interference information. Finally, the semantic alignment and deep information interaction of the two types of features are completed through cross-scale cross-attention mechanism, which overcomes the limitation of the lack of deep collaboration in the simple splicing and superposition fusion method in the existing technology. This enables the fused features to have both pixel-level detail resolution and superpixel-level regional semantic perception ability, effectively improving the overall land cover classification accuracy and significantly improving the classification accuracy of land cover edge areas.

[0139] Third, improve the stability and generalization performance of model training. A multi-loss joint training strategy is adopted, which applies supervised constraints to the three stages of superpixel feature extraction, pixel feature extraction and feature fusion respectively, to guide the network branches to optimize collaboratively. Combined with an early stopping mechanism, training is dynamically terminated based on the classification accuracy of the validation set, which effectively avoids the risk of overfitting and improves the model's generalization and adaptation ability on different hyperspectral datasets.

[0140] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

[0141] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0142] The above-listed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.

Claims

1. A method for detecting land cover categories in hyperspectral images, characterized in that, The method for detecting land cover categories in the hyperspectral image includes: A hyperspectral image is acquired and superpixel segmentation is performed on the hyperspectral image to obtain the superpixel segmentation result and the spatial mapping relationship between pixels and superpixels; Feature extraction is performed on the superpixel segmentation results to obtain superpixel region features, specifically including: A superpixel adjacency graph is constructed based on the superpixel partitioning results, and the normalized Laplacian matrix of the superpixel adjacency graph is calculated. Chebyshev polynomials are used to perform first-order, second-order, and third-order spectral convolutions on the normalized Laplacian matrix to obtain superpixel features corresponding to different orders, thereby expanding the spatial receptive field of the superpixel layer by layer and capturing the spatial high-order structural relationships between different superpixels. By performing low-order and high-order spectral feature interaction fusion on the superpixel features corresponding to different orders through residual connections, fused superpixel features are obtained; and The fused superpixel features are enhanced by channel grouping and weighting using a multi-head grouping attention mechanism to obtain the superpixel region features; Feature extraction is performed on the pixels of the hyperspectral image to obtain fine pixel features; Based on the spatial mapping relationship, the superpixel region features are mapped to the pixel space to obtain the superpixel region features at the pixel scale. An adaptive threshold-guided cross-attention mechanism is used to deeply fuse the fine-grained features of the pixel and the superpixel region features at the pixel scale to obtain fused features, specifically including: Adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation are performed on the pixel fine features respectively to obtain pixel channel interaction weights and pixel spatial interaction weights respectively; Adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation are performed on the superpixel region features at the pixel scale to obtain the superpixel channel interaction weight and the superpixel spatial interaction weight, respectively. The pixel fine features are enhanced by multiplying element-wise with the pixel channel interaction weights and pixel space interaction weights to obtain enhanced pixel fine features. The superpixel region features at the pixel scale are enhanced by element-wise multiplication and weighted enhancement based on the superpixel channel interaction weights and superpixel spatial interaction weights, resulting in enhanced superpixel region features; and Using the enhanced pixel fine features as the query vector and the enhanced superpixel region features as the key vector and value vector, cross-scale feature cross-attention calculation is performed to obtain the fused features; Based on the fusion features, the predicted land cover category of the hyperspectral image is output; Specifically, when performing the adaptive threshold channel attention calculation and the adaptive threshold spatial attention calculation, corresponding adaptive thresholds are generated for the pixel fine features and the superpixel region features at the pixel scale, respectively, including: For any input feature, calculate the global average feature value of the corresponding input feature in the channel dimension, and generate the channel adaptive threshold corresponding to the corresponding input feature by combining it with preset coefficients; For any input feature, calculate the global average feature value of the corresponding input feature in the spatial dimension, and generate the spatial adaptive threshold corresponding to the input feature by combining it with preset coefficients; and For any input feature, the initial attention weights for the corresponding dimension are obtained by suppressing weights below the corresponding adaptive threshold and retaining and strengthening weights above the corresponding adaptive threshold, thus obtaining the interaction weights for the corresponding input feature dimension.

2. The method for detecting land cover categories from hyperspectral images as described in claim 1, characterized in that, Acquire a hyperspectral image and perform superpixel segmentation on the hyperspectral image to obtain the superpixel segmentation result and the spatial mapping relationship between pixels and superpixels, including: The hyperspectral image is subjected to min-max normalization. Principal component analysis is performed on the normalized hyperspectral image. A preset number of principal components are selected from all principal components and retained to obtain the dimension-reduced hyperspectral image. The dimensionality-reduced hyperspectral image is processed by a simple linear iterative clustering algorithm to generate the superpixel partitioning result, and the spatial mapping relationship is constructed.

3. The method for detecting land cover categories from hyperspectral images as described in claim 1, characterized in that, Feature extraction is performed on the pixels of the hyperspectral image to obtain fine pixel features, including: The pixels of the hyperspectral image are convolved using 1×1 convolution to obtain the denoised pixel features; The denoised pixel features are input into a multi-scale differential filtering module to extract multi-scale features under different receptive fields; the multi-scale differential filtering module is equipped with multiple convolution kernels, each of which corresponds to a spatial size; Multiple multi-scale differential filtering modules are cascaded and stacked for deep feature extraction. The multi-scale features output by each multi-scale differential filtering module are then fused along the channel dimension to obtain fused multi-scale pixel features. The fused multi-scale pixel features are enhanced by channel grouping and weighting using a multi-head grouping attention mechanism to obtain the pixel fine features.

4. The method for detecting land cover categories from hyperspectral images as described in claim 1, characterized in that, Based on the fusion features, the land cover category prediction results of the hyperspectral image are output, including: The fused features are fed into a fully connected classification layer, and the predicted probability value of each pixel in the hyperspectral image corresponding to the local land cover category is output. For each pixel, the land cover category with the highest predicted probability value is determined as the predicted land cover category label for that pixel; Based on the predicted labels of all pixels, generate and output the predicted land cover categories containing the predicted labels of each land cover category.

5. The method for detecting land cover categories from hyperspectral images as described in claim 1, characterized in that, The method for detecting land cover categories in hyperspectral images also includes: Obtain the ground cover category ground value label corresponding to the hyperspectral image; Classification predictions are performed on the superpixel region features, the pixel fine features, and the fusion features at the pixel scale, respectively, to obtain the classification prediction results corresponding to each feature. By combining the classification prediction results corresponding to each feature and the ground value labels of the land cover categories, a total loss function is constructed. The network parameters are updated via backpropagation based on the total loss function; and An early stopping mechanism is introduced to control the training process until the preset convergence condition is met.

6. The method for detecting land cover categories from hyperspectral images as described in claim 5, characterized in that, Combining the classification prediction results corresponding to each feature and the ground truth labels of the land cover categories, a total loss function is constructed, including: A first loss function is constructed to constrain the extraction process of superpixel region features at the pixel scale. The first loss function is calculated based on the cross-entropy difference between the classification prediction result corresponding to the superpixel region features at the pixel scale and the ground value label of the land cover category. A second loss function is constructed to constrain the extraction process of the pixel fine features. The second loss function is calculated based on the cross-entropy difference between the classification prediction result corresponding to the pixel fine features and the ground value label of the land cover category. A third loss function is constructed to constrain the fusion process of the fusion features. The third loss function is calculated based on the cross-entropy difference between the classification prediction result corresponding to the fusion features and the ground value label of the land cover category. Based on the preset weight coefficients corresponding to each loss function, the first loss function, the second loss function, and the third loss function are weighted and summed to obtain the total loss function.

7. The method for detecting land cover categories from hyperspectral images as described in claim 5, characterized in that, An early stopping mechanism is introduced until preset convergence conditions are met, including: After each training iteration, the classification accuracy on the preset validation dataset is calculated; If the classification accuracy on the preset verification dataset does not improve within a preset number of consecutive training iterations, then the preset convergence condition is satisfied, and training is terminated.

8. A device for detecting land cover categories in hyperspectral images, characterized in that, The hyperspectral image land cover category detection device includes: The superpixel segmentation module is used to acquire a hyperspectral image and perform superpixel segmentation processing on the hyperspectral image to obtain the superpixel segmentation result and the spatial mapping relationship between pixels and superpixels. The superpixel feature extraction module is used to extract features from the superpixel segmentation results to obtain superpixel region features, specifically including: A superpixel adjacency graph is constructed based on the superpixel partitioning results, and the normalized Laplacian matrix of the superpixel adjacency graph is calculated. Chebyshev polynomials are used to perform first-order, second-order, and third-order spectral convolutions on the normalized Laplacian matrix to obtain superpixel features corresponding to different orders, thereby expanding the spatial receptive field of the superpixel layer by layer and capturing the spatial high-order structural relationships between different superpixels. By performing low-order and high-order spectral feature interaction fusion on the superpixel features corresponding to different orders through residual connections, fused superpixel features are obtained; and The fused superpixel features are enhanced by channel grouping and weighting using a multi-head grouping attention mechanism to obtain the superpixel region features; The pixel feature extraction module is used to extract features from the pixels of the hyperspectral image to obtain fine pixel features; The feature mapping module is used to map the superpixel region features to the pixel space according to the spatial mapping relationship, so as to obtain the superpixel region features at the pixel scale. A cross-scale feature fusion module is used to perform deep fusion of the pixel fine features and the superpixel region features at the pixel scale using an adaptive threshold-guided cross-attention mechanism to obtain fused features, specifically including: Adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation are performed on the pixel fine features respectively to obtain pixel channel interaction weights and pixel spatial interaction weights respectively; Adaptive threshold channel attention calculation and adaptive threshold spatial attention calculation are performed on the superpixel region features at the pixel scale to obtain the superpixel channel interaction weight and the superpixel spatial interaction weight, respectively. The pixel fine features are enhanced by multiplying element-wise with the pixel channel interaction weights and pixel space interaction weights to obtain enhanced pixel fine features. The superpixel region features at the pixel scale are enhanced by element-wise multiplication and weighted enhancement based on the superpixel channel interaction weights and superpixel spatial interaction weights, resulting in enhanced superpixel region features; and Using the enhanced pixel fine features as the query vector and the enhanced superpixel region features as the key vector and value vector, cross-scale feature cross-attention calculation is performed to obtain the fused features; The classification output module is used to output the predicted land cover category of the hyperspectral image based on the fused features; Specifically, when performing the adaptive threshold channel attention calculation and the adaptive threshold spatial attention calculation, corresponding adaptive thresholds are generated for the pixel fine features and the superpixel region features at the pixel scale, respectively, including: For any input feature, calculate the global average feature value of the corresponding input feature in the channel dimension, and generate the channel adaptive threshold corresponding to the corresponding input feature by combining it with preset coefficients; For any input feature, calculate the global average feature value of the corresponding input feature in the spatial dimension, and generate the spatial adaptive threshold corresponding to the input feature by combining it with preset coefficients; and For any input feature, the initial attention weights for the corresponding dimension are obtained by suppressing weights below the corresponding adaptive threshold and retaining and strengthening weights above the corresponding adaptive threshold, thus obtaining the interaction weights for the corresponding input feature dimension.

9. A computer device, characterized in that, The computer device includes: Memory, used to store computer programs; and A processor for executing the computer program to implement the method for detecting land cover categories in hyperspectral images as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Hybrid CNN-GCN network-based hyperspectral image classification method under limited training sample

    CN116912677A

  • Hyperspectral image superpixel spatial-spectral fusion identification method and system, and medium

    CN119295949A