A few-shot medical microscopic hyperspectral image segmentation method based on meta learning

By combining a hybrid convolution module, a multi-scale feature extractor, and a learnable edge detection module, the problems of single feature extraction and insufficient multi-scale adaptation in medical hyperspectral image segmentation are solved, achieving accurate segmentation and robustness improvement of lesion tissues, and adapting to rapid generalization in small sample scenarios.

CN122176309APending Publication Date: 2026-06-09HOHAI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HOHAI UNIV
Filing Date
2026-03-18
Publication Date
2026-06-09

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The application discloses a kind of medical hyperspectral image segmentation methods of mixed convolution fusion meta-learning, it is related to medical image processing and deep learning technical field.To solve the technical defects that existing medical hyperspectral segmentation algorithm is difficult to adapt target deformation, multiscale difference, weak edge feature and small sample scene, the integrated process of the application is realized through "data preprocessing-mixed feature extraction-multiscale fusion-learnable edge optimization-meta learning self-adaptation", and the precise segmentation of pathological region is realized.The method is first screened, labeled, enhanced and other pre-processing to medical hyperspectral image;Then adaptively extract multiple types of features through mixed convolution module, and strengthen key information through channel space attention module;Subsequently, deep and shallow layer features are fused using multiscale feature extractor to adapt to different scale lesions;Weak edges are accurately captured through learnable edge detection module;Finally, combined with customized meta-learning framework, only a small amount of samples are needed to quickly adapt to new data distribution.The experimental results show that the application performs excellently in gastric cancer and cholangiocarcinoma hyperspectral image segmentation tasks, and has stable cross-dataset generalization performance, proving the reliability and robustness of the method, and providing quantitative basis for early diagnosis of clinical diseases.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a medical hyperspectral image segmentation method based on hybrid convolutional fusion meta-learning. Specifically, it achieves accurate segmentation of lesions and normal tissues in medical hyperspectral images through the synergistic effect of hybrid convolutional modules, multi-scale feature fusion, learnable edge detection, and a customized meta-learning framework. This method belongs to the fields of medical image processing and deep learning technology. Background Technology

[0002] Medical hyperspectral imaging technology, as an emerging detection method integrating optics, spectroscopy, and computer vision, can capture continuous spectral information from the visible to near-infrared bands, forming high-dimensional data containing both spatial and spectral dimensions. By analyzing the absorption and scattering characteristics of biological tissues to different wavelengths of light, it can reflect the differences in their biochemical composition and tissue structure, providing quantitative evidence for the early non-invasive detection of diseases such as gastric cancer and cholangiocarcinoma. Medical hyperspectral image segmentation, as a key step in disease diagnosis, aims to accurately delineate lesion and normal tissue regions, providing reliable support for clinical diagnosis.

[0003] Previous medical hyperspectral image segmentation methods were mostly based on traditional machine learning algorithms. These methods relied on manually designed features, making it difficult to fully extract the complex spectral-spatial correlation information in hyperspectral data, resulting in limited segmentation accuracy. With the development of deep learning technology, segmentation algorithms based on convolutional neural networks (CNNs) (such as native U-Net) have been widely used in the field of medical image segmentation. They achieve feature representation learning from low to high levels through a hierarchical feature extraction mechanism. However, native U-Net has obvious limitations in medical hyperspectral image segmentation: ordinary convolution uses fixed sampling positions, resulting in a single feature extraction method that is difficult to adapt to the morphological deformation and multi-scale differences of lesions; skip connections only fuse features at the same level, lacking deep fusion of multi-scale features, and have insufficient ability to collaboratively segment lesions at different scales; edge detection relies on manually designed operators, making it difficult to adapt to weak edges, blurred boundaries, and noisy interference scenes in medical images, and manual parameter tuning is inefficient and has poor adaptability.

[0004] Furthermore, medical hyperspectral data annotation is extremely costly, high-quality pixel-level annotated samples are scarce in clinical settings, and the heterogeneous data distribution caused by different disease stages and different acquisition devices further increases the segmentation difficulty. Existing algorithms lack the application of meta-learning mechanisms and the ability to quickly adapt to different data distributions, making it difficult to effectively mine complex spectral-spatial features in scenarios with few samples, thus limiting generalization performance. Therefore, designing a medical hyperspectral image segmentation method that can adapt to disease deformation, integrate multi-scale features, accurately capture weak edges, and has small-sample adaptability has become crucial for improving the accuracy of clinical diagnosis. Summary of the Invention

[0005] Objective: To overcome the technical shortcomings of existing medical hyperspectral image segmentation algorithms, such as single feature extraction, insufficient multi-scale adaptation, difficulty in capturing weak edges, and lack of adaptability in small sample scenarios, this invention provides a medical hyperspectral image segmentation method based on hybrid convolutional and meta-learning approaches. By constructing an integrated network comprising a hybrid convolutional module, a multi-scale feature extractor, a learnable edge detection module, and a customized meta-learning framework, this method achieves adaptive adaptation to pathological deformities, deep fusion of multi-scale features, accurate capture of weak edges, and rapid generalization in small sample scenarios, providing accurate and reliable segmentation results for early clinical diagnosis.

[0006] Technical Solution: First, to address the shortcomings of traditional convolutional features, such as limited feature extraction and difficulty in adapting to lesion deformation and multi-scale differences, a hybrid convolutional module (MCB) adaptively selects three types: ordinary convolution, depthwise separable convolution, and deformable convolution. Ordinary convolution extracts local dense features, depthwise separable convolution reduces the number of parameters and improves computational efficiency, and deformable convolution adapts to the deformation of lesion tissue by adaptively sampling the location. The three types of convolution work together to effectively compensate for the limitations of single convolution in feature representation, computational efficiency, and deformation adaptability.

[0007] Secondly, the feature maps extracted by hybrid convolution are fed into the UB module. Each UB module consists of a hybrid convolution module (MCB) and a channel spatial attention module (CBAM) connected in series. The CBAM module first filters key spectral channels through channel attention, and then locates the core region of the lesion through spatial attention, enhancing effective features and suppressing redundant interference. Subsequently, the feature maps output by the UB module are fed into the bottleneck layer of the embedded multi-scale feature extractor (MSFE). The MSFE fuses shallow detail features and deep semantic features through multi-scale branches, adapting to the multi-scale segmentation requirements of large tumors and small lesions. Next, the decoder restores the feature map resolution through transposed convolution and skip connections. After the feature fusion effect is optimized by the MCB module, it is fed into the learnable edge detection module (LED). The LED module automatically optimizes edge parameters through end-to-end training, accurately capturing weak edges and blurred boundary information.

[0008] Finally, the segmentation network is superimposed and combined with a customized meta-learning framework. The meta-learning framework learns cross-task common rules through the meta-training to meta-testing paradigm. It can quickly adapt to new lesion types or data from new acquisition devices with only a small number of samples. After the spectral-spatial feature meta-fusion module dynamically balances spectral and spatial information, it outputs preliminary segmentation results. Then, the deviation is corrected by edge calibration, and finally the accurate segmentation results of lesion areas and normal tissues are obtained, and quantitative indicators such as Dice similarity coefficient and IoU are output.

[0009] 1. Hybrid Convolutional Module

[0010] MCB (Hybrid Convolution Module) is the core component of the MCB-Unet model's convolution module (UB). It is specifically designed to address the limitations of traditional convolutional features in medical hyperspectral image segmentation, such as their singular feature extraction and insufficient adaptability. By integrating the advantages of three convolutional methods, it achieves efficient, flexible, and accurate feature extraction, laying a solid foundation for subsequent lesion region segmentation. The core design goal of this module is to address the significant deformation, large scale differences, and substantial noise interference characteristic of lesions in medical hyperspectral images. Simultaneously, it overcomes the shortcomings of traditional convolution, such as fixed sampling positions, large parameter count, and weak adaptability to geometric transformations. Ultimately, it achieves a balance between extracting dense local features, optimizing computational efficiency, and adapting to target deformation, reducing the number of model parameters to improve the efficiency of high-dimensional data processing, and accurately capturing the multi-scale and irregular morphological features of lesions.

[0011] The MCB module includes three types of convolution: ordinary convolution, depthwise separable convolution, and deformable convolution, which can be adaptively selected through two control parameters. Each type has its core function and mathematical expression logic. Ordinary convolution, as a basic operation, extracts local basic features such as edges and textures by sliding the convolution kernel across the input feature map and performing a weighted sum. In single-channel mode, the output is the local weighted sum of the input and the convolution kernel. In multi-channel mode, a specific number of convolution kernels of a specific size are required, and each output channel is obtained by convolving the input channels and then summing the results. In the single-channel case, the convolution operation can be represented as:

[0012]

[0013] Where (i,j) are the coordinates of the output feature map, and (m,n) are the coordinates of the convolution kernel. For multi-channel applications, assume the number of input channels is C. in The number of output channels is C out Then C is required. out The size is The convolution kernel (k is the kernel side length) is used. During calculation, each output channel is convolved with the input channels separately, and then the results are summed. If the input image is a three-channel image (C... in =3), the kernel size is 3×3, and the number of output channels is 10 (C out =10), then the number of convolution kernel parameters is .

[0014] Depthwise separable convolution is split into depthwise convolution and pointwise convolution, which handle spatial and cross-channel correlations separately, significantly reducing the number of parameters. Its depthwise convolution performs spatial convolution on a single channel, while the pointwise convolution fuses channel features using a 1×1 kernel. Both are calculated through weighted summation. Assume the input feature map X has a size of... Depth convolution kernel K dw Size is (where k is the side length of the convolution kernel), we have C in One, output feature map Ydw Size is The calculation formula is:

[0015]

[0016] Where 'c' represents the channel index, (i,j) are the output feature map coordinates, and (m,n) are the convolution kernel coordinates. Pointwise convolution uses... The convolutional kernel performs channel fusion and feature transformation on the output of the depthwise convolution. Assume the pointwise convolutional kernel K... pw Size is There is C out One, output feature map Y pw Size is The calculation formula is:

[0017]

[0018] Where 'o' represents the output channel index.

[0019] Deformable convolution adds a learnable 2D offset to the standard convolution sampling grid. It uses bilinear interpolation to process the fractional offset, achieving adaptive sampling to accommodate tissue deformation and multi-scale changes. The core calculation is a weighted summation after adding the offset. Its core formula is the same as the calculation formula for ordinary convolution with the offset added:

[0020]

[0021] Where y(p0) is the value of the output feature map at position p0, and w(p n ) represents the convolution kernel weights. Adding offset The input feature map samples are then used, where R defines the sampling grid for standard convolution. Since the offset is usually a fraction, sampling is actually achieved through bilinear interpolation, as shown in the formula:

[0022]

[0023] in , .

[0024] The three types of convolution complement each other, giving the MCB module a high degree of flexibility and adaptability. It can dynamically adjust the convolution type according to the characteristics of the input features, improving computational efficiency while ensuring the accuracy of feature extraction. It effectively copes with the complex scenarios of medical hyperspectral images and provides high-quality feature support for the feature selection of the subsequent CBAM module and the accurate segmentation of the edge detection module.

[0025] 2. Convolutional Block Attention Module

[0026] CBAM (Convolutional Block Attention Module) is an important component of the convolutional module (UB) of the MCB-Unet model. Its core objective is to enhance the key features related to lesions in medical hyperspectral images, suppress redundant and interfering information, and improve the model's ability to represent the features of lesion regions by dynamically adjusting feature weights, thus providing accurate and optimized feature support for subsequent segmentation tasks.

[0027] This module takes the multi-type features extracted by the MCB module as input and follows a progressive logic of "channel attention - spatial attention" to achieve adaptive feature refinement from two dimensions. The channel attention mechanism focuses on the channel dimension of the feature map. It extracts global channel information by performing average pooling and max pooling on the input feature map, learns the inter-channel dependencies through a shared multilayer perceptron, and then generates channel attention weights through the sigmoid function. This strengthens the key spectral channel features for lesion differentiation and suppresses interference from irrelevant channels. The formula is as follows:

[0028]

[0029] in It is the sigmoid function. , In MLP, the weights W0 and W1 are shared by the two inputs, and W0 is followed by the ReLU activation function.

[0030] The spatial attention mechanism targets the spatial dimension of the feature map. It captures the spatial feature distribution patterns through average pooling and max pooling along the channel axis. After learning spatial location correlations through a 7×7 convolutional layer, spatial attention weights are generated, accurately focusing on irregular and poorly defined lesion areas while reducing interference from normal tissue. The spatial attention module focuses on the spatial relationships between features, performing average pooling and max pooling operations along the channel axis of the input feature map to obtain... and The two feature maps are concatenated, then passed through a 7×7 convolutional layer, and finally through a sigmoid function to obtain the spatial attention map M. s (F), the calculation formula is:

[0031] (7)

[0032] here This represents the sigmoid function. This represents a 7×7 convolution operation.

[0033] Overall, CBAM first uses the channel attention map. Element-wise multiplication with the input feature map F yields Then, the spatial attention map and Element-wise multiplication yields the final refined output. ,Right now , ,in This indicates element-wise multiplication.

[0034] In medical hyperspectral image segmentation scenarios, the CBAM module effectively solves the problems of complex hyperspectral data information, high noise interference, and difficulty in lesion region localization. It not only enhances the model's ability to capture key spectral-spatial features, but also improves the model's robustness to interference factors such as noise, illumination changes, and equipment differences. At the same time, it adapts to the complex and varied characteristics of human tissue morphology, laying a high-quality feature foundation for subsequent multi-scale fusion and edge detection modules, and helping to improve the accuracy and completeness of lesion region segmentation.

[0035] 3. Multi-scale feature extractor module

[0036] MSFE (Multi-Scale Feature Extractor) is a key module of the MCB-Unet model. Its core objective is to address the problem that traditional U-Net skip connections only fuse features from the same layer and are not well adapted to the large scale differences of lesions in medical hyperspectral images (such as the coexistence of small lesions and large tumors). By fusing shallow details and deep semantic features, MSFE improves the model's robustness in segmenting multi-scale targets.

[0037] This module draws inspiration from the Feature Pyramid Network (FPN) design, introducing multi-scale branches into the Bottleneck layer of U-Net to overcome the limitations of traditional single-scale feature processing. Its core logic is based on the Region of Interest (RoI) allocation formula in FPN, using parameters such as the size and resolution of the gastric cancer region in medical hyperspectral images to rationally allocate lesions of different scales to corresponding feature maps: high-resolution feature maps focus on small lesions, utilizing rich detail information for precise localization; low-resolution feature maps focus on large tumors, using strong semantic information to analyze the overall structure. Simultaneously, the fusion of multi-scale features integrates image information from different perspectives.

[0038] In the medical hyperspectral gastric cancer segmentation scenario, the MSFE module demonstrates significant value: on the one hand, it effectively addresses the issue of large differences in tumor size and morphology, compensating for the shortcomings of traditional U-Net in multi-scale target collaborative segmentation; on the other hand, it enhances the model's resistance to complex backgrounds and noise, reducing misjudgments or missed detections caused by interference factors such as device noise and spectral overlap; furthermore, it supports tumor heterogeneity analysis by mining information such as the microscopic features of tumor cells and the overall metabolic status of tissues at different scales, helping to more comprehensively understand the nature and development of tumors, providing multi-dimensional and high-quality feature support for subsequent edge detection and accurate segmentation, and further improving the detection and diagnostic accuracy of the model.

[0039] 4. Learnable edge detection module

[0040] The LED (Edge Enhancement and Refinement Module) is a key finishing module for the MCB-Unet model to achieve accurate segmentation. Its core objective is to solve the problems of blurred boundaries between lesion areas and normal tissues, easy loss of edge details, and insufficient edge accuracy after feature fusion in medical hyperspectral images. By enhancing and refining the multi-scale fusion features processed by the MSFE module, the clarity and accuracy of the lesion area contour are improved, ensuring the accuracy of the final segmentation result.

[0041] This module takes multi-scale fusion features as input. Its core logic is to first enhance the feature response of the lesion region's edges using a targeted edge enhancement algorithm, highlighting grayscale or spectral differences at the boundary. Leveraging the characteristics of medical hyperspectral images, it focuses on capturing the edge feature differences between lesion tissue and normal tissue in specific spectral bands. Simultaneously, denoising processing reduces the interference of hyperspectral data noise on edge detection, avoiding the generation of false edges. Building upon this, the module uses an edge refinement algorithm to precisely purify the enhanced edges, removing redundant edge pixels and optimizing edge continuity and smoothness. This ensures that the segmented lesion region boundary highly matches the actual tissue morphology, while preserving the edge details of minute lesions, avoiding segmentation deviations caused by edge roughness.

[0042] In medical hyperspectral image segmentation scenarios, the LED module is particularly valuable: it compensates for the weakening of edge information during the initial feature extraction and fusion process, effectively solving the segmentation challenges caused by blurred lesion boundaries and irregular shapes; by accurately locking the lesion edges, it not only improves the visual consistency of the segmentation results, but also provides accurate lesion range references for clinical diagnosis, reducing missed diagnoses or oversegmentation caused by edge misjudgment; at the same time, its edge enhancement strategy adapted to hyperspectral data further improves the model's robustness to interference factors such as complex tissue backgrounds and spectral overlap, providing the final edge guarantee for the high-precision segmentation of the entire MCB-Unet model.

[0043] 5. Combination Loss Function

[0044] The combined loss function is a key optimization component in the training of the MCB-Unet model. Its core objective is to address issues such as the imbalance between the foreground (lesion area) and background (normal tissue) ratios in medical hyperspectral gastric cancer datasets, the difficulty in identifying hard-to-classify samples, and significant noise interference. By integrating the advantages of multiple loss functions, the model training process is optimized from multiple dimensions, thereby improving segmentation accuracy and robustness.

[0045] This loss function integrates four classic loss functions: DiceLoss, FocalLoss, BCELoss (binary cross-entropy loss function), and HuberLoss. Each function has a clear division of labor and complementary advantages. DiceLoss focuses on solving the foreground-background imbalance problem by measuring the overlap between the predicted region and the ground truth label, thus strengthening the detection of gastric cancer regions. FocalLoss, by introducing balanced weights and adjustment factors, assigns higher weights to hard-to-classify samples, effectively mitigating training bias caused by class imbalance and focusing on gastric cancer regions that are prone to misclassification. BCELoss calculates the cross-entropy between the ground truth label and the predicted probability, providing accurate feedback on the classification error of each sample and promoting the overall classification accuracy of the model. HuberLoss combines the characteristics of L1 and L2 losses, is insensitive to outliers, can reduce the interference of noise in medical hyperspectral images, and enhance the robustness of the model. The DiceLoss formula is:

[0046]

[0047] Where X represents the predicted result and Y represents the true label, it can measure the degree of overlap between the predicted result and the true label. It is particularly effective in dealing with the imbalance between the foreground (gastric cancer area) and the background (normal tissue) and can focus on strengthening the detection of gastric cancer area.

[0048] The formula for FocalLoss is:

[0049]

[0050] in It is the probability that the model predicts a sample as a positive class. Used to balance the weights of positive and negative samples It is a regulating factor. This function can effectively solve the problem of sample class imbalance, give greater weight to difficult-to-classify samples, and make the model more focused on identifying gastric cancer areas that are prone to misclassification.

[0051] BCELoss is the binary cross-entropy loss function, and its formula is:

[0052]

[0053] Where y is the true label and p is the predicted probability, it can provide good feedback on the classification error of each sample, and promote the model to classify gastric cancer and normal tissue more accurately as a whole.

[0054] HuberLoss combines the advantages of L1 and L2 losses, and its formula is as follows:

[0055]

[0056] y is the true value, and p is the predicted value. These are hyperparameters that are insensitive to outliers. Noise in medical hyperspectral images easily generates outliers, and HuberLoss can reduce the interference of these outliers on model training, enhancing the model's robustness. By combining these loss functions, the model can be optimized from multiple dimensions, taking into account issues such as imbalanced samples, hard-to-classify samples, overall classification accuracy, and noise resistance, significantly improving the model's performance in medical hyperspectral gastric cancer image detection.

[0057] In the medical hyperspectral gastric cancer segmentation scenario, the value of combined loss functions is particularly prominent: it makes up for the limitations of single loss functions, such as the sensitivity of BCELoss to sample imbalance and the incomplete feedback of DiceLoss classification errors. Through multi-dimensional collaborative optimization, it not only ensures attention to minority class lesion regions, but also improves the model's adaptability to difficult-to-classify samples and noise interference. At the same time, its comprehensive characteristics enable the model to more accurately capture feature differences when facing gastric cancer regions with fuzzy boundaries and weak features, reducing missed detections and false detections, and ultimately providing a key guarantee for the model to achieve high-precision and high-robust segmentation results.

[0058] 6. Meta-learning training

[0059] First, to address the shortcomings of existing algorithms in terms of insufficient adaptability to different data distributions and limited complex feature mining in small sample scenarios, a customized meta-learning framework is built based on the MAML algorithm and integrated with the MML-Unet segmentation network. The framework includes a meta-learning fast adaptive module and a spectral-spatial feature meta-fusion module, achieving deep adaptation between segmentation tasks and meta-learning mechanisms.

[0060] Secondly, the meta-training tasks are divided according to "lesion type + imaging conditions." Each task's support set contains 5-10 pixel-level labeled images, and the query set contains 20-30 images. Iterative training is conducted using a two-layer gradient descent mechanism to learn common patterns across tasks (such as differences in spectral-spatial features between different lesions and normal tissues), optimizing network meta-parameters and giving the model the potential to quickly adapt to new data distributions. For new lesion types (such as the IM / GIN stage of gastric cancer and cholangiocarcinoma) or data from newly acquired equipment, meta-parameters are fine-tuned using a small number of support set samples (5-8 images) to quickly adapt to new data distributions and solve the model generalization problem in small sample scenarios.

[0061] Finally, a meta-learning-oriented feature interaction mechanism is designed through the spectral-spatial feature fusion module to dynamically balance the discriminativeness of spectral information with the accuracy of spatial information, thus making up for the shortcomings of complex feature mining under the meta-learning framework. The meta-learning-optimized features are weighted and fused with the edge features output by the segmentation network, and the deviation is corrected by edge calibration to finally output accurate segmentation results. The model performance is verified by quantitative indicators such as Dice similarity coefficient and IoU. Attached Figure Description

[0062] Figure 1 This is the overall network model diagram (MML-Unet) for the implementation of this invention;

[0063] Figure 2 This is the convolutional module model diagram (UB);

[0064] Figure 3 ChannelAttention module model diagram;

[0065] Figure 4 Spatial Attention module model diagram;

[0066] Figure 5 The diagram shows the Multiscale Feature Extractor Module (MSFE) model. Detailed Implementation

[0067] The medical hyperspectral image segmentation method based on hybrid convolutional fusion meta-learning disclosed in this invention is applicable to the segmentation of lesion regions in medical hyperspectral images of diseases such as gastric cancer (including IM stage and GIN stage) and cholangiocarcinoma. The following describes the specific implementation process in detail with the core process and key parameters to ensure that those skilled in the art can implement this invention.

[0068] The hybrid convolutional module described in step S4 has the following sub-steps in its learning process:

[0069] A1: Set two parameters to control the activation weights of ordinary convolution, depthwise separable convolution, and deformable convolution respectively, so as to realize the switching and collaborative work of the three types of convolution;

[0070] A2: Ordinary convolution uses a 3×3 convolution kernel to extract local dense features of the lesion area; depthwise separable convolution is split into 3×3 depthwise convolution and 1×1 pointwise convolution, which reduces the number of parameters and improves computational efficiency while ensuring feature representation; deformable convolution adds a 2D learnable offset to the 3×3 standard convolution to adaptively adjust the sampling position and adapt to the deformation features of the lesion tissue.

[0071] A3: The output feature maps of the three convolutions are concatenated along the channel dimension, and the features are optimized by BatchNorm normalization and ReLU activation function. The final output is a fused feature map that takes into account local details, computational efficiency and deformation adaptability, providing high-quality feature support for subsequent multi-scale feature fusion and edge detection.

[0072] Furthermore, such as Figure 3 The spatial attention module described in step S5 includes the following sub-steps in its learning process:

[0073] B1: For the feature map extracted by hybrid convolution, global average pooling and global max pooling operations are performed simultaneously to obtain the channel global statistical features (AvgPool_F, MaxPool_F) respectively. The two types of features are input into a shared multilayer perceptron, and after ReLU activation and linear transformation, they are fused by element-wise addition. Then, a channel attention weight map is generated by the Sigmoid function. High weights are given to key spectral channels (such as channels that reflect the differences in biochemical components of diseased tissues) to suppress interference from redundant channels.

[0074] B2: The feature map after channel attention weighting is subjected to average pooling and max pooling along the channel axis to obtain two single-channel feature maps (AvgChan_F, MaxChan_F). Spatial information is fused by channel splicing, and a spatial attention weight map is generated by a 7×7 convolutional layer (capturing large-scale spatial dependence) and a sigmoid function to accurately focus on the lesion area and weaken the influence of normal tissue and background noise.

[0075] B3: First, multiply the original feature map element-wise with the channel attention weight map to enhance key spectral features; then multiply the result element-wise with the spatial attention weight map to locate the core area of ​​the lesion, and finally output a feature map that has been doubly optimized to improve the discriminative power between lesions and normal tissues, especially to improve the feature expression of weak edges and blurred boundary areas, providing more accurate feature support for subsequent segmentation.

[0076] Furthermore, such as Figure 4 The multi-scale feature extractor described in step S6 has the following sub-steps in its learning process:

[0077] C1: A multi-scale feature extractor (MSFE) is built in the bottleneck layer of the network. Three scale branches are set up, and 1×1, 3×3 and 5×5 convolutional kernels are used for feature sampling respectively. The corresponding number of output channels is 32, which respectively captures the details of small lesions, the structure of medium-scale lesions and the global semantic features (AQ) of large tumors.

[0078] C2: The shallow (high resolution, low semantic) features of the encoder and the deep (low resolution, high semantic) features of the decoder are introduced into MSFE through skip connections. Referring to the feature pyramid mechanism of FPN, the resolution of the feature maps of each branch is unified by upsampling (transposed convolution) and downsampling (max pooling), so as to achieve cross-level complementarity of detailed information and semantic information.

[0079] C3: Input the multi-scale feature map after MSFE fusion into the hybrid convolution-attention module. First, the hybrid convolution dynamically adapts the morphological features of targets at different scales. Then, the CBAM module strengthens the key channels and core region features to suppress redundant noise introduced during the multi-scale fusion process.

[0080] C4: By concatenating channels and performing convolutional dimensionality reduction, the optimized multi-scale features are aggregated into a feature map with a unified number of channels, outputting a fusion feature that combines detail resolution and semantic discriminative power. This effectively adapts to the segmentation needs of large tumors and small lesions, and improves the model's robustness to scale changes.

[0081] Furthermore, the learnable edge detection module described in step S7 has the following sub-steps in its learning process:

[0082] D1: The learnable edge detection module is connected to the output of the preceding feature extraction network. Multi-scale edge perception branches are built inside the module, and different convolutional kernels are used to capture edge features at different scales (small-scale branches focus on weak edges such as small blood vessels, and large-scale branches capture tumor contour boundaries), replacing the traditional Sobel and Canny manually designed operators.

[0083] D2: The LED module constructs a hierarchical output through a deep supervision mechanism. Each branch outputs an edge prediction map, and the loss is calculated by combining the real edge mask. The edge feature extraction parameters are automatically optimized through backpropagation to adapt to the weak edge and blurred boundary characteristics of medical hyperspectral images and improve the edge positioning accuracy.

[0084] D3: A weighted combination of DiceLoss, FocalLoss, BCELoss, and HuberLoss loss functions is introduced, with the weights of each loss function determined through performance tuning on the validation set. DiceLoss balances the imbalance between foreground (lesion) and background (normal tissue) samples; FocalLoss strengthens the training weights for difficult-to-classify edge regions; BCELoss optimizes pixel-level classification accuracy; and HuberLoss reduces the interference of noise and outliers on training.

[0085] D4: The edge prediction loss of the LED module is combined with the segmentation loss of the preceding feature extraction network to form an overall loss function. The parameters of the entire network are optimized synchronously through backpropagation, and the final output is a medical hyperspectral image segmentation result with both accurate segmentation regions and clear edges, improving the segmentation integrity of blurred boundaries and weak edge regions.

[0086] Furthermore, the meta-learning framework described in step S8 includes the following sub-steps in its specific learning process:

[0087] E1: A meta-learning framework is built based on the MAML algorithm and superimposed and fused with the preceding segmentation network (MML-Unet). The framework includes a meta-learning fast adaptive module and a spectral-spatial feature meta-fusion module, realizing a seamless connection between the segmentation network and the meta-learning mechanism.

[0088] E2: The meta-training tasks are divided according to "lesion type + imaging conditions". The support set of each task contains 5-10 pixel-level labeled images, and the query set contains 20-30 images. Iterative training is carried out through a two-layer gradient descent mechanism to learn common patterns across tasks (such as the differences in spectral-spatial features between different lesions and normal tissues), optimize network meta-parameters, and improve the model's adaptive potential to new data distributions.

[0089] E3: For new lesion types (such as gastric cancer IM / GIN stage, bile duct cancer) or data from newly acquired equipment, fine-tune meta-parameters using a small number of support set samples (5-8 images) to quickly adapt to the new data distribution and ensure segmentation performance in small sample scenarios.

[0090] E4: The segmentation features optimized by meta-learning are weighted and fused with the edge features output by the preceding LED module. The feature dimension is unified by 1×1 convolution, and then a preliminary segmentation result is generated by the Sigmoid function. The segmentation boundary is calibrated based on the real edge mask to correct the segmentation deviation of blurred areas and weak edges.

[0091] F5: Outputs the final segmented image with precise annotation of the boundary between the lesion area and normal tissue; calculates and outputs four core quantitative indicators: Dice similarity coefficient, intersection-over-union ratio (IoU), accuracy (Acc), and sensitivity (Sensitivity), providing quantitative basis for segmentation performance and supporting clinical diagnostic applications.

[0092] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make various adjustments and modifications without departing from the technical concept of the present invention, and such adjustments and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A medical hyperspectral image segmentation method based on Hybrid Convolutional Fusion Meta-Learning (MCB-MSFE-LED-Unet, hereinafter referred to as MML-Unet), characterized in that, First, an overall segmentation network is constructed, including a hybrid convolutional module (MCB), a channel spatial attention module (CBAM), a multi-scale feature extractor (MSFE), a learnable edge detection module (LED), and a customized meta-learning framework. The hybrid convolutional module adaptively extracts lesion features through three different types of convolution. The channel spatial attention module enhances key features and suppresses redundancy. The multi-scale feature extractor fuses deep and shallow features to adapt to multi-scale targets. The learnable edge detection module accurately captures weak edges. The meta-learning framework enables fast adaptation for small samples. The specific implementation includes the following steps: S1: Hyperspectral image preprocessing, loading hyperspectral image data and corresponding segmentation masks, performing PCA dimensionality reduction on the hyperspectral image, reducing the original 40-channel hyperspectral image to 6 channels, and then normalizing the dimensionality-reduced image; S2: 3D data augmentation, which performs random horizontal flipping, vertical flipping, rotation and affine transformation on the preprocessed image and mask simultaneously to improve the diversity of training data; S3: Construct an MML-Unet segmentation network that integrates meta-learning, the network including an encoder, a bottleneck layer, a decoder, a learnable edge detection module, and a meta-learning module; S4: Perform hybrid convolution feature extraction. By adaptively selecting ordinary convolution, depthwise separable convolution, and deformable convolution, different lesion features in medical hyperspectral images are obtained. The combination of the three convolution types takes into account local dense features, computational efficiency, and adaptability to lesion deformation. S5: Enhance feature extraction by leveraging the Channel Spatial Attention Module (CBAM), strengthen key spectral channel features through channel attention optimization, and locate lesion areas through spatial attention optimization, thereby improving the discrimination between lesions and normal tissues and improving the segmentation effect of weak edge areas; S6: By combining the Multi-Scale Feature Extractor (MSFE) with the Hybrid Convolution-Attention Module, shallow detail features and deep semantic features are fused to effectively solve the multi-scale target segmentation adaptation problem and improve the model's robustness to scale changes; S7: It integrates the learnable edge detection module (LED) with the preceding feature extraction network, abandons the traditional manual design of edge detection operators, and automatically optimizes edge parameters through end-to-end training to accurately capture blurred boundaries and weak edge information. At the same time, it introduces a combined loss function to balance sample imbalance and noise resistance requirements. S8: By combining a customized meta-learning framework with a segmentation network, from meta-training to meta-testing, the network's adaptive capability is optimized. After feature fusion and edge calibration, the output results are used to obtain accurate segmentation results of lesion areas and normal tissues, and quantitative indicators such as Dice similarity coefficient and IoU are output.

2. The medical hyperspectral image segmentation method based on hybrid convolutional fusion meta-learning according to claim 1, characterized in that... The hybrid convolutional module described in S4 has the following sub-steps in its learning process: A1: Set two parameters to control the activation weights of ordinary convolution, depthwise separable convolution, and deformable convolution respectively, so as to realize the switching and collaborative work of the three types of convolution; A2: Ordinary convolution uses a 3×3 convolution kernel to extract local dense features of the lesion area; depthwise separable convolution is split into 3×3 depthwise convolution and 1×1 pointwise convolution, which reduces the number of parameters and improves computational efficiency while ensuring feature representation; deformable convolution adds a 2D learnable offset to the 3×3 standard convolution to adaptively adjust the sampling position and adapt to the deformation features of the lesion tissue. A3: The output feature maps of the three convolutions are concatenated along the channel dimension, and the features are optimized by BatchNorm normalization and ReLU activation function. The final output is a fused feature map that takes into account local details, computational efficiency and deformation adaptability, providing high-quality feature support for subsequent multi-scale feature fusion and edge detection.

3. The medical hyperspectral image segmentation method based on hybrid convolutional fusion meta-learning according to claim 1, characterized in that... The spatial attention module described in S5 has the following sub-steps in its learning process: B1: For the feature map extracted by hybrid convolution, global average pooling and global max pooling operations are performed simultaneously to obtain the channel global statistical features. The two types of features are input into a shared multilayer perceptron, and after ReLU activation and linear transformation, they are fused by element-wise addition. Then, a channel attention weight map is generated by the Sigmoid function, and high weights are given to key spectral channels to suppress interference from redundant channels. B2: The feature map after channel attention weighting is subjected to average pooling and max pooling along the channel axis to obtain two single-channel feature maps. Spatial information is fused by channel splicing, and a spatial attention weight map is generated by a 7×7 convolutional layer and a sigmoid function to accurately focus on the lesion area and weaken the influence of normal tissue and background noise. B3: First, multiply the original feature map element by element with the channel attention weight map to enhance key spectral features; The result is then multiplied element-by-element by the spatial attention weight map to locate the core area of ​​the lesion. Finally, a feature map with dual optimization is output to improve the discriminative power between lesions and normal tissues, especially to improve the feature expression of weak edges and blurred boundary areas, providing more accurate feature support for subsequent segmentation.

4. The medical hyperspectral image segmentation method based on hybrid convolutional fusion meta-learning according to claim 1, The multi-scale feature extractor described in S6 is characterized by the following sub-steps in its learning process: C1: A multi-scale feature extractor (MSFE) is built in the bottleneck layer of the network. Three scale branches are set up, and 1×1, 3×3 and 5×5 convolutional kernels are used for feature sampling respectively. The corresponding output channels are all 32, capturing the details of small lesions, the structure of medium-scale lesions and the global semantic features of large tumors respectively. C2: The shallow features of the encoder and the deep features of the decoder are introduced into the MSFE through skip connections. Referring to the feature pyramid mechanism of FPN, the resolution of the feature maps of each branch is unified by upsampling and downsampling to achieve cross-level complementarity of detailed information and semantic information. C3: Input the multi-scale feature map after MSFE fusion into the hybrid convolution-attention module. First, the hybrid convolution dynamically adapts the morphological features of targets at different scales. Then, the CBAM module strengthens the key channels and core region features to suppress redundant noise introduced during the multi-scale fusion process. C4: By concatenating channels and performing convolutional dimensionality reduction, the optimized multi-scale features are aggregated into a feature map with a unified number of channels, outputting a fusion feature that combines detail resolution and semantic discriminative power. This effectively adapts to the segmentation needs of large tumors and small lesions, and improves the model's robustness to scale changes.

5. The medical hyperspectral image segmentation method based on hybrid convolutional fusion meta-learning according to claim 1, characterized in that... The learnable edge detection module described in S7 has the following sub-steps in its learning process: D1: The learnable edge detection module is connected to the output of the preceding feature extraction network. A multi-scale edge perception branch is built inside the module, and different convolutional kernels are used to capture edge features at different scales, replacing the traditional Sobel and Canny manually designed operators. D2: The LED module constructs a hierarchical output through a deep supervision mechanism. Each branch outputs an edge prediction map, and the loss is calculated by combining the real edge mask. The edge feature extraction parameters are automatically optimized through backpropagation to adapt to the weak edge and blurred boundary characteristics of medical hyperspectral images and improve the edge positioning accuracy. D3: A weighted combination of DiceLoss, FocalLoss, BCELoss, and HuberLoss loss functions is introduced, with the weights of each loss function determined through performance tuning on the validation set. DiceLoss balances the imbalance between foreground and background samples, FocalLoss strengthens the training weights for difficult-to-classify edge regions, BCELoss optimizes pixel-level classification accuracy, and HuberLoss reduces the interference of noise and outliers on training. D4: The edge prediction loss of the LED module is combined with the segmentation loss of the preceding feature extraction network to form an overall loss function. The parameters of the entire network are optimized synchronously through backpropagation, and the final output is a medical hyperspectral image segmentation result with both accurate segmentation regions and clear edges, improving the segmentation integrity of blurred boundaries and weak edge regions.

6. The medical hyperspectral image segmentation method based on hybrid convolutional fusion meta-learning according to claim 1, characterized in that... The meta-learning framework described in S8 includes the following sub-steps in its specific learning process: E1: A meta-learning framework is built based on the MAML algorithm and superimposed and fused with the preceding segmentation network (MML-Unet). The framework includes a meta-learning fast adaptive module and a spectral-spatial feature meta-fusion module, realizing a seamless connection between the segmentation network and the meta-learning mechanism. E2: The meta-training tasks are divided according to "lesion type + imaging conditions". The support set of each task contains 5-10 pixel-level labeled images, and the query set contains 20-30 images. Iterative training is carried out through a two-layer gradient descent mechanism to learn common rules across tasks, optimize network meta parameters, and improve the model's adaptive potential to new data distributions. E3: For new lesion types or data from new acquisition devices, fine-tune meta-parameters using a small number of support set samples to quickly adapt to the new data distribution and ensure segmentation performance in small sample scenarios. E4: The segmentation features optimized by meta-learning are weighted and fused with the edge features output by the preceding LED module. The feature dimension is unified by 1×1 convolution, and then a preliminary segmentation result is generated by the Sigmoid function. The segmentation boundary is calibrated based on the real edge mask to correct the segmentation deviation of blurred areas and weak edges. E5: Outputs the final segmented image with precise annotation of the boundary between the lesion area and normal tissue; calculates and outputs four core quantitative indicators: Dice similarity coefficient, intersection-over-union ratio (IoU), accuracy (Acc), and sensitivity (Sensitivity), providing quantitative basis for segmentation performance and supporting clinical diagnostic applications.