A colonoscopy polyp segmentation method based on singular spectrum and frequency domain collaborative decoupling

By employing the Singular Spectrum and Frequency Domain Cooperative Decoupling Mechanism (SSFCD), the feature matrix of colonoscopy images is decoupled in the frequency domain, solving the problem of spatial coupling between specular highlight reflection and polyp edges. This achieves high-precision, real-time polyp segmentation, making it suitable for colonoscopy-assisted diagnostic systems.

CN122391277APending Publication Date: 2026-07-14泰州学院

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
泰州学院
Filing Date
2026-04-20
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In processing colonoscopy images, existing technologies show that the specular highlights and the actual edges of polyps are highly similar in spatial scale. This inevitably damages edge fidelity when filtering out noise, resulting in imprecise boundary delineation, high false negative rates for tiny targets, and the model is prone to overfitting with small samples and has poor cross-domain generalization, making it difficult to meet the needs of real-time clinical deployment.

Method used

A singular spectrum and frequency domain collaborative decoupling mechanism (SSFCD) is adopted. The feature matrix is ​​orthogonally decoupled from the principal components and sparse details through singular value decomposition (SVD). Two-dimensional fast Fourier transform (2D-FFT) is used to target and filter out reflective noise in the frequency domain. Combined with self-supervised pre-training and partial fine-tuning strategies, a composite loss function and optimizer are used for end-to-end training to ensure edge fidelity and real-time performance.

Benefits of technology

It achieves extremely high boundary delineation accuracy and strong generalization under limited annotation conditions, reduces training overhead, and improves the recall and segmentation quality of tiny polyps, making it suitable for real-time clinical deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122391277A_ABST
    Figure CN122391277A_ABST
Patent Text Reader

Abstract

The application provides a colonoscopy polyp segmentation method based on singular spectrum and frequency domain collaborative decoupling, comprising the following steps: step 1, collecting colonoscopy image data, and performing pixel-by-pixel labeling on the polyp area to generate a binary mask; step 2, performing uniform size normalization and pixel standardization on the image and the mask, and applying data enhancement operations in the training stage; step 3, pre-training an encoder feature extraction; step 4, feature decoupling reconstruction based on singular spectrum and frequency domain collaboration; step 5, loss function and training strategy; step 6, evaluating the segmentation and identification performance, and giving the inference speed and parameter size to verify the engineering availability. An end-to-end model is constructed by combining a feature projection module and a composite loss function. Experimental results show that the application significantly improves the recall rate of the minimum target while maintaining high accuracy, has high boundary description accuracy and clinical robustness, and is suitable for real-time deployment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent medical image analysis, and in particular relates to a colonoscopy polyp segmentation method based on singular spectrum and frequency domain co-decoupling. Background Technology

[0002] Colorectal cancer is one of the most common malignant tumors worldwide, with high incidence and mortality rates. Its development typically follows a gradual process from "normal mucosa to polyp to cancer." Therefore, timely detection and treatment of colon polyps in the precancerous stage is crucial for reducing the risk of colorectal cancer. During clinical colonoscopy, doctors need to rapidly scan the intestinal mucosa in a continuous video stream and identify suspicious lesions in real time. However, the long and narrow intestinal lumen, along with peristalsis, changes in viewing angle, and lens shake, easily leads to motion blur and imaging distortion.

[0003] Meanwhile, polyps vary significantly in size, shape (flat, raised, pedunculated), color, and texture, and often coexist with interfering factors such as mucosal folds, intestinal contents residue, foam, bleeding, and specular highlights. Current deep learning segmentation models mostly enhance features in the spatial domain of images through convolution or attention mechanisms. However, clinical practice has found that specular highlight noise within the intestinal lumen and the true edge details of polyps are highly similar in the spatial scale, both manifesting as localized, drastic brightness abrupt changes. Traditional spatial gating or feature stitching methods, while suppressing highlight noise, inevitably compromise the fidelity of polyp edges, resulting in imprecise boundary delineation and a high rate of missed detection for extremely small targets. This limitation of not being able to completely decouple "noise interference" and "edge features" in the spatial domain has become a key bottleneck restricting the clinical performance of colonoscopy-assisted diagnostic systems.

[0004] In recent years, deep learning-based encoder-decoder segmentation networks have made progress in medical image segmentation tasks. However, they still face limitations in real-world clinical deployments: on the one hand, pixel-level fine annotation relies on experienced experts, resulting in high annotation costs and limited sample size, and the model is prone to overfitting with small samples; on the other hand, polyp regions typically account for a very small proportion, and class imbalance leads to a decrease in the segmentation quality of small targets. Furthermore, domain shifts caused by different devices can cause performance degradation, and some methods rely on complex multi-stage training or heavy decoding structures, which are not conducive to real-time deployment. Therefore, it is necessary to propose a polyp segmentation method that can decouple noise and edges at the underlying physical level, and still possess strong generalization, high edge fidelity, and real-time performance under limited annotation conditions. Summary of the Invention

[0005] Objective: The technical problem this invention aims to solve is to address the shortcomings of existing technologies by providing a colonoscopy polyp segmentation method based on singular spectrum and frequency domain co-decoupling. Addressing the bottleneck of existing technologies (such as traditional convolution or spatial attention mechanisms) in processing intestinal images, where specular highlights and the true edges of polyps are highly similar in the spatial scale, inevitably compromising edge fidelity during noise filtering, this invention innovatively introduces matrix orthogonal decoupling and frequency domain targeted filtering mechanisms. By purifying features at the underlying physical and mathematical levels in the frequency domain, it achieves extremely high boundary delineation accuracy, strong generalization, and real-time performance suitable for clinical deployment even under limited annotation conditions. This effectively solves the shortcomings of existing models, such as poor cross-domain generalization, missed detection of small targets, and blurred boundaries of extremely small targets.

[0006] The method includes the following steps:

[0007] Step 1, Data Acquisition and Labeling; Collect colonoscopy image data and label the polyp area pixel by pixel to generate a binary mask;

[0008] Step 2, Data Preprocessing and Augmentation: The image and mask are uniformly normalized in size and pixel standardized, and data augmentation operations are applied during the training phase;

[0009] Step 3, Pre-trained encoder feature extraction: A self-supervised pre-trained visual transformer is used as the encoder. The input image is divided into fixed-size image patches and mapped to a sequence of tokens. Multi-scale semantic features are extracted through two or more layers of Transformer blocks. A partial fine-tuning strategy is used to freeze the shallow parameters of the encoder and only update the last few layers to adapt to the medical domain.

[0010] Step 4, Feature decoupling and reconstruction based on singular spectrum and frequency domain collaboration: Singular value decomposition (SVD) is used to orthogonally decouple the matrix output by the feature extraction layer from the principal components and sparse details. Two-dimensional fast Fourier transform (2D-FFT) is then performed on the sparse details. After targeted filtering of reflective noise in the frequency domain, the inverse transform is performed back to the spatial domain for reconstruction and fusion, thus completely decoupling reflective noise and polyp edges at the physical level.

[0011] Step 5, Loss Function and Training Strategy: A composite loss function consisting of binary cross-entropy (BCE) loss and soft dice coefficient (Dice) loss is adopted, and end-to-end training is performed using the adaptive moment estimation weight decay optimizer AdamW optimizer and cosine annealing learning rate scheduling; model selection and early stopping are performed on the validation set to prevent overfitting.

[0012] Step 6, Inference, Post-processing and Evaluation: Perform forward inference on the test image to obtain a probability map, and generate a prediction mask after thresholding; evaluate the segmentation and recognition performance, and provide inference speed and parameter scale to verify engineering usability.

[0013] Step 1 includes: collecting colorectal polyp datasets at different pixel levels and resolutions, and completing pixel-level annotations through a combination of automated pre-annotation and manual refinement.

[0014] In step 1, the colorectal polyp dataset contains two or more types of colorectal polyps, and the annotation information of the dataset includes the spatial location, outline boundary, relative area and morphological features of the polyps.

[0015] In step 2, the colorectal polyp images and corresponding pixel-level masks obtained in step 1 are subjected to unified data preprocessing and data augmentation operations. First, all input images and masks are scaled according to preset sizes, and then the normalized images are subjected to pixel intensity standardization.

[0016] In step 2, the data augmentation operation includes applying random rotation, random flipping, and random scaling to the input image and mask simultaneously; at the same time, brightness, contrast, and color perturbations are applied to the image; data preprocessing and data augmentation operations are only performed during the training phase, and during the inference phase, only the input image is normalized in size and normalized in pixels.

[0017] In step 3, a self-supervised pre-trained visual transformer is used as the encoder to extract global and local semantic representations with transferability under limited annotation conditions: After inputting the normalized image output from step 2 into the encoder, it is first divided into fixed-size patches, and each patch is mapped to a token sequence and superimposed with positional encoding to obtain the initial token representation, represented as:

[0018] ,

[0019] in, Let H be the initial token, and W be the height and width of the input image, respectively. Let L represent the real number space, where L is the length of the token sequence, p is the side length of the image patch, and D is the token embedding dimension.

[0020] Subsequently, the token sequence is iteratively updated through two or more Transformer blocks to form hierarchical features from low-level texture edges to high-level lesion semantics. The forward propagation is represented as follows:

[0021] ,

[0022] in, Indicates the first Layer features, Indicates the first A Transformer block Indicates the first Layer features, B is the current layer number, and B is the number of Transformer blocks.

[0023] A partial fine-tuning strategy is adopted to freeze the shallow layer parameters of the encoder, and only update a few layers to adapt to the medical domain.

[0024] In step 4, a feature processing module based on the singular spectrum and frequency domain co-decoupling mechanism SSFCD is constructed. The feature processing module is used to: perform singular value decomposition (SVD) on the multi-scale feature matrix, and orthogonally decouple the multi-scale feature matrix into a low-rank principal component matrix representing the low-frequency basic structure of the image and a sparse detail matrix containing high-frequency abrupt signals according to the energy distribution ratio; transform the sparse detail matrix into a two-dimensional frequency domain space 2D-FFT, and attenuate the extremely high-frequency specular highlight pulse signal through an adaptive frequency domain mask, while retaining the real edge signal of the mid-to-high frequency range without loss, and then perform an inverse transform to restore it to the purified detail matrix; finally, perform linear reconstruction of the purified detail matrix and the low-rank principal component matrix.

[0025] In step 5, a composite loss function consisting of binary cross-entropy loss and soft Dice loss is used as the training objective. Represented as:

[0026] ,

[0027] Where p is the foreground probability and y is the true label. It is a binary cross-entropy loss. These are the weighting coefficients of the binary cross-entropy loss. It is the loss of soft dice coefficients. These are the soft dice coefficient loss weights; during training, the AdamW optimizer is used, and the encoder and decoder are divided into different parameter groups with differentiated learning rates.

[0028] Simultaneously, a preheated cosine annealing learning rate schedule is employed to improve convergence stability. The scaling factor is expressed as: ,

[0029] Where T is the total number of iterations. This is the number of warm-up iterations. Minimum scaling ratio It is the current iteration step. It is the first Scaling factor of the step;

[0030] Model selection is performed on the validation set, and an early stopping mechanism is adopted. When the validation metric does not improve for several consecutive rounds (e.g., 100 rounds), training is terminated and the optimal weights are saved.

[0031] In step 6, forward inference is performed on the test image to obtain the logit map, which is then mapped to a probability map using the sigmoid activation function. A prediction mask is then generated based on a threshold. The sigmoid mapping is expressed as:

[0032] ,

[0033] in, It is a pixel index. It is the first Foreground probability of each pixel, It is the first The network output log odds per pixel It is a sigmoid activation function. Output logit to the network. Let e ​​be the prospect probability, and e be the natural constant.

[0034] The present invention also provides an electronic device, including a processor and a memory, the memory storing program code that, when executed by the processor, causes the processor to perform the steps of the method.

[0035] The present invention has the following beneficial effects: (1) It uses a self-supervised pre-trained model to obtain a stronger general visual representation, which can still converge stably on small sample medical data; (2) It innovatively proposes a singular spectrum and frequency domain collaborative decoupling mechanism (SSFCD), which completely breaks the coupling between specular noise and real boundary in the spatial domain at the physical and mathematical level, greatly improving the boundary characterization accuracy and recall rate of tiny polyps; (3) It adopts a partial fine-tuning strategy to reduce training overhead and alleviate overfitting, and improves the generalization ability across datasets; (4) The frequency domain filtering calculation in the decoding structure is efficient, the overall inference efficiency is high, and it is convenient for real-time clinical engineering deployment; (5) The physical feature decoupling framework has good scalability and can be seamlessly transferred to other endoscopic lesion analysis tasks that are susceptible to reflection interference. Attached Figure Description

[0036] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.

[0037] Figure 1 This is a schematic diagram of the overall process of the method of the present invention.

[0038] Figure 2 Demonstrating the effects on different datasets.

[0039] Figure 3 The training results are from the Kvasir-SEG dataset.

[0040] Figure 4These are the training results on the CVC-ClincDB dataset.

[0041] Figure 5 These are the training results on the CVC-ColonDB dataset.

[0042] Figure 6 These are the training results on the ETIS dataset.

[0043] Figure 7 Training process for different datasets.

[0044] Figure 8 This is a bar chart comparing the segmentation metrics and overall performance of the method of this invention on four public datasets. Detailed Implementation

[0045] This invention provides a colonoscopy polyp segmentation method based on singular spectrum and frequency domain co-decoupling, such as... Figure 1 The diagram shown is an overall flowchart and network architecture diagram of the method provided in the embodiment of the present invention.

[0046] It should be noted that, in order to visually demonstrate the network structure and data flow, Figure 1 The document uses some English technical terms, and their Chinese meanings and corresponding structures in the specific implementation methods are explained below:

[0047] (a) Overall workflow: Input Image represents the input image; Path Tokenization represents image block tokenization (segmenting the image into fixed-size blocks); ViT (Vision Transformer) represents the vision transformer, and the diagram uses the DinoV2 Transformer; Blocks represent network blocks, including the second, third, and fourth levels (Level-2 / 3 / 4) of shallow and deep feature extraction; Fused feature represents fused features; MaskGeneration represents the mask generation head; Segmentation represents the final output segmentation map; Convolution represents the convolution operation; Bilinear Upsampling represents bilinear upsampling.

[0048] (b) Feature Projection Module (FPM): CLS represents the class token; Conv represents convolution; Feature Map represents the feature map; C, H, W, and D in the attached figure refer to the number of channels, height, width, and dimension of the feature, respectively.

[0049] (c) Feature fusion unit part: Concat (Concatenate) represents feature concatenation in the channel dimension; BN (Batch Normalization) represents batch normalization; ReLU represents modified linear unit activation function; Dropout represents random deactivation (used to prevent overfitting).

[0050] (d) Training Objectives and Inference Section: Training only indicates that this auxiliary branch structure is only used during the training phase and will be discarded during the inference phase; Dice and Bce represent the Dice coefficient loss and binary cross entropy loss commonly used in image segmentation, respectively; Final represents the final generated mask; These represent the main loss, auxiliary loss, and total loss, respectively.

[0051] In combination with the above Figure 1 Based on the network architecture and principles, the colonoscopy polyp segmentation method in this embodiment specifically includes the following steps:

[0052] Step 1, Data Acquisition and Labeling: Collect colonoscopy image data, and have qualified clinicians or pathologists and endoscopy experts label the polyp areas pixel by pixel to generate a binary mask;

[0053] Step 2, Data Preprocessing and Augmentation. The image and mask are normalized to a uniform size and pixel standardization. During the training phase, augmentation operations such as random rotation, flipping, scaling, and color perturbation are applied to improve robustness.

[0054] Step 3, Feature Extraction from the Pre-trained Encoder. A self-supervised pre-trained visual transformer is used as the encoder. The input image is divided into fixed-size patches and mapped to a token sequence. Multi-scale semantic features are extracted through multi-layer Transformer blocks. A partial fine-tuning strategy is used to freeze the shallow layer parameters of the encoder, updating only the last few layers to adapt to the medical domain.

[0055] Step 4: Feature decoupling and reconstruction based on singular spectrum and frequency domain collaboration. Singular value decomposition (SVD) is used to orthogonally decouple the matrix output from the feature extraction layer from the principal components and sparse details. Two-dimensional fast Fourier transform (2D-FFT) is then performed on the sparse details. After targeted filtering of reflective noise in the frequency domain, the model is inversely transformed back to the spatial domain for reconstruction and fusion, thus completely decoupling reflective noise and polyp edges at the physical level.

[0056] Step 5, Loss Function and Training Strategy. A composite loss function consisting of binary cross-entropy loss and soft Dice loss is used, and end-to-end training is performed using the AdamW optimizer and cosine annealing learning rate scheduling; model selection and early stopping are performed on the validation set to prevent overfitting;

[0057] Step 6, Inference, Post-processing, and Evaluation. Forward inference is performed on the test images to obtain a probability map, which is then thresholded to generate a prediction mask. Morphological post-processing is performed if necessary. The segmentation and recognition performance is evaluated using metrics such as average dice coefficient (mDice), average intersection-union ratio (mIoU), precision, recall, and F2 score. Inference speed and parameter scale are also provided to verify engineering usability.

[0058] The data collection in step 1 includes:

[0059] First, a dataset of colorectal polyps at different pixel levels and resolutions was collected. This dataset was acquired by a professional medical team from multiple clinical environments, covering no fewer than three endoscopic equipment models and different imaging parameter settings, and contains approximately 3000-6000 colonoscopy images or video keyframes. All data underwent rigorous quality screening and standardization, removing blurry, severely occluded, or clinically insignificant samples to ensure high imaging quality and clinical relevance for each image frame. Pixel-level annotation was completed through a combination of automated pre-annotation and manual refinement, with review by endoscopists with at least five years of experience. This ensured that 100% of the polyp regions in the dataset were accurately labeled, providing a reliable data foundation for subsequent computer-aided diagnostic research.

[0060] This dataset contains various types of colorectal polyps, including flat, raised, and pedunculated forms. Small polyps (those accounting for less than 5% of the sample area) account for at least 30% of the total, and the dataset covers different stages from early to advanced lesions, demonstrating strong sample diversity. Furthermore, the dataset's annotation information includes not only the spatial location of the polyps but also detailed contours, relative areas, and key morphological features, providing strong support for the model in small object segmentation, boundary delineation, and cross-domain generalization assessment.

[0061] In step 2, the colorectal polyp images and their corresponding pixel-level masks obtained in step 1 undergo unified data preprocessing and enhancement operations. First, all input images and masks are scale-normalized according to a preset size to eliminate resolution differences caused by different acquisition devices and imaging parameters, thereby ensuring the consistency of the input dimensions of the subsequent model. Subsequently, the normalized images are subjected to pixel intensity standardization to reduce the impact of differences in brightness and contrast distribution between different images on the stability of model training.

[0062] During the model training phase, data augmentation strategies are further introduced to enhance the model's robustness and generalization ability in complex clinical environments. These data augmentation operations include applying geometric transformations such as random rotation, random flipping, and random scaling to the input image and its mask simultaneously to simulate changes in different scope angles and viewing angles. Simultaneously, illumination enhancement operations such as brightness, contrast, and color perturbations are applied to the image to enhance the model's adaptability to different imaging conditions and noise interference. These preprocessing and enhancement operations are performed only during the training phase; during the inference phase, only size normalization and pixel standardization of the input image are performed to ensure the consistency and stability of the segmentation results.

[0063] In step 3, a self-supervised pre-trained visual transformer is used as the encoder to extract transferable global and local semantic representations under limited annotation conditions. Specifically, after inputting the normalized image output from step 2 into the encoder, it is first divided into fixed-size patches, and each patch is mapped to a token sequence and then positional encoding is superimposed to obtain the initial token representation. Its form is as follows:

[0064] ,

[0065] Where H and W are the input image dimensions, p is the patch side length, and D is the token embedding dimension. Subsequently, the token sequence is iteratively updated through multiple Transformer blocks to form hierarchical features layer by layer, from low-level texture edges to high-level lesion semantics. Its forward propagation representation is as follows:

[0066] ,

[0067] Where B represents the number of Transformer blocks. To reduce the risk of overfitting caused by full fine-tuning in small medical samples, and to retain the general visual representation of the pre-trained model, a partial fine-tuning strategy is adopted to freeze the shallow layer parameters of the encoder and only update the last few layers to adapt to the medical domain. For example, the first six shallow blocks are frozen and only the subsequent deep blocks are trained, thereby achieving a balance between generalization and adaptability.

[0068] Step 4 specifically involves constructing a feature processing module based on the Singular Spectrum and Frequency Domain Cooperative Decoupling Mechanism (SSFCD). Existing techniques, when processing polyp edges and intestinal mirror reflections, suffer from high coupling due to the drastic brightness abrupt changes in both at the spatial scale. Therefore, this step abandons traditional spatial gating methods: First, singular value decomposition (SVD) is performed on the multi-scale feature matrix, orthogonally decoupling it according to the energy distribution ratio into a low-rank principal component matrix representing the low-frequency fundamental structure of the image, and a sparse detail matrix containing high-frequency abrupt signals (edge ​​textures and specular highlights); second, the sparse detail matrix is ​​transformed into a two-dimensional frequency domain space (2D-FFT), and extremely high-frequency specular highlight pulse signals are targeted and attenuated using an adaptive frequency domain mask, while losslessly preserving mid-to-high-frequency real edge signals, followed by an inverse transform to restore the purified detail matrix; finally, the purified detail matrix and the low-rank principal component matrix are linearly reconstructed, overcoming the bottleneck of traditional attention mechanisms that easily miss real edges.

[0069] In step 5, to alleviate the class imbalance problem caused by the small foreground proportion of polyps, a composite loss function consisting of binary cross-entropy loss and soft Dice loss is used as the training objective to simultaneously constrain pixel-level classification accuracy and region overlap consistency. The composite loss is expressed as:

[0070] ,

[0071] in and The weights are preferably equal to achieve a balance constraint. During training, the AdamW optimizer is used, and the encoder and decoder are divided into different parameter groups. Differential learning rates are set to avoid corrupting pre-trained representations and to improve decoding adaptation speed; for example, the encoder learning rate is smaller while the decoder learning rate is larger.

[0072] Simultaneously, a preheated cosine annealing learning rate schedule is employed to improve convergence stability, and its scaling factor is expressed as: ,

[0073] Where T is the total number of iterations. This is the number of warm-up iterations. The minimum scaling factor is used. Furthermore, model selection is performed on the validation set, and an early stopping mechanism is employed. Training is terminated and the optimal weights are saved when the validation metric fails to improve for several consecutive rounds, thus reducing the risk of overfitting and improving engineering reproducibility.

[0074] In step 6, forward inference is performed on the test image to obtain a logit map, which is then mapped to a probability map using a Sigmoid algorithm. A prediction mask is generated based on a threshold, which can be fixed at 0.5 or adjusted as needed to meet different trade-offs between sensitivity and specificity. The Sigmoid mapping is represented as follows:

[0075] ,

[0076] in Output logit to the network. The probability is used for the foreground. When it is necessary to improve boundary smoothness or remove isolated noise, morphological post-processing can be optionally performed on the predicted mask, including opening and closing operations, connected component filtering, and hole filling, to obtain a more continuous lesion contour. For evaluation, mDice and mIoU are used as the main segmentation metrics, supplemented by recognition-related metrics such as Precision, Recall, and F2score for comprehensive evaluation. Inference speed and model parameter size are also statistically analyzed to verify engineering usability. For stability during the inference stage, test-time enhancement strategies can be optionally adopted, such as inferring the original image and the horizontally flipped image separately and then fusing the results to reduce the variance of a single inference.

[0077] In one embodiment of the present invention, a colonoscopy polyp segmentation method based on singular spectrum and frequency domain co-decoupling is disclosed, comprising the following steps:

[0078] Step 1: Collect colorectal polyp image data acquired during colonoscopy. The data can originate from multiple clinical environments and different models of endoscopic equipment, covering varying imaging parameter settings and complex intestinal backgrounds. To ensure data quality, the original images are screened, removing samples with severe blurring, occlusion, overexposure, or insufficient clinical interpretation value. Subsequently, a physician experienced in colonoscopy diagnosis performs pixel-level annotation on the polyp regions in the images, obtaining a mask corresponding to each frame, which is used for subsequent model training, validation, and testing.

[0079] Step 2: Perform uniform size normalization and pixel standardization on the image and mask obtained in Step 1. Preferably, the image and mask are scaled to a uniform resolution, such as 448×448, to eliminate differences in acquisition scale between different devices and meet network input requirements. Pixel standardization is performed on the input image, preferably using the mean vector method. with standard deviation vector The normalization expression is as follows:

[0080] ,

[0081] Data augmentation is introduced during the training phase to improve model robustness. Augmentation operations include random rotation, random flipping, random scaling, and perturbations of brightness, contrast, and color. Geometric augmentation operations are applied simultaneously to the image and mask to maintain pixel-level label consistency; illumination augmentation is applied only to the image. To ensure label consistency, the mask is binarized after loading.

[0082] Step 3: Use a self-supervised pre-trained visual transformer as an encoder to divide the input image into fixed-size non-overlapping patches, such as 14×14, and map them to a token sequence; the encoder consists of 12 stacked Transformer blocks, which are used to extract multi-scale features from low-level texture to high-level semantics layer by layer.

[0083] To reduce the risk of overfitting caused by end-to-end training on small sample medical data, a partial fine-tuning strategy was adopted. The first 6 shallow blocks (Block 0 to Block 5) were frozen, and only the last 6 deep blocks (Block 6 to Block 11) were trained and updated. This allowed the model to adapt to the appearance features of the colonoscopy domain while reusing general visual representations.

[0084] Step 4: Orthogonal decoupling of the eigenma based on Singular Value Decomposition (SVD);

[0085] 4.1 Orthogonal decoupling of eigenma matrices based on Singular Value Decomposition (SVD);

[0086] The multi-scale feature map output by the encoder is reshaped into a two-dimensional feature matrix. And perform singular value decomposition on it:

[0087] ,

[0088] in, For containing singular values The diagonal matrix. Based on the singular value energy distribution, a preset energy scaling factor is used. (Preferably 0.1), the feature matrix Orthogonal decoupling into low-rank principal component matrices With sparse detail matrix :

[0089] Low-rank principal component matrix From the past Reconstructing a larger singular value The structure represents the low-frequency basic structure of the image, namely the main outline of the polyp and the smooth background of the intestine;

[0090] Sparse detail matrix : Reconstructed from the remaining smaller singular values, it contains high-frequency abrupt signals, namely the tiny edge texture of the polyp and specular highlight reflection noise.

[0091] 4.2, Two-dimensional frequency domain targeted filtering for sparse detail matrices;

[0092] To address the highly coupled edges and noise in the spatial domain, a frequency domain processing mechanism is introduced. Purification:

[0093] Frequency domain conversion: for Perform a two-dimensional fast Fourier transform (2D-FFT) to convert it to the frequency domain. :

[0094] ,

[0095] Spectrum centering and filtering: Perform a spectrum shift operation (fftshift) to move low-frequency components to the center. Construct an adaptive frequency-domain high-frequency suppression mask. The high-frequency noise distribution pattern is adaptively learned through backpropagation. Using this mask, the spectrum is multiplied element-wise to target and attenuate the extremely high-frequency pulse signal representing specular highlights, while preserving the mid-to-high-frequency signals representing the texture of the polyp edges.

[0096] ,

[0097] Inverse Transform Restoration: Perform inverse shift and two-dimensional inverse Fourier transform (2D-IFFT) on the filtered spectrum to return to the spatial domain and obtain the purified detail matrix. :

[0098] ,

[0099] 4.3, Cooperative Orthogonal Reconstruction and Feature Output;

[0100] The purified detail matrix (no glare, sharp edges) is reconstructed by linear aggregation with the low-rank principal component matrix (complete structure):

[0101] ,

[0102] Reconstructed feature map It balances the global semantic structure of the polyp with extremely high-fidelity boundary details. Finally, features are refined through convolutional blocks containing normalization and activation functions, outputting robust feature representations for final segmentation and decoding.

[0103] Step 5: A weighted combination of binary cross-entropy loss and Dice loss is used to simultaneously constrain pixel-level classification accuracy and region overlap consistency, thereby alleviating the class imbalance problem caused by the small proportion of polyp regions. Here, the network output logits is denoted as... The probability graph is obtained by sigmoid. The total loss for a single image can be expressed as:

[0104] ,

[0105] The optimizer uses AdamW and divides the parameters into two sets: those for the encoder's trainable layers and those for the decoder, setting different learning rates, such as the encoder learning rate. Decoder learning rate We also set a weight decay of 0.01 to improve training stability and generalization ability.

[0106] The learning rate scheduling employs a cosine annealing strategy with linear warm-up; during training, a validation set is used for model selection and early stopping, and the validation selection score can be defined as the average of Dice and IoU to improve the stability of checkpoint ranking.

[0107] ,

[0108] Meanwhile, to ensure reproducibility, a fixed random seed can be used and nondeterministic computation kernels can be turned off as much as possible.

[0109] Step 6: Perform forward inference on the test image to obtain a segmentation probability map, and then threshold it to obtain a prediction mask. If necessary, morphological post-processing can be performed to remove isolated noise and improve boundary continuity. To reduce prediction variance, a simplified test-time enhancement strategy can be used during testing, averaging the logits of the original image and its horizontally flipped image, and then applying a sigmoid function to obtain the final probability map.

[0110] To enhance the illustrativeness and support of the method of this invention, this embodiment was validated on four publicly available colonoscopy polyp segmentation datasets, including Kvasir-SEG, CVC-ClinicDB, CVC-ColonDB, and ETIS-LaribPolypDB, and divided into 80% training, 10% validation, and 10% testing datasets.

[0111] Under the above settings, the segmentation performance was evaluated using metrics such as mIoU, and the results are as follows: Figure 3 , Figure 4 , Figure 5 and Figure 6 As shown: The mIoU reaches approximately 0.922 on the CVC-ClinicDB dataset; approximately 0.880 on the Kvasir-SEG dataset; approximately 0.871 on the CVC-ColonDB dataset; and approximately 0.875 on the ETIS-LaribPolypDB dataset. To further demonstrate the effectiveness of the method of this invention, as... Figure 8 As shown, this invention provides a visual comparison of the average dice coefficient (mDice), average intersection-over-union ratio (mIoU), and overall performance across four datasets. It can be seen that the model maintains a high level of segmentation accuracy across different datasets, and the overall scores remain at a high level, further demonstrating its strong cross-domain generalization ability and robustness. Figure 2 As shown, the method of this invention can achieve high-precision polyp boundary segmentation on different datasets; for example... Figure 7As shown, the model's loss decreases steadily during training on each dataset, demonstrating good convergence.

[0112] Furthermore, the mIoU across the four datasets generally falls within the range of 0.871 to 0.922, indicating that the method exhibits a certain degree of stability under different imaging conditions and datasets of varying difficulty. The above are merely preferred embodiments of the present invention. Those skilled in the art can make various modifications or equivalent substitutions without departing from the spirit and scope of the present invention, and all such modifications or substitutions should fall within the protection scope of the present invention.

[0113] This invention provides a colonoscopy polyp segmentation method based on singular spectrum and frequency domain co-decoupling. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment of the invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.

Claims

1. A colonoscopy polyp segmentation method based on singular spectrum and frequency domain co-decoupling, characterized in that, Includes the following steps: Step 1, Data Acquisition and Labeling; Collect colonoscopy image data and label the polyp area pixel by pixel to generate a binary mask; Step 2, Data Preprocessing and Augmentation: The image and mask are uniformly normalized in size and pixel standardized, and data augmentation operations are applied during the training phase; Step 3, Pre-trained encoder feature extraction: A self-supervised pre-trained visual transformer is used as the encoder to divide the input image into fixed-size image patches and map them to a sequence of tokens. Multi-scale semantic features are extracted through two or more layers of Transformer blocks. Step 4, Feature decoupling and reconstruction based on singular spectrum and frequency domain collaboration: Singular value decomposition (SVD) is used to orthogonally decouple the matrix output by the feature extraction layer from the principal components and sparse details. Two-dimensional fast Fourier transform (2D-FFT) is then performed on the sparse details. After targeted filtering of reflective noise in the frequency domain, the inverse transform is performed back to the spatial domain for reconstruction and fusion, thus completely decoupling reflective noise and polyp edges at the physical level. Step 5, Loss Function and Training Strategy: A composite loss function consisting of binary cross-entropy (BCE) loss and soft dice coefficient (Dice) loss is adopted, and end-to-end training is performed using the adaptive moment estimation weight decay optimizer AdamW optimizer and cosine annealing learning rate scheduling; model selection and early stopping are performed on the validation set to prevent overfitting. Step 6, Reasoning, Post-processing and Evaluation: Forward reasoning is performed on the test image to obtain a probability map, which is then thresholded to generate a prediction mask; Evaluate segmentation and recognition performance, and provide inference speed and parameter size to verify engineering usability.

2. The method according to claim 1, characterized in that, Step 1 includes: collecting colorectal polyp datasets at different pixel levels and resolutions, and completing pixel-level annotation.

3. The method according to claim 2, characterized in that, In step 1, the colorectal polyp dataset contains two or more types of colorectal polyps, and the annotation information of the dataset includes the spatial location, outline boundary, relative area and morphological features of the polyps.

4. The method according to claim 3, characterized in that, In step 2, the colorectal polyp images and corresponding pixel-level masks obtained in step 1 are subjected to unified data preprocessing and data augmentation operations. First, all input images and masks are scaled according to preset sizes, and then the normalized images are subjected to pixel intensity standardization.

5. The method according to claim 4, characterized in that, In step 2, the data augmentation operation includes simultaneously applying random rotation, random flipping, and random scaling to the input image and mask; at the same time, applying brightness, contrast, and color perturbations to the image; Data preprocessing and data augmentation operations are performed only during the training phase; during the inference phase, only the input image is normalized in size and pixel normalized.

6. The method according to claim 5, characterized in that, In step 3, a self-supervised pre-trained visual transformer is used as the encoder to extract global and local semantic representations with transferability under limited annotation conditions: After inputting the normalized image output from step 2 into the encoder, it is first divided into fixed-size patches, and each patch is mapped to a token sequence and superimposed with positional encoding to obtain the initial token representation, represented as: , in, Let H be the initial token, and W be the height and width of the input image, respectively. Let L represent the real number space, where L is the length of the token sequence, p is the side length of the image patch, and D is the token embedding dimension. Subsequently, the token sequence is iteratively updated through two or more Transformer blocks to form hierarchical features from low-level texture edges to high-level lesion semantics. The forward propagation is represented as follows: , in, Indicates the first Layer features, Indicates the first A Transformer block Indicates the first Layer features, B is the current layer number, and B is the number of Transformer blocks.

7. The method according to claim 6, characterized in that, In step 4, a feature processing module based on the singular spectrum and frequency domain co-decoupling mechanism SSFCD is constructed. The feature processing module is used to: perform singular value decomposition (SVD) on the multi-scale feature matrix, and orthogonally decouple the multi-scale feature matrix into a low-rank principal component matrix representing the low-frequency basic structure of the image, and a sparse detail matrix containing high-frequency abrupt signals according to the energy distribution ratio. The sparse detail matrix is ​​transformed to a two-dimensional frequency domain 2D-FFT. The extremely high-frequency specular highlight pulse signal is attenuated by an adaptive frequency domain mask, while the real edge signal of the mid-to-high frequency range is preserved without loss. Then, the inverse transform is used to restore the purified detail matrix. Finally, the purified detail matrix and the low-rank principal component matrix are linearly reconstructed.

8. The method according to claim 7, characterized in that, In step 5, a composite loss function consisting of binary cross-entropy loss and soft Dice loss is used as the training objective. Represented as: , Where p is the foreground probability and y is the true label. It is a binary cross-entropy loss. These are the weighting coefficients of the binary cross-entropy loss. It is the loss of soft dice coefficients. These are the soft dice coefficient loss weights; during training, the AdamW optimizer is used, and the encoder and decoder are divided into different parameter groups with differentiated learning rates. Simultaneously, a preheated cosine annealing learning rate schedule is employed to improve convergence stability. The scaling factor is expressed as: , Where T is the total number of iterations. This is the number of warm-up iterations. Minimum scaling ratio It is the current iteration step. It is the first Scaling factor of the step; Model selection is performed on the validation set, and an early stopping mechanism is adopted. When the validation metric does not improve for several consecutive rounds, training is terminated and the optimal weights are saved.

9. The method according to claim 8, characterized in that, In step 6, forward inference is performed on the test image to obtain the logit map, which is then mapped to a probability map using the sigmoid activation function. A prediction mask is then generated based on a threshold. The sigmoid mapping is expressed as: , in, It is a pixel index. It is the first Foreground probability of each pixel, It is the first The network output log odds per pixel It is a sigmoid activation function. Output logit to the network. Let e ​​be the prospect probability, and e be the natural constant.

10. An electronic device, characterized in that, It includes a processor and a memory, the memory storing program code that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 9.