An abdominal CT segmentation method based on mask anti-feeding memory enhancement
Patent Information
- Application Number
- CN202611260793.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-19
- Publication Date
- 2026-10-30
AI Technical Summary
然而,SAM2的记忆编码器仅将原始图像特征与预测掩码进行简单融合后存入记忆库,未能充分利用预测掩码对原始图像内容本身进行有选择性的增强,导致大量背景区域信息同样被编码进入记忆库,在跨帧传递过程中可能累积噪声,进而影响后续帧的分割准确性
(1)本发明提出的一种基于掩码反哺记忆增强的腹部CT分割方法,配合图像编码器中穿插的卷积模块对局部细节的增强、预处理环节对软组织对比度的提升以及提示特征在推理阶段的自动传播,各模块协同作用,在NIH TCIA Pancreas-CT数据集上达到92.3%的Dice相似系数;
Smart Images

Figure CN123015497A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and specifically to an abdominal CT segmentation method based on mask-based memory enhancement. Background Technology
[0002] Accurate segmentation of abdominal organs is a crucial prerequisite for computer-aided diagnosis, surgical planning, and radiotherapy target delineation. In recent years, deep learning-based segmentation methods have made significant progress in medical image processing. Convolutional neural network methods, such as U-Net and its variants, and nnU-Net, effectively extract local texture features from images through encoder-decoder structures and skip connections, and have been widely applied in abdominal organ segmentation tasks. However, the local receptive field characteristic of convolution operations limits their ability to model long-range dependencies and global contextual information, making them ill-suited for handling complex situations such as significant variations in organ shape and blurred boundaries. Pure Transformer methods, such as Swin-UNETR, leverage the global perception capability of self-attention mechanisms, excelling in modeling dependencies between distant pixels. However, their ability to depict local details and fine boundaries remains limited, especially for small target organs like the pancreas with low volume and low boundary contrast, where segmentation accuracy remains unsatisfactory. In recent years, suggestive segmentation models, such as Segment Anything Model 2 (SAM2), have provided new technical approaches for continuous inter-slice segmentation of medical CT body data by introducing a memory mechanism to process video sequences frame by frame. Existing research has attempted to apply SAM2 to medical image segmentation, using a memory bank to store historical frame information to guide the segmentation of the current frame, thus improving inter-slice consistency to some extent. However, SAM2's memory encoder simply fuses the original image features with the predicted mask and stores it in the memory bank, failing to fully utilize the predicted mask to selectively enhance the original image content itself. This results in a large amount of background information also being encoded into the memory bank, potentially accumulating noise during cross-frame transmission and affecting the segmentation accuracy of subsequent frames. Furthermore, existing methods still struggle to meet clinical needs for segmenting small target organs in contrast-free abdominal CT images with low soft tissue contrast; the Dice similarity coefficient on publicly available pancreatic datasets is generally below 90%. Summary of the Invention
[0003] To address the aforementioned problems in the existing technology, this invention proposes an abdominal CT segmentation method based on mask-based memory enhancement, comprising the following steps: S1: Acquire abdominal CT volume data, preprocess and normalize the slices of each layer in the abdominal CT volume data, and arrange the preprocessed slices into an image sequence according to the anatomical order. S2: Using the current frame in the image sequence as the input to be segmented, the input image encoder extracts multi-scale image features. The image encoder intersperses convolutional modules between Transformer coding layers. S3: After fusing the current prompt features with the multi-scale image features by concatenating and integrating them along the channel dimension, input the result into the mask decoder to generate the prediction mask for the current frame; S4: The original image of the current frame and the prediction mask are concatenated in the channel dimension, and a spatial weight map is generated by cascaded convolution and spatial dimension Softmax normalization. The numerical distribution of the spatial weight map decays from the high confidence region of the prediction mask to the background region, and is generated based on cross-position competition when the weight sum is always one. S5: Based on the spatial weight map, the original image of the current frame is reweighted element by element to obtain enhanced features and store them in the memory bank; S6: Use the multi-scale image features of the current frame as the query vector, and the historical enhancement features stored in the memory bank as the key vector and value vector to perform memory attention fusion. Output the organ segmentation result of the current frame based on the fused current frame features. S7: Obtain the organ segmentation results of each frame in the image sequence and integrate them into a three-dimensional organ segmentation result.
[0004] This invention generates a spatial weight map that decays towards the background centered on a high-confidence region by concatenating the predicted mask and the original image through concatenated convolution and spatial dimension Softmax. The original image is then reweighted element by element, so that the enhanced features stored in the memory bank are focused on the target organ region and the background noise is suppressed to accumulate across frames. Combined with the enhanced capture of local details by the convolution module interspersed in the encoder, the segmentation accuracy and inter-layer consistency of small target organs are improved.
[0005] Furthermore, in step S1, the preprocessing also includes: performing edge detection on each slice to obtain the maximum contour coordinates of each slice, taking the union of the maximum contour coordinates of all layers as the clipping range, and performing background clipping on the volume data.
[0006] Furthermore, in step S1, the preprocessing also includes: truncating the pixel values of each slice to a preset grayscale value range, and linearly mapping the truncated pixel values to a normalized range.
[0007] Furthermore, in step S1, the preprocessing also includes: dividing each layer slice into several sub-blocks, and performing contrast-limited adaptive histogram equalization on each sub-block.
[0008] Furthermore, in step S2, features of neighboring image blocks are convolutionally fused using a convolution module.
[0009] Furthermore, in step S3, the cue feature is generated by passing the prediction mask of the previous frame through the memory bank.
[0010] Furthermore, the cue features of the first frame in the image sequence are automatically generated by the object detection algorithm.
[0011] Furthermore, in step S4, the cascaded convolution sequentially includes a first convolution operation with a kernel size of 3×3 and a second convolution operation with a kernel size of 1×1.
[0012] Furthermore, in step S4, cross-location competition specifically involves determining the numerical distribution of the corresponding spatial location in the spatial weight map based on the proportion of the response intensity of each spatial location in the total response intensity of all spatial locations.
[0013] Furthermore, in step S5, the number of enhanced features stored in the memory is a preset capacity threshold. When the number of enhanced features stored exceeds the preset capacity threshold, the memory is updated according to the first-in-first-out strategy.
[0014] Compared with the prior art, the present invention has at least the following beneficial effects: (1) The present invention proposes an abdominal CT segmentation method based on mask feedback memory enhancement, which, together with the convolution module interspersed in the image encoder to enhance local details, the preprocessing stage to improve soft tissue contrast, and the automatic propagation of cue features in the inference stage, achieves a Dice similarity coefficient of 92.3% on the NIH TCIA Pancreas-CT dataset. (2) Convolutional modules are interspersed between Transformer layers to take into account both global context modeling and local detail capture. Combined with background cropping, gray value truncation mapping and contrast-limited adaptive histogram equalization in preprocessing, the various layer methods work together to enable the current frame segmentation results to obtain more reliable historical experience guidance. In the task of segmenting small target organs in abdominal CT images without contrast agent, compared with the scheme of using any one technique alone, the overall segmentation accuracy and interlayer consistency are steadily improved. (3) By normalizing the spatial dimension using Softmax, the sum of the weight values of all spatial locations in the spatial weight map is made to 1. This causes the weight values of each spatial location to be generated through cross-location competition, rather than by independently performing Sigmoid activation on each spatial location. Compared with the conventional pixel-by-pixel independent gating method, the spatial weight map of the present invention can produce a cross-location relative suppression effect on the response of the background region while preserving the high response of the target region. This allows the enhanced features to obtain more thorough background noise suppression before being stored in the memory bank, reducing the cumulative effect of noise during cross-frame memory propagation. Attached Figure Description
[0015] Figure 1 This is a step-by-step diagram of an abdominal CT segmentation method based on mask-based memory enhancement. Detailed Implementation
[0016] The following are specific embodiments of the present invention, which are described in conjunction with the accompanying drawings. However, the present invention is not limited to these embodiments.
[0017] This invention proposes an abdominal CT segmentation method based on mask-feedback memory enhancement. This method aims to address the problems of low segmentation accuracy and poor inter-slice consistency of small abdominal organs (especially the pancreas) in contrast-free CT images by constructing an end-to-end processing flow from image feature extraction and mask feedback enhancement to cross-frame memory propagation. Overall, this method treats the two-dimensional slice sequence as a video frame stream, using the predicted mask generated in the current frame as guiding information to adaptively gating the original image in pixel space, thereby generating enhanced features focused on the target organ region and storing them in a memory bank. Subsequently, through a memory attention mechanism, subsequent frames can effectively reference the clean organ morphology information in historical frames during segmentation. Figure 1 As shown, the method mainly includes the following steps: S1: Acquire abdominal CT volume data, preprocess and normalize the slices of each layer in the abdominal CT volume data, and arrange the preprocessed slices into an image sequence according to the anatomical order. S2: Using the current frame in the image sequence as the input to be segmented, the input image encoder extracts multi-scale image features. The image encoder intersperses convolutional modules between Transformer coding layers. S3: After fusing the current prompt features with the multi-scale image features by concatenating and integrating them along the channel dimension, input the result into the mask decoder to generate the prediction mask for the current frame; S4: The original image of the current frame and the prediction mask are concatenated in the channel dimension, and a spatial weight map is generated by cascaded convolution and spatial dimension Softmax normalization. The numerical distribution of the spatial weight map decays from the high confidence region of the prediction mask to the background region, and is generated based on cross-position competition when the weight sum is always one. S5: Based on the spatial weight map, the original image of the current frame is reweighted element by element to obtain enhanced features and store them in the memory bank; S6: Use the multi-scale image features of the current frame as the query vector, and the historical enhancement features stored in the memory bank as the key vector and value vector to perform memory attention fusion. Output the organ segmentation result of the current frame based on the fused current frame features. S7: Obtain the organ segmentation results of each frame in the image sequence and integrate them into a three-dimensional organ segmentation result.
[0018] Specifically, before segmentation, the abdominal CT scan data to be processed needs to be acquired first. This data is typically output in DICOM format by medical scanning equipment and contains several two-dimensional tomographic slices arranged along the long axis of human anatomy. Considering the inconsistencies in the original scan data due to equipment models, scanning protocols, and individual patient differences, this invention implements a preprocessing procedure on the original scan data before inputting it into the network. Specifically, after receiving the original CT scan data, the server or processing terminal performs resampling operations sequentially. Due to the differences in in-plane resolution of slices output by different devices, and in order to control the overhead of computing resources and maintain the stability of batch processing size during subsequent feature extraction, each slice needs to be uniformly resampled to a preset spatial size. After resampling, the spatial scale of the slices is standardized.
[0019] To address the common background redundancy problem in medical CT images, such as areas like the scanning bed, air, and foreign objects outside the patient's body, which contain no information about abdominal anatomy, directly inputting them into the network would consume additional computational resources and potentially interfere with feature extraction. Therefore, this invention introduces a background clipping strategy based on contour union after the resampling step. Specifically, edge detection is performed on each resampled slice, for example, using the Canny operator to extract all contour information in that slice, and selecting the contour with the largest area, recording its bounding rectangle or coordinate range. After traversing all slices, the union of the coordinates of the largest contour in the row and column directions is taken, thus determining a unified clipping boundary. This clipping boundary ensures coverage of the effective anatomical regions in all slices while removing background pixels to the maximum extent. Clipping each slice based on this unified boundary effectively reduces the spatial dimension of the data while preserving all abdominal organs.
[0020] After background cropping, grayscale adjustment is performed. Pixel values in CT images are expressed in Hounsfield Units (HU), which cover multiple orders of magnitude for air, fat, soft tissue, and bone. To highlight the contrast of abdominal soft tissue organs (especially small organs like the pancreas), this invention truncates the HU values of each slice to a preset grayscale range. In a preferred embodiment, this truncation range is set to [-300, 500]. This range is chosen because the CT values of most solid organs in the human abdomen are concentrated between -100 and 200. Truncation to [-300, 500] effectively filters out air and fat noise below -300 and bone and metal artifacts above 500, thereby guiding the network's learning attention to the soft tissue window. Subsequently, the truncated pixel values are normalized to the [0, 1] range using a linear mapping function. This normalization process unifies the grayscale distribution of each slice to the same numerical range, thereby accelerating the convergence of the subsequent deep learning model and improving numerical stability.
[0021] After adjusting the grayscale values, to further enhance the discernibility of organ boundaries and internal textures, this invention introduces a contrast-limited adaptive histogram equalization (CLAHE) operation. This operation does not perform global histogram equalization on the entire slice, but rather divides each slice into several non-overlapping sub-blocks in space. In this embodiment, the sub-block division parameter is preferably 8×8, that is, dividing the slice into 8 blocks along both the height and width directions, forming a total of 64 sub-blocks. For each sub-block, the CLAHE algorithm calculates its local histogram and performs remapping to stretch the contrast of that local area. Simultaneously, to prevent excessive noise amplification during adaptive equalization, the algorithm sets a slope limiting threshold to truncate the slope of the cumulative distribution function. Through this block-based contrast enhancement strategy, the subtle boundaries and internal structures of abdominal organs are visually sharpened, providing higher-quality input data for subsequent deep learning feature extraction. It should be noted that although the above preprocessing steps are described in a specific order, in practical applications, the execution order between resampling, background cropping, HU truncation, and CLAHE enhancement can be fine-tuned according to the specific hardware implementation and data characteristics, as long as the data finally input to the network has a standardized scale and enhanced soft tissue contrast.
[0022] After the preprocessing of each slice, the next step is to arrange them into an ordered image sequence according to the cephalopod orientation in human anatomy (i.e., from the head side to the foot side or vice versa). This arrangement transforms the originally independent three-dimensional volume data into a temporally continuous two-dimensional video frame sequence. The significance of this transformation lies in the spatial smoothness of the inter-slice changes of abdominal organs in CT scans; that is, the morphology and position of organs between adjacent slices only undergo minor changes, which is highly similar to the continuity between adjacent frames in a video sequence. Therefore, subsequent processing modules can directly utilize a memory-enhanced segmentation architecture designed for video streams to process this image sequence.
[0023] For the current frame to be segmented in the image sequence, the system inputs it to the image encoder to extract depth features. The image encoder used in this invention uses a hierarchical visual Transformer as its backbone network. Specifically, the current frame input image is first divided into several image blocks of uniform size. In this embodiment, the spatial size of the image block is preferably 16×16 pixels. The pixel values within each image block are mapped to embedding vectors through a linear projection layer, thereby converting the original two-dimensional image data into sequence data composed of embedding vectors. To preserve the positional information of the image blocks in the original space, a preset sine positional encoding is superimposed before the embedding vectors are input to the Transformer encoding layer. This positional encoding is generated using sine and cosine functions, which can provide the network with absolute or relative spatial positional cues. The backbone network contains four output stages in the entire architecture, and the number of feature map channels output by each stage is 768, 384, 192, and 96, respectively. This design, from deep to shallow and with decreasing channel numbers, meets the common requirement in visual tasks of balancing high-level semantic abstraction and low-level spatial details. The multi-scale feature maps output by the backbone network are then fed into the Feature Pyramid Network (FPN) for aggregation. Through top-down paths and lateral connections, strong semantic information from higher layers is passed to lower layers, and finally, the output multi-scale fused features with a unified number of 64 channels are generated.
[0024] It is worth emphasizing that the image encoder of this invention also incorporates a convolution merging module between traditional Transformer coding layers. The core design purpose of this module is to compensate for the inherent limitations of the pure Transformer architecture in handling local details. While pure self-attention mechanisms excel at capturing global long-range dependencies, their ability to model texture variations within image patches and local continuity between adjacent patches is relatively weak. Therefore, this invention embeds convolution operations between adjacent Transformer coding layers. This convolution merging module utilizes the sliding of convolution kernels within the spatial neighborhood to perform convolutional fusion and dimensionality reduction on the features of neighboring image patches. In this embodiment, the convolution operation is performed in the feature space, aggregating the contextual information of adjacent image patches into the current block representation through the local receptive field of the convolution kernel. Through this alternating interleaving of global attention and local convolution, the final output features of the image encoder contain both global contextual information and retain a high degree of sensitivity to the boundaries of small target organs and fine textures.
[0025] After obtaining the multi-scale image features of the current frame, the system needs to combine cue features to guide the mask decoder in generating the initial prediction mask. Cue features are obtained by embedding the cue information of the current frame into the cue encoder. This cue information can be represented as bounding boxes or as sparse or dense mask points. During the training phase, cue information can be automatically generated directly from the precisely labeled data in the training dataset, for example, by extracting the bounding rectangle from the labeled mask as the bounding box cue. In the actual clinical inference deployment phase, to reduce the cost of manual interaction, the system adopts an automated cue propagation strategy. Specifically, for the first frame in the image sequence, its cue features are automatically generated by a pre-deployed object detection algorithm. This algorithm can use a region proposal-based Faster R-CNN structure or a single-detection-based YOLO series structure, only needing to provide a rough bounding box location for the target organ in the first frame. For each subsequent frame, its cue features no longer rely on an external detector, but are generated from the high-precision prediction mask of the previous frame after memory-enhanced correction via a memory bank. This design allows the entire segmentation process to run fully automatically after the initialization of the first frame.
[0026] The cue features are concatenated and fused with the previously extracted multi-scale image features along the channel dimension. Compared to element-wise addition, channel-dimensional concatenation preserves the independent information channels of the two features, allowing the mask decoder to adaptively learn the interaction weights between different channels in subsequent transform layers, avoiding feature cancellation or information loss caused by addition operations. The fused feature tensor is input to the mask decoder, which is constructed using a multi-layer Transformer decoding structure. During decoding, the decoder simultaneously receives multi-scale features from the image encoder's feature pyramid network, aggregating contextual information across multiple scales through a cross-attention mechanism. Subsequently, the decoder gradually restores the spatial resolution of the feature map to the same size as the original input image of the current frame through multiple upsampling operations. The feature map restored to its original resolution is then passed through a linear mapping layer and a Softmax activation function, outputting a binary probability map, which is the initial prediction mask for the current frame. Each pixel value in this prediction mask represents the probability that the location belongs to the target organ.
[0027] After obtaining the initial predicted mask for the current frame, the core enhancement mechanism of this invention—the mask-feedback image enhancement module—begins. This module does not simply use the predicted mask as additional input or attention bias; instead, it generates an enhanced image focused on the target region by performing explicit gating on the original image in the spatial domain. The specific implementation process is as follows: First, the original grayscale image of the current frame is concatenated with the initial predicted mask of that frame along the channel dimension. Since the original image is usually a single-channel grayscale image, and the predicted mask is a single-channel binary probability map or a thresholded binary map, the concatenation forms a dual-channel or multi-channel tensor. This tensor then passes through two cascaded convolutional layers. The first layer is a 3×3 convolution operation, which slides across the concatenated multi-channel feature map. The 3×3 convolutional kernel has a local receptive field, which not only observes the mask response value at a single pixel but, more importantly, fuses the image texture and mask confidence distribution information within the 3×3 neighborhood around that pixel. This operation allows noise points near the mask boundaries to be smoothed and handled with fault tolerance within the spatial neighborhood, avoiding abrupt weight changes due to misjudgment of a single pixel. The intermediate feature map output from the first convolutional layer is then fed into the second convolutional layer, with a kernel size of 1×1. The purpose of the 1×1 convolution is to linearly reorganize and reduce the dimensionality of the channels without changing the spatial resolution. Through the 1×1 convolution, the information from multiple channels is compressed into a single-channel response map, thereby projecting high-dimensional features back onto the two-dimensional spatial plane.
[0028] After the above 3×3 and 1×1 concatenated convolution processing, the resulting response map has the same width and height as the original image in the spatial dimension. Next, this invention performs a Softmax normalization operation on the response map along the spatial dimension. It should be noted that the Softmax normalization here is expanded along the spatial dimension, not along the channel dimension. This means that for all spatial locations (i.e., all pixels) on this two-dimensional response map, its exponential function value is calculated and summed, so that the output values of all locations sum to 1. After spatial Softmax processing, the originally numerically discrete response map is transformed into a competitive spatial probability distribution map, that is, the spatial weight map proposed in this invention. Since the prediction mask of the current frame has a high response value (close to 1) in the target region and a low response value (close to 0) in the background region, the spatial weight map generated after feature extraction by 3×3 and 1×1 convolution and spatial Softmax normalization naturally presents a distribution pattern that gradually decays towards the background region, centered on the high confidence region of the prediction mask. That is, in the pixel region where the target organ is located, the value of the spatial weight map is close to 1, while in the background region far away from the organ, the weight value is close to 0.
[0029] It should be noted that the spatial dimension Softmax normalization method used in this invention is fundamentally different from the conventional pixel-by-pixel independent gating method (such as applying the Sigmoid activation function to each position of the response map to obtain a weight map). In the pixel-by-pixel independent gating method, the weight value of each spatial position is determined only by the response intensity of that position itself, and positions do not affect each other. Local noise points with high response values in the background region may still receive high weights and not be fully suppressed. However, the spatial Softmax normalization used in this invention ensures that the sum of the weight values of all spatial positions is always 1. The weight value of each position is determined by its relative proportion of its response intensity in all spatial positions, i.e., a cross-positional competitive relationship is formed between positions: high-confidence regions of the target organ occupy an absolute advantage in the competition, thereby further suppressing the weight value of the background region (including originally high-response noise regions) to near 0. This cross-positional competitive suppression effect is not present in the pixel-by-pixel independent gating method, and is one of the key reasons why the enhanced features stored in the memory bank of this invention are purer and have less background noise accumulation across frames compared to existing mask-guided attention schemes.
[0030] After obtaining the spatial weight map, the system performs element-wise multiplication of this weight map with the original image of the current frame in pixel space, i.e., element-wise reweighting. This operation is equivalent to applying a spatial gating mask to the original image. Through this operation, the grayscale information of the target organ region is given a higher preservation coefficient and is enhanced in the output, while the grayscale information of the background region is significantly suppressed. The enhanced feature obtained by element-wise reweighting has its grayscale value of the background part compressed to near zero, while the texture and boundary details of the target region are highlighted. This enhanced feature is "purer" in information composition compared to the original grayscale image or features directly concatenated with a mask. This enhanced feature is then fed into a memory encoder. The memory encoder further encodes it into a fixed-length high-dimensional vector through a multilayer perceptron or lightweight Transformer structure. After encoding, this high-dimensional vector is stored in the memory bank as a memory item for the current frame.
[0031] To prevent the memory from growing indefinitely, leading to excessive computational burden and introducing redundant information, this invention sets a preset capacity threshold for the memory. In a preferred embodiment, this capacity threshold is set to 7, meaning the memory can store a maximum of 7 enhanced features from historical frames. When the memory is full and new enhanced features need to be added, the system updates the memory according to a first-in, first-out (FIFO) strategy, removing the oldest stored memory item and writing the new item to the end. The capacity threshold is chosen because 7 adjacent slices in an abdominal CT scan typically cover a complete microcycle of organ morphological changes, providing sufficient contextual information to stabilize the segmentation of the current frame while avoiding interference from features from dozens of previous slices that differ significantly from the current morphology in the attention calculation.
[0032] While performing the aforementioned memory item storage operation, the system also needs to utilize historical information in the current memory to correct the feature representation of the current frame. Specifically, the system uses the multi-scale image features of the current frame as the query vector and all historical enhanced features stored in the memory as the key vector and value vector, and performs a memory attention operation. This operation calculates the similarity between the query vector and each key vector (usually using dot product similarity) to obtain the attention weight distribution, and then performs a weighted summation of the value vectors based on this weight distribution. The result of this weighted summation is the most relevant contextual aggregation feature extracted from historical experience for the current frame. Subsequently, this aggregation feature is fused into the original features of the current frame through residual connections or a feedforward network to update the features of the current frame. After this memory enhancement process, the features of the current frame not only contain its own image information, but also incorporate empirical information from historical frames regarding organ shape, location, and boundaries. This has a significant corrective and stabilizing effect on regions in the current frame whose boundaries are blurred due to noise or partial volumetric effects. Finally, the updated current frame features are processed by a segmentation head (which typically contains deconvolutional and classification layers) to output the final high-precision organ segmentation result for the current frame.
[0033] After sequentially performing the aforementioned feature extraction, mask feedback enhancement, memory storage, and memory attention fusion on all slices of the image sequence, the system re-stacks the two-dimensional segmentation masks output from each frame according to the original slice index order, thus reconstructing the three-dimensional organ segmentation result of the abdominal CT body data. This three-dimensional result can be used for subsequent clinical applications such as organ volume measurement, three-dimensional visualization, and surgical planning.
[0034] In summary, this invention generates a spatial weight map by concatenating the current frame prediction mask with the original image in the channel dimension, followed by cascaded convolution and Softmax normalization of the spatial dimension. Based on this weight map, the original image is reweighted element-wise, enabling the enhanced features stored in the memory to perform spatial filtering centered on the target region and suppress background noise at the information source. This effectively reduces the accumulation of irrelevant information during the cross-frame propagation of memory attention. Simultaneously, the image encoder intersperses convolutional modules between Transformer layers to balance global context modeling and local detail capture. Combined with background cropping, grayscale truncation mapping, and contrast-limited adaptive histogram equalization in preprocessing, the various layers work together to provide more reliable historical experience guidance for the current frame segmentation results. In the task of segmenting small target organs in contrast-free abdominal CT images, compared to schemes using any one technique alone, the overall segmentation accuracy and inter-layer consistency are steadily improved.
[0035] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0036] Furthermore, in this invention, descriptions involving terms such as "first," "second," and "a" are for descriptive purposes only and should not be construed as indicating or implying their 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.
[0037] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0038] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
Claims
1. A method for abdominal CT segmentation based on mask-based memory enhancement, characterized in that, Including the following steps: S1: Acquire abdominal CT volume data, preprocess and normalize the slices of each layer in the abdominal CT volume data, and arrange the preprocessed slices into an image sequence according to the anatomical order. S2: Using the current frame in the image sequence as the input to be segmented, the input image encoder extracts multi-scale image features. The image encoder intersperses convolutional modules between Transformer coding layers. S3: After fusing the current prompt features with the multi-scale image features by concatenating and integrating them along the channel dimension, input the result into the mask decoder to generate the prediction mask for the current frame; S4: The original image of the current frame and the prediction mask are concatenated in the channel dimension, and a spatial weight map is generated by cascaded convolution and spatial dimension Softmax normalization. The numerical distribution of the spatial weight map decays from the high confidence region of the prediction mask to the background region, and is generated based on cross-position competition when the weight sum is always one. S5: Based on the spatial weight map, the original image of the current frame is reweighted element by element to obtain enhanced features and store them in the memory bank; S6: Use the multi-scale image features of the current frame as the query vector, and the historical enhancement features stored in the memory bank as the key vector and value vector to perform memory attention fusion. Output the organ segmentation result of the current frame based on the fused current frame features. S7: Obtain the organ segmentation results of each frame in the image sequence and integrate them into a three-dimensional organ segmentation result.
2. The abdominal CT segmentation method based on mask-fed memory enhancement as described in claim 1, characterized in that, In step S1, the preprocessing also includes: performing edge detection on each slice to obtain the maximum contour coordinates of each slice, taking the union of the maximum contour coordinates of all layers as the clipping range, and performing background clipping on the volume data.
3. The abdominal CT segmentation method based on mask-fed memory enhancement as described in claim 1, characterized in that, In step S1, the preprocessing further includes: truncating the pixel values of each slice to a preset grayscale value range, and linearly mapping the truncated pixel values to a normalized range.
4. The abdominal CT segmentation method based on masked feedback memory enhancement as described in claim 1, characterized in that, In step S1, the preprocessing also includes: dividing each layer slice into several sub-blocks and performing contrast-limited adaptive histogram equalization on each sub-block.
5. The abdominal CT segmentation method based on mask-fed memory enhancement as described in claim 1, characterized in that, In step S2, features of neighboring image blocks are convolutionally fused using a convolution module.
6. The abdominal CT segmentation method based on mask-fed memory enhancement as described in claim 1, characterized in that, In step S3, the cue features are generated by passing the prediction mask from the previous frame through the memory bank.
7. The abdominal CT segmentation method based on mask-fed memory enhancement as described in claim 6, characterized in that, The cue features of the first frame in the image sequence are automatically generated by the object detection algorithm.
8. The abdominal CT segmentation method based on mask-fed memory enhancement as described in claim 1, characterized in that, In step S4, the cascaded convolution sequentially includes a first convolution operation with a kernel size of 3×3 and a second convolution operation with a kernel size of 1×1.
9. The abdominal CT segmentation method based on mask-fed memory enhancement as described in claim 1, characterized in that, In step S4, cross-location competition specifically involves determining the numerical distribution of the corresponding spatial location in the spatial weight map based on the proportion of the response intensity of each spatial location in the total response intensity of all spatial locations.
10. The abdominal CT segmentation method based on mask-fed memory enhancement as described in claim 1, characterized in that, In step S5, the number of enhanced features stored in the memory is a preset capacity threshold. When the number of enhanced features stored exceeds the preset capacity threshold, the memory is updated according to the first-in-first-out strategy.
