Medical image segmentation method and device for bladder wall and medium thereof
By introducing an extended long short-term memory module and a position-aware gating mechanism, combined with a frequency domain routing enhancement module, the problems of global consistency and detail preservation in bladder wall segmentation in 3D medical images were solved, achieving efficient and fine segmentation results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-11
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies struggle to achieve precise segmentation of the bladder wall in 3D medical images, particularly in terms of global consistency, spatial location awareness, and local detail enhancement, resulting in inaccurate and unromantic segmentation results.
An extended long short-term memory module is used to enhance global dependency modeling, a location-aware gating module is combined to improve spatial positioning accuracy, and a frequency domain routing mechanism is used to enhance detailed features. Feature extraction and fusion are performed through an encoder and decoder architecture.
It significantly improves the accuracy and robustness of bladder wall segmentation, and is particularly suitable for fine segmentation of thin bladder walls and small lesions, while maintaining high computational performance.
Smart Images

Figure CN121767386A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image segmentation, and more particularly to a method, device and medium for medical image segmentation of the bladder wall. Background Technology
[0002] In recent years, encoder-decoder architectures based on convolutional neural networks have become the mainstream framework for medical image segmentation, achieving multi-scale feature extraction and fusion through layer-by-layer convolution and upsampling operations. However, existing technologies still have significant limitations when facing the need for fine segmentation of thin structures such as the bladder wall. First, the local receptive field characteristics of traditional convolutional operations make it difficult to establish dependencies between long-distance regions. Although stacking layers can expand the receptive field, the modeling of long-range structures such as the overall contour of the bladder wall is still insufficient, resulting in a lack of global consistency in the segmentation results. Although some studies have introduced self-attention mechanisms to enhance global modeling, they face problems such as high computational complexity and insufficient capture of long-distance dependencies in 3D medical images, making it difficult to balance efficiency and effectiveness.
[0003] Secondly, existing methods have weak capabilities in modeling spatial location information. While the weight-sharing mechanism of convolutional kernels ensures translation invariance, it weakens the model's ability to perceive the spatial distribution of the bladder wall, and the global attention mechanism lacks explicit constraints on location. This deficiency directly leads to problems such as blurred segmentation boundaries and localization offset, especially noticeable in bladder wall segmentation tasks with low gray-level contrast and blurred edges. Simultaneously, information loss during downsampling and the neglect of local details in global modeling result in insufficient ability to capture minute lesions and tissue textures, while traditional detail enhancement methods often introduce feature redundancy and computational burden. Therefore, a solution that can simultaneously consider global context modeling, spatial location awareness, and local detail enhancement is urgently needed to improve the accuracy and robustness of bladder wall segmentation. Summary of the Invention
[0004] The main objective of this application is to propose a medical image segmentation method, device, and medium for bladder wall. It enhances global dependency modeling through a long short-term memory module, improves spatial positioning accuracy by combining position-aware gating, and strengthens detailed features using a frequency domain routing mechanism, thereby comprehensively improving the accuracy and robustness of bladder wall segmentation.
[0005] To achieve the above objectives, a first aspect of this application proposes a medical image segmentation method for the bladder wall, comprising: Acquire a three-dimensional image of the patient's bladder wall and a trained image segmentation model. The image segmentation model includes an encoder and a decoder. The encoder includes multiple cascaded convolutional layers and a bottleneck layer. A position-aware gating module is provided in one convolutional layer. The bottleneck layer is provided with a long short-term memory module and a frequency domain routing enhancement module. The 3D image is input into multiple cascaded convolutional layers and features are extracted layer by layer by forward propagation to obtain multiple first feature maps with decreasing spatial scales. When the forward propagation reaches the convolutional layer with a position-aware gating module, the position-aware gating module enhances the spatial features of the first feature map output by the previous convolutional layer. The first feature map with the smallest spatial scale is input into the long short-term memory module for global context dependency capture to obtain the second feature map; The second feature map is input into the frequency domain routing enhancement module to perform edge enhancement of local features, resulting in the third feature map. The third feature map is input into the decoder and fused with multiple first feature maps layer by layer in a backpropagation manner to obtain a segmented image between organs and lesions in the bladder wall.
[0006] Furthermore, in one possible embodiment, the position-aware gating module includes a first pointwise convolutional layer, a ReLU activation function layer, a second pointwise convolutional layer, and a Sigmoid activation function layer. The position-aware gating module performs spatial feature enhancement on the first feature map output from the previous convolutional layer, including: The first feature map output from the previous convolutional layer is input into the first pointwise convolutional layer for spatial weight calibration to obtain the first weight map. By using a ReLU activation function layer, the positive weights of the first weight map are spatially mapped to obtain a spatial feature map. The spatial feature map is input into the second pointwise convolutional layer for spatial weight calibration to obtain the second weight map; By using a Sigmoid activation function layer, the weights of the second weight graph are proportionally gated to obtain a spatially gated graph. The spatial gating map is multiplied element-wise with the first feature map output from the previous convolutional layer to differentiate and amplify or suppress features at different spatial locations on the first feature map.
[0007] Furthermore, in one possible embodiment, the long short-term memory module includes a first normalization layer, a first fully connected layer, an extended long short-term memory network, a SiLU activation function layer, and a second fully connected layer; Specifically, the first feature map with the smallest spatial scale is input into the Long Short-Term Memory module for global context dependency capture, resulting in the second feature map, which includes: The first feature map with the smallest spatial scale is normalized through the first normalization layer to obtain the fourth feature map. The fourth feature map is flattened in space using the first fully connected layer, forming a first sequence of multiple tokens, where each token corresponds to the fourth feature. Figure 1 Channel feature vectors at each spatial location; The first sequence is input into an extended long short-term memory network, and each token in the first sequence is recursively processed in row-major order to obtain a second sequence with long-range spatial dependencies. The first sequence is input into the SiLU activation function layer for gating constraints to obtain the gated sequence; The second sequence is multiplied element-wise with the gated sequence to obtain the third sequence; The third sequence is reshaped according to the spatial dimensions of the first feature map through the second fully connected layer to obtain the second feature map.
[0008] Furthermore, in one possible embodiment, the Extended Long Short-Term Memory (ESTM) network includes a first sequence flipping module, an mLSTM module, and a second sequence flipping module. The first sequence is input into the ESM, and each token in the first sequence is recursively processed in row-major order to obtain a second sequence with long-range spatial dependencies, including: The first sequence is reversed using the first sequence reversal module to obtain a third sequence with backward context dependency. The third sequence is input into the mLSTM module for forward context dependency determination, resulting in a fourth sequence with bidirectional context dependency. The second sequence is obtained by restoring the original order of the bidirectional sequence through the second sequence reversal module.
[0009] Furthermore, in one possible embodiment, the frequency domain routing enhancement module includes a local frequency modeling layer, a channel routing layer, and a fusion layer. The second feature map is input into the frequency domain routing enhancement module to perform edge enhancement of local features, resulting in a third feature map, including: The second feature map is input into the local frequency modeling layer for local spatial mapping to obtain a spatial attention map with local spatial features. The second feature map is input into the channel routing layer to perform channel weight mapping, resulting in a channel weight map with channel weight vectors. Through the fusion layer, the channel weight map and the spatial attention map are multiplied element-wise to obtain the ninth feature map, and the ninth feature map is fused with the second feature map to obtain the third feature map.
[0010] Furthermore, in one possible embodiment, the local frequency modeling layer includes a discrete cosine transform layer and a multilayer perceptron layer; The second feature map is input into the local frequency modeling layer for local spatialization mapping, resulting in a spatial attention map with local spatial features, including: The second feature map is divided into multiple fifth feature maps with local spatial features by using a discrete cosine transform layer, and multiple sixth feature maps with local spectral features are obtained by performing a discrete cosine transform on each fifth feature map. The local spectral features within each sixth feature map are vectorized to obtain multiple local vector maps. These multiple local vector maps are then input into the multilayer perceptron layer for attention weight projection to obtain multiple local attention maps. Multiple local attention maps are folded and upsampled back to the spatial size corresponding to the second feature map to obtain a spatial attention map.
[0011] Furthermore, in one possible embodiment, the channel routing layer includes a global average pooling layer, a third fully connected layer, a fourth fully connected layer, and a Sigmoid activation function layer; Specifically, the second feature map is input to the channel routing layer for channel weight mapping, resulting in a channel weight map with channel weight vectors, including: The second feature map is input into the global average pooling layer for global average pooling processing to obtain the seventh feature map with global channel descriptors. The seventh feature map is input into the third fully connected layer for channel dimension compression, and the seventh feature map after dimension reduction is subjected to a non-linear bias transformation through the ReLU activation function to obtain the eighth feature map. The eighth feature map is input into the fourth fully connected layer to restore the channel dimension, resulting in the restored eighth feature map. The restored eighth feature map is input into the Sigmoid activation function layer to constrain the weight range, thus obtaining the channel weight map.
[0012] Furthermore, in one possible embodiment, the fusion layer includes a 3×3×3 convolutional layer, a second normalization layer, and a ReLU function layer; The third feature map is obtained by fusing the ninth feature map with the second feature map, including... The ninth feature map is input into a 3×3×3 convolutional layer for feature extraction, resulting in the tenth feature map; The eleventh feature map is obtained by normalizing the tenth feature map through the second normalization layer. The eleventh feature map and the second feature map are non-linearly fused through the ReLU function layer to obtain the third feature map.
[0013] To achieve the above objectives, a second aspect of the present application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the medical image segmentation method for the bladder wall described in the first aspect of the present application.
[0014] To achieve the above objectives, the first aspect of this application proposes a storage medium, which is a computer-readable storage medium storing a computer program that, when executed by a processor, implements the medical image segmentation method for the bladder wall described in the first aspect of the present application.
[0015] The embodiments of the first aspect of this application have the following beneficial effects: by introducing the synergistic effect of an extended long short-term memory architecture, a position-aware gating mechanism, and a frequency domain routing enhancement module, a significant improvement in the performance of 3D medical image segmentation is achieved. Specifically, by integrating a long short-term memory module into the bottleneck layer, 3D features are converted into sequences and traversed, effectively establishing global dependencies between distant regions. This overcomes the shortcomings of traditional convolutional neural networks in long-range context modeling, enabling the segmentation results to maintain better overall consistency across complex anatomical structures. The position-aware gating module, through a lightweight position weight mapping mechanism, explicitly enhances the perception of the spatial distribution of the bladder wall, significantly improving the boundary blurring and positioning offset problems caused by insufficient position information modeling, making the depiction of organ contours and lesion edges more accurate. Simultaneously, the frequency domain routing enhancement module, through a dynamic filtering mechanism of frequency domain transformation and channel gating, highlights and retains key high-frequency components related to edges and textures, effectively enhancing the expression of local details in combination with residual structures, making it particularly suitable for fine segmentation of thin bladder walls and small lesions. These modules all adopt a lightweight design, maintaining computational efficiency while ensuring high precision. Ultimately, they achieved simultaneous breakthroughs in three dimensions: global consistency, positional accuracy, and detail preservation, providing more reliable technical support for clinical diagnosis. Attached Figure Description
[0016] Figure 1 This is an optional flowchart of a medical image segmentation method for the bladder wall provided in the embodiments of this application; Figure 2 This is another optional flowchart of the medical image segmentation method for the bladder wall provided in the embodiments of this application; Figure 3 This is an optional schematic diagram of the position-aware gating module provided in an embodiment of this application; Figure 4 This is an optional flowchart of a location-aware gating module performing spatial feature enhancement on a first feature map, as provided in an embodiment of this application. Figure 5 This is an optional schematic diagram of the long short-term memory module provided in an embodiment of this application; Figure 6 This is provided by the embodiments of this application. Figure 1 Another optional flowchart for step S103; Figure 7 This is provided by the embodiments of this application. Figure 6 An optional flowchart for step S303; Figure 8 This is provided by the embodiments of this application. Figure 1 An optional flowchart for step S104; Figure 9 This is an optional schematic diagram of the frequency domain routing enhancement module provided in an embodiment of this application; Figure 10 This is provided by the embodiments of this application. Figure 8 An optional flowchart for step S501; Figure 11 This is provided by the embodiments of this application. Figure 8 An optional flowchart for step S502; Figure 12 This is provided by the embodiments of this application. Figure 8 An optional flowchart for step S503; Figure 13 This is a schematic diagram of the segmentation prediction results of different models provided in the embodiments of this application on the internal bladder wall dataset; Figure 14 This is a schematic diagram of the hardware structure of an electronic device provided in one embodiment of this application. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0018] In the description of this application, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.
[0019] It should also be noted that in the description of this application, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. If the terms "first" and "second" are used, they are only for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0021] In the description of this application, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. 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.
[0022] Bladder wall segmentation is a crucial yet challenging task in medical image analysis. The bladder wall is thin and its morphology varies greatly among different patients, scanning modalities, and even in its full state; the contrast between the inner and outer walls and the background tissue is sometimes very low; scanning noise, motion artifacts, lesion invasion, or the presence of surrounding tissue structures blur the boundaries; simultaneously, available labeled data is usually limited, especially in 3D medical images (such as CT, MRI, or volume reconstruction) with significant intermodal variations. Bladder wall segmentation is not only a segmentation task itself, but often forms the basis for a series of downstream tasks such as tumor detection, radiation dose assessment, preoperative planning, and postoperative monitoring. Inaccurate segmentation can lead to misdiagnosis, dose calculation errors, or inappropriate surgical path selection. Therefore, model design needs to capture both the subtle boundary details of the bladder wall and the stability of the overall organ morphology and structure.
[0023] To address these issues, this application proposes a medical image segmentation method for the bladder wall. First, by introducing the synergistic effect of an extended long short-term memory (LSTM) architecture, a position-aware gating mechanism, and a frequency-domain routing enhancement module, a significant improvement in 3D medical image segmentation performance is achieved. Specifically, by integrating an LSM module into the bottleneck layer, 3D features are converted into sequences and traversed, effectively establishing global dependencies between distant regions. This overcomes the shortcomings of traditional convolutional neural networks in long-range context modeling, resulting in better overall consistency of segmentation results across complex anatomical structures. The position-aware gating module, through a lightweight position weight mapping mechanism, explicitly enhances the perception of the spatial distribution of the bladder wall, significantly improving boundary blurring and positioning offset problems caused by insufficient position information modeling, resulting in more accurate depiction of organ contours and lesion edges. Simultaneously, the frequency-domain routing enhancement module, through a dynamic filtering mechanism of frequency domain transformation and channel gating, highlights and retains key high-frequency components related to edges and textures. Combined with residual structures, this effectively enhances the expression of local details, making it particularly suitable for fine segmentation of thin bladder walls and small lesions. These modules all adopt a lightweight design, maintaining computational efficiency while ensuring high precision. Ultimately, they achieved simultaneous breakthroughs in three dimensions: global consistency, positional accuracy, and detail preservation, providing more reliable technical support for clinical diagnosis.
[0024] This application provides a medical image segmentation method for the bladder wall, applied to a 24GHz millimeter-wave radar detection system, which is specifically illustrated through the following embodiments.
[0025] Firstly, referring to Figure 1 As shown, Figure 1 This is an optional flowchart of a medical image segmentation method for the bladder wall provided in the embodiments of this application. The method may include, but is not limited to, steps S101 to S105.
[0026] Step S101: Obtain a three-dimensional image of the patient's bladder wall and a trained image segmentation model.
[0027] The image segmentation model includes an encoder and a decoder. The encoder includes multiple cascaded convolutional layers and a bottleneck layer. A position-aware gating module is set in one convolutional layer, and a long short-term memory module (HFA-Net) and a frequency domain routing enhancement module are set in the bottleneck layer.
[0028] Step S102: Input the 3D image into multiple cascaded convolutional layers and perform layer-by-layer feature extraction in a forward propagation manner to obtain multiple first feature maps with decreasing spatial scales. When the forward propagation reaches the convolutional layer equipped with a position-aware gating module, the position-aware gating module performs spatial feature enhancement on the first feature map output by the previous convolutional layer.
[0029] Step S103: Input the first feature map with the smallest spatial scale into the long short-term memory module to perform global context dependency capture and obtain the second feature map.
[0030] Step S104: Input the second feature map into the frequency domain routing enhancement module to perform edge enhancement of local features, and obtain the third feature map.
[0031] Step S105: Input the third feature map into the decoder and perform layer-by-layer spatial scale fusion with multiple first feature maps in a backpropagation manner to obtain a segmented image between organs and lesions in the bladder wall.
[0032] In one possible embodiment of steps S101 to S105, a three-dimensional MRI image of the patient's bladder region is acquired, and a pre-trained encoder-decoder segmentation model is loaded. The encoder of this model consists of five cascaded 3D convolutional layers. A position-aware gating module is embedded in the third convolutional layer, and a long short-term memory module and a frequency domain routing enhancement module are sequentially set in the bottleneck layer. In practice, the three-dimensional image is input into the encoder for forward propagation. Multi-scale feature maps are extracted through layer-by-layer convolution and downsampling. When processing reaches the third convolutional layer, a position-aware gating mechanism is activated to spatially weight the features, enhancing the response of the bladder wall region. Subsequently, the smallest-scale features are input into the long short-term memory module, and global spatial dependencies are established through sequence flattening, bidirectional mLSTM processing, and dimensionality recovery. The output is then sent to the frequency domain routing enhancement module, where it undergoes block-based DCT transformation, channel gating to select key frequency components, and inverse DCT reconstruction, combined with residual connections to enhance edge details. Finally, the enhanced features are input into the decoder, and through deconvolution upsampling and skip connections with the corresponding scale features of the encoder, the spatial resolution is gradually restored, and the final output is an accurate bladder wall segmentation image, which effectively solves the problems of boundary blurring and detail loss in thin tissue segmentation.
[0033] It should be noted that the image segmentation model employs a typical encoder-decoder U-shaped network structure, combining the advantages of convolutional neural networks (CNNs) and long short-term memory networks (LSTMs) to fully utilize the local details and global semantic information of the image. This structure is suitable for segmenting bladder walls, effectively extracting multi-scale features and performing efficient feature recovery.
[0034] The encoder consists of multiple convolutional layers (Conv3D) and pooling layers (MaxPooling). Each convolutional operation uses a 3x3x3 convolutional kernel for spatial feature extraction. A ReLU activation function is added after each convolutional layer, followed by MaxPooling operations to progressively reduce the resolution of the feature maps, thereby increasing the receptive field and extracting more abstract features. Through multiple convolutions and pooling, the encoder not only compresses image information but also enhances its ability to perceive complex structures. Its computational flow can be formally represented as follows:
[0035] In the formula: Indicates the first Feature maps input to the layer, For the first Layer convolution kernel parameters, This represents a 3D convolution operation. Represents the ReLU activation function. This indicates a max pooling operation. For the first The layer encoder outputs a feature map.
[0036] The decoder progressively restores resolution through a series of transposed convolutional (DeConv3D) layers to recover spatial details of the image. Each decoder layer upsamples the feature map using transposed convolution (DeConv3D) and supplements it with information from skip connection features from the encoder. Specifically, the decoder concatenates the first feature map of multiple high-dimensional features from the encoder output with the third feature map of low-dimensional features from skip connections. Then, a transposed convolutional layer further processes the concatenated features to recover the details needed for segmentation. Finally, a sigmoid activation function is used to map the output to the range [0, 1] for segmentation prediction. The calculation process is as follows:
[0037] In the formula: These are skip connection features from the layer 1 encoder. Decoder The input features of the layer This represents a 3D transpose convolution operation. Indicates feature splicing, This represents the Sigmoid activation function. For the first Feature map output by the layer decoder.
[0038] It should be noted that, referring to Figure 2 As shown, Figure 2 This is another optional flowchart of the medical image segmentation method for bladder wall provided in this application embodiment. The 3D image of the input image segmentation model enters the encoder stage after preprocessing, and multi-scale features are extracted by layer-by-layer convolution and residual structure. In the encoding process, this application specifically introduces a position-aware gating module (PosGate Block), which strengthens spatial position information through a lightweight position weight mapping mechanism, enabling the model to perceive boundaries and local structures more accurately, and effectively reducing the contour blurring and positioning offset problems that are prone to occur in traditional convolution models.
[0039] After encoding, the features enter the bottleneck layer. The Long Short-Term Memory (xLSTM) module introduced in this application flattens the 3D features into a sequence, and achieves dependency modeling between distant regions through sequence traversal, thereby enhancing the expressive power of the global context while preserving local convolutional features. This process significantly improves the model's overall consistency in modeling complex anatomical structures, making the segmentation results more coherent and reasonable in the spatial layout of organs and lesions. Subsequently, the features are further enhanced in detail through the Frequency Domain Routing Enhancement (LRFR) Block. This module utilizes frequency domain information routing and channel gating mechanisms to dynamically filter key high-frequency components and combine them with residual structures, effectively highlighting local details and texture features, especially showing higher resolution in small lesions and boundary regions.
[0040] The multi-level enhanced features, after the above processing, are finally input into the decoder stage, where they are gradually fused with the multi-scale features of the encoder and upsampled to restore spatial resolution, resulting in high-precision medical image segmentation results. The entire process achieves end-to-end automated modeling from input image to output segmentation, achieving breakthroughs simultaneously in global modeling, position awareness, and detail depiction. Compared with existing technologies, this application significantly improves the accuracy and robustness of 3D medical image segmentation while maintaining efficiency, providing a more efficient and reliable solution for clinical diagnosis and treatment.
[0041] In one possible embodiment, reference is made to... Figure 3 As shown, Figure 3 This is an optional schematic diagram of a position-aware gating module provided in an embodiment of this application. The position-aware gating module (PosGate Block) includes a first pointwise convolutional layer Conv1×1×1, a ReLU activation function layer, a second pointwise convolutional layer Conv1×1×1, and a Sigmoid activation function layer, as shown in the figure. Figure 4 As shown, Figure 4 This is an optional flowchart of a location-aware gating module performing spatial feature enhancement on a first feature map, provided in an embodiment of this application. The method may include, but is not limited to, steps S201 to S205.
[0042] Step S201: Input the first feature map output from the previous convolutional layer into the first pointwise convolutional layer for spatial weight calibration to obtain the first weight map.
[0043] Step S202: Through the ReLU activation function layer, the positive weights of the first weight map are spatially mapped to obtain a spatial feature map.
[0044] Step S203: Input the spatial feature map into the second pointwise convolutional layer for spatial weight calibration to obtain the second weight map.
[0045] Step S204: By using the Sigmoid activation function layer, the weights of the second weight graph are proportionally gated to obtain a spatially gated graph.
[0046] Step S205: Multiply the spatial gating map element-wise with the first feature map output from the previous convolutional layer to differentially amplify or suppress features at different spatial locations on the first feature map.
[0047] It should be noted that the position-aware gating module aims to explicitly model spatially relevant channel weights without introducing additional spatial convolutions, so as to amplify or suppress features point-by-point at the voxel level. For bladder wall segmentation, a thin-walled, ring-shaped structure with obvious positional priors, the position-aware gating module learns a gating map of the same size as the input, enhancing the wall region and suppressing the background, thereby improving boundary continuity and segmentation accuracy.
[0048] Unlike channel attention mechanisms (such as SE), the position-aware gating module does not perform spatial compression. Instead, it generates command weights P at each voxel location, thus explicitly learning the spatial priors of the bladder wall (annular shape, thin wall, proximity to the inner cavity). The position-aware gating module recalibrates each channel at each spatial location using two pointwise convolutional layers (1×1×1 Conv) and a nonlinear mapping, generating a spatial gating map (i.e., a position-channel gating map) consistent with the input shape. Subsequently, it weights the input features using element-wise multiplication, enabling the network to achieve higher responses at important locations (such as the bladder wall) while suppressing noise interference at non-critical locations. The calculation formula for this process is as follows.
[0049] The position-dependent mapping is obtained by using two layers of pointwise convolution (1×1×1 Conv) and ReLU nonlinear transformation:
[0050] In the formula: X is the input feature map, and W1 and W2 are learnable parameters of the weight matrix. The final result represents the position weight of each voxel in each channel.
[0051] Apply the positional weight P to the input features:
[0052] In the formula: This indicates element-wise multiplication, which allows for the differential amplification or suppression of features at different spatial locations.
[0053] In one possible embodiment of steps S201 to S205, the first feature map output from the previous convolutional layer is first input into the first pointwise convolutional layer for channel compression and spatial weight calibration, generating a preliminary spatial attention distribution. Then, the weight map is nonlinearly transformed using the ReLU activation function, preserving positive responses and establishing spatial location mapping relationships to form a spatial feature map. This feature map is then input into the second pointwise convolutional layer for channel recovery and fine weight calibration, resulting in an unnormalized spatial weight distribution. Next, the weight values are normalized using the Sigmoid activation function, constraining them to the [0,1] interval to form the final spatial gating map. This gating map is then multiplied element-wise with the original first feature map to achieve differentiated enhancement of key regions of the bladder wall: selectively amplifying features in high-weight regions while effectively suppressing background noise in low-weight regions. This design allows the model to significantly improve spatial location awareness while maintaining lightweight computation, especially in forming accurate feature responses in the bladder wall boundary region, laying an important foundation for subsequent global feature modeling and detail enhancement. The entire processing flow is completed in the third convolutional layer of the encoder, which effectively solves the problem of insufficient modeling of spatial location information by traditional convolution operations without significantly increasing computational complexity.
[0054] In one possible embodiment, reference is made to... Figure 5 As shown, Figure 5 This is an optional schematic diagram of a Long Short-Term Memory (LSTM) module provided in an embodiment of this application. The LSM module includes a first normalization layer (LayerNorm), a first fully connected layer (Linear), an extended LSM network, a SiLU activation function layer, and a second fully connected layer (Linear). (Refer to...) Figure 6 As shown, Figure 6 This is provided by the embodiments of this application. Figure 1 Another optional flowchart for step S103, the process of the method may include, but is not limited to, steps S301 to S306.
[0055] Step S301: The first feature map with the smallest spatial scale is normalized through the first normalization layer to obtain the fourth feature map.
[0056] Step S302: The fourth feature map is flattened in the spatial dimension through the first fully connected layer to form a first sequence consisting of multiple tokens.
[0057] Each token corresponds to the fourth feature. Figure 1 Channel feature vectors at spatial locations.
[0058] Step S303: Input the first sequence into the extended long short-term memory network, and recursively process each token in the first sequence in row-major order to obtain a second sequence with long-range spatial dependencies.
[0059] Step S304: Input the first sequence into the SiLU activation function layer for gating constraints to obtain a gated sequence.
[0060] Step S305: Multiply the second sequence element by element with the gated sequence to obtain the third sequence.
[0061] Step S306: Through the second fully connected layer, the third sequence is reshaped according to the spatial dimensions of the first feature map to obtain the second feature map.
[0062] It should be noted that, to further enhance the global context modeling capability of deep features, this application introduces an extended long short-term memory (xLSTM) network in the deepest layer of the encoder. This module converts the 3D feature map into a token sequence and captures long-range spatial dependencies through a gated recursion mechanism, thereby providing a globally aware feature representation for subsequent frequency domain enhancement and decoding stages. For a given 3D feature output by the encoder, it is first normalized and flattened into a first sequence in the spatial dimension, where each element of the first sequence corresponds to a token of channel dimension C. In the sequence dimension, the xLSTM processes each token sequentially according to the traversal order (row-major in this application), and its calculation process is shown below.
[0063]
[0064]
[0065]
[0066]
[0067]
[0068]
[0069] In the formula: These are the forget gate, input gate, and output gate, which control the retention, writing, and reading of information. For the first One token, This corresponds to the hidden state output. For candidate memories, This is the unit state. For learnable weight matrix, For bias terms, It is the hyperbolic tangent activation function.
[0070] After all tokens have been recursively processed, the output second sequence is rearranged back into the 3D structure and passed as an enhanced deep feature to the frequency domain routing enhancement module. This process ensures that the model can simultaneously capture local spatial details and global contextual dependencies, compensating for the shortcomings of convolutional structures in long-range modeling.
[0071] In one possible embodiment of steps S301 to S306, the smallest-scale feature map output by the encoder is first normalized by a first normalization layer to obtain a stable fourth feature map. Then, the three-dimensional features are flattened in space using a first fully connected layer to form a first sequence composed of spatial location tokens. This sequence is input into an extended long short-term memory network (LSTM), where each token is processed in row-major order. Long-range spatial dependencies are established through recursive computation using mLSTM units, outputting a second sequence containing global context. To enhance the expressive power of sequence modeling, the first sequence is simultaneously input into a SiLU activation function layer for nonlinear transformation, generating a gated sequence with smooth gating characteristics. By multiplying the second sequence element-wise with the gated sequence, dynamic adjustment of information flow at different locations is achieved, enhancing the response of important features and suppressing redundant information. Finally, the processed third sequence is reshaped into a three-dimensional structure with the same spatial dimensions as the input feature map through a second fully connected layer, completing the transformation from sequence to space and obtaining a second feature map rich in global dependencies. This design, through the organic combination of sequence modeling and gating mechanisms, significantly improves the model's ability to perceive the overall structure of the bladder wall while maintaining computational efficiency.
[0072] Furthermore, refer to Figure 5 As shown, the Extended Long Short-Term Memory (LSTM) network includes a first sequence flipping module (Flip), an mLSTM module, and a second sequence flipping module (Flip), as referenced. Figure 7 As shown, Figure 7 This is provided by the embodiments of this application. Figure 6 An optional flowchart for step S303, the method may include, but is not limited to, steps S401 to S403.
[0073] Step S401: The first sequence is reversed using the first sequence reversal module to obtain a third sequence with backward context dependency.
[0074] Step S402: Input the third sequence into the mLSTM module to determine the forward context dependency, and obtain the fourth sequence with bidirectional context dependency.
[0075] Step S403: The bidirectional sequence is restored to its original order using the second sequence reversal module to obtain the second sequence.
[0076] In steps S401 to S403, bidirectional context modeling is achieved while maintaining the unidirectional mLSTM computational architecture through a carefully designed sequence direction transformation. First, the first sequence reversal module reverses the order of the input first sequence, adjusting the tokens at the end of the original sequence to the beginning position, forming a third sequence with backward context dependency characteristics. This reversed sequence is then input into the mLSTM module for forward recursive processing. Because the sequence order has been reversed, the mLSTM will preferentially access the token information at the end of the original sequence during sequential processing, thus establishing a backward content dependency. The fourth sequence obtained after mLSTM processing simultaneously contains both forward and backward semantic information of the original sequence, forming a complete bidirectional context dependency. Finally, the second sequence reversal module reverses the order of the processed sequence again, restoring it to the original sequence's arrangement, ensuring that the spatial position of the output sequence strictly corresponds to the input. This "reverse-process-restore" pipeline design achieves the same contextual modeling effect as bidirectional LSTM using only unidirectional mLSTM. It significantly reduces computational complexity and memory usage while maintaining model expressiveness, making it particularly suitable for efficient processing of long sequences in 3D medical images and providing an effective global feature enhancement method for bladder wall segmentation tasks.
[0077] Furthermore, the frequency domain routing enhancement module includes a local frequency modeling layer, a channel routing layer, and a fusion layer, as shown in the reference... Figure 8 As shown, Figure 8 This is provided by the embodiments of this application. Figure 1 An optional flowchart for step S104, the method may include, but is not limited to, steps S501 to S503.
[0078] Step S501: Input the second feature map into the local frequency modeling layer to perform local spatialization mapping, and obtain a spatial attention map with local spatial features.
[0079] Step S502: Input the second feature map into the channel routing layer to perform channel weight mapping, and obtain a channel weight map with channel weight vector.
[0080] Step S503: Through the fusion layer, the channel weight map and the spatial attention map are multiplied element-wise to obtain the ninth feature map, and the ninth feature map is fused with the second feature map to obtain the third feature map.
[0081] In steps S501 to S503, the input second feature map is first fed into two parallel processing paths: In the local frequency modeling path, spatial features are mapped to the frequency domain, the energy distribution of each frequency component is extracted, and then an inverse transform and spatial convolution are performed to generate a spatial attention map, which accurately focuses on the spatial location corresponding to high-frequency details; In the channel routing path, global average pooling is used to compress the spatial dimension, and a channel weight vector is constructed through two fully connected layers. The first layer compresses the number of channels to 1 / 16 of the original number of channels and activates it with ReLU, while the second layer restores the original number of channels and generates a channel weight map through the Sigmoid function, realizing differentiated selection of channels carrying different frequency information. Subsequently, in the fusion layer, the spatial attention map and the channel weight map are multiplied element-wise, so that the model simultaneously focuses on important spatial locations and key feature channels, resulting in an enhanced ninth feature map. Finally, the ninth feature map is added to the original second feature map through residual connection, which not only preserves the original semantic information, but also significantly enhances the expression of high-frequency details such as edges and textures. The final output third feature map particularly enhances the representation ability of the bladder wall boundary region, providing feature input rich in detailed information for the subsequent decoder.
[0082] Furthermore, refer to Figure 9 As shown, Figure 9 This is an optional schematic diagram of the frequency domain routing enhancement module provided in this application embodiment, wherein the local frequency modeling layer Frequency Routing Attention includes a discrete cosine transform layer Patch DCT and a multilayer perceptron layer MLP, as shown in the figure. Figure 10 As shown, Figure 10 This is provided by the embodiments of this application. Figure 8 An optional flowchart for step S501, the method may include, but is not limited to, steps S601 to S603.
[0083] Step S601: Through the discrete cosine transform layer, the second feature map is divided into multiple fifth feature maps with local spatial features, and the discrete cosine transform is performed on each fifth feature map to obtain multiple sixth feature maps with local spectral features.
[0084] Step S602: Vectorize the local spectral features in each sixth feature map to obtain multiple local vector maps, and input the multiple local vector maps into the multilayer perceptron layer for attention weight projection to obtain multiple local attention maps.
[0085] Step S603: Fold the multiple local attention maps and upsample them back to the spatial size corresponding to the second feature map to obtain the spatial attention map.
[0086] It should be noted that the frequency domain routing enhancement module aims to enhance boundary information and local features in bladder wall segmentation. Traditional convolutional operations are often insufficient in processing edges and textures, especially for thin-walled tissues such as the bladder wall. To compensate for this deficiency, local frequency modeling and a frequency routing mechanism are introduced, enabling the model to focus on the frequency components most helpful for segmentation in the frequency domain, enhancing edge details, while an attention mechanism is introduced to guide feature weighting.
[0087] First, the features of the input second feature map Divide into small local patches (fifth feature map), each PxP in size, and for each patch... Perform Discrete Cosine Transform (DCT). DCT can effectively convert the spatial information of an image into frequency information, and is particularly suitable for capturing image edge and texture information, which is especially important for the segmentation of thin-walled structures such as the bladder wall. DCT can be represented as: .
[0088] In the formula: ,parameter These represent the frequency indices in the horizontal and vertical directions, respectively. and As the normalization factor, , Through DCT decomposition, the spatial texture of each patch is represented as a spectral coefficient matrix. We retain only the first K spectral coefficients to reduce computation and highlight key spectral information.
[0089] Then, the spectral coefficients of each patch are vectorized as follows: The attention weights are obtained by projection through multiple perceptron layers:
[0090] In the formula: For the Sigmoid activation function, W1 and W 2 is a learnable parameter, and b1 and b2 are bias terms.
[0091] all Fold and upsample back to the original size to obtain the spatial attention map:
[0092] In the formula: This represents a mapping operator consisting of Discrete Cosine Transform (DCT), spectral coefficient selection, fully connected projection (MLP), and spatial upsampling. The model is made more sensitive at boundaries by indirectly modulating the feature X through the generation of attention A.
[0093] In one possible embodiment of steps S601 to S603, a block-based discrete cosine transform (DCT) technique is used to implement the spatial attention mechanism. First, the input second feature map is divided into 8×8 local blocks in the spatial dimension. Each local block is then transformed from the spatial domain to the frequency domain using a DCT layer, generating a spectral feature map containing different frequency components. Subsequently, each spectral block is vectorized, expanding the two-dimensional frequency coefficients into one-dimensional feature vectors to form a vector sequence with local spectral features. These vector sequences are input into a multilayer perceptron consisting of two fully connected layers. Through nonlinear transformation, the importance weights of different frequency components are learned, generating the corresponding local attention distribution map. Finally, a folding operation reassembles the processed local attention map into a complete feature map structure, and bilinear interpolation is used for upsampling to restore it to the same level as the original second feature map. Figure 1 The spatial dimensions are determined to form the final spatial attention map. This design, through the organic combination of frequency domain analysis and attention mechanism, enables the model to accurately capture high-frequency information related to the bladder wall edge and texture, while effectively suppressing low-frequency background noise. This provides spatially adaptive weight guidance for subsequent feature fusion, significantly improving the model's ability to resolve details of complex anatomical structures.
[0094] Furthermore, refer to again Figure 9 As shown, the channel routing layer includes a global average pooling layer, a third fully connected layer (FC), a fourth fully connected layer (FC), and a sigmoid activation function layer, as shown in the reference. Figure 11 As shown, Figure 11 This is provided by the embodiments of this application. Figure 8 An optional flowchart for step S502, the method may include, but is not limited to, steps S701 to S703.
[0095] Step S701: Input the second feature map into the global average pooling layer for global average pooling processing to obtain the seventh feature map with global channel descriptors.
[0096] Step S702: Input the seventh feature map into the third fully connected layer for channel dimension compression, and perform a non-linear bias transformation on the dimension-reduced seventh feature map through the ReLU activation function to obtain the eighth feature map.
[0097] Step S703: Input the eighth feature map into the fourth fully connected layer to restore the channel dimension, and obtain the restored eighth feature map.
[0098] Step S704: Input the restored eighth feature map into the Sigmoid activation function layer to constrain the weight range and obtain the channel weight map.
[0099] It should be noted that global average pooling is performed on the feature X of the input second feature map to obtain the channel description:
[0100] The seventh feature map, which has a global channel descriptor, is then processed through two fully connected layers and a Sigmoid activation function layer to obtain the corresponding channel weights. : .
[0101] In the formula, For learnable parameters, This is a bias term.
[0102] In one possible embodiment of steps S701 to S704, the input second feature map is first input into a global average pooling layer, and the feature mean of each channel is calculated along the spatial dimension to generate a channel descriptor containing global statistical information. This descriptor is then input into a third fully connected layer for channel dimension compression, reducing the original number of channels to 1 / 16, effectively reducing the number of parameters and establishing nonlinear relationships between channels. The ReLU activation function is used to perform a nonlinear transformation on the dimensionality-reduced features, enhancing the model's expressive power and alleviating the gradient vanishing problem. The processed features are then input into a fourth fully connected layer for channel dimension recovery, reconstructing the feature dimension to the original number of channels, maintaining consistency with the input feature dimension. Finally, the Sigmoid activation function constrains the output values to the [0,1] interval, generating a channel weight map with clear semantics, where each weight value represents the importance of the corresponding feature channel in the bladder wall segmentation task. This design, through efficient channel interaction modeling, enables the model to adaptively emphasize key feature channels related to lesion edges and tissue texture, while suppressing interference from redundant or noisy channels, providing precise weight guidance for subsequent spatial and channel feature fusion. While maintaining low computational complexity, the entire processing flow significantly improves the model's ability to distinguish feature channels.
[0103] Furthermore, refer to Figure 9 As shown, the fusion layer includes a 3×3×3 convolutional layer (Conv3D), a second normalization layer (Norm), and a ReLU function layer, as shown in the reference. Figure 12 As shown, Figure 12 This is provided by the embodiments of this application. Figure 8 An optional flowchart for step S503, the method may include, but is not limited to, steps S801 to S803.
[0104] Step S801: Input the ninth feature map into a 3×3×3 convolutional layer for feature extraction to obtain the tenth feature map.
[0105] Step S802: Normalize the tenth feature map through the second normalization layer to obtain the eleventh feature map.
[0106] Step S803: Through the ReLU function layer, the eleventh feature map and the second feature map are nonlinearly fused to obtain the third feature map.
[0107] It should be noted that the features of the ninth feature map are fused with the features of the input second feature map through residual connections, preserving the dimensionality of the feature maps and enhancing key boundary information. Finally, the third feature map output by the frequency domain routing enhancement module LRFR Block is:
[0108] In the formula: denoted as element-wise multiplication, Conv is a 3x3x3 convolution, and A is the spatial attention map after global concatenation.
[0109] In one possible embodiment of steps S801 to S803, the ninth feature map, after spatial-channel attention fusion, is first input into a 3×3×3 convolutional layer for local feature extraction. Richer neighborhood information is obtained through sliding calculation of the convolutional kernel, resulting in an enhanced tenth feature map. Subsequently, a second normalization layer performs batch normalization on the convolutional output, adjusting the mean and variance of the feature distribution to accelerate the training process and improve model stability, resulting in a standardized eleventh feature map. Finally, a ReLU activation function layer performs residual connections between the processed features and the original input second feature map, achieving non-linear feature fusion. This operation preserves the semantic integrity of the original features while incorporating detailed information filtered in the frequency domain and spatially enhanced, ultimately forming a third feature map with rich context and refined local features. This design ensures the stability of gradient propagation through shortcut connections and enhances the expressive ability of bladder wall edges and texture features through refined paths. It significantly improves the model's ability to model complex anatomical structures without significantly increasing the number of parameters, providing high-quality feature input for subsequent decoding.
[0110] In this application, the proposed image segmentation model was evaluated on an internal bladder wall dataset containing 131 patient cases.
[0111] To quantify the segmentation accuracy of the bladder wall using the model, this application employs five metrics: Dice similarity coefficient, intersection-over-union ratio (IOU), 95% Hausdorff distance (HD95), volume overlap error (VOE), and average volume difference (AVD). All metrics are calculated in three-dimensional voxel space. Dice and IOU both range from [0, 1], with values closer to 1 indicating higher consistency between the segmentation result and the annotations by medical experts. A smaller HD95 value indicates better edge fit, while VOE and AVD are better when closer to 0.
[0112]
[0113] It should be noted that this application sets the batch size to 2, the initial learning rate to 1e-4, and the training to 100 rounds. During data preprocessing, the image size is adjusted to 256x224 and resampled to 1mm x 1mm x 1mm.
[0114] The experimental results are shown in Table 1 below. Table 1 presents the test results on the internal bladder wall dataset. Meanwhile, referring to... Figure 13 As shown, Figure 13 This is a schematic diagram of the segmentation prediction results of different models provided in the embodiments of this application on the internal bladder wall dataset, as shown in Table 1 and... Figure 13 It can be seen that the model in this application has higher segmentation accuracy for the bladder wall than other network structures.
[0115] Table 1
[0116] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned medical image segmentation method for the bladder wall. This electronic device can be any smart terminal, including mobile phones, tablets, and in-vehicle computers.
[0117] Please see Figure 14 , Figure 14 This is a schematic diagram of the hardware structure of an electronic device provided in one embodiment of this application. The electronic device includes: The processor 1401 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the medical image segmentation method for bladder wall provided in the embodiments of this application. The memory 1402 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1402 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1402 and is called and executed by the processor 1401 to execute the medical image segmentation method for the bladder wall provided in the embodiments of this application. The input / output interface 1403 is used to implement information input and output; The communication interface 1404 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 1405 transmits information between various components of the device (e.g., processor 1401, memory 1402, input / output interface 1403, and communication interface 1404); The processor 1401, memory 1402, input / output interface 1403 and communication interface 1404 are connected to each other within the device via bus 1405.
[0118] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, provides a medical image segmentation method for the bladder wall according to this application.
[0119] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0120] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.
[0121] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.
[0122] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0123] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.
[0124] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0125] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.
[0126] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0127] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0128] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0129] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-accessible storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0130] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.
Claims
1. A medical image segmentation method for the bladder wall, characterized in that, include: A three-dimensional image of the patient's bladder wall and a trained image segmentation model are acquired. The image segmentation model includes an encoder and a decoder. The encoder includes multiple cascaded convolutional layers and a bottleneck layer. A position-aware gating module is provided in one of the convolutional layers. The bottleneck layer is provided with a long short-term memory module and a frequency domain routing enhancement module. The three-dimensional image is input into the multiple cascaded convolutional layers and features are extracted layer by layer in a forward propagation manner to obtain multiple first feature maps with decreasing spatial scales. When the forward propagation reaches the convolutional layer equipped with the position-aware gating module, the position-aware gating module enhances the spatial features of the first feature map output by the previous convolutional layer. The first feature map with the smallest spatial scale is input into the long short-term memory module to perform global context dependency capture, thereby obtaining the second feature map; The second feature map is input into the frequency domain routing enhancement module to perform edge enhancement of local features, resulting in a third feature map; The third feature map is input into the decoder and fused with multiple first feature maps layer by layer in a backpropagation manner to obtain a segmented image of the bladder wall.
2. The medical image segmentation method according to claim 1, characterized in that, The position-aware gating module includes a first pointwise convolutional layer, a ReLU activation function layer, a second pointwise convolutional layer, and a Sigmoid activation function layer. The spatial feature enhancement of the first feature map output from the previous convolutional layer via the position-aware gating module includes: The first feature map output from the previous convolutional layer is input into the first pointwise convolutional layer for spatial weight calibration to obtain the first weight map; The spatial feature map is obtained by mapping the positive weights of the first weight map to their spatial positions through the ReLU activation function layer. The spatial feature map is input into the second pointwise convolutional layer for spatial weight calibration to obtain the second weight map; By using the Sigmoid activation function layer, the weights of the second weight graph are proportionally gated to obtain a spatially gated graph; The spatial gating map is multiplied element-wise with the first feature map output by the previous convolutional layer to differentially amplify or suppress features at different spatial locations on the first feature map.
3. The medical image segmentation method according to claim 1, characterized in that, The long short-term memory module includes a first normalization layer, a first fully connected layer, an extended long short-term memory network, a SiLU activation function layer, and a second fully connected layer. The step of inputting the first feature map with the smallest spatial scale into the long short-term memory module for global context dependency capture to obtain the second feature map includes: The first feature map, which has the smallest spatial scale, is normalized through the first normalization layer to obtain the fourth feature map. The fourth feature map is flattened in the spatial dimension through the first fully connected layer to form a first sequence consisting of multiple tokens, wherein each token corresponds to a channel feature vector at a spatial location in the fourth feature map; The first sequence is input into the extended long short-term memory network, and each token in the first sequence is recursively processed in row-major order to obtain a second sequence with long-range spatial dependencies. The first sequence is input into the SiLU activation function layer for gating constraints to obtain a gated sequence; The second sequence is multiplied element-wise with the gated sequence to obtain the third sequence; The second fully connected layer reshapes the third sequence according to the spatial dimensions of the first feature map to obtain the second feature map.
4. The medical image segmentation method according to claim 3, characterized in that, The extended long short-term memory network includes a first sequence flipping module, an mLSTM module, and a second sequence flipping module. The first sequence is input into the extended long short-term memory network, and each token in the first sequence is recursively processed in row-major order to obtain a second sequence with long-range spatial dependencies. This includes: The first sequence is reversed using the first sequence reversal module to obtain a third sequence with backward context dependency. The third sequence is input into the mLSTM module for forward context dependency determination to obtain a fourth sequence with bidirectional context dependency. The second sequence is obtained by restoring the original order of the bidirectional sequence through the second sequence reversal module.
5. The medical image segmentation method according to claim 1, characterized in that, The frequency domain routing enhancement module includes a local frequency modeling layer, a channel routing layer, and a fusion layer. The step of inputting the second feature map into the frequency domain routing enhancement module to perform edge enhancement of local features to obtain a third feature map includes: The second feature map is input into the local frequency modeling layer for local spatial mapping to obtain a spatial attention map with local spatial features. The second feature map is input to the channel routing layer to perform channel weight mapping, resulting in a channel weight map with channel weight vectors; The fusion layer multiplies the channel weight map and the spatial attention map element-wise to obtain the ninth feature map, and then fuses the ninth feature map with the second feature map to obtain the third feature map.
6. The medical image segmentation method according to claim 5, characterized in that, The local frequency modeling layer includes a discrete cosine transform layer and a multilayer perceptron layer; The step of inputting the second feature map into the local frequency modeling layer for local spatialization mapping to obtain a spatial attention map with local spatial features includes: The second feature map is divided into multiple fifth feature maps with local spatial features by the discrete cosine transform layer, and multiple sixth feature maps with local spectral features are obtained by performing discrete cosine transform on each of the fifth feature maps. The local spectral features within each of the sixth feature maps are vectorized to obtain multiple local vector maps. These multiple local vector maps are then input into the multilayer perceptron layer for attention weight projection to obtain multiple local attention maps. The multiple local attention maps are folded and upsampled back to the spatial size corresponding to the second feature map to obtain the spatial attention map.
7. The medical image segmentation method according to claim 5, characterized in that, The channel routing layer includes a global average pooling layer, a third fully connected layer, a fourth fully connected layer, and a Sigmoid activation function layer. The step of inputting the second feature map into the channel routing layer to perform channel weight mapping and obtain a channel weight map with channel weight vectors includes: The second feature map is input into the global average pooling layer for global average pooling processing to obtain a seventh feature map with a global channel descriptor. The seventh feature map is input into the third fully connected layer for channel dimension compression, and the reduced seventh feature map is subjected to a non-linear bias transformation using the ReLU activation function to obtain the eighth feature map. The eighth feature map is input into the fourth fully connected layer to restore the channel dimension, resulting in the restored eighth feature map. The restored eighth feature map is input into the Sigmoid activation function layer for weight range constraint to obtain the channel weight map.
8. The medical image segmentation method according to claim 5, characterized in that, The fusion layer includes a 3×3×3 convolutional layer, a second normalization layer, and a ReLU function layer; The step of fusing the ninth feature map with the second feature map to obtain the third feature map includes: The ninth feature map is input into the 3×3×3 convolutional layer for feature extraction to obtain the tenth feature map; The eleventh feature map is obtained by normalizing the tenth feature map through the second normalization layer. The third feature map is obtained by nonlinearly fusing the eleventh feature map with the second feature map through the ReLU function layer.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the medical image segmentation method for the bladder wall as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a processor-executable program, which, when executed by a processor, is used to implement the medical image segmentation method for the bladder wall as described in any one of claims 1 to 8.
Citation Information
Cited By
Bladder neck division auxiliary identification method for minimally invasive prostate cancer radical operation
CN122048936A