Colorectal cancer pathological image segmentation method and device based on frequency domain characteristics and readable storage medium thereof

By improving the TransUnet model, combining the multi-scale frequency reconstruction module, F-Ctrans jump connection and attention aggregation module, and fusing frequency domain and spatial domain features, the problems of insufficient boundary detail recovery and poor multi-scale feature fusion effect in colorectal cancer pathology image segmentation are solved, and high-precision and strong generalization ability of pathology image segmentation are achieved.

CN120635104AActive Publication Date: 2025-09-12CHINA JILIANG UNIV

Patent Information

Application Number
CN202511120623.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-12
Publication Date
2025-09-12
Estimated Expiration
2045-08-12

AI Technical Summary

Technical Problem

Existing technologies in colorectal cancer pathology image segmentation have problems such as insufficient boundary detail recovery and poor multi-scale feature fusion effect, and are limited to single spatial domain or frequency domain feature extraction. They lack a comprehensive framework that can simultaneously improve segmentation accuracy, generalization ability and processing efficiency.

Method used

By improving the TransUnet model, introducing the multi-scale frequency reconstruction module (MFRM), F-Ctrans skip connection and attention aggregation module (AAM), the frequency domain and spatial domain features are integrated to achieve high-precision segmentation of colorectal cancer pathological images.

Benefits of technology

It significantly improves segmentation accuracy, optimizes the ability to restore boundary details, enhances the generalization ability and processing efficiency of the model, and adapts to segmentation tasks of different types of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120635104A_ABST
    Figure CN120635104A_ABST
Patent Text Reader

Abstract

The invention provides a colorectal cancer pathological image segmentation method and device based on frequency domain features and a readable storage medium thereof, and provides an improved TransUnet model for solving the problems that an existing model is insufficient in boundary detail recovery, poor in multi-scale feature fusion effect and limited in generalization ability in colorectal cancer pathological image segmentation. A multi-scale frequency reconstruction module (MFRM) is introduced to extract high and low frequency features of an image, an attention aggregation module (AAM) is combined to fuse frequency domain and spatial domain features, F-Ctrans jump connection is adopted to optimize feature transfer, and finally a high-precision segmentation result is output through a decoder. Experiments show that the method is superior to an existing model in Dice, IoU, HD95 and other indexes, the segmentation precision and the boundary detail recovery capability are remarkably improved, and the generalization capability is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image processing, and in particular to a method and device for colorectal cancer pathology image segmentation based on frequency domain features and a readable storage medium thereof. Background Art

[0002] Colorectal adenocarcinoma is a common malignancy, and early diagnosis is crucial for improving patient prognosis. As the core basis for imaging-assisted diagnosis, accurate analysis of pathological images is key to achieving early diagnosis. Traditional pathological image analysis relies on physician experience and visual observation, which is significantly influenced by subjective factors. This results in instability and inaccuracy in diagnostic results. Furthermore, manual inspection is inefficient when processing large amounts of imaging data, making missed diagnoses and misdiagnoses more likely. This is particularly true for accurate segmentation of tumor regions and identification of complex edges, which present significant limitations.

[0003] With the development of artificial intelligence and deep learning technologies, convolutional neural networks (CNNs) and Transformer techniques have been widely used in medical image analysis, significantly improving automation and intelligence. The existing TransUnet model, which combines the strengths of CNNs and Transformers, has made progress in medical image segmentation tasks, but it still has drawbacks: segmentation accuracy and detail recovery are insufficient when processing tumor boundaries, and the processing of complex edge regions is inferior to manual segmentation. Existing improvement schemes are mostly limited to feature extraction in a single spatial or frequency domain, failing to achieve efficient fusion of multi-domain features.

[0004] Currently, there is no comprehensive, automated deep learning framework that can effectively improve the accuracy of colorectal cancer pathology image segmentation while also ensuring model generalization and processing efficiency. Therefore, an improved technical solution is urgently needed to address issues such as blurred boundaries and insufficient multi-scale feature fusion, thereby meeting the clinical demand for high-precision pathology image segmentation. Summary of the Invention

[0005] The embodiments of the present invention provide a method, device, and readable storage medium for colorectal cancer pathology image segmentation based on frequency domain features. These methods address the problems of existing technologies (such as TransUnet and related improvement solutions) in colorectal cancer pathology image segmentation, such as insufficient boundary detail recovery, poor multi-scale feature fusion effect, limitation to single spatial domain or frequency domain feature extraction, and lack of a comprehensive framework that can simultaneously improve segmentation accuracy, generalization capability, and processing efficiency.

[0006] The core technology of this invention is mainly to achieve high-precision segmentation of colorectal cancer pathology images by improving the TransUnet model (FD-TransUnet), introducing the Multiscale Frequency Reconstruction Module (MFRM), F-Ctrans jump connection and Adaptive Attention Mechanism (AAM), and fusing frequency domain and spatial domain features, especially improving the ability to restore boundary details and fuse multi-scale features.

[0007] In a first aspect, the present invention provides a method for colorectal cancer pathology image segmentation based on frequency domain features, the method comprising the following steps: Step 1: Obtain the original input image of colorectal cancer pathology and process it through the multi-scale frequency reconstruction module to extract high-frequency and low-frequency components in the frequency domain. The high-frequency components correspond to the details and edge information of the image, while the low-frequency components correspond to the overall contour information of the image. Step 2: The encoder extracts spatial features from the original input image. The encoder combines a convolutional neural network and a Vision Transformer (VIT) to output spatial features that contain the global context information of the image. Step 3: The frequency features output from step 1 and the spatial features output from step 2 are fused through the attention aggregation module. The fusion process includes channel splicing, 1×1 convolution processing and height-width attention mechanism weighting to obtain the fused features. Step 4: The encoder output features and fused features are transferred through the F-Ctrans jump connection. The transfer process includes Fourier transform to convert the features to the frequency domain, learnable filter weighting, inverse Fourier transform back to the spatiotemporal domain, and residual connection to optimize the feature expression. Step 5: The decoder processes the features transferred via the F-Ctrans jump connection. The decoder uses an upsampling operator to restore spatial information and adaptively adjusts channel features through the SE (Squeeze-and-Excitation) layer to output the segmentation results of colorectal cancer pathology images.

[0008] Furthermore, in step 1, the processing of the multi-scale frequency reconstruction module includes: The original input image is divided into blocks, and the frequency features of each image block are extracted by two-dimensional discrete cosine transform. The frequency features are recombined to obtain a frequency feature map containing high-frequency components and low-frequency components.

[0009] Furthermore, in step 3, the height-width attention mechanism includes: performing global pooling along the height direction and width direction respectively, calculating the channel attention weights in the two directions, and multiplying the attention weights back to the fused features after 1×1 convolution processing to enhance key features and suppress redundant information.

[0010] Furthermore, in step 4, the processing of the F-Ctrans jump connection also includes: channel fusion, flattening and position encoding of the input features, processing by a multi-layer perceptron and then performing Fourier transform, and after the frequency features and spatial features are interactively fused, the original feature dimension is restored through the feature reconstruction module.

[0011] Furthermore, in step 5, the decoder uses the Dysample upsampling operator to recover spatial information, and the SE layer adaptively adjusts the weight of each channel feature by squeezing and excitation operations on the channel features.

[0012] In a second aspect, the present invention provides a colorectal cancer pathology image segmentation device based on frequency domain features, comprising: An input module, used to obtain original input images of colorectal cancer pathology; The multi-scale frequency reconstruction module is used to process the original input image and extract the high-frequency and low-frequency components in the frequency domain. The high-frequency components correspond to the details and edge information of the image, while the low-frequency components correspond to the overall contour information of the image. The encoder module is used to extract spatial features from the original input image. The encoder module combines convolutional neural networks and Vision Transformer (VIT) to output spatial features containing global context information; The attention aggregation module is used to fuse the frequency features output by the multi-scale frequency reconstruction module and the spatial features output by the encoder module. The fusion process includes channel splicing, 1×1 convolution processing and height-width attention mechanism weighting to obtain fused features; The F-Ctrans jump connection module is used to transfer the features and fused features output by the encoder module. The transfer process includes Fourier transform to convert the features to the frequency domain, learnable filter weighting, inverse Fourier transform back to the spatiotemporal domain, and residual connection to optimize feature expression; The decoder module is used to process the features transmitted by the F-Ctrans jump connection module, restore the spatial information using the upsampling operator, and adaptively adjust the channel features through the SE (Squeeze-and-Excitation) layer to output the segmentation results of colorectal cancer pathology images.

[0013] Furthermore, the multi-scale frequency reconstruction module includes: A block division unit, used for performing block processing on the original input image; DCT processing unit, used to extract frequency features of each image block through two-dimensional discrete cosine transform; a recombining unit, configured to recombine the frequency characteristics output by the DCT processing unit to obtain a frequency characteristic graph containing high-frequency components and low-frequency components; The attention aggregation module includes: A channel splicing unit is used to perform channel dimension splicing on frequency features and spatial features; Convolutional fusion unit, used to extract and fuse information from the concatenated features through a 1×1 convolutional layer; The attention weighting unit is used to adopt the height-width attention mechanism, perform global pooling along the height and width directions, calculate the channel attention weights, and multiply the weights back to the fused features to enhance key information.

[0014] Furthermore, the F-Ctrans skip connection module includes: The preliminary processing unit is used to perform channel fusion, flattening and position encoding on the input features; The frequency domain enhancement unit is used to convert features into the frequency domain through a multi-layer perceptron and Fourier transform, weight the selected frequency patterns using a learnable filter, and then convert them back to the spatiotemporal domain through an inverse Fourier transform; The fusion optimization unit is used to interactively fuse the frequency domain enhanced features with the spatial features, and optimize the feature expression by combining residual connection and multi-layer perceptron; A feature reconstruction unit is used to restore the original feature dimension through reconstruction operation and generate output features; The decoder module includes: An upsampling unit, used to restore spatial information using a Dysample upsampling operator; SE processing unit, used to adaptively adjust the weights of channel features through SE layer operations; The output unit is used to output the segmentation result of the colorectal cancer pathology image based on the processed features.

[0015] In a third aspect, the present invention provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the above-mentioned colorectal cancer pathology image segmentation method based on frequency domain features.

[0016] In a fourth aspect, the present invention provides a readable storage medium, in which a computer program is stored. The computer program includes a program code for controlling a process to execute a process, and the process includes the above-mentioned colorectal cancer pathology image segmentation method based on frequency domain features.

[0017] The main contributions and innovations of the present invention are as follows: 1. Significantly improve segmentation accuracy: The Multi-Scale Frequency Reconstruction Module (MFRM) extracts high- and low-frequency features in the frequency domain, and the Attention Aggregation Module (AAM) fuses frequency and spatial domain features. This model outperforms existing models (such as TransUnet) in metrics such as the Dice coefficient and Intersection over Union (IoU), resulting in better overall segmentation results.

[0018] 2. Optimizing boundary detail recovery: F-Ctrans jump connections enhance the utilization of frequency domain information in feature transfer. Combined with the ability of high-frequency components in the frequency domain to capture details and edges, the HD95 index is significantly reduced, and boundary segmentation is closer to the actual boundary, effectively solving the segmentation problem of complex edges and blurred areas.

[0019] 3. Enhanced model generalization: Through cross-domain (spatial domain + frequency domain) feature fusion and multi-module collaborative design, it achieves stable performance on different datasets such as Glas and CRAG, overcoming the limitations of single-domain feature extraction and adapting to segmentation tasks of different types of data.

[0020] 4. Improve processing efficiency and automation level: The constructed integrated deep learning framework realizes the automated processing of pathological image segmentation, reduces dependence on manual intervention, improves processing efficiency while taking into account accuracy, and is more suitable for large-scale clinical image analysis scenarios.

[0021] The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below so that other features, objects, and advantages of the invention are more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings: Figure 1 is a structural diagram of an overall model according to an embodiment of the present invention; Figure 2 This is a core flow chart of the collaborative processing of the multi-scale frequency reconstruction module (MFRM) and the CNN encoder according to an embodiment of the present invention; Figure 3 is a diagram of an image processing process of a multi-scale frequency reconstruction module according to an embodiment of the present invention; Figure 4 is a structural diagram of an AAM aggregation module according to an embodiment of the present invention; Figure 5 is a diagram of an F-Ctrans jump connection structure according to an embodiment of the present invention; Figure 6 2. This is a diagram of the F-Ctrans channel cross attention structure according to an embodiment of the present invention; Figure 7is a diagram of an MLP structure according to an embodiment of the present invention; Figure 8 FD-TransUnet prediction results and original image (a) according to an embodiment of the present invention; Figure 9 FIG. 4 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The implementations described in the following exemplary embodiments are not intended to represent all implementations consistent with one or more embodiments of this specification. Rather, they are merely examples of apparatuses and methods consistent with certain aspects of one or more embodiments of this specification, as detailed in the appended claims.

[0024] It should be noted that in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the method may include more or fewer steps than those described in this specification. In addition, a single step described in this specification may be broken down into multiple steps for description in other embodiments, and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0025] Existing technologies (such as TransUnet and related improved solutions) in colorectal cancer pathology image segmentation have problems such as insufficient boundary detail recovery and poor multi-scale feature fusion effect. They are limited to single spatial domain or frequency domain feature extraction and lack a comprehensive framework that can simultaneously improve segmentation accuracy, generalization ability and processing efficiency.

[0026] Based on this, the present invention improves the TransUnet model to solve the problems existing in the prior art.

[0027] Example 1 This method extracts high-frequency and low-frequency components from pathological images from a frequency domain perspective. High-frequency components correspond to image details, edges, and pixels, while low-frequency components correspond to the overall image contours. Frequency features are extracted from the original input image using a multiscale frequency reconstruction module (MFRM). These features are then fused with the spatial features output by the Vision Transformer (VIT) encoder using an adaptive attention mechanism (AAM). The FCtrans skip connection is introduced as a skip connection. Its core concept is to first convert the input sequence features from the time domain to the frequency domain using a Fourier transform (FFT) before applying the attention mechanism. In the frequency domain, selected frequency patterns are weighted using a learnable filter, filtering out components at specific frequencies to extract more representative features. Subsequently, the frequency domain features are converted back to the spatiotemporal domain using an inverse Fourier transform (IFFT), restoring the format consistent with the original time domain sequence. The output of this process is connected layer by layer to the residual of the original input features, thereby enhancing the network's ability to learn frequency domain patterns while preserving the original feature information, improving the feature expression capability and model performance. This method effectively solves the problem of rough segmentation results and unclear edges caused by pure Transformer models in segmentation tasks.

[0028] Specifically, the embodiment of the present invention provides a colorectal cancer pathology image segmentation method based on frequency domain features. Specifically, referring to Figure 1 The structure of the overall model of the present invention, the segmentation method based on the model includes the following steps: Step 1: Obtain the original input image of colorectal cancer pathology and process it using the Multiscale Frequency Reconstruction Module (MFRM) to extract high-frequency components and low-frequency components in the frequency domain. The high-frequency components correspond to image details and edge information, while the low-frequency components correspond to the overall contour information of the image. like Figure 1 In the paper, the model takes colorectal cancer pathological images as input and achieves high-precision segmentation through four stages: "frequency feature extraction (MFRM) → spatial feature encoding (CNN+ViT) → cross-domain fusion (AAM+F-Ctrans) → segmentation and decoding".

[0029] like Figure 2 As shown in the figure, the core process of the collaborative processing of the multi-scale frequency reconstruction module (MFRM) and the CNN encoder of the present invention is shown. The specific analysis is as follows: 1) Input layer: The left side shows a colorectal cancer pathology image (such as a grayscale pathology slice, containing structures such as glands and cells, which is the original input for the segmentation task).

[0030] 2) Image segmentation (orange module "image segmentation"): It is not the "segmentation result output" in the traditional sense, but a preprocessing block operation - cutting the large-size pathological image into several small image blocks (such as sub-images of fixed size). The purpose is to reduce the complexity of DCT calculation, while adapting to the input dimension of the subsequent model and realizing multi-scale frequency analysis (different blocks can correspond to different frequency resolutions).

[0031] 3) DCT module (green "DCT"): Perform a two-dimensional discrete cosine transform (DCT) on each image block to convert the spatial domain image into frequency domain features: Low-frequency components: concentrate on the “global contour” of the image (such as the overall shape of the tumor area), corresponding to the upper left corner of the DCT coefficient matrix; High-frequency components: depict "details and edges" (such as tumor boundaries and cell textures), corresponding to the lower right corner of the DCT coefficient matrix.

[0032] This step is the core of frequency domain feature extraction, providing information of the "detail-contour" dimension for the subsequent fusion of spatial domain features.

[0033] 4) CNN sub-network (gray feature map on the right): The frequency features processed by DCT are input into the convolutional neural network (CNN) for spatial domain feature enhancement: The feature map dimension (e.g., 64×18×18, 64×9×9, etc.) represents the number of channels × spatial size. Through downsampling in the convolutional layer (reducing the spatial size and increasing the number of channels), multi-scale spatial features are gradually extracted (small-size feature maps correspond to global information, and large-size feature maps correspond to local details); This CNN is the front-end module of the encoder, and works with the subsequent Vision Transformer (ViT) to complete the complementary extraction of "local-global" spatial features.

[0034] In this embodiment, if Figure 3 As shown, MFRM extracts frequency features through discrete cosine transform (DCT), processes them in conjunction with CNN, and adjusts the output. To overcome the limitations of single-domain analysis, the overall model of this invention introduces frequency domain information. The frequency domain describes the overall structure and rate of change of the image. The extracted high-frequency components correspond to the details, edges, and texels of the image, while the low-frequency components correspond to the overall contours and slow changes of the image. The specific steps are as follows: 1) Input image; 2) The input image is divided into blocks, and each block is processed using a two-dimensional discrete cosine transform (DCT) to extract frequency features. These features help capture the frequency information of the image, including high-frequency details and overall low-frequency structure. 3) After DCT processing, the obtained frequency features are reorganized and further processed. At this time, the frequency information in the image is rearranged, allowing the model to better analyze and utilize the frequency features; 4) Output frequency feature map to provide support for subsequent segmentation.

[0035] Among them, the DCT two-dimensional discrete cosine transform formula is as follows: Given an N×M (usually M equals N, where N represents the horizontal length) input matrix F, its discrete cosine transform result G can be calculated using the following formula:

[0036]

[0037] Among them, the spatial domain matrix is the pixel in the original image Gray value at ; is the element in the coefficient matrix after transformation, indicating the weight of different frequency components, u, v are the frequency coordinates, corresponding to the frequency components in the horizontal / vertical direction. is the orthogonal normalization coefficient, when hour, ,otherwise .

[0038] Step 2: The encoder extracts spatial features from the original input image. The encoder combines a convolutional neural network (CNN) and a vision transformer (VIT) to output spatial features. The spatial features contain the global context information of the image. In this embodiment, CNN performs “layer-by-layer abstraction” on the input image through operations such as convolution, pooling, and activation: Shallow layers (such as the first 2-3 layers): capture fine-grained spatial details (such as cell edges, texture mutations, and small-scale structures), corresponding to local features such as "tumor boundary wrinkles" and "disordered cell arrangement" in pathological images; Deep layer (such as the last 2~3 layers): aggregates local features to form high-level semantic representations (such as the overall outline of the tumor area and tissue type distinction), corresponding to the macroscopic structural differences of "tumor area vs. normal gland".

[0039] ViT divides the feature map output by CNN into token sequences (or directly processes the feature map) and models long-range spatial associations through multi-head self-attention: Self-attention calculates the association weights of different spatial positions: If there is a semantic association between the "tumor edge area" and the "distant background tissue" in the pathology image (such as morphological similarity and distribution pattern), ViT will assign a high weight, thereby modeling the global contextual relationship (such as the spatial distribution of the tumor in the entire image and its positional association with normal glands).

[0040] In this way, through CNN's multi-scale spatial feature extraction and ViT's global context modeling, the subsequent cross-domain feature fusion (AAM module) and segmentation decoding are provided with "precise details and complete semantics" spatial domain basic features, which is the core support for achieving high-precision segmentation of colorectal cancer pathology images.

[0041] Step 3: The frequency features output from step 1 and the spatial features output from step 2 are fused through the attention aggregation module (AAM). The fusion process includes channel splicing, 1×1 convolution processing, and height-width attention mechanism weighting to obtain the fused features. In this embodiment, if Figure 4 As shown in the figure, the feature maps from the spatial and frequency domains are first concatenated along the channel dimension. Subsequently, a 1x1 convolutional layer is used to extract and fuse the concatenated features. The AAM module uses a height-width attention mechanism, performing global pooling in both the height and width directions, calculating channel attention weights along these two dimensions, and finally multiplying these attention weights back onto the fused feature map to extract key information. This mechanism learns parameters based on the spatial distribution of features and their distribution in the frequency domain, enhancing key features and suppressing redundant information, thereby improving the quality of the merged features.

[0042] Step 4: The encoder output features and fused features are transferred through the F-Ctrans jump connection. The transfer process includes Fourier transform (FFT) to convert the features to the frequency domain, learnable filter weighting, inverse Fourier transform (IFFT) back to the spatiotemporal domain, and residual connection to optimize feature expression. In this embodiment, if Figure 5 As shown in the figure, the input image undergoes convolution, flattening, and position encoding through the channel fusion module to obtain a preliminary feature representation. Next, it undergoes processing using an MLP (Multi-Layer Perceptron) and Fourier Transform (FFT) to generate frequency-enhanced features. Selected frequency patterns are weighted using a learnable filter before being converted back to the spatiotemporal domain using an inverse Fourier Transform (IFFT). Frequency and spatial features are then interactively fused, and residual connections and MLP are combined to further optimize the feature representation. The subsequent feature reconstruction module restores the original features through reconstruction to generate the final output. During this process, skip connections are used to enhance the model's ability to recover detail and ensure the efficient fusion of spatial and frequency features.

[0043] The FFT formula is as follows:

[0044] in is a time domain function; is its frequency domain representation, and the integral covers all time ranges ; is the angular frequency (unit: rad / s, describes the “speed” of the signal oscillation, corresponding to the “frequency characteristics” of the image: high frequency → edge / detail, low frequency → outline / global); is a complex exponential basis function (given by Euler's formula , which means "the frequency is sine and cosine components”). Essentially a time domain signal to frequency domain signal The mapping is called the continuous-time Fourier transform (CTFT).

[0045] The IFFT formula is as follows:

[0046] Among them, the normalization factor Ensure energy conservation (forward transformation does not have this factor, inverse transformation supplements it, so This formula realizes the time domain reconstruction of the signal through frequency domain integration and complex exponential function. It is essentially the inverse continuous time Fourier transform (Inverse CTFT) used to transform the frequency domain signal into Restore to the time domain signal f(t).

[0047] In this embodiment, if Figure 6 As shown in the F-Ctrans channel cross-attention structure, it can be seen that F-Ctrans globally pools the feature maps from the decoder and the jump connection, and then inputs the two pooled information into two independent multi-layer perceptrons respectively to obtain attention weight information. Finally, the obtained attention weight information is weighted to the jump connection feature map, and the weighted feature map is fused with the feature map of the decoder to obtain more effective feature map information.

[0048] In this embodiment, the structure of the MLP layer is as follows Figure 7 As shown, it is divided into: 1) Input layer (black nodes on the left): Receive the original feature input (such as local features of pathological images, frequency domain coefficients, or feature vectors output by other modules). The number of nodes corresponds to the dimension of the input features (3D input in the figure).

[0049] 2) Hidden layer (middle gray nodes): The input features are linearly transformed and nonlinearly activated through the fully connected weights (the activation function is not explicitly shown in the figure, and usually includes ReLU, Sigmoid, etc. in engineering), realizing feature abstraction and dimension mapping (as shown in the figure, the hidden layer dimension is 3, which can compress / expand the feature dimension).

[0050] 3) Output layer (gray nodes on the right): The hidden layer output is further transformed to output the target result (such as the category probability of pathological image segmentation, the output vector after feature fusion, and the 2D output in the figure).

[0051] Step 5: The decoder processes the features transferred via the F-Ctrans jump connection. The decoder uses an upsampling operator to restore spatial information and adaptively adjusts channel features through the SE (Squeeze-and-Excitation) layer to output the segmentation results of colorectal cancer pathology images.

[0052] Among them, the SE (Squeeze-and-Excitation) layer can be called an adaptive channel attention module. It first compresses the spatial dimension through global average pooling (Squeeze), then learns the channel weights through the fully connected layer (Excitation), enhances key channel features, and is deployed in the decoder to adaptively adjust the channel feature weights to improve the detail expression of the segmentation results.

[0053] To verify the technical effects of the present invention, Monte Carlo Cross-Validation (MMCV) was performed on the baseline model and FD-TransUnet on the Glas dataset (containing colorectal adenocarcinoma pathological sections with annotated tumor regions for model training and testing) and the CRAG dataset (covering more pathological variations (such as different degrees of differentiation and stromal interference) for verifying the generalization ability of the model). Each model was trained and evaluated 10 times through independent random partitioning of the dataset. The experimental data of the baseline model and FD-TransUnet are shown in Tables 1 and 2: Table 1 Comparative test data of Glas dataset

[0054] Table 2 CRAG comparative test data

[0055] It can be seen that the FD-TransUnet of the present invention outperforms the baseline model TransUnet in evaluation indicators such as Dice and HD95. The Dice coefficient is improved by 0.0266, which proves that FD-TransUnet has better segmentation overall. The HD95 is reduced by 10.53, which shows that FD-TransUnet also performs better in boundary segmentation, and the boundary prediction is closer to the real boundary.

[0056] like Figure 8 The diagram shows the effect of the FD-TransUnet cutting of the present invention, the traditional physician cutting and the existing TransUnet cutting, wherein: (a) Physician segmentation (gold standard): The green area is the manually labeled colorectal cancer lesion (e.g., tumor area), representing the "ideal segmentation result" and used to evaluate the model accuracy.

[0057] (b) TransUnet segmentation: The blue area is the segmentation result of the baseline model (TransUnet), reflecting the limitations of traditional methods.

[0058] (c) FD-TransUnet segmentation: The blue area is the segmentation result of the improved model of the present invention, reflecting the optimization effect of the technical solution.

[0059] It can be seen that the segmentation results of the FD-TransUnet of the present invention are closer to the gold standard in terms of boundary accuracy (HD95 index) and regional consistency (Dice coefficient), verifying the effectiveness of the following technical innovations: Cross-domain feature fusion between frequency domain and spatial domain (to make up for the missing information of single domain features); Frequency domain optimization modules (MFRM, F-Ctrans) can enhance details and boundaries; The attention mechanism focuses on key features.

[0060] This set of figures intuitively demonstrates that the present invention effectively solves the core problems of blurred boundaries and incomplete regions in pathological image segmentation of traditional models through the technical solution of "frequency domain enhancement + cross-domain fusion", providing a more accurate automated tool for clinical pathology analysis.

[0061] Example 2 Based on the same concept, the present invention also proposes a colorectal cancer pathology image segmentation device based on frequency domain features, comprising: An input module, used to obtain original input images of colorectal cancer pathology; The multi-scale frequency reconstruction module is used to process the original input image and extract the high-frequency and low-frequency components in the frequency domain. The high-frequency components correspond to the details and edge information of the image, while the low-frequency components correspond to the overall contour information of the image. The encoder module is used to extract spatial features from the original input image. The encoder module combines convolutional neural networks and Vision Transformer (VIT) to output spatial features containing global context information; The attention aggregation module is used to fuse the frequency features output by the multi-scale frequency reconstruction module and the spatial features output by the encoder module. The fusion process includes channel splicing, 1×1 convolution processing and height-width attention mechanism weighting to obtain fused features; The F-Ctrans jump connection module is used to transfer the features and fused features output by the encoder module. The transfer process includes Fourier transform to convert the features to the frequency domain, learnable filter weighting, inverse Fourier transform back to the spatiotemporal domain, and residual connection to optimize feature expression; The decoder module is used to process the features transmitted by the F-Ctrans jump connection module, restore the spatial information using the upsampling operator, and adaptively adjust the channel features through the SE (Squeeze-and-Excitation) layer to output the segmentation results of colorectal cancer pathology images.

[0062] Furthermore, the multi-scale frequency reconstruction module includes: A block division unit, used for performing block processing on the original input image; DCT processing unit, used to extract frequency features of each image block through two-dimensional discrete cosine transform; a recombining unit, configured to recombine the frequency characteristics output by the DCT processing unit to obtain a frequency characteristic graph containing high-frequency components and low-frequency components; Furthermore, the attention aggregation module includes: A channel splicing unit is used to perform channel dimension splicing on frequency features and spatial features; Convolutional fusion unit, used to extract and fuse information from the concatenated features through a 1×1 convolutional layer; The attention weighting unit is used to adopt the height-width attention mechanism, perform global pooling along the height and width directions, calculate the channel attention weights, and multiply the weights back to the fused features to enhance key information.

[0063] Furthermore, the F-Ctrans skip connection module includes: The preliminary processing unit is used to perform channel fusion, flattening and position encoding on the input features; The frequency domain enhancement unit is used to convert features into the frequency domain through a multi-layer perceptron and Fourier transform, weight the selected frequency patterns using a learnable filter, and then convert them back to the spatiotemporal domain through an inverse Fourier transform; The fusion optimization unit is used to interactively fuse the frequency domain enhanced features with the spatial features, and optimize the feature expression by combining residual connection and multi-layer perceptron; A feature reconstruction unit is used to restore the original feature dimension through reconstruction operation and generate output features; Furthermore, the decoder module includes: An upsampling unit, used to restore spatial information using a Dysample upsampling operator; SE processing unit, used to adaptively adjust the weights of channel features through SE layer operations; The output unit is used to output the segmentation result of the colorectal cancer pathology image based on the processed features.

[0064] Example 3 This embodiment also provides an electronic device, referring to Figure 9 , includes a memory 404 and a processor 402, wherein the memory 404 stores a computer program, and the processor 402 is configured to run the computer program to perform the steps in any of the above method embodiments.

[0065] Specifically, the processor 402 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits for implementing the embodiments of the present invention.

[0066] Memory 404 may include a large-capacity memory 404 for data or instructions. By way of example, and not limitation, memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 404 may include removable or non-removable (or fixed) media. Where appropriate, memory 404 may be internal or external to the data processing device. In certain embodiments, memory 404 is non-volatile memory. In certain embodiments, memory 404 includes read-only memory (ROM) and random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM) or a flash memory (FLASH), or a combination of two or more of these. In appropriate circumstances, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM may be a fast page mode dynamic random access memory 404 (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.

[0067] The memory 404 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402 .

[0068] The processor 402 reads and executes the computer program instructions stored in the memory 404 to implement any one of the colorectal cancer pathology image segmentation methods based on frequency domain features in the above embodiments.

[0069] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408 , wherein the transmission device 406 is connected to the processor 402 , and the input / output device 408 is connected to the processor 402 .

[0070] Transmission device 406 can be used to receive or transmit data via a network. Specific examples of such networks may include wired or wireless networks provided by the electronic device's communications provider. In one embodiment, the transmission device includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, transmission device 406 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0071] The input / output device 408 is used to input or output information.

[0072] Example 4 This embodiment also provides a readable storage medium, in which a computer program is stored. The computer program includes a program code for controlling a process to execute a process. The process includes the colorectal cancer pathology image segmentation method based on frequency domain features according to the first embodiment.

[0073] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be repeated here.

[0074] In general, various embodiments may be implemented in hardware or dedicated circuitry, software, logic, or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flow charts, or using some other graphical representation, it should be understood that, as non-limiting examples, the blocks, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or a controller or other computing device, or some combination thereof.

[0075] The embodiments of the present invention may be implemented by computer software that is executable by a data processor of a mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and / or macros may be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. A computer program product may include one or more computer executable components that are configured to perform an embodiment when the program is run. One or more computer executable components may be at least one software code or a portion thereof. In addition, it should be noted at this point that, for example, Figure 1 Any block of the logic flow in the program may represent program steps, or interconnected logic circuits, blocks and functions, or a combination of program steps and logic circuits, blocks and functions. The software may be stored on physical media such as memory chips or memory blocks implemented within the processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs, etc. Physical media are non-transitory media.

[0076] Those skilled in the art should understand that the technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0077] The above embodiments merely illustrate several embodiments of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of the present invention. Therefore, the scope of the present invention shall be determined by the appended claims.

Claims

1. A colorectal cancer pathology image segmentation method based on frequency domain features, characterized in that: The following steps are involved: Step 1: Obtain an original input image of colorectal cancer pathology, process the original input image through a multi-scale frequency reconstruction module, and extract high-frequency components and low-frequency components in the frequency domain, wherein the high-frequency components correspond to image details and edge information, and the low-frequency components correspond to the overall contour information of the image; Step 2: Extract spatial features from the original input image through an encoder. The encoder combines a convolutional neural network and ViT to output spatial features, which contain global context information of the image. Step 3: The frequency features output from step 1 and the spatial features output from step 2 are fused through the attention aggregation module. The fusion process includes channel splicing, 1×1 convolution processing and height-width attention mechanism weighting to obtain fused features. Step 4: The features output by the encoder and the fused features are transferred through the F-Ctrans jump connection. The transfer process includes Fourier transform to convert the features to the frequency domain, learnable filter weighting, inverse Fourier transform back to the spatiotemporal domain, and residual connection to optimize feature expression. Step 5: The features transferred through the F-Ctrans jump connection are processed by the decoder. The decoder uses an upsampling operator to restore spatial information, and adaptively adjusts channel features through the SE layer to output the segmentation result of the colorectal cancer pathology image.

2. The colorectal cancer pathology image segmentation method based on frequency domain features according to claim 1, characterized in that: In step 1, the processing process of the multi-scale frequency reconstruction module includes: The original input image is divided into blocks, and frequency features are extracted from each image block through two-dimensional discrete cosine transform. The frequency features are reorganized to obtain a frequency feature map containing high-frequency components and low-frequency components.

3. The colorectal cancer pathology image segmentation method based on frequency domain features according to claim 1, characterized in that: In step 3, the height-width attention mechanism includes: performing global pooling along the height direction and the width direction respectively, calculating the channel attention weights in the two directions, multiplying the attention weights back to the fused features after 1×1 convolution processing, enhancing key features and suppressing redundant information.

4. The colorectal cancer pathology image segmentation method based on frequency domain features according to claim 1, characterized in that: In step 4, the processing of the F-Ctrans jump connection also includes: channel fusion, flattening and position encoding of the input features, processing by a multi-layer perceptron and then performing Fourier transform, and after the frequency features and spatial features are interactively fused, the original feature dimensions are restored through a feature reconstruction module.

5. The colorectal cancer pathology image segmentation method based on frequency domain features according to any one of claims 1 to 4, characterized in that: In step 5, the decoder uses the Dysample upsampling operator to recover spatial information, and the SE layer adaptively adjusts the weight of each channel feature by squeezing and excitation operations on the channel features.

6. A colorectal cancer pathology image segmentation device based on frequency domain features, characterized in that: include: An input module, used to obtain original input images of colorectal cancer pathology; A multi-scale frequency reconstruction module is used to process the original input image and extract high-frequency components and low-frequency components in the frequency domain, wherein the high-frequency components correspond to the details and edge information of the image, and the low-frequency components correspond to the overall contour information of the image; An encoder module, configured to extract spatial features from the original input image, wherein the encoder module combines a convolutional neural network and ViT to output spatial features containing global context information; An attention aggregation module is used to fuse the frequency features output by the multi-scale frequency reconstruction module and the spatial features output by the encoder module. The fusion process includes channel splicing, 1×1 convolution processing and height-width attention mechanism weighting to obtain fused features; An F-Ctrans jump connection module is used to transfer the features output by the encoder module and the fused features. The transfer process includes Fourier transform to convert the features to the frequency domain, learnable filter weighting, inverse Fourier transform back to the spatiotemporal domain, and residual connection to optimize feature expression; The decoder module is used to process the features transmitted by the F-Ctrans jump connection module, restore the spatial information using an upsampling operator, and adaptively adjust the channel features through the SE layer to output the segmentation results of the colorectal cancer pathology image.

7. The colorectal cancer pathology image segmentation device based on frequency domain features according to claim 6, characterized in that: The multi-scale frequency reconstruction module includes: A block division unit, configured to perform block processing on the original input image; DCT processing unit, used to extract frequency features of each image block through two-dimensional discrete cosine transform; a recombining unit, configured to recombine the frequency characteristics output by the DCT processing unit to obtain a frequency characteristic graph including high-frequency components and low-frequency components; The attention aggregation module includes: A channel splicing unit is used to perform channel dimension splicing on frequency features and spatial features; Convolutional fusion unit, used to extract and fuse information from the concatenated features through a 1×1 convolutional layer; The attention weighting unit is used to adopt a height-width attention mechanism, perform global pooling along the height and width directions, calculate the channel attention weights, and multiply the weights back to the fused features to enhance key information.

8. The colorectal cancer pathology image segmentation device based on frequency domain features according to claim 6, characterized in that: The F-Ctrans jump connection module includes: The preliminary processing unit is used to perform channel fusion, flattening and position encoding on the input features; The frequency domain enhancement unit is used to convert features into the frequency domain through a multi-layer perceptron and Fourier transform, weight the selected frequency patterns using a learnable filter, and then convert them back to the spatiotemporal domain through an inverse Fourier transform; The fusion optimization unit is used to interactively fuse the frequency domain enhanced features with the spatial features, and optimize the feature expression by combining residual connection and multi-layer perceptron; A feature reconstruction unit is used to restore the original feature dimension through reconstruction operation and generate output features; The decoder module comprises: An upsampling unit, used to restore spatial information using a Dysample upsampling operator; SE processing unit, used to adaptively adjust the weights of channel features through SE layer operations; The output unit is used to output the segmentation result of the colorectal cancer pathology image based on the processed features.

9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the colorectal cancer pathology image segmentation method based on frequency domain features according to any one of claims 1 to 5.

10. A readable storage medium, characterized in that: The readable storage medium stores a computer program, which includes a program code for controlling a process to execute a process, and the process includes the colorectal cancer pathology image segmentation method based on frequency domain features according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Real-time instance segmentation method based on frequency domain and spatial domain information fusion

    CN118351305A

  • Transform and CNN fusion-based small focus segmentation and feature learning method

    CN119832378A

  • MRI brain tumor image segmentation method based on state space model and frequency domain

    CN120147332A

  • Medical image segmentation method and device, equipment, medium and program product

    CN120298363A

  • Medical image segmentation method and device based on spatial perception and frequency domain information

    CN120298441A

Cited By

  • Quantitative index determination method and device based on hepatitis pathology image, equipment and product

    CN121213551A

  • A method, device, equipment and product for determining a quantitative index based on a hepatitis pathological image

    CN121213551B

  • Focus positioning method and system based on superconducting magnetocardiography

    CN121937534A

  • A method and system for lesion localization based on superconducting magnetocardiograph

    CN121937534B