Cross-modal lightweight colorectal tumor segmentation method and device

By combining adaptive image enhancement and multi-scale feature extraction with a boundary attention mechanism, the problem of insufficient global contextual information modeling and high computational complexity in colorectal tumor segmentation is solved, achieving high-precision, low-overhead cross-modal segmentation suitable for clinical environments.

CN121564014APending Publication Date: 2026-02-24NANKAI UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511790920.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing technologies for colorectal tumor segmentation suffer from problems such as insufficient global contextual information modeling, high computational complexity, poor cross-scene adaptability, high annotation costs, and low segmentation accuracy, especially in the identification of small lesions and fuzzy boundaries.

Method used

Adaptive histogram equalization and random gamma correction are used to enhance image contrast. Multi-scale convolution and dilated convolution are combined to extract features, generate boundary masks and combine them with boundary attention mechanisms. Fast spatial pyramid pooling module is used to reduce computational complexity, and group convolution and inverted point convolution are used to achieve lightweight jump fusion of the decoder.

Benefits of technology

Achieving high-precision colorectal tumor segmentation in environments with limited labeled data and constrained resources improves boundary recognition capabilities and cross-scenario robustness, while reducing computational overhead and parameter count, and supports real-time deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564014A_ABST
    Figure CN121564014A_ABST
Patent Text Reader

Abstract

The invention discloses a cross-modal lightweight colorectal tumor segmentation method and device, and aims to solve the problems that an existing medical image segmentation model depends on large-scale annotation data, small lesions and fuzzy boundaries are inaccurately recognized, the calculation complexity is high, clinical deployment is difficult, and the like. According to the method, on the basis of an improved U-shaped network architecture, adaptive histogram equalization and Gamma correction are introduced in a data preprocessing stage to enhance boundary information of a low-contrast CT image; the encoder captures a multi-level context by adopting a multi-scale convolution and cavity convolution fusion module, and strengthens tumor edge response in combination with a boundary attention module; and meanwhile, the calculation amount is reduced by introducing rapid spatial pyramid pooling. The decoder effectively recovers details and avoids artifacts through lightweight jump connection and bilinear interpolation up-sampling. The parameter quantity of the whole model is only about 4.25 M, the reasoning efficiency and the cross-equipment generalization ability are remarkably improved while the high segmentation precision is guaranteed, and the method is suitable for a resource-limited clinical environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image segmentation technology, and in particular to a lightweight, cross-modal colorectal tumor segmentation method and apparatus. Background Technology

[0002] Colorectal tumor segmentation, as a core technology in intelligent medical imaging diagnosis, is widely used in clinical scenarios such as preoperative planning, radiotherapy target delineation, and efficacy evaluation. With the development of deep learning technology, U-Net and its improved models based on the encoder-decoder architecture have become the mainstream solution, achieving breakthroughs in various medical imaging tasks through multi-scale feature fusion. Specifically, this technology system covers the complete process from data preprocessing to feature extraction, context modeling, and boundary optimization. Key technologies such as the combination of convolutional neural networks (CNN) and Transformer structures, and the introduction of attention mechanisms, have jointly constructed the current multimodal technology ecosystem for medical image segmentation.

[0003] However, traditional CNNs, limited by their local receptive field, struggle to effectively model global contextual information, resulting in insufficient tumor recognition accuracy in complex tissue environments. While Transformer models like TransUNet improve segmentation accuracy through self-attention mechanisms, their parameter count exceeds 100M, creating a significant contradiction between computational complexity and the computing power requirements of clinical edge devices. Secondly, while attention-based improvements (such as AttentionU-Net) enhance response in key regions, they introduce additional computational overhead, and their accuracy in identifying the boundaries of lesions <5mm is below 70%. Furthermore, medical image annotation relies on radiologists combining pathological information, taking 2-3 hours per case, with large-scale data acquisition costs exceeding 500,000, severely limiting the model's generalization ability. When training and testing data come from different CT devices, segmentation accuracy drops by 20-30%, further highlighting the problem of insufficient cross-scenario adaptability. Summary of the Invention

[0004] The present invention aims to at least partially solve one of the technical problems in the related art.

[0005] Therefore, the first objective of this invention is to propose a lightweight, cross-modal colorectal tumor segmentation method.

[0006] Another object of the present invention is to provide a lightweight, cross-modal colorectal tumor segmentation device.

[0007] The third objective of this invention is to provide a computer device.

[0008] A fourth objective of this invention is to provide a non-transitory computer-readable storage medium.

[0009] To achieve the above objectives, a first aspect of the present invention proposes a lightweight, cross-modal colorectal tumor segmentation method, comprising: S1, adaptive histogram equalization and random Gamma correction are applied to medical images to enhance the grayscale difference between tumors and background, and a high-quality training dataset is constructed by introducing random Gaussian noise and tumor-free slice samples. S2 employs a cascaded design of multi-scale convolution and dilated convolution to extract multi-level contextual features from the input image, and achieves joint modeling of local details and global information through feature stitching and channel number compression. S3, based on gradient detection to generate boundary masks and combined with boundary attention mechanism, highlights high gradient regions to enhance the perception of blurred tumor boundaries; S4 uses a fast spatial pyramid pooling module to simulate a large receptive field by stacking the smallest convolution kernel multiple times, reducing computational complexity while preserving key feature information. S5 utilizes group convolution and inverted point convolution to achieve lightweight jump fusion of the decoder, and employs bilinear interpolation upsampling to restore spatial resolution to avoid artifact generation.

[0010] In one embodiment of the present invention, S1 includes: S11 uses the CLAHE algorithm for adaptive histogram equalization, with a contrast limit of 2.0 and a block size of 8×8. S12, through the Gamma correction function Implement a random Gamma transformation, where Randomly select within the interval [0.5, 1.5].

[0011] In one embodiment of the present invention, S2 includes: S21, used , , Concatenated feature extraction using three different scales of convolutional kernels; S22, via Feature maps concatenated from convolution pairs The number of channels is compressed to 60% of the original number of channels.

[0012] In one embodiment of the present invention, S3 includes: S31, using the Sobel operator to perform gradient detection on the input image, and employing [a specific method] when generating the boundary mask. Convolution kernel; S32, the boundary mask is weighted using the channel attention module, and the weight calculation formula is as follows: ,in Indicates a fully connected layer. This represents the Sigmoid function.

[0013] In one embodiment of the present invention, S4 includes: S41, employing 3 The convolutional kernels are cascaded and stacked, with each kernel having an expansion rate of 1, 2, and 5, respectively. S42 uses global average pooling to compress the feature map into channels, resulting in a compressed channel count that is 50% of the original channel count.

[0014] To achieve the above objectives, a second aspect of the present invention provides a lightweight, cross-modal colorectal tumor segmentation device, comprising: The image enhancement and dataset construction module is used to perform adaptive histogram equalization and random Gamma correction on medical images to enhance the grayscale difference between tumors and the background, and to construct a high-quality training dataset by introducing random Gaussian noise and tumor-free slice samples. The multi-scale and dilated convolution cascaded feature extraction module is used to extract multi-level contextual features of the input image by using a cascaded design of multi-scale convolution and dilated convolution. It achieves joint modeling of local details and global information through feature stitching and channel number compression. The boundary mask generation and attention processing module is used to generate boundary masks based on gradient detection and combine them with a boundary attention mechanism to highlight high gradient regions in order to enhance the perception of blurred tumor boundaries. The Fast Spatial Pyramid Pooling module is used to simulate a large receptive field by stacking multiple convolution kernels with the smallest kernel, thereby reducing computational complexity and preserving key feature information. The lightweight skip fusion and upsampling module is used to achieve lightweight skip fusion of the decoder by using group convolution and inverted point convolution, and to use bilinear interpolation upsampling to restore spatial resolution to avoid artifact generation.

[0015] This invention provides a lightweight, cross-modal colorectal tumor segmentation method and apparatus that achieves high-precision segmentation of colorectal tumors in clinical environments with limited labeled data and resources. It significantly improves boundary recognition capabilities and cross-scenario robustness while reducing computational overhead and the number of parameters, and supports real-time deployment.

[0016] To achieve the above objectives, a third aspect of this application provides a computer device comprising a processor and a memory; wherein the processor runs a program corresponding to the executable program code stored in the memory to implement a cross-modal lightweight colorectal tumor segmentation method as described in the first aspect embodiment.

[0017] To achieve the above objectives, a fourth aspect of this application provides a non-transitory computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements a cross-modal lightweight colorectal tumor segmentation method as described in the first aspect embodiment.

[0018] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0019] Figure 1 This is a flowchart of a cross-modal lightweight colorectal tumor segmentation method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a cross-modal lightweight colorectal tumor segmentation method according to an embodiment of the present invention; Figure 3 This is a structural diagram of a cross-modal lightweight colorectal tumor segmentation device according to an embodiment of the present invention; Figure 4 It is a computer device according to an embodiment of the present invention. Detailed Implementation

[0020] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0022] The following description, with reference to the accompanying drawings, describes a lightweight, cross-modal colorectal tumor segmentation method and apparatus according to an embodiment of the present invention.

[0023] Example 1 Figure 1 This is a flowchart of a cross-modal lightweight colorectal tumor segmentation method according to an embodiment of the present invention, such as... Figure 1 As shown, it includes: S1 performs adaptive histogram equalization and random Gamma correction on medical images to enhance the grayscale difference between tumors and the background, and constructs a high-quality training dataset by introducing random Gaussian noise and tumor-free slice samples.

[0024] Specifically, in medical image segmentation tasks, the data preprocessing stage has a decisive impact on model performance. This invention introduces an image enhancement strategy combining Adaptive Histogram Equalization (CLAHE) and random Gamma correction in data preprocessing to improve the grayscale contrast between tumors and background tissue. Adaptive Histogram Equalization enhances the detail information in low-contrast regions of the image through local histogram adjustment, and is particularly suitable for problems such as blurred tumor boundaries and uneven grayscale distribution in CT images. In some implementations, the CLAHE algorithm is used, with its parameters set as: contrast limiting factor. Grid size To enhance contrast while avoiding excessive noise amplification, random Gamma correction is introduced to simulate illumination variations under different imaging conditions. The Gamma value is randomly selected within the range [0.5, 1.5] and adjusted through nonlinear transformation. Adjusting the image brightness distribution improves the model's adaptability to images acquired from different modalities and devices.

[0025] Furthermore, to enhance the robustness and generalization ability of the model, this invention introduces random Gaussian noise and non-tumor slices in the preprocessing stage. The mean of the random Gaussian noise is set to... Standard deviation The values ​​are randomly varied within the range of [0.01, 0.05] to simulate image degradation caused by equipment noise or motion artifacts in real medical images. Tumor-free slice samples are randomly selected from normal tissue images and together with tumor images, they form the training dataset. This allows the model to learn the discriminative features of tumor and non-tumor regions during training, thereby improving the accuracy and stability of segmentation.

[0026] Furthermore, by enhancing image contrast and introducing noise perturbations and negative samples, the model's segmentation performance in low-contrast, blurred boundary, and cross-device scenarios was significantly improved. Meanwhile, the construction of a high-quality training dataset provides a solid foundation for the subsequent training of the lightweight model, effectively alleviating the problems of high cost and insufficient data in medical image annotation, and enhancing the model's practicality and adaptability in clinical deployment.

[0027] Furthermore, S1 includes: S11 uses the CLAHE algorithm for adaptive histogram equalization, with a contrast limit of 2.0 and a block size of 8×8.

[0028] Specifically, in the data preprocessing stage of this invention, a contrast-limited adaptive histogram equalization algorithm is used to enhance the input medical images, thereby improving the grayscale contrast between the tumor region and the background tissue, and providing more discriminative image features for the subsequent segmentation network. CLAHE is an improved histogram equalization method that divides the image into multiple local regions, equalizes the histogram of each region separately, and limits the histogram contrast of each region to avoid excessive amplification of noise.

[0029] Furthermore, this invention sets the contrast limit value of CLAHE to 2.0 and the block size to [missing value]. Specifically, each Each image block will independently calculate its histogram and perform linear interpolation to extend it to the full image range. If the frequency of a certain gray level in the histogram of a block exceeds the set contrast limit, the frequency of that gray level will be truncated and evenly distributed among other gray levels, thereby achieving contrast enhancement while suppressing noise.

[0030] Furthermore, since colorectal tumors often appear as low-contrast, blurred-border areas in CT or MRI images, traditional global histogram equalization methods are prone to noise enhancement and loss of detail. CLAHE, through local equalization and contrast limiting mechanisms, can enhance the contrast of tumor regions while maintaining the natural visual effect and structural information of the image. This preprocessing method provides clearer input for subsequent multi-scale convolution and boundary attention modules, helping to improve the segmentation model's ability to identify small lesions and edge regions, thereby enhancing overall segmentation accuracy and robustness.

[0031] S12, through the Gamma correction function Implement a random Gamma transformation, where Randomly select within the interval [0.5, 1.5].

[0032] Specifically, in the data preprocessing stage of this invention, the Gamma correction function is used. Implementing random gamma transformation is an important means to improve the identifiability of tumor regions in medical images. Gamma correction is a nonlinear grayscale transformation method whose core principle is to enhance image contrast and visual effect by adjusting the brightness response curve of the image. In this invention, gamma transformation is used to enhance the grayscale difference between the tumor and surrounding tissues in CT images, thereby providing more discriminative input features for subsequent segmentation networks.

[0033] Furthermore, the parameters of the Gamma transformation Random selections were made within the interval [0.5, 1.5] to simulate image style variations under different imaging devices or scanning parameters. When the image brightens overall, the contrast in low grayscale areas is enhanced; when As the image darkens, details in high-grayscale areas become more prominent. By introducing a random Gamma transformation during the training phase, the model can learn more robust feature representations, improving its adaptability to cross-modal and cross-device images.

[0034] Furthermore, the implementation of the Gamma transform is typically based on a point-by-point nonlinear mapping of image pixels. Specifically, the input image... Each pixel value After normalization (usually mapped to the [0,1] interval), the Gamma transformation formula is then applied. Finally, the image is restored to its original grayscale range through inverse normalization. This operation can be implemented in deep learning frameworks such as PyTorch or TensorFlow using a custom image enhancement layer, and supports batch processing and GPU acceleration.

[0035] Furthermore, this step is primarily used in the CT image preprocessing stage for colorectal tumors, especially suitable for early lesion images with blurred tumor boundaries and low contrast. By enhancing the local grayscale differences in the image, the Gamma transform helps improve the encoder's ability to perceive tumor regions, particularly in the multi-scale convolution and boundary attention module (BAM), where it can more effectively extract edge features.

[0036] Furthermore, the technical benefits of this step are twofold: firstly, it improves the visual contrast of the image through nonlinear enhancement, thereby increasing the distinguishability of the tumor region; secondly, the random Gamma transformation, as a data augmentation method, increases the diversity of training data, thus improving the model's generalization ability and cross-scene adaptability. Experiments show that this preprocessing strategy can improve the segmentation model's performance on metrics such as the Dice coefficient by approximately 3% to 5%, especially in small lesion segmentation tasks.

[0037] S2 employs a cascaded design of multi-scale convolution and dilated convolution to extract multi-level contextual features from the input image, and achieves joint modeling of local details and global information through feature splicing and channel number compression.

[0038] Specifically, in the encoder stage of this invention, the MSCA module (multi-scale convolution and dilated convolution cascade module) is used to extract multi-level contextual features of the input medical image, realizing joint modeling of local details and global information. This module, through the cascaded design of multi-scale convolution and dilated convolution, effectively expands the receptive field and enhances the model's contextual awareness of the tumor region, making it particularly suitable for tasks such as identifying lesions with blurred boundaries and low contrast, such as early-stage colorectal tumors.

[0039] Furthermore, the MSCA module consists of three convolutional layers of different scales and one dilated convolutional layer. Each convolutional operation uses a standard convolutional kernel with a stride of 1 and "same" padding to maintain consistent spatial resolution of the feature maps. Specifically, the input feature map F_{input} first passes through... Convolution extracts local detail features, and the output is Then they passed through in turn. and Convolution, respectively generate and This captures contextual information at both medium and large scales. Simultaneously, the input feature map is also processed through dilated convolution to extract global features with a larger receptive field, resulting in an output... All feature maps are concatenated along the channel dimension to form F_{concat}, and then passed through a... Convolution is used to compress the number of channels to reduce redundant computation and improve feature fusion efficiency.

[0040] Furthermore, the MSCA module is embedded in each layer of the encoder, working in conjunction with skip connections and downsampling operations, making it particularly suitable for scenarios with blurred tumor boundaries and low contrast in CT images. Through joint modeling of multi-scale and dilated convolutions, this module can effectively enhance the perception of tumor edges while preserving rich local texture information, thereby improving segmentation accuracy and robustness.

[0041] Furthermore, the technical benefits of this step are reflected in the following: under limited labeled data conditions, the MSCA module significantly improves the model's generalization ability through multi-level feature fusion; at the same time, its lightweight design reduces computational overhead, making the model more suitable for deployment and application in environments with limited clinical resources.

[0042] Furthermore, S2 includes: S21, used , , Three different scales of convolutional kernels are used for cascaded feature extraction.

[0043] Specifically, in the encoder stage of this invention, using , , Three different scale convolution kernels are used for cascaded feature extraction. This step enhances the model's ability to perceive colorectal tumors at different scales through multi-scale convolution operations, thereby improving segmentation accuracy and robustness.

[0044] Furthermore, this cascaded feature extraction module sequentially employs... , , Feature extraction is performed using convolutional kernels. Each convolutional layer uses a stride of 1 and padding of 1 to maintain the spatial resolution of the feature map. Specifically, the input feature map F_{input} is first processed by... Convolutional layers extract local detail features and generate Subsequently, through Convolution further captures mesoscale contextual information, generating ;at last, pass Convolution extracts global features over a wider range, generating... Furthermore, to enhance the model's ability to model long-distance dependencies, this module also introduces dilation convolution to generate... Its void ratio is set to 2 to expand the receptive field without losing resolution.

[0045] Furthermore, the above four sets of feature maps , , , The channels are fused using a concat operation to form a multi-scale feature map F_{concat}. To reduce channel redundancy and improve computational efficiency, the concatenated feature map is then... Convolution performs channel compression, ultimately outputting a fused feature representation. This operation is described in the technical disclosure document as follows:

[0046]

[0047]

[0048]

[0049]

[0050] in, This module represents the ReLU activation function, and BN represents the batch normalization operation. It introduces non-linear activation and normalization after each convolutional layer, which helps improve gradient propagation efficiency and model stability.

[0051] Furthermore, this step is particularly suitable for medical image segmentation tasks of colorectal tumors, especially when the tumor is small, has blurred boundaries, and low contrast with surrounding tissues. It can significantly improve the model's ability to identify lesion areas through multi-scale feature fusion. In terms of lightweight deployment, this module is designed in a cascaded rather than parallel manner, which effectively reduces computational complexity. Compared with traditional multi-scale parallel convolutional structures, it reduces redundant computation and improves the feasibility of deploying the model on embedded devices or edge computing platforms.

[0052] Furthermore, the technical benefits of this step are twofold: firstly, through the cascaded design of multi-scale convolutions, the model can simultaneously capture local texture and global structural information, enhancing its ability to perceive tumor boundaries and internal structures; secondly, the introduction of dilated convolutions expands the receptive field, improving robustness in recognizing low-contrast regions. In summary, this step provides a high-quality, multi-scale feature foundation for subsequent boundary attention modules and feature fusion, and is one of the core technologies of this invention for achieving high-precision, low-computational-consumption segmentation.

[0053] S22, via Feature maps concatenated from convolution pairs The number of channels is compressed to 60% of the original number of channels.

[0054] Specifically, after the skip fusion operation in the decoder stage, the present invention... Feature maps concatenated from convolution pairs Channel number compression is performed to reduce the computational complexity of subsequent processing and improve the lightweight nature of the model.

[0055] Furthermore, the The convolutional layer uses standard convolution operations, and the input is the multi-scale feature map obtained after skip fusion. Its number of channels is the sum of the number of channels in the output feature maps of multiple encoder layers. The convolution kernel size is... The step size is 1, the padding is 0, and the number of output channels is set to 60% of the original number of channels. For example, if The number of channels is Then the number of output channels is The compression ratio was verified in experiments to significantly reduce the number of model parameters and computational overhead while preserving key semantic information.

[0056] Furthermore, this convolutional layer is followed by batch normalization (BN) and the GELU activation function to enhance the stability of the feature representation and its non-linear fitting ability. Specifically, the input feature map is first processed through... Convolution performs a linear transformation along the channel dimension, followed by normalization of the channel features using a Batch Normalization (BN) layer, and finally introduces non-linearity using the GELU activation function. Its mathematical expression is as follows:

[0057] in, express Convolution operation, This represents the GELU activation function.

[0058] Furthermore, in practical applications, this step is mainly used in the feature fusion stage at different levels in the decoder, especially when deploying models on resource-constrained embedded devices or mobile terminals. Channel compression can effectively reduce memory usage and computational latency, improving the real-time performance of the model. For example, in the colorectal tumor segmentation task, if the original feature map has 256 channels, the number of channels after compression is 154, thereby reducing the computational load in the decoder by about 40% without affecting the semantic expression of key regions.

[0059] Furthermore, this channel compression step significantly reduces the computational complexity and memory consumption of the model without sacrificing segmentation accuracy, providing strong support for the lightweight deployment of this invention in clinical environments. Simultaneously, by appropriately setting the compression ratio, the integrity of the feature map information in the channel dimension is ensured, thereby improving the model's generalization ability and robustness across cross-modal and cross-hospital imaging data.

[0060] S3 generates a boundary mask based on gradient detection and combines it with a boundary attention mechanism to highlight high gradient regions to enhance the perception of blurred tumor boundaries.

[0061] Specifically, in the encoder stage of this invention, the boundary attention module (BAM) generates a boundary mask through gradient detection and, combined with an attention mechanism, highlights high-gradient regions to enhance the perception of blurred tumor boundaries. The core technical principle of this module is based on the extraction and weighted fusion of image gradient information, aiming to improve the model's recognition accuracy for low-contrast, blurred-boundary regions.

[0062] Furthermore, the BAM module first uses the Sobel operator to perform gradient detection on the input feature map. The Sobel operator is a classic edge detection operator that extracts boundary information by calculating the gradient magnitudes of the image in the horizontal and vertical directions. Specifically, after the input feature map F_{input} is processed by the Sobel operator, a gradient magnitude map is generated. The calculation method is as follows:

[0063] in, and These represent the gradient responses in the horizontal and vertical directions, respectively. This gradient map reflects the spatial distribution of boundary intensity in the image, providing a basis for subsequent boundary attention generation.

[0064] Furthermore, the kernel size of the Sobel operator is typically 1. To balance computational efficiency and boundary detection accuracy, the normalization operation employs min-max normalization to ensure the dynamic range of the weight map adapts to the network input. Furthermore, the number of output channels in the BAM module remains consistent with the input feature map to guarantee compatibility with subsequent modules.

[0065] Furthermore, this step is particularly suitable for CT image segmentation of colorectal tumors in practical applications, especially when the tumor boundaries are blurred and the gray-level difference with surrounding tissues is small, effectively improving the edge accuracy of segmentation. Through a gradient-guided attention mechanism, the BAM module compensates for the lack of boundary information perception in traditional convolutional networks, providing more accurate boundary cues for subsequent feature fusion and segmentation decisions, thereby significantly improving overall segmentation performance.

[0066] Furthermore, S3 includes: S31, using the Sobel operator to perform gradient detection on the input image, and employing [a specific method] when generating the boundary mask. Convolution kernel.

[0067] Specifically, in the Boundary Attention Module (BAM) of this invention, the Sobel operator is used to perform gradient detection on the input image. The Sobel operator is a classic edge detection operator. Its core principle is to identify areas in the image with drastic gray-scale changes, i.e., potential boundary information, by calculating the gradient magnitude of the image in the horizontal and vertical directions.

[0068] Furthermore, to improve computational efficiency, approximate methods are typically used to calculate the gradient magnitude, such as... The gradient map is then normalized to the range [0,1] and used as a boundary mask input into the attention module to guide the network to focus on high gradient regions, i.e., the boundary regions between the tumor and surrounding tissues.

[0069] Furthermore, in this invention, the parameters of the Sobel operator are set to standard. The convolutional kernel has a stride of 1 and padding of 0 to maintain the same spatial resolution as the input image. This operation can be implemented through convolutional layers in deep learning frameworks such as PyTorch or TensorFlow, requiring no additional training parameters and offering good computational efficiency and deployability.

[0070] Furthermore, since colorectal tumors often appear as low-contrast, blurred-border areas in CT images, traditional convolutional operations struggle to effectively extract boundary information. By using a boundary mask generated by the Sobel operator, the BAM module enhances the network's ability to perceive boundary regions, thereby achieving more accurate tumor contour restoration in the decoder stage. Experiments show that this method significantly improves metrics such as the Dice coefficient and boundary overlap, exhibiting particularly strong robustness in small lesions and low-contrast scenarios.

[0071] S32, the boundary mask is weighted using the channel attention module, and the weight calculation formula is as follows: ,in Indicates a fully connected layer. This represents the Sigmoid function.

[0072] Specifically, in the decoder stage of this invention, weighting the boundary mask through the channel attention module is one of the key steps to achieve high-precision and lightweight colorectal tumor segmentation. The core of this step lies in using the channel attention mechanism to dynamically weight the boundary mask generated by the boundary attention module (BAM), thereby enhancing the model's ability to perceive tumor boundary regions and improving the edge clarity and accuracy of the segmentation results.

[0073] Furthermore, the weight calculation formula for the channel attention module is as follows: ,in This represents the concatenation result of skip connections in the decoder with the feature map of the current layer. This represents a fully connected layer used to perform non-linear transformations on the channel dimension of the concatenated features, extracting global feature information related to the boundary. This represents the Sigmoid activation function, used to map the output of the fully connected layer to the [0,1] interval as channel attention weights. These weights are then applied to a boundary mask to enhance the model's response to key boundary regions.

[0074] Furthermore, fully connected layer The number of input channels depends on The channel dimension is typically the sum of the number of channels in the corresponding layer feature maps of the encoder and decoder. The number of output channels is consistent with the number of channels in the boundary mask, generally a single-channel mask or a multi-channel mask corresponding to the number of tumor categories. The introduction of the Sigmoid function ensures the smoothness and differentiability of the weights, facilitating end-to-end training. Furthermore, this module has low computational complexity, typically accounting for only a small portion of the total network computation. This meets the lightweight design requirements of this invention.

[0075] Furthermore, this step is primarily used for boundary optimization after the skip connections in the decoder are fused with the features of the current layer. By introducing a channel attention mechanism, the model can adaptively adjust the response intensity of different channels, thereby more accurately identifying tumor boundaries in medical images with low contrast, noise interference, or blurred boundaries. Especially in the early detection of colorectal tumors, this step helps reduce missed or false detections caused by unclear boundaries, improving the clinical reliability of segmentation results.

[0076] Furthermore, the technical effects of this step are reflected in two aspects: Firstly, through the dynamic weighting mechanism, the model can focus on the tumor boundary region, enhancing the response to key features and thus improving segmentation accuracy. Secondly, due to the simple structure and few parameters of the channel attention module, it significantly reduces computational overhead while maintaining high accuracy, enabling the invention to maintain good real-time performance and deployment feasibility in resource-constrained medical devices (such as mobile terminals and embedded systems). In summary, this step effectively supports the innovative goal of this invention in cross-modal, lightweight medical image segmentation while improving segmentation quality.

[0077] S4 uses a fast spatial pyramid pooling module to simulate a large receptive field by stacking the smallest convolution kernel multiple times, reducing computational complexity while preserving key feature information.

[0078] Specifically, in the encoder stage of this invention, the fast spatial pyramid pooling module simulates a large receptive field by stacking the smallest convolutional kernel multiple times, thereby reducing computational complexity while preserving key feature information. This module's design is inspired by the traditional spatial pyramid pooling structure, but by optimizing the combination of convolutional operations, it significantly improves computational efficiency.

[0079] Furthermore, the SPPF module employs multiple The sequential stacking of convolutional layers replaces the high computational overhead of traditional parallel multi-scale convolution. Specifically, each Convolutional layers expand their receptive field by setting different dilatancy rates. For example, three convolutional layers with dilatancy rates of 1, 2, and 5 stacked sequentially are equivalent to a single convolutional layer. The convolution operation. This structure achieves multi-scale feature extraction and fusion without increasing the feature map size.

[0080] Furthermore, the SPPF module is embedded in each layer of the encoder to extract features with global contextual information. This module is particularly suitable for scenarios in medical imaging where the tumor region has low contrast and blurred boundaries with surrounding tissues, effectively enhancing the model's ability to perceive lesion areas.

[0081] Furthermore, by reducing redundant computations, the feasibility of deploying the model on resource-constrained devices is improved. At the same time, through multi-scale feature fusion, the model's ability to identify tumor regions is enhanced, providing richer contextual information for subsequent boundary attention modules and decoder stages, thereby improving the overall segmentation accuracy and robustness.

[0082] S5 utilizes group convolution and inverted point convolution to achieve lightweight jump fusion of the decoder, and employs bilinear interpolation upsampling to restore spatial resolution to avoid artifact generation.

[0083] Specifically, in the skip fusion and upsampling operations at the decoder stage, this invention uses a combination of group convolution and inverted point convolution to achieve lightweight feature fusion, and performs upsampling through bilinear interpolation to restore spatial resolution and avoid the generation of artifacts.

[0084] Furthermore, the skip fusion module fuses feature maps from different levels of the encoder by combining group convolutions and inverted point convolutions. Specifically, group convolutions divide the input feature map into several groups, each of which undergoes an independent convolution operation, thereby significantly reducing computational complexity. In this invention, the number of groups in the group convolution is typically set to the square root of the number of input channels; for example, when the input channels are 64, the number of groups is set to 8 to balance computational efficiency and feature expressiveness. Subsequently, inverted point convolutions (i.e., depthwise separable convolution structures that first expand channels and then compress them) further enhance the diversity and expressiveness of features. This structure has significant advantages in lightweight design, with computational cost only 1 / 4 to 1 / 3 of that of traditional full convolutions, while preserving the semantic information of multi-scale features.

[0085] Furthermore, in the upsampling operation, this invention eliminates the checkerboard artifact problem that may be introduced by traditional deconvolution, and uses bilinear interpolation to upsample the feature map. Bilinear interpolation, by performing linear interpolation in two directions, can smoothly restore the spatial resolution of the image, and its calculation formula is as follows:

[0086] in, This is the feature map output by the previous layer decoder. This is the upsampled feature map. After bilinear interpolation, the feature map is... Convolutional, batch normalization (BN) layers, and GELU activation functions are used for further processing to restore the semantic consistency of features and enhance boundary information.

[0087] Furthermore, lightweight skip fusion effectively integrates contextual and detailed information from different levels of the encoder, improving the boundary accuracy of segmentation. On the other hand, bilinear interpolation upsampling avoids artifacts caused by deconvolution, ensuring the smoothness and realism of the output segmentation image. In practical applications, this step is suitable for multi-scale boundary recovery of colorectal tumors, exhibiting good robustness and adaptability, especially in low-contrast, small-lesion CT images. Through this design, the present invention significantly reduces the computational overhead and memory usage of the model while maintaining segmentation accuracy, providing feasibility for deployment on resource-constrained clinical equipment.

[0088] The lightweight colorectal tumor segmentation method of this invention can achieve high-precision segmentation of colorectal tumors under limited labeled data and resource-constrained environments, effectively improve the identification ability of small lesions and fuzzy boundaries, and significantly reduce computational complexity and number of parameters, thereby enhancing the robustness and cross-scenario adaptability of the model.

[0089] Example 2 This invention discloses a cross-modal lightweight system for colorectal tumor segmentation, named MSCANet. Based on an improved U-shaped network architecture, this system addresses problems in existing medical image segmentation techniques, such as over-reliance on large-scale labeled data, difficulty in accurately identifying small lesions and ambiguous boundaries, high computational overhead, and limitations in clinical deployment. The overall framework is as follows: Figure 2 As shown, it includes three core parts: data preprocessing stage, encoder stage, and decoder stage.

[0090] In one embodiment of the present invention, the data preprocessing stage includes: Existing technologies in medical image preprocessing largely rely on conventional normalization and geometric enhancement, which are insufficient to address issues such as low pixel contrast and high noise interference in CT images. The present invention proposes an improved solution: on the one hand, it performs scaling, grayscale conversion, rotation, and cropping operations on the images to expand sample diversity; on the other hand, to address the problem of insufficient contrast in CT images, it introduces adaptive histogram equalization and random Gamma correction to enhance the grayscale difference between the tumor and the background, thereby facilitating subsequent network boundary recognition. To improve robustness, the present invention further incorporates random Gaussian noise and introduces some tumor-free slice samples to ensure the model can learn the discriminative features of tumor presence or absence. Regarding data annotation, not only are precise annotations performed by radiologists combined with pathological information, but also the intestinal lumen region is located using multi-sequence images, resulting in a higher quality training dataset than existing methods. These measures ensure that the input data is superior to traditional schemes in both feature contrast and annotation accuracy, thereby directly improving the model's segmentation performance.

[0091] In one embodiment of the present invention, the encoder of the present invention consists of five layers, each layer including a Stem module, an MSCA module, a boundary attention module (BAM), a fast spatial pyramid pooling module (SPPF), and a downsampling operation.

[0092] Furthermore, the present invention employs the following in the Stem module: Convolution (stride 1, padding 1) combined with a Batch Normalization (BN) layer to maintain the spatial resolution of the input image. Its purpose is to ensure that the feature resolution remains completely consistent during skip connections, avoiding information loss and thus improving boundary sensitivity and training stability.

[0093] Furthermore, the MSCA module designed in this invention combines multi-scale convolution and dilated convolution, which can effectively capture multi-level contextual information. Its calculation process is as follows:

[0094] in, to Representing different convolution kernels ( , , Extracted multi-scale features This represents dilated convolution features. By splicing and fusing convolutions to compress the number of channels, this invention reduces redundant computation while preserving local details and global information. Low contrast and blurred boundaries, common problems in medical imaging, are pain points that existing methods struggle to address. The BAM module proposed in this invention generates boundary masks based on gradient detection (Sobel operator), highlighting high-gradient regions. This module significantly enhances the network's ability to perceive tumor boundaries, enabling high-precision boundary segmentation even under complex tissue interference. Traditional parallel multi-scale convolution operations are computationally complex, hindering lightweight deployment. This invention employs Fast Spatial Pyramid Pooling (SPPF), using multiple stacks of the smallest convolution kernels to achieve a large receptive field, thereby reducing computational load. Comparisons are shown below:

[0095] Unlike some methods that use convolutional downsampling, this invention uses max pooling ( (Step size 2), its advantage lies in its ability to better preserve boundary features in low-contrast images, while reducing noise interference and further improving the robustness of segmentation.

[0096] In one embodiment of the present invention, the decoder stage comprises a five-layer bottom-up structure, each layer including skip-fusion and upsampling operations to progressively restore spatial resolution and integrate contextual and detailed features. Skip-fusion includes: the present invention achieves lightweight feature fusion through group convolution and inverted point convolution, and combines GELU and BN to improve stability and expressive power. Its calculation process is as follows:

[0097] in, and For the output of the adjacent encoder layer, Represents ReLU. This represents GELU. In this way, the present invention can improve the effective fusion of context and detailed information while reducing computational load.

[0098] In one embodiment of the present invention, the upsampling operation includes: the present invention employs bilinear interpolation, followed by using... Convolution, Batch Normalization (BN), and ReLU effectively restore resolution while preserving feature integrity. The calculation formulas are as follows:

[0099] in, and These are the input and output feature maps of adjacent layers, respectively.

[0100] In one embodiment of the present invention, the number of configurable channels includes: to adapt to different hardware conditions, the present invention provides three configurable channel schemes to achieve flexible deployment and improve clinical usability.

[0101] The embodiments of this invention also have the following technical effects. The core innovation of this invention lies in overcoming the limitations of existing colorectal tumor segmentation methods in low-contrast processing, accurate boundary recognition, and model computational overhead through multi-level, lightweight, and highly efficient modular collaborative work. Specifically, in the data preprocessing stage, this invention differs from existing methods that rely solely on simple geometric transformations. It combines adaptive histogram equalization, random Gamma correction, and random Gaussian noise to effectively enhance the boundary information of low-contrast medical images, significantly improving the robustness and generalization ability of the model. In terms of the core architecture, the multi-scale convolution and attention fusion module overcomes the limitations of single-scale convolution, achieving joint modeling of local details and global context, thus exhibiting superior performance in small lesion recognition. The boundary attention module solves the problem of insensitivity to blurred boundaries in existing technologies, significantly improving the accuracy of tumor boundary segmentation through a gradient guidance mechanism. At the same time, the fast spatial pyramid pooling module reduces the computational load by approximately 35% compared to traditional parallel convolution while maintaining the equivalent receptive field, making it more suitable for lightweight deployment. In terms of feature fusion and upsampling, the skip fusion in the decoder stage differs from traditional fully connected convolutional fusion, employing group convolution and inverted dot-matrix convolution. This significantly reduces computational cost while enhancing the ability to express feature diversity. Bilinear interpolation upsampling avoids artifacts that may occur during deconvolution, ensuring the smoothness and realism of the upsampling results. In summary, this invention significantly reduces computational overhead and parameter size while maintaining high-precision segmentation performance, successfully solving the problem of existing medical image segmentation methods being difficult to deploy efficiently in resource-constrained clinical environments.

[0102] Example 3 To achieve the above embodiments, such as Figure 3 As shown, this embodiment also provides a cross-modal lightweight colorectal tumor segmentation device 10, comprising: Image enhancement and dataset construction module 100 is used to perform adaptive histogram equalization and random Gamma correction on medical images to enhance the grayscale difference between tumors and background, and to construct a high-quality training dataset by introducing random Gaussian noise and tumor-free slice samples. The multi-scale and dilated convolution cascaded feature extraction module 200 is used to extract multi-level contextual features of the input image by using a cascaded design of multi-scale convolution and dilated convolution, and to achieve joint modeling of local details and global information through feature stitching and channel number compression. The boundary mask generation and attention processing module 300 is used to generate boundary masks based on gradient detection and combine them with a boundary attention mechanism to highlight high gradient regions in order to enhance the perception of blurred tumor boundaries. The Fast Spatial Pyramid Pooling Module 400 is used to simulate a large receptive field by stacking multiple convolution kernels with the smallest convolution kernel, thereby reducing computational complexity and preserving key feature information. The lightweight skip fusion and upsampling module 500 is used to achieve lightweight skip fusion of the decoder by using group convolution and inverted point convolution, and to use bilinear interpolation upsampling to restore spatial resolution to avoid artifact generation.

[0103] Furthermore, the image enhancement and dataset construction module 100 is also used for: Adaptive histogram equalization was performed using the CLAHE algorithm, with a contrast limit of 2.0 and a block size of 8×8. Through the Gamma correction function Implement a random Gamma transformation, where Randomly select within the interval [0.5, 1.5].

[0104] Furthermore, the multi-scale and dilated convolution cascaded feature extraction module 200 is also used for: use , , Concatenated feature extraction using three different scales of convolutional kernels; pass Feature maps concatenated from convolution pairs The number of channels is compressed to 60% of the original number of channels.

[0105] This invention discloses a cross-modal lightweight colorectal tumor segmentation device that achieves high-precision segmentation of colorectal tumors in clinical environments with limited labeled data and resources. It significantly improves boundary recognition capabilities and cross-scenario robustness while reducing computational overhead and the number of parameters, and supports real-time deployment.

[0106] Example 4 To implement the methods of the above embodiments, the present invention also provides a computer device, such as... Figure 4 As shown, the computer device 600 includes a memory 601 and a processor 602; wherein, the processor 602 reads the executable program code stored in the memory 601 to run a program corresponding to the executable program code, so as to implement the various steps of the cross-modal lightweight colorectal tumor segmentation method described above.

[0107] Example 5 To implement the above embodiments, this application also proposes a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a cross-modal lightweight colorectal tumor segmentation method as described in the foregoing embodiments.

[0108] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0109] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

Claims

1. A lightweight, cross-modal colorectal tumor segmentation method, characterized in that, include: S1, adaptive histogram equalization and random Gamma correction are applied to medical images to enhance the grayscale difference between tumors and background, and a high-quality training dataset is constructed by introducing random Gaussian noise and tumor-free slice samples. S2 employs a cascaded design of multi-scale convolution and dilated convolution to extract multi-level contextual features from the input image, and achieves joint modeling of local details and global information through feature stitching and channel number compression. S3, based on gradient detection to generate boundary masks and combined with boundary attention mechanism, highlights high gradient regions to enhance the perception of blurred tumor boundaries; S4 uses a fast spatial pyramid pooling module to simulate a large receptive field by stacking the smallest convolution kernel multiple times, reducing computational complexity while preserving key feature information. S5 utilizes group convolution and inverted point convolution to achieve lightweight jump fusion of the decoder, and employs bilinear interpolation upsampling to restore spatial resolution to avoid artifact generation.

2. The method as described in claim 1, characterized in that, S1 includes: S11 uses the CLAHE algorithm for adaptive histogram equalization, with a contrast limit of 2.0 and a block size of 8×8. S12, through the Gamma correction function Implement a random Gamma transformation, where Randomly select within the interval [0.5, 1.5].

3. The method as described in claim 1, characterized in that, The S2 includes: S21, used , , Concatenated feature extraction using three different scales of convolutional kernels; S22, via Feature maps concatenated from convolution pairs The number of channels is compressed to 60% of the original number of channels.

4. The method as described in claim 1, characterized in that, The S3 includes: S31, using the Sobel operator to perform gradient detection on the input image, and employing [a specific method] when generating the boundary mask. Convolution kernel; S32, the boundary mask is weighted using the channel attention module, and the weight calculation formula is as follows: ,in Indicates a fully connected layer. This represents the Sigmoid function.

5. The method as described in claim 1, characterized in that, The S4 includes: S41, employing 3 The convolutional kernels are cascaded and stacked, with each kernel having an expansion rate of 1, 2, and 5, respectively. S42 uses global average pooling to compress the feature map into channels, resulting in a compressed channel count that is 50% of the original channel count.

6. A lightweight, cross-modal colorectal tumor segmentation device, characterized in that, include: The image enhancement and dataset construction module is used to perform adaptive histogram equalization and random Gamma correction on medical images to enhance the grayscale difference between tumors and the background, and to construct a high-quality training dataset by introducing random Gaussian noise and tumor-free slice samples. The multi-scale and dilated convolution cascaded feature extraction module is used to extract multi-level contextual features of the input image by using a cascaded design of multi-scale convolution and dilated convolution. It achieves joint modeling of local details and global information through feature stitching and channel number compression. The boundary mask generation and attention processing module is used to generate boundary masks based on gradient detection and combine them with a boundary attention mechanism to highlight high gradient regions in order to enhance the perception of blurred tumor boundaries. The Fast Spatial Pyramid Pooling module is used to simulate a large receptive field by stacking multiple convolution kernels with the smallest kernel, thereby reducing computational complexity and preserving key feature information. The lightweight skip fusion and upsampling module is used to achieve lightweight skip fusion of the decoder by using group convolution and inverted point convolution, and to use bilinear interpolation upsampling to restore spatial resolution to avoid artifact generation.

7. The apparatus as claimed in claim 6, characterized in that, The image enhancement and dataset construction module is also used for: Adaptive histogram equalization was performed using the CLAHE algorithm, with a contrast limit of 2.0 and a block size of 8×8. Through the Gamma correction function Implement a random Gamma transformation, where Randomly select within the interval [0.5, 1.5].

8. The apparatus as claimed in claim 6, characterized in that, The multi-scale and dilated convolution cascaded feature extraction module is also used for: use , , Concatenated feature extraction using three different scales of convolutional kernels; pass Feature maps concatenated from convolution pairs The number of channels is compressed to 60% of the original number of channels.

9. A computer device, characterized in that, Including processor and memory; The processor reads executable program code stored in the memory to run a program corresponding to the executable program code, so as to implement a cross-modal lightweight colorectal tumor segmentation method as described in any one of claims 1-5.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements a cross-modal, lightweight colorectal tumor segmentation method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Automatic segmentation method for residual UNet rectal cancer tumor magnetic resonance image

    CN112785617A

  • MRI (Magnetic Resonance Imaging) brain tumor segmentation method based on multi-scale feature fusion of improved U-Net

    CN117876399A

  • Auxiliary scanning method and device for stomach ultrasonic image and electronic equipment

    CN118628657A

  • Cascade multi-scale convolution and modal enhancement brain tumor segmentation method based on Mamba architecture

    CN120635124A

  • Multi-modal brain tumor image segmentation method based on self-supervised learning

    WO2024108522A1