Image segmentation method and system based on pairwise spectral context and reliability-guided update

CN123015993APending Publication Date: 2026-10-30SUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611519506.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-29
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0006]为此,本发明所要解决的技术问题在于克服现有技术中基于卷积的分割网络全局结构建模能力不足、难以有效捕捉图像长程空间依赖关系,浅层跳跃特征易携带噪声与伪影等无效干扰信息,且跳跃特征融合缺乏局部可靠性显式判别机制,仅依靠语义相似度筛选特征易造成干扰信息误融合,进而导致复杂区域分割形态失真、边界精度差、分割鲁棒性低的问题

Benefits of technology

(1)本发明所述的一种基于成对谱上下文和可靠性引导更新的图像分割方法及系统,在编码器的多个尺度设置成对谱上下文模块,于截断低频带内进行复数跨通道谱混合,并针对成对纵向频率模式进行权重共享,一方面在复数域同时保留幅值与相位信息,利用低频带完成跨通道信息互补融合,并通过残差连接保留原始空间表征,另一方面通过频率维度的权重共享有效压缩模型参数量,形成结构化频域参数约束,将成对纵向频率模式之间的对应关系引入频域参数学习,结合空间域局部混合分支兼顾全局结构信息与局部通道信息,提升频域表征能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015993A_ABST
    Figure CN123015993A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of image segmentation method and system based on paired spectrum context and reliability guided update, belong to image processing technical field.The method uses U-shaped network, and five-level features are extracted by encoder, and the first to fourth level features are enhanced by paired spectrum context module;The module carries out complex cross-channel spectral mixing in truncated low frequency band, and the weight of paired longitudinal frequency mode is shared, and residual output is fused after local branch;Decoder restores resolution level by level.In the final decoding stage, the aligned decoding features and shallow layer enhanced coding features are respectively used as semantic priori, shallow observation, and the reliability guided update module is used to generate gating map to purify shallow observation;According to semantic priori and the shallow layer observation after purification, obtain fusion feature;Fusion feature is refined by convolution and pixel-level prediction to generate segmentation result;Training set is used to train network, model is selected by verification set, and the selected model is used to segment the image to be processed.The present application improves the precision of image segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to an image segmentation method and system based on pairwise spectral context and reliability-guided updates. Background Technology

[0002] Image segmentation, a fundamental and core task in computer vision, aims to achieve pixel-level precise localization and refined boundary delineation of target regions in images. In medical image processing, accurate segmentation results can be used for quantitative analysis of lesions, assisted diagnosis, and treatment planning.

[0003] Currently, the U-shaped encoder-decoder network is the main basic architecture for image segmentation tasks. This network extracts semantic features from the image layer by layer through the encoder's step-by-step downsampling operation, while the decoder restores the feature map resolution through step-by-step upsampling. A skip connection mechanism directly transmits the high-resolution features from the encoder to the corresponding layers of the decoder. This architecture effectively integrates strong semantic features with spatial detail features, balancing image semantic representation capabilities and spatial detail preservation capabilities. It can effectively adapt to most common image segmentation scenarios and has become a classic basic structure in the field of image segmentation, widely used in various visual segmentation tasks and medical image segmentation tasks.

[0004] However, existing image segmentation techniques based on U-shaped encoders and decoders still suffer from many inherent technical problems. On the one hand, existing networks rely on convolutional operations to extract features, but the receptive field of convolution is limited by the number of network layers and the size of the convolutional kernel, making it difficult to effectively capture the long-range spatial dependencies of images. For lesion target regions in medical images with complex morphological changes and long-range correlations, relying solely on convolutional operations is insufficient to fully model the global continuous structure of the target, easily leading to problems such as incomplete segmentation of the target region, structural breaks, and morphological distortion. At the same time, existing attention modeling methods based on image patches or local windows can disrupt the original spatial continuity of the image, or require the gradual establishment of global feature associations through multi-layer networks, resulting in low modeling efficiency, poor feature fitting effects, and an inability to accurately adapt to the global structural feature extraction requirements of complex lesions. On the other hand, while the shallow skip connection features of U-shaped networks contain rich high-resolution edge and texture detail information, they are also prone to introducing a large amount of invalid interference information, including background texture interference, speckle noise, speckle reflection noise, and local imaging artifacts that are common in images. In the high-resolution image reconstruction stage of existing conventional segmentation networks, the deep semantic features of the decoder are usually directly concatenated and fused with the shallow skip features of the encoder. This fusion method does not distinguish the validity of shallow features, resulting in a large amount of unreliable detail interference information being introduced into the feature reconstruction process. This severely interferes with the boundary recovery accuracy of lesions and easily leads to defects such as blurred target boundaries, oversegmentation, and undersegmentation. In addition, existing deterministic fusion methods for skip feature fusion generally lack explicit evaluation and screening mechanisms for the local reliability of shallow high-resolution features. Current gating fusion strategies rely solely on feature semantic similarity to complete the screening and fusion of shallow features. The screening dimension is single and the discrimination accuracy is low. For artifacts and noise interference that highly overlap with the target region in spatial location, they are easily misclassified as valid target detail features and participate in feature fusion, further aggravating the segmentation error and significantly reducing the accuracy and robustness of lesion segmentation in medical images.

[0005] In summary, current image segmentation networks suffer from core problems such as weak global structure modeling capabilities, severe interference from shallow and invalid features, and a lack of reliable discrimination mechanisms for feature fusion. These issues make it difficult to achieve high-precision segmentation of lesions in complex medical images and fail to fully meet the refined application needs of clinical medical diagnosis and treatment. Summary of the Invention

[0006] Therefore, the technical problem to be solved by the present invention is to overcome the shortcomings of existing technologies, such as insufficient global structure modeling ability of convolution-based segmentation networks, difficulty in effectively capturing long-range spatial dependencies of images, shallow skip features are prone to carrying invalid interference information such as noise and artifacts, and the lack of explicit discrimination mechanism for local reliability in skip feature fusion. Relying solely on semantic similarity to select features can easily lead to misfusion of interference information, resulting in distorted segmentation morphology, poor boundary accuracy, and low segmentation robustness in complex regions.

[0007] In a first aspect, to solve the above-mentioned technical problems, the present invention provides an image segmentation method based on pairwise spectral context and reliability-guided updates, comprising: S1. Obtain the image and the pixel-level annotation mask corresponding to the image; perform preprocessing on the image and the pixel-level annotation mask respectively to obtain a preprocessed image and a preprocessed pixel-level annotation mask; S2. Establish training and validation sets based on the preprocessed image and the preprocessed pixel-level labeled mask; S3. Establish an image segmentation network model; wherein, the image segmentation network model includes an encoder, a decoder, and a pixel-level prediction layer; the encoder includes a pairwise spectral context module, the decoder includes a reliability-guided update module; the pixel-level prediction layer is connected to the output of the decoder; The preprocessed image is input into the encoder to obtain N multi-scale coding features; the first n levels of the multi-scale coding features of the N multi-scale coding features are input into the pairwise spectral context module for enhancement to obtain enhanced coding features; where N represents the total number of multi-scale coding features output by the encoder. The enhanced coding features and the remaining Nn-level multi-scale coding features from the N multi-scale coding features are input into the decoder. The decoder uses the enhanced coding features of the corresponding scale to perform skip fusion to obtain the decoded features. The reliability-guided update module aligns the spatial dimensions and channels of the shallow enhanced coding features in the decoded features and the enhanced coding features, and uses the aligned decoded features as semantic priors and the aligned shallow enhanced coding features as shallow observations; a gating graph is generated based on the semantic priors and the shallow observations; the shallow observations are cleaned using the gating graph to obtain cleaned shallow observations; and a fused feature is obtained based on the semantic priors and the cleaned shallow observations. The fused features are refined through convolution and then input into the pixel-level prediction layer to obtain the segmentation probability map of the image; based on the segmentation probability map, the image segmentation result is generated. S4. Train the image segmentation network model using the training set, and select the optimal parameters of the image segmentation network model using the validation set to obtain the optimal image segmentation network model. S5. Input the image to be segmented into the optimal image segmentation network model to obtain the image segmentation result of the image to be segmented, and complete the image segmentation.

[0008] In one embodiment of the present invention, the step of inputting the first n levels of the multi-scale coding features of the N multi-scale coding features into the pairwise spectral context module for enhancement to obtain the enhanced coding features is as follows: The paired spectral context module includes a spectral context branch and a local mixing branch; it maps each level of the coding features in the first n levels of multi-scale coding features to hidden features, and inputs the hidden features into the spectral context branch and the local mixing branch respectively; The spectral context branch performs a two-dimensional real-valued fast Fourier transform on the hidden features to obtain frequency domain features; A truncated low-frequency band is constructed within the horizontal non-negative frequency range; within the truncated low-frequency band, the spectral context branch uses complex spectral mixing weights to perform cross-channel spectral mixing on the frequency domain features to obtain mixed frequency domain features; The spectral context branch performs a two-dimensional real-valued inverse fast Fourier transform on the mixed frequency domain features to recover the spatial domain spectral context features; The local blending branch performs spatial domain local channel blending on the hidden features to obtain local blended features; The spatial domain spectral context features and the local blending features are fused in the spatial domain and then projected to obtain the spatial domain fused features. The spatial domain fusion features are residually fused with the first n-level multi-scale coding features to obtain enhanced coding features.

[0009] In one embodiment of the present invention, the mathematical relationship satisfied by the cross-channel spectral mixing is: ; in, Represents vertical frequency index and horizontal frequency index The corresponding mixed frequency domain features, Indicates the number of hidden channels. Indicates frequency position The frequency domain coefficients, Indicates frequency position From the The input hidden channel to the first Complex spectral mixing weights for each output hidden channel, This indicates that the low-frequency band has been cut off.

[0010] In one embodiment of the present invention, the relationship satisfied by the cut-off low-frequency band is: ; ; in, This indicates that the low-frequency band has been cut off. Represents a set of vertical frequency indices. This indicates the number of non-negative frequency positions in the horizontal direction. Indicates vertical frequency index, Indicates a horizontal frequency index. This indicates the number of non-zero frequency modes in the positive longitudinal direction. Indicates the height of the hidden feature.

[0011] In one embodiment of the present invention, the pairwise spectral context module further includes pairwise weight sharing, such that the positive longitudinal non-zero frequency mode and the corresponding negative longitudinal frequency mode share complex spectral mixing weights at the same transverse non-negative frequency position; wherein, the mathematical expression of the complex spectral mixing weights is: ; in, Indicates frequency position From the The input hidden channel to the first Complex spectral mixing weights for each output hidden channel, Indicates the height of the hidden feature. Indicates a horizontal frequency index. This indicates the number of non-negative frequency positions in the horizontal direction. Indicates vertical frequency index, This indicates the number of positive longitudinal non-zero frequency modes.

[0012] In one embodiment of the present invention, the step of obtaining the fused features based on the semantic prior and the purified shallow observation is as follows: Using the aforementioned semantic prior, the prior uncertainty is estimated; wherein the prior uncertainty satisfies the following relation: ; Based on the purified shallow observations and the semantic prior, the observation noise is estimated; wherein the observation noise satisfies the following relationship: ; ; in, This indicates prior uncertainty. Indicates observation noise. Indicates semantic prior, This indicates the purification of shallow observations. This represents the difference penalty mapping function. Represents the basic noise prediction function; The updated weights are determined using the observation noise and the prior uncertainty. The updated weights are used to perform reliability-guided fusion of the semantic prior and the cleaned shallow observations to obtain fused features; wherein, the expression of the fused features is: ; in, Indicates fusion features, This indicates that the weights are being updated.

[0013] In one embodiment of the present invention, the expression for updating the weights is: ; in, This indicates an update to the weights. This indicates prior uncertainty. Indicates observation noise. This represents the Sigmoid function.

[0014] In one embodiment of the present invention, the mathematical expression for the enhanced coding feature is: ; in, Indicates enhanced coding features, This represents multi-scale encoded features. This represents a 1×1 output projection. This represents the GELU activation function. Representing the spatial domain spectral context features, Represents a 1×1 convolution with locally mixed branches. This indicates a hidden feature.

[0015] In one embodiment of the present invention, the encoder sequentially outputs first to fifth level coding features. The first to fourth level coding features are enhanced by the pairwise spectral context module and used as skip connection features. The fifth level coding feature is used as a bottleneck feature and input to the decoder. The decoder includes four decoding stages. In the first three decoding stages, the upsampled decoding features are concatenated and refined by convolution with the enhanced coding features of the corresponding scale. In the fourth decoding stage, the reliability-guided update module is used to fuse the upsampled decoding features and the shallow enhanced coding features.

[0016] Secondly, to solve the above-mentioned technical problems, the present invention provides an image segmentation system based on pairwise spectral context and reliability-guided update, used to implement the above-mentioned image segmentation method based on pairwise spectral context and reliability-guided update, comprising: An acquisition and preprocessing module is used to acquire an image and a pixel-level annotation mask corresponding to the image; and to preprocess the image and the pixel-level annotation mask respectively to obtain a preprocessed image and a preprocessed pixel-level annotation mask. The dataset creation module is used to create a training set and a validation set based on the preprocessed image and the preprocessed pixel-level labeled mask. A network model construction module is used to build an image segmentation network model; wherein, the image segmentation network model includes an encoder, a decoder, and a pixel-level prediction layer; the encoder includes a pairwise spectral context module, the decoder includes a reliability-guided update module; the pixel-level prediction layer is connected to the output of the decoder; The preprocessed image is input into the encoder to obtain N multi-scale coding features; the first n levels of the multi-scale coding features of the N multi-scale coding features are input into the pairwise spectral context module for enhancement to obtain enhanced coding features; where N represents the total number of multi-scale coding features output by the encoder. The enhanced coding features and the remaining Nn-level multi-scale coding features from the N multi-scale coding features are input into the decoder. The decoder uses the enhanced coding features of the corresponding scale to perform skip fusion to obtain the decoded features. The reliability-guided update module aligns the spatial dimensions and channels of the shallow enhanced coding features in the decoded features and the enhanced coding features, and uses the aligned decoded features as semantic priors and the aligned shallow enhanced coding features as shallow observations; a gating graph is generated based on the semantic priors and the shallow observations; the shallow observations are cleaned using the gating graph to obtain cleaned shallow observations; and a fused feature is obtained based on the semantic priors and the cleaned shallow observations. The fused features are refined through convolution and then input into the pixel-level prediction layer to obtain the segmentation probability map of the image; based on the segmentation probability map, the image segmentation result is generated. An optimization module is used to train the image segmentation network model using the training set and select the optimal parameters of the image segmentation network model using the validation set to obtain the optimal image segmentation network model. The output module is used to input the image to be segmented into the optimal image segmentation network model and output the image segmentation result of the image to be segmented, thereby completing the image segmentation.

[0017] Compared with the prior art, the above-described technical solution of the present invention has the following advantages: (1) The image segmentation method and system based on paired spectral context and reliability-guided update described in this invention sets up paired spectral context modules at multiple scales of the encoder, performs complex cross-channel spectral mixing in the truncated low-frequency band, and performs weight sharing for paired vertical frequency modes. On the one hand, amplitude and phase information are retained in the complex domain at the same time, cross-channel information complementary fusion is completed using the low-frequency band, and the original spatial representation is retained through residual connection. On the other hand, the number of model parameters is effectively compressed through the weight sharing of the frequency dimension, forming structured frequency domain parameter constraints. The correspondence between paired vertical frequency modes is introduced into frequency domain parameter learning. Combined with the spatial domain local mixing branch, the global structural information and local channel information are taken into account, thereby improving the frequency domain representation capability.

[0018] (2) In the final high-resolution reconstruction stage, the present invention controls the injection of shallow details based on prior uncertainty and observation noise, which helps to suppress unreliable shallow responses caused by background texture, noise and artifacts.

[0019] (3) This invention achieves efficient modeling of global continuous structural features at the encoding end, and at the decoding end, it realizes adaptive control of the reliability of shallow detail features, effectively avoids interference from invalid features, and improves the accuracy and robustness of image segmentation. Attached Figure Description

[0020] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0021] Figure 1 This is a flowchart of an image segmentation method based on pairwise spectral context and reliability-guided updates in a preferred embodiment of the present invention; Figure 2 This is a diagram of the overall network structure of Spekal-UNet in a preferred embodiment of the present invention; Figure 3 This is a structural diagram of the paired spectral context module in a preferred embodiment of the present invention; Figure 4 This is a diagram showing the truncated low-frequency band and paired weight sharing relationship in a preferred embodiment of the present invention; Figure 5 This is a structural diagram of the reliability-guided update module in a preferred embodiment of the present invention; Figure 6 This is a diagram illustrating the uncertainty-guided update structure in a preferred embodiment of the present invention. Detailed Implementation

[0022] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0023] Example 1: Reference Figure 1 As shown, this embodiment of the invention provides an image segmentation method based on pairwise spectral context and reliability-guided updates, including but not limited to the following steps: S1. Obtain the image and the corresponding pixel-level annotation mask; preprocess the image and the pixel-level annotation mask respectively to obtain the preprocessed image and the preprocessed pixel-level annotation mask; S2. Based on the preprocessed image and the preprocessed pixel-level labeled mask, establish the training set and the validation set; S3. Establish an image segmentation network model; the image segmentation network model includes an encoder, a decoder, and a pixel-level prediction layer; the encoder includes a pairwise spectral context module, the decoder includes a reliability-guided update module; the pixel-level prediction layer is connected to the output of the decoder; The preprocessed image is input into the encoder to obtain N multi-scale coded features; the first n levels of the N multi-scale coded features are input into the pairwise spectral context module for enhancement to obtain enhanced coded features; where N represents the total number of multi-scale coded features output by the encoder. The enhanced coding features and the remaining Nn-level multi-scale coding features from the N multi-scale coding features are input into the decoder. The decoder uses the enhanced coding features of the corresponding scale to perform skip fusion to obtain the decoded features. The reliability-guided update module aligns the shallow enhanced coding features in the decoded features and enhanced coding features with spatial dimensions and channels, and uses the aligned decoded features as semantic priors and the aligned shallow enhanced coding features as shallow observations; a gating graph is generated based on the semantic priors and shallow observations; the shallow observations are cleaned using the gating graph to obtain cleaned shallow observations; and the fused features are obtained based on the semantic priors and cleaned shallow observations. The fused features are refined through convolution and then input into the pixel-level prediction layer to obtain the image segmentation probability map; based on the segmentation probability map, the image segmentation result is generated. S4. Train the image segmentation network model using the training set, and select the optimal parameters of the image segmentation network model using the validation set to obtain the optimal image segmentation network model. S5. Input the image to be segmented into the optimal image segmentation network model to obtain the image segmentation result of the image to be segmented, and complete the image segmentation.

[0024] This invention presents an image segmentation method based on paired spectral context and reliability-guided updates, effectively addressing the problems of insufficient feature extraction, weak contextual correlation, numerous shallow feature interferences, low segmentation accuracy, and poor generalization ability in traditional image segmentation methods. First, step S1 performs paired preprocessing on the original image and pixel-level labeled masks. This maximizes the preservation of the original semantic information of the image and the accurate pixel-level labeling information of the mask, while avoiding the negative impact of inconsistent original data quality and data dimensionality on model training, thus improving the overall reliability of the segmentation task from the source. Step S2 constructs training and validation sets based on the preprocessed standardized images and masks. This allows the model to fully explore the correspondence between image pixels and semantic labels in the training set, completing feature learning and parameter iteration, while also ensuring the objectivity and accuracy of subsequent model parameter selection. Step S3, through modular network structure design, significantly improves the feature extraction and fusion capabilities of image segmentation, which is the key to improving segmentation accuracy. This network architecture, based on traditional encoder-decoder, introduces a pairwise spectral context module and a reliability-guided update module. This overcomes the limitations of traditional segmentation networks that rely solely on local spatial features and ignore global spectral domain correlations. The encoder's multi-scale encoded features comprehensively cover both shallow and deep semantic features, ensuring the integrity of feature extraction. The pairwise spectral context module enhances multi-scale features, effectively capturing global contextual information and strengthening the semantic representation of features, thus addressing the problems of target feature confusion and semantic information loss in complex scenes. Simultaneously, the decoder achieves preliminary combination of shallow and deep features through multi-scale feature skipping fusion, preserving details such as image edges and textures, as well as high-level semantic information. The reliability-guided update module precisely aligns the decoded features and shallow enhanced features in spatial and channel dimensions, using a gating graph to adaptively clean shallow features, accurately removing noise and invalid interference, retaining highly reliable details, and then combining this with deep semantic priors to complete feature fusion. This effectively balances the semantic accuracy and detail integrity of image segmentation, avoiding the drawbacks of traditional shallow and deep feature fusion such as detail loss, semantic misalignment, and invalid feature interference. Finally, by refining through convolution and outputting a segmentation probability map with pixel-level prediction, pixel-level accurate discrimination is achieved, significantly improving the segmentation effect. Step S4 uses the training set and validation set for model training and parameter optimization. Through iterative training, the network gradually learns the feature distribution of the data, and the model performance under different hyperparameter configurations is evaluated and selected based on the validation set to determine the hyperparameter configuration with better performance and the corresponding model. This reduces the risk of overfitting the model on the training data and improves the model's generalization ability and stability in practical applications.Step S5 performs inference on the image to be segmented based on the trained optimal model. Utilizing high-quality data support, a refined model structure, and optimized model parameters, it can quickly and accurately output pixel-level segmentation results, achieving efficient and high-precision end-to-end image segmentation. Compared to traditional segmentation methods, it has significant advantages in complex scene segmentation, detail preservation, and semantic accuracy, greatly improving the overall practicality of image segmentation tasks. Therefore, this method achieves efficient modeling of global continuous structural features at the encoding end, while simultaneously implementing adaptive control of the reliability of shallow detail features at the decoding end, effectively avoiding interference from invalid features and improving image segmentation accuracy and robustness.

[0025] The image segmentation method provided in this embodiment of the invention is applicable to a variety of image segmentation application scenarios. In order to clearly and completely illustrate the technical solution of the invention, a medical image segmentation scenario is used as an example for illustrative explanation, but this is not intended to limit the scope of protection of the invention.

[0026] Specifically, in step S1, medical images for training, verification, and testing, as well as pixel-level labeled masks corresponding to the training images and verification images, are acquired, and the medical images and corresponding pixel-level labeled masks are preprocessed.

[0027] Furthermore, the medical images and their corresponding pixel-level annotation masks are preprocessed. The preprocessing includes adjusting the medical images and their corresponding pixel-level annotation masks to a preset spatial size, normalizing the medical images, and binarizing the pixel-level annotation masks. During the training phase, the medical images and pixel-level annotation masks in the same training sample are simultaneously subjected to random flipping or random rotation data augmentation.

[0028] Specifically, in step S2, a training set and a validation set are established based on the preprocessed image (i.e., the preprocessed medical image) and the preprocessed pixel-level annotation mask (i.e., the preprocessed pixel-level annotation mask). The training set is used to update the image segmentation network parameters, and the validation set is used to select model parameters.

[0029] Specifically, in step S3, a SegKal-UNet image segmentation network based on pairwise spectral context and reliability-guided updates is constructed and applied to target region segmentation in medical images. (Refer to...) Figure 2As shown, the image segmentation network adopts a U-shaped encoder-decoder structure, including five levels of encoded features, four decoding stages, pairwise spectral context modules set in the first four encoding scales, and a reliability-guided update module set in the final high-resolution reconstruction stage. In this embodiment of the invention, the network model includes an encoder, a decoder, and a pixel-level prediction layer; the encoder includes a pairwise spectral context module, serving as a feature enhancement module in the encoding path; the decoder includes a reliability-guided update module, located in the final high-resolution fusion stage of the decoder; the pixel-level prediction layer is connected to the output of the decoder. The specific functions and implementation steps of each component module are as follows: S310. Input the preprocessed image into the encoder, and obtain N multi-scale coding features through step-by-step downsampling. The encoded features are enhanced using paired spectral context modules at multiple encoding scales to obtain enhanced encoded features for skip connections.

[0030] S320, the paired spectral context module includes input projection, spectral context branching, local mixing branching, output projection, and residual fusion. (See reference...) Figure 3 As shown, the first n levels of multi-scale coding features of N multi-scale coding features are... The specific steps for inputting the paired spectral context module for enhancement to obtain enhanced encoded features are as follows: S321. Encode the features of the first n levels of multi-scale respectively. The encoded features at each level are mapped to hidden features. and hide features The spectral context branch and the local mixing branch are input separately. In this embodiment of the invention, a 1×1 convolution is used to project the input encoded features onto the hidden feature space.

[0031] S322, Spectral context branch pairs hidden features Perform a two-dimensional real-valued fast Fourier transform to obtain the frequency domain features. .

[0032] S323, reference Figure 4 As shown, a truncated low-frequency band is constructed within the horizontal non-negative frequency range of explicit storage. ; in cutting off the low frequency band Within this, the spectral context branch utilizes complex spectral mixing weights to apply frequency domain features. Learnable complex cross-channel spectral mixing is performed to obtain mixed frequency domain features. The mathematical relationship satisfied by the cross-channel spectral mixing is: ; in, Represents vertical frequency index and horizontal frequency index The corresponding mixed frequency domain features, Indicates the number of hidden channels. Indicates frequency position The frequency domain coefficients, Indicates frequency position From the The input hidden channel to the first The complex spectral mixing weights of each output hidden channel are composed of learnable real and imaginary parameters. and These represent the input channel and the output channel, respectively. This indicates that the low-frequency band has been cut off.

[0033] Furthermore, for batch indexes Channel Index and frequency position The frequency domain coefficients satisfy: ; in, Represents the imaginary unit. Indicates hidden features in the index eigenvalues ​​at that location The symbol for pi.

[0034] Furthermore, for heights of Width is Hidden features, Explicit storage of horizontal non-negative frequencies, horizontal frequency index satisfy .set up To retain the number of positive longitudinal non-zero frequency modes, The number of non-negative lateral frequency positions to be retained. The set of retained vertical frequency indices. and cut-off low frequency band The relationship that satisfies this is: ; ; in, This indicates that the low-frequency band has been cut off. Represents a set of vertical frequency indices. This indicates the number of non-negative lateral frequency positions retained. Indicates vertical frequency index, Indicates a horizontal frequency index. This indicates the number of positive longitudinal non-zero frequency modes retained. Indicates the height of the hidden feature.

[0035] Furthermore, when the altitude Even number and bandwidth parameter reaches At that time, The corresponding vertical Nyquist frequency rows are retained separately. The zero vertical frequency row and the retained vertical Nyquist frequency rows are parameterized independently; among them, the zero vertical frequency row is only parameterized when... The corresponding two-dimensional DC frequency point.

[0036] Furthermore, for the positive vertical non-zero frequency mode and the corresponding negative vertical frequency mode, a paired weight sharing approach is adopted, so that the positive vertical non-zero frequency mode and the corresponding negative vertical frequency mode share the complex spectrum mixing weight at the same horizontal non-negative frequency position. Specifically, for a height of The hidden features, the pairwise weight sharing corresponding to the pairwise vertical frequency patterns include the vertical frequency index as The positive longitudinal non-zero frequency mode and longitudinal frequency index are as follows The negative longitudinal frequency mode, where 1≤ ≤ For the same horizontal non-negative frequency position, the positive vertical non-zero frequency mode and the corresponding negative vertical frequency mode use the same complex spectral mixing weights. The zero vertical frequency row is parameterized independently, and the vertical Nyquist frequency row is parameterized independently when it is retained. It should be noted that the vertical non-zero frequency mode and the corresponding negative vertical frequency mode are paired frequency modes with the same vertical frequency amplitude and opposite directions. In this embodiment of the invention, only the learnable complex weights are stored for the positive vertical non-zero frequency mode, and these weights are aligned according to frequency amplitude and reused for the corresponding negative vertical frequency mode. In addition, paired weight sharing means applying parameter constraints to paired frequency positions to keep the weights corresponding to the paired frequency positions equal.

[0037] Furthermore, the mathematical expression for the complex spectrum mixed weights is: ; in, Indicates frequency position From the The input hidden channel to the first Complex spectral mixing weights for each output hidden channel, This represents the vertical frequency index. When applying shared weights to negative vertical frequency patterns, the weights of positive vertical frequency patterns are flipped along the vertical pattern dimension, making... and Corresponding to frequency amplitude. Thus, paired frequency modes accept the same set of learnable spectral domain transformations.

[0038] S324. In the spectral context branch, truncate the low-frequency band. Set all other frequency domain positions to zero and adjust the mixed frequency domain features. Perform a two-dimensional real-valued inverse fast Fourier transform to recover the spatial domain spectral context features; where the expression for the spatial domain spectral context features is: ; in, Representing hidden features Spatial domain spectral context features, This represents the two-dimensional real-valued inverse fast Fourier transform.

[0039] S325, Locally Mixed Branches for Hidden Features Local channel blending in the spatial domain is performed to obtain locally blended features. In this embodiment of the invention, a 1×1 convolution is used to construct the locally blended branch.

[0040] S326. In the spatial domain, the spatial domain spectral context features and local mixed features are fused, and then the output is projected through the GELU activation function and 1×1 convolution to obtain the spatial domain fused features.

[0041] S327. Integrating spatial domain fusion features with the first n levels of multi-scale coding features Residual fusion is performed to obtain enhanced coding features. The mathematical expression for these enhanced coding features is: ; in, Indicates enhanced coding features, This represents the multi-scale encoded features of the first n levels. This represents a 1×1 output projection. This represents the GELU activation function. This represents a 1×1 convolution with locally mixed branches.

[0042] S330. The decoder upsamples step by step, using bottleneck features as input to recover spatial resolution. In the intermediate decoding stage, it uses enhanced coding features of the corresponding scale for skip fusion. In the final high-resolution decoding stage (also known as the final high-resolution reconstruction stage), it uses a reliability-guided update module to fuse decoding features (also known as pre-decoding features) and corresponding shallow enhanced coding features. The shallow enhanced coding features are the features of the first-level coding features enhanced by the paired spectral context module.

[0043] S340, reference Figure 5 As shown, the reliability-guided update module fuses the decoding features and shallow enhanced coding features to generate fused features. The specific steps are as follows: S341. The reliability-guided update module aligns the spatial dimensions and channels of the decoded features and shallow-enhanced encoded features, and uses the aligned decoded features as semantic priors. The aligned shallow enhancement coding features are used as shallow observations. According to semantic priors and shallow observation Generate gated graph Among them, gating diagram The expression is: ; in, This represents the gating graph generation function. This indicates channel splicing.

[0044] S342, Using Gated Charts Shallow observation Purification is performed to obtain purified shallow observations, i.e., purified shallow observations. Its expression is: ; in, This indicates element-wise multiplication.

[0045] S343. Based on semantic priors and purified shallow observations, obtain the fused features. The specific steps are as follows: S3431. Utilizing semantic priors Estimate the prior uncertainty; where the prior uncertainty satisfies the following relation: ; in, This represents a prediction function for prior uncertainty. It indicates prior uncertainty.

[0046] S3432, Based on shallow layer observations after purification and semantic prior Estimate the observation noise; where the observation noise satisfies the following relationship: ; ; in, Indicates observation noise. This represents the difference penalty mapping function. This represents the basic noise prediction function.

[0047] S3433, reference Figure 6 As shown, using observation noise and prior uncertainty Determine the updated weights; where the expression for the updated weights is: ; ; in, This indicates an update to the weights. This represents the Sigmoid function. The amount of shallow details injected into the semantic prior is controlled by updating the weights.

[0048] S3434, Utilizing updated weights semantic priors and purification of shallow observation Reliability-guided fusion is performed to obtain fusion characteristics. Among them, fusion features The expression is: .

[0049] S350, integrating features After convolutional refinement, the image is input into a pixel-level prediction layer to generate a segmentation probability map of the medical image.

[0050] Specifically, refer to Figure 2 As shown, in this embodiment of the invention, the encoder sequentially outputs the first to fifth level coded features (i.e., N=5). The first to fourth level coded features (i.e., n=4) are enhanced by the pairwise spectral context module and used as skip connection features. The fifth level coded feature is used as a bottleneck feature and input to the decoder. The decoder includes four decoding stages. In the first three decoding stages, the upsampled decoded features are concatenated and refined by convolution with the enhanced coded features at the corresponding scale. In the fourth decoding stage, a reliability-guided update module is used to fuse the upsampled decoded features and the shallow enhanced coded features. The shallow enhanced coded features are the features of the first level coded features enhanced by the pairwise spectral context module.

[0051] The method described in this invention configures paired spectral context modules at multiple scales in the encoder, performs complex cross-channel spectral mixing in the truncated low-frequency band, and shares weights for paired longitudinal frequency modes. Complex domain processing considers both amplitude and phase, achieving low-frequency cross-channel information fusion while preserving high-frequency details. Weight sharing reduces the number of parameters and the risk of overfitting, captures spectral dependencies at multiple scales, and optimizes frequency domain representation. In the high-resolution reconstruction stage, a reliability-guided update module is set up, using decoded features as semantic priors and shallow-enhanced encoded features as observations, adaptively adjusting the injection of shallow details based on reliability approximation. Compared to traditional skip connections, this avoids the direct transmission of noise artifacts, controlling model size while ensuring detail restoration and anti-interference capabilities.

[0052] Specifically, in step S4, the image segmentation network model is trained using the training set, and the optimal parameters of the model are selected using the validation set. In this embodiment of the invention, an equal-weighted combination of Dice loss and binary cross-entropy loss is used as the segmentation loss of the image segmentation network, the Adam optimizer is used to update the network parameters, and a cosine annealing hot restart strategy is used to adjust the learning rate. The inference model parameters are selected based on the Dice coefficients of the validation set.

[0053] Specifically, in step S5, the optimal image segmentation network model obtained after training is used to predict the medical image to be segmented, and the medical image segmentation result is output according to the segmentation probability map. In this process, the fused features are refined through convolution and then input into the pixel-level prediction layer. Convolution and the Sigmoid function are used to obtain a segmentation probability map, and a binary target mask is obtained according to a preset threshold.

[0054] Specifically, to describe in detail the specific implementation process of the image segmentation method provided in the embodiments of the present invention, exemplary execution steps are given below in conjunction with specific embodiments to clearly illustrate the technical solution of the present invention. The specific steps are as follows: Step 1: Obtain the medical image to be segmented, and adjust the input image to... Pixels, and normalize the pixel values ​​to Interval.

[0055] Step 2: Input the preprocessed image into the encoder. The encoder extracts five levels of multi-scale coding features step by step through double convolutional units and max pooling. Their channel numbers are 64, 128, 256, 512, and 1024 respectively; among which It has the highest spatial resolution. This is a bottleneck characteristic.

[0056] Furthermore, the paired spectral context modules are respectively set in the encoded features , , and Then, enhanced coding features are generated. Each level of enhanced coding features serves both as downsampling input for the next coding scale and as skip connection input for the corresponding decoding stage; bottleneck features Do not set a paired spectrum context module.

[0057] Furthermore, in this example, the bandwidth parameter is used. Based on this, the bandwidth parameters for each coding scale are set to 2, 3, 4, and 4 respectively; the hidden channel ratio... Setting it to 0.5 causes the paired spectral context module to first perform spectral domain processing within the compressed channel space before restoring it to the input channel number. The specific steps are as follows: Step 2-1: Refer to Figure 3 As shown, for input encoding features ,use Convolution projects it into hidden features The hidden features are then input into the spectral context branch and the local blending branch, respectively. Indicates batch size, Indicates the number of input channels.

[0058] Step 2-2: The spectral context branch uses a two-dimensional discrete Fourier transform to obtain the frequency domain representation of the hidden features (i.e., frequency domain features). ), and through two-dimensional real fast Fourier transform Implementation. For batch indexes. Channel Index and frequency position This yields the expression satisfied by the frequency domain coefficients. Figure 3 In this context, DFT represents the two-dimensional discrete Fourier transform, and IDFT represents the two-dimensional inverse discrete Fourier transform.

[0059] Furthermore, for heights of Width is Hidden features, Explicit storage of horizontal non-negative frequencies, horizontal frequency index satisfy .set up To retain the number of positive longitudinal non-zero frequency modes, To determine the number of lateral non-negative frequency positions to retain, we obtain the set of retained vertical frequency indices. and cut-off low frequency band A relationship that satisfies certain conditions.

[0060] Furthermore, when Even number and bandwidth parameter reaches At that time, The corresponding vertical Nyquist frequency rows are retained separately. The zero vertical frequency row and the retained vertical Nyquist frequency rows are parameterized independently; among them, the zero vertical frequency row is only parameterized when... This corresponds to a two-dimensional DC frequency point. The low-frequency band is truncated. Within this process, learnable complex cross-channel spectral mixing is performed on the input frequency domain features to obtain the mixed frequency domain features. .

[0061] Furthermore, cut off the low-frequency band The frequency domain positions other than those specified are set to zero, and the real-valued spatial domain spectral context features are recovered by using a two-dimensional real-valued inverse fast Fourier transform. Specifically, hybrid frequency domain features Two-dimensional real-valued inverse fast Fourier transform Transform to the spatial domain to obtain the spectral context branch output. .

[0062] Steps 2-3: Using local mixed branches Convolution outputs local blending features .

[0063] Steps 2-4: The outputs of the spectral context branch and the local mixing branch are added in the spatial domain, and after nonlinear transformation and output projection, residual fusion is performed with the input encoded features. Thus, the paired spectral context modules output enhanced encoded features. .

[0064] Step 3: Define the bottleneck characteristics Input decoder. The first three decoding stages respectively employ... Transposed convolutions are used for upsampling, and the upsampled deep features are concatenated with the corresponding enhanced coding features along the channel direction, then refined using double convolutional units. In the fourth decoding stage, a reliability-guided update module replaces the direct concatenation method, fusing the upsampled decoded features and the highest resolution enhanced coding features. The specific steps are as follows: Step 3-1: Refer to Figure 5 As shown, first use Transposed convolution upsamples the decoded features to enhance the encoded features. The space dimensions, and then utilize them separately Convolution is used to perform channel projection, and group normalization layers are used to calibrate the two-way projection features to obtain semantic priors. and aligned shallow features : ; ; in, Indicates group normalization, This represents the decoded features after upsampling. This indicates shallow-layer enhanced coding features.

[0065] Step 3-2: Concatenate the semantic prior and aligned shallow features along the channel direction, through two layers. Convolution, ReLU activation function, and Sigmoid function generate single-channel spatial gating maps. , gate control diagram Broadcast to each feature channel and perform cleanup on shallow features: ; ; in, Represents the ReLU activation function; This indicates shallow observations after gating and purification, i.e., shallow observations after purification.

[0066] Step 3-3: Refer to Figure 6 As shown, in uncertainty-guided updates, semantic prior predictions are used respectively. The observation noise basis term is predicted from the gated and purified shallow observations, and the absolute difference between the two is used to determine the noise level. Generate nonnegative difference penalty term : ; ; .

[0067] Steps 3-4: Semantic priors Treating it as a priori state, the shallow observation after gating and purification Treat it as an observation, and update the weights pixel by pixel and channel by channel. Forming a state of fusion When there is a large discrepancy between shallow observations and semantic priors, the difference penalty term increases the estimated observation noise, thus affecting the weight update. Reduce; when shallow observations are consistent with semantic priors, larger update weights Allows for more shallow detail injection.

[0068] Through the aforementioned gating cleanup and uncertainty-guided update, the reliability-guided update module selectively fuses decoded features and shallow-enhanced coded features in the final high-resolution reconstruction stage, and then updates the fusion state. It serves as input for subsequent convolutional refinement and pixel-level prediction.

[0069] Step 4: Fuse the state The input is processed by a dual-convolutional refining head for local integration. The dual-convolutional refining head comprises two layers. Convolution, followed by a batch normalization layer and a ReLU activation layer after each convolution layer; then utilize... Convolution maps the refined features to a single class channel, generates a binary classification segmentation probability map through the Sigmoid function, and obtains a binary target mask according to a threshold of 0.5.

[0070] Specifically, regarding step S4, which involves training the image segmentation network model using the training set and selecting the optimal parameters of the model using the validation set, the present invention provides the following exemplary implementation steps.

[0071] In this example, the constructed image segmentation network model is trained using training images and their pixel-level labeled masks. During training, the images and labeled masks are simultaneously subjected to random flipping and rotation, and the input size is uniformly adjusted. Pixels, and normalize the pixel values ​​of the training image to a normal value using tensor transformation. Interval. The composite loss used. It is obtained by weighted combination of weighted Dice loss and weighted binary cross-entropy loss, satisfying: ; in, This represents the weighted Dice loss, used to optimize the degree of overlap between the predicted mask and the labeled mask. This represents the weighted binary cross-entropy loss, used to constrain the binary classification prediction of each pixel.

[0072] Furthermore, the Adam optimizer is used during training, with an initial learning rate of [missing information]. Cosine annealing hot restart parameters Set to 10 Set to 1, minimum learning rate set to The batch size is set to 8. During training, the Dice coefficients on the validation set are calculated, and the model parameters with the highest Dice coefficients on the validation set are retained.

[0073] Furthermore, when using the trained image segmentation network for segmentation, the images to be segmented undergo the same size adjustment and normalization processes as during the training phase. Multi-scale encoding, pairwise spectral context enhancement, stepwise decoding, reliability-guided update, convolutional refinement, and pixel-level prediction are performed sequentially. A binary target mask is obtained by applying a 0.5 threshold to the segmentation probability map.

[0074] To verify the effectiveness of the method described in this embodiment of the invention, tests were conducted on the dermoscopic lesion segmentation dataset ISIC2018, the breast ultrasound lesion segmentation dataset BUSI, the colon polyp segmentation dataset CVC-ClinicDB, and the glandular tissue pathology segmentation dataset GlaS. The Dice coefficient and Intersection over Union (IoU) were used as evaluation metrics. The test results are shown in Table 1. Table 1 presents the performance parameters of the method described in this invention on four types of medical image segmentation datasets. Higher Dice coefficients and IoU indicate a higher degree of overlap between the segmentation results and the ground truth annotations. As shown in Table 1, the method of this invention achieved high Dice coefficients and IoU values ​​on four medical image segmentation datasets with significant differences in imaging modalities and diverse lesion morphologies: dermoscopy, breast ultrasound, colonoscopy, and histopathology sections. This not only verifies the accuracy of the method in single-class segmentation tasks but also demonstrates its good cross-dataset generalization ability and robustness.

[0075] Table 1:

[0076] Furthermore, in the structural ablation experiments on the ISIC2018 dataset, the Dice coefficient and IoU of the base network were 86.58% and 77.97%, respectively; when only the reliability-guided update module was added, they were 87.40% and 79.62%, respectively; and when both the pairwise spectral context module and the reliability-guided update module were used, they were 89.38% and 82.80%, respectively.

[0077] Furthermore, when the reliability-guided update module is further ablated, the Dice coefficient and IoU of the a priori-guided gating cleanup are 88.52% and 81.38%, respectively, when only the uncertainty-guided update is used, they are 88.82% and 81.88%, respectively, and when both are used, they are 89.38% and 82.80%, respectively.

[0078] Furthermore, in the blur, contrast variation, and specular perturbation tests on the BUSI dataset, the average Dice coefficients of the standard U-Net, the U-Net with the added reliability-guided update module, and the complete implementation of this invention were 66.45%, 70.66%, and 72.70%, respectively. These results demonstrate that reliability-guided updates are beneficial in reducing the impact of unreliable shallow responses on the segmentation results.

[0079] The image segmentation method described in this embodiment of the invention has the following advantages through the above design: First, performing complex cross-channel spectral mixing within the truncated low-frequency band can supplement continuous global structural information with fewer frequency modes, which is beneficial for enhancing the overall structural characterization of the target region.

[0080] Second, pairwise frequency modes with the same longitudinal frequency amplitude and opposite direction share spectral mixing weights, so that the learning parameters conform to the frequency organization of the real number fast Fourier transform, and structural constraints are imposed on the spectral domain parameters.

[0081] Third, in the final high-resolution reconstruction stage, controlling the injection of shallow details based on prior uncertainties and observation noise helps to suppress unreliable shallow responses caused by background textures, noise, and artifacts.

[0082] Fourth, the paired spectral context module and the reliability-guided update module are used for structural modeling at the encoding end and detail recovery at the decoding end, respectively. The two work together to improve the accuracy and robustness of image segmentation.

[0083] Example 2: Based on the same inventive concept, this embodiment provides an image segmentation system based on pairwise spectral context and reliability-guided updates. The principle of solving the problem is similar to that of the image segmentation method based on pairwise spectral context and reliability-guided updates provided in Embodiment 1, and the repeated parts will not be described again.

[0084] This embodiment provides an image segmentation system based on pairwise spectral context and reliability-guided updates, used to implement the image segmentation method based on pairwise spectral context and reliability-guided updates described in Embodiment 1, including: The acquisition and preprocessing module is used to acquire the image and the corresponding pixel-level annotation mask; and to preprocess the image and the pixel-level annotation mask respectively to obtain the preprocessed image and the preprocessed pixel-level annotation mask. The dataset creation module is used to create training and validation sets based on preprocessed images and preprocessed pixel-level labeled masks. A network model construction module is used to build an image segmentation network model; wherein, the image segmentation network model includes an encoder, a decoder, and a pixel-level prediction layer; the encoder includes a pairwise spectral context module, the decoder includes a reliability-guided update module; the pixel-level prediction layer is connected to the output of the decoder; The preprocessed image is input into the encoder to obtain N multi-scale coded features; the first n levels of the N multi-scale coded features are input into the pairwise spectral context module for enhancement to obtain enhanced coded features; where N represents the total number of multi-scale coded features output by the encoder. The enhanced coding features and the remaining Nn-level multi-scale coding features from the N multi-scale coding features are input into the decoder. The decoder uses the enhanced coding features of the corresponding scale to perform skip fusion to obtain the decoded features. The reliability-guided update module aligns the shallow enhanced coding features in the decoded features and enhanced coding features with spatial dimensions and channels, and uses the aligned decoded features as semantic priors and the aligned shallow enhanced coding features as shallow observations; a gating graph is generated based on the semantic priors and shallow observations; the shallow observations are cleaned using the gating graph to obtain cleaned shallow observations; and the fused features are obtained based on the semantic priors and cleaned shallow observations. The fused features are refined through convolution and then input into the pixel-level prediction layer to obtain the image segmentation probability map; based on the segmentation probability map, the image segmentation result is generated. The optimization module is used to train the image segmentation network model using the training set and select the optimal parameters of the image segmentation network model using the validation set to obtain the optimal image segmentation network model. The output module is used to input the image to be segmented into the optimal image segmentation network model and output the image segmentation result of the image to be segmented, thus completing the image segmentation.

[0085] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0086] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0087] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0088] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0089] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. An image segmentation method based on pairwise spectral context and reliability-guided updates, characterized in that, include: S1. Obtain the image and the pixel-level annotation mask corresponding to the image; The image and the pixel-level annotation mask are preprocessed to obtain a preprocessed image and a preprocessed pixel-level annotation mask, respectively. S2. Establish training and validation sets based on the preprocessed image and the preprocessed pixel-level labeled mask; S3. Establish an image segmentation network model; wherein, the image segmentation network model includes an encoder, a decoder, and a pixel-level prediction layer; the encoder includes a pairwise spectral context module, the decoder includes a reliability-guided update module; the pixel-level prediction layer is connected to the output of the decoder; The preprocessed image is input into the encoder to obtain N multi-scale coding features; the first n levels of the multi-scale coding features of the N multi-scale coding features are input into the pairwise spectral context module for enhancement to obtain enhanced coding features; where N represents the total number of multi-scale coding features output by the encoder. The enhanced coding features and the remaining Nn-level multi-scale coding features from the N multi-scale coding features are input into the decoder. The decoder uses the enhanced coding features of the corresponding scale to perform skip fusion to obtain the decoded features. The reliability-guided update module aligns the spatial dimensions and channels of the shallow enhanced coding features in the decoded features and the enhanced coding features, and uses the aligned decoded features as semantic priors and the aligned shallow enhanced coding features as shallow observations; a gating graph is generated based on the semantic priors and the shallow observations; the shallow observations are cleaned using the gating graph to obtain cleaned shallow observations; and a fused feature is obtained based on the semantic priors and the cleaned shallow observations. The fused features are refined through convolution and then input into the pixel-level prediction layer to obtain the segmentation probability map of the image; based on the segmentation probability map, the image segmentation result is generated. S4. Train the image segmentation network model using the training set, and select the optimal parameters of the image segmentation network model using the validation set to obtain the optimal image segmentation network model. S5. Input the image to be segmented into the optimal image segmentation network model to obtain the image segmentation result of the image to be segmented, and complete the image segmentation.

2. The image segmentation method based on pairwise spectral context and reliability-guided updates according to claim 1, characterized in that, The steps for inputting the first n levels of the multi-scale coding features of the N multi-scale coding features into the pairwise spectral context module for enhancement, to obtain the enhanced coding features, are as follows: The paired spectral context module includes a spectral context branch and a local mixing branch; Each level of the coding features in the first n levels of multi-scale coding features is mapped to a hidden feature, and the hidden features are input into the spectral context branch and the local mixing branch respectively; The spectral context branch performs a two-dimensional real-valued fast Fourier transform on the hidden features to obtain frequency domain features; Construct a cutoff low-frequency band within the horizontal non-negative frequency range; Within the truncated low-frequency band, the spectral context branch uses complex spectral mixing weights to perform cross-channel spectral mixing on the frequency domain features to obtain mixed frequency domain features; The spectral context branch performs a two-dimensional real-valued inverse fast Fourier transform on the mixed frequency domain features to recover the spatial domain spectral context features; The local blending branch performs spatial domain local channel blending on the hidden features to obtain local blended features; The spatial domain spectral context features and the local blending features are fused in the spatial domain and then projected to obtain the spatial domain fused features. The spatial domain fusion features are residually fused with the first n-level multi-scale coding features to obtain enhanced coding features.

3. The image segmentation method based on pairwise spectral context and reliability-guided updates according to claim 2, characterized in that, The mathematical relationship satisfied by the cross-channel spectral mixing is: ; in, Represents vertical frequency index and horizontal frequency index The corresponding mixed frequency domain features, Indicates the number of hidden channels. Indicates frequency position The frequency domain coefficients, Indicates frequency position From the The input hidden channel to the first Complex spectral mixing weights for each output hidden channel, This indicates that the low-frequency band has been cut off.

4. The image segmentation method based on pairwise spectral context and reliability-guided updates according to claim 2, characterized in that, The relationship satisfied by the cut-off low-frequency band is: ; ; in, This indicates that the low-frequency band has been cut off. Represents a set of vertical frequency indices. This indicates the number of non-negative frequency positions in the horizontal direction. Indicates vertical frequency index, Indicates a horizontal frequency index. This indicates the number of non-zero frequency modes in the positive longitudinal direction. Indicates the height of the hidden feature.

5. The image segmentation method based on pairwise spectral context and reliability-guided updates according to claim 1, characterized in that... The paired spectral context module further includes a paired weight sharing mechanism, enabling the positive longitudinal non-zero frequency mode and the corresponding negative longitudinal frequency mode to share complex spectral mixing weights at the same transverse non-negative frequency position; wherein, the mathematical expression for the complex spectral mixing weights is: ; in, Indicates frequency position From the The input hidden channel to the first Complex spectral mixing weights for each output hidden channel, Indicates the height of the hidden feature. Indicates a horizontal frequency index. This indicates the number of non-negative frequency positions in the horizontal direction. Indicates vertical frequency index, This indicates the number of positive longitudinal non-zero frequency modes.

6. The image segmentation method based on pairwise spectral context and reliability-guided updates according to claim 1, characterized in that, The steps for obtaining the fused features based on the semantic prior and the purified shallow observation are as follows: Using the aforementioned semantic prior, the prior uncertainty is estimated; wherein the prior uncertainty satisfies the following relation: ; Based on the purified shallow observations and the semantic prior, the observation noise is estimated; wherein the observation noise satisfies the following relationship: ; ; in, This indicates prior uncertainty. Indicates observation noise. Indicates semantic prior, This indicates the purification of shallow observations. This represents the difference penalty mapping function. Represents the basic noise prediction function; The updated weights are determined using the observation noise and the prior uncertainty. The updated weights are used to perform reliability-guided fusion of the semantic prior and the cleaned shallow observations to obtain fused features; wherein, the expression of the fused features is: ; in, Indicates fusion features, This indicates that the weights are being updated.

7. The image segmentation method based on pairwise spectral context and reliability-guided updates according to claim 6, characterized in that, The expression for updating the weights is: ; in, This indicates an update to the weights. This indicates prior uncertainty. Indicates observation noise. This represents the Sigmoid function.

8. The image segmentation method based on pairwise spectral context and reliability-guided updates according to claim 1, characterized in that, The mathematical expression for the enhanced coding feature is: ; in, Indicates enhanced coding features, This represents multi-scale encoded features. This represents a 1×1 output projection. This represents the GELU activation function. Representing the spatial domain spectral context features, Represents a 1×1 convolution with locally mixed branches. This indicates a hidden feature.

9. The image segmentation method based on pairwise spectral context and reliability-guided updates according to claim 1, characterized in that, The encoder sequentially outputs first to fifth level coding features. The first to fourth level coding features are enhanced by the pairwise spectral context module and used as skip connection features. The fifth level coding feature is used as a bottleneck feature and input to the decoder. The decoder includes four decoding stages. In the first three decoding stages, the upsampled decoding features are concatenated and refined by convolution with the enhanced coding features of the corresponding scale. In the fourth decoding stage, the reliability-guided update module is used to fuse the upsampled decoding features and the shallow enhanced coding features.

10. An image segmentation system based on pairwise spectral context and reliability-guided update, used to implement the image segmentation method based on pairwise spectral context and reliability-guided update as described in any one of claims 1 to 9, characterized in that, include: The acquisition and preprocessing module is used to acquire the image and the pixel-level labeled mask corresponding to the image; The image and the pixel-level annotation mask are preprocessed to obtain a preprocessed image and a preprocessed pixel-level annotation mask, respectively. The dataset creation module is used to create a training set and a validation set based on the preprocessed image and the preprocessed pixel-level labeled mask. A network model construction module is used to build an image segmentation network model; wherein, the image segmentation network model includes an encoder, a decoder, and a pixel-level prediction layer; the encoder includes a pairwise spectral context module, the decoder includes a reliability-guided update module; the pixel-level prediction layer is connected to the output of the decoder; The preprocessed image is input into the encoder to obtain N multi-scale coding features; the first n levels of the multi-scale coding features of the N multi-scale coding features are input into the pairwise spectral context module for enhancement to obtain enhanced coding features; where N represents the total number of multi-scale coding features output by the encoder. The enhanced coding features and the remaining Nn-level multi-scale coding features from the N multi-scale coding features are input into the decoder. The decoder uses the enhanced coding features of the corresponding scale to perform skip fusion to obtain the decoded features. The reliability-guided update module aligns the spatial dimensions and channels of the shallow enhanced coding features in the decoded features and the enhanced coding features, and uses the aligned decoded features as semantic priors and the aligned shallow enhanced coding features as shallow observations; a gating graph is generated based on the semantic priors and the shallow observations; the shallow observations are cleaned using the gating graph to obtain cleaned shallow observations; and a fused feature is obtained based on the semantic priors and the cleaned shallow observations. The fused features are refined through convolution and then input into the pixel-level prediction layer to obtain the segmentation probability map of the image; based on the segmentation probability map, the image segmentation result is generated. An optimization module is used to train the image segmentation network model using the training set and select the optimal parameters of the image segmentation network model using the validation set to obtain the optimal image segmentation network model. The output module is used to input the image to be segmented into the optimal image segmentation network model and output the image segmentation result of the image to be segmented, thereby completing the image segmentation.