A method for measuring anal verge distance based on inference propagation model

By constructing a feature propagation segmentation neural network based on the inference propagation model, the problems of insufficient accuracy and data dependence in anal edge ranging are solved, efficient and stable tumor area segmentation and distance measurement are achieved, and the demand for training data is reduced.

CN120495379BActive Publication Date: 2025-09-16HANGZHOU PURUI MEDICAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510977108.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2025-05-20
Filing Date
2025-07-16
Publication Date
2025-09-16
Estimated Expiration
2045-07-16

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient accuracy when measuring the distance from the anal verge to the tumor (DTAV). In particular, they lack the ability to dynamically integrate historical features when processing long sequences of images, resulting in accumulated errors in the segmentation results and requiring a large amount of training data.

Method used

A method based on the inference propagation model is used to construct a feature propagation segmentation neural network, including a key encoder, a value encoder, a decoder, and a memory reading module. Combined with the attention mechanism and a multi-level memory module, the segmentation task starts from the tumor salient area through the image sequence reordering strategy, achieving robust segmentation and efficient propagation of the tumor area.

Benefits of technology

It significantly improves the accuracy of tumor region segmentation and the stability of distance measurement, reduces the demand for training data, and provides reliable clinical application value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120495379B_ABST
    Figure CN120495379B_ABST
Patent Text Reader

Abstract

The present invention provides an anal edge distance measurement method based on an inference propagation model, comprising the following steps: S1 data collection and processing step, S2 initial layer selection and labeling step, S3 model construction and inference step, S4 model training step, and S5 anal edge distance measurement step. The present invention achieves lightweight data training and can solve problems such as low feature storage and retrieval efficiency in magnetic resonance imaging in colorectal cancer image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an anal verge distance measurement method based on an inference propagation model. Background Art

[0002] Magnetic resonance imaging (MRI) is widely used in the diagnosis and treatment planning of colorectal cancer. The distance to the anal verge (DTAV) is an important indicator for clinical assessment of tumor location relative to surgical landmarks. Existing DTAV measurement methods mostly rely on manual operations or basic segmentation techniques, which are easily disturbed by the complex boundary structure of the tumor, resulting in insufficient accuracy. Studies have shown that DTAV has important reference value in patient surgery. When the tumor is more than 8 cm away from the anal verge, the resection rate is significantly improved, postoperative complications are reduced, and the overall morbidity is reduced. In addition, DTAV is closely related to the achievement of pathological complete response (pCR) after neoadjuvant therapy, which may affect the prognosis of rectal cancer patients. Therefore, DTAV has important reference value for judging the success rate of surgery and selecting treatment options.

[0003] Currently, there are few studies on DTAV calculation based on artificial intelligence. Shen et al. proposed a pyramid attention pool Transformer architecture that automatically segments the rectum and tumor and calculates DTAV based on the generated rectal midline. However, such methods require a large amount of labeled data to train the segmentation model, and the segmentation accuracy is limited by the data quality. Some studies have attempted to use architectures such as convolutional neural networks (CNNs) or U-Net for image segmentation, but these models lack the ability to dynamically integrate historical features when processing long sequences of images and cannot adaptively associate contextual information at different levels. Such models also require a large amount of data for training. Although some studies have also introduced attention mechanisms to enhance feature relevance, this only slightly reduces the amount of data training and still does not fundamentally solve the problems of inefficient feature storage and retrieval and the need for large amounts of data training. Summary of the Invention

[0004] The purpose of the present invention is to provide an anal verge distance measurement method based on an inference propagation model to solve the problems existing in the background technology.

[0005] To this end, the present invention adopts the following technical solutions:

[0006] A method for measuring anal verge distance based on an inference propagation model comprises the following steps:

[0007] S1 Data Collection and Processing Steps: Obtain the patient's MRI sequence and select the required proton density-weighted sagittal MRI sequence as input data, and ensure that the input data meets the subsequent segmentation and ranging requirements;

[0008] S2 initial layer selection and labeling step: select the middle layer containing the tumor from the input data as the initial layer, and manually or semi-automatically label the tumor area in the initial layer; divide the image sequence of the input data into the front segment and the back segment, and reverse the front segment to form a rearranged sequence starting from the initial layer;

[0009] S3 model construction and inference steps: Build an inference propagation model based on a feature propagation segmentation neural network, which includes a key encoder, value encoder, decoder, and memory read module. The memory read module uses short-term memory, long-term memory, and working memory to collaboratively store and retrieve features, and combines this with an attention mechanism to achieve segmentation propagation of the tumor region.

[0010] S4 model training step: Based on the labeled data, the calculated image sequence is compared with the manual annotation results of experienced radiologists to calculate the loss function, and the model weights are updated through backpropagation;

[0011] S5 Anal edge distance measurement steps: The unknown new data is segmented into the tumor area and the rectal edge according to the constructed model for edge detection. The weighted Euclidean distance from the lowest point of the tumor along the midline of the intestinal wall to the anal edge is calculated, and the distance from the tumor to the anal edge is output.

[0012] Furthermore, in step S1, the FOV range of the input data is (160-320) mm × (160-320) mm, the layer thickness is 3-4 mm, and the layer spacing is 0.3-0.4 mm.

[0013] Furthermore, in step S2, the image sequence of the input data is represented as , from which the initial layer is determined , k is the index of the initial layer;

[0014] Rearrange the image sequence and split the sequence into two parts: and ,Will Reverse and get The rearranged sequence is As the starting point, the segmentation task is ensured to propagate from the tumor salient region; the tumor salient region refers to the layer where the tumor area is more than half of the largest layer of the tumor.

[0015] Furthermore, in step S3, the key encoder adopts the ResNet50 architecture to extract the key feature tensor of the image; the value encoder adopts the ResNet18 architecture to extract the value feature tensor of the image; the decoder includes four stacked decoding blocks, each decoding block sequentially includes an upsampling layer, a convolution layer, and a regularization and activation function layer.

[0016] Furthermore, the specific steps of step S3 are as follows:

[0017] S301 Initial encoding and memory initialization step: From the input image sequence and Read the initial layer Image, and image sequence and Input key encoder Encode to get the key matrix tensor ,Will Image input value encoder Encode to get the value matrix tensor ;

[0018] The key matrix tensor Sum matrix tensor Store in short-term memory , while initializing the working memory and long-term memory is empty;

[0019] S302 Attention decoding mask generation step: Read subsequent unlabeled image sequences , the image sequence Input key encoder Encode to get the key matrix tensor As a query matrix ; from short-term memory Read the key matrix tensor Sum matrix tensor ,The relevance weight is calculated through the attention mechanism formula and input into the decoder to generate the segmentation mask of the current image;

[0020] Among them, the calculation formula of the attention mechanism is as follows:

[0021]

[0022] represents the key vector dimension;

[0023] S303 memory migration and dynamic update step: the key matrix tensor Sum matrix tensor Store in long-term memory , and the obtained image segmentation mask is input into the encoder Encoding generated value matrix tensor , and the query matrix As a key matrix tensor , a matrix tensor with values Stored in working memory ;

[0024] S304 Historical feature weighted integration step: Read subsequent unlabeled sequence images , through the key encoder Code Generation Matrix, as the query matrix ;

[0025] From the memory module Get all historical key feature sets in Sum feature set ; Among them, the key feature set After the learnable weight matrix , perform linear transformation on the historical key features and get , and as a Key; value feature set As Value;

[0026] Key features of the current layer As a query matrix , calculate the correlation through the attention mechanism;

[0027] Will 、 and historical value features are input into the attention mechanism to generate a segmentation mask, and the current and Update to working memory , historical key-value pairs are migrated to long-term memory .

[0028] Furthermore, the decoder comprises four stacked decoding blocks, each decoding block sequentially comprising an upsampling layer, a first convolutional layer, a regularization and activation function layer, a second convolutional layer, and a quadratic regularization and activation function layer;

[0029] Upsampling layer: The convolution kernel size is 4x4, the stride is 2, the feature map size is restored to 1 / 2 of the original number of channels, and the length and width are doubled;

[0030] Convolutional layer 1: The convolution kernel size is 3x3, the stride is 1, and the output channel remains unchanged;

[0031] Regularization and activation function layer 1: batch normalization calculation and ReLU activation function operation;

[0032] Convolutional layer 2: The convolution kernel size is 3x3, the stride is 1, and the output channel remains unchanged;

[0033] Regularization and activation function layer 2: batch normalization calculation and ReLU activation function operation.

[0034] Furthermore, in step S3, the short-term memory is used to store the key features and value features of the current slice and adjacent slices;

[0035] Long-term memory, used to store key features and value features of historical slices;

[0036] Working memory, used to dynamically update the key and value features of the current slice;

[0037] The memory reading module calculates the correlation between the current slice and the historical slices through a learnable weight matrix combined with the attention mechanism to generate a segmentation mask.

[0038] Furthermore, in step S4, the loss function is expressed as:

[0039]

[0040] in, The value is 0.8. is the dice loss, is the cross entropy loss.

[0041] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0042] A computer-readable storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0043] Compared with related technologies, the anal verge distance measurement method based on the inference propagation model provided by the present invention has the following beneficial effects:

[0044] This solution avoids the problem of traditional models that usually process each frame of the image independently, ignores the anatomical structure correlation between adjacent layers in the sequence, and causes cumulative errors in the segmentation results during sequence propagation. This solution achieves robust segmentation and efficient propagation of tumor areas in MRI sequence images by constructing a segmentation network with a key encoder, a value encoder, a decoder, and a multi-level memory module, combined with an attention mechanism and a dynamic feature management strategy. By combining the synergistic mechanism of short-term memory, long-term memory, and working memory, historical features can be effectively stored and retrieved, and the feature correlation calculation is optimized by combining a learnable weight matrix, which significantly improves the segmentation accuracy and the stability of feature propagation between sequences. In addition, through the rearrangement strategy of the image sequence, the segmentation task starts from the significant area of ​​the tumor, which further reduces the risk of error propagation and greatly reduces the sample size of the training data. This solution not only improves the degree of automation, but also provides reliable distance measurement results for clinical practice, and has important clinical application value. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1A schematic diagram of tumor annotation for an image of the present invention;

[0046] Figure 2 Schematic diagram of constructing a feature propagation segmentation neural network of the present invention;

[0047] Figure 3 Schematic diagram of the segmentation mask for unknown images in the present invention. DETAILED DESCRIPTION

[0048] The embodiments of the present invention are described in detail below, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and are not intended to limit the present invention.

[0049] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art in the art to which this invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and, unless defined as such, will not be interpreted in an idealized or overly formal sense.

[0050] The step numbers mentioned in each embodiment are for convenience of description only and do not constitute a sequence of events. The different steps in each embodiment can be combined in different sequences to achieve the objectives of the present invention. Furthermore, some structures, modules, and modeling methods not described in detail in the present invention can be implemented using conventional technical means and will not be described in detail.

[0051] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0052] Please refer to Figures 1 to 3 As shown, the present invention provides a method for measuring the distance between the anal edge and the anus based on the inference propagation model, comprising the following steps:

[0053] S1 Data collection and processing steps: Obtain the patient's MRI image sequence and select the proton density weighted sagittal MRI sequence that meets the requirements as input data. The original MRI image sequence of the input data is represented as Perform preliminary screening to ensure that the input data meets the requirements for subsequent segmentation and ranging. Specifically, select proton density-weighted sagittal MRI sequences that include complete anatomical structures and tumor regions as input data.

[0054] The input data includes scanned images of rectal cancer and the anus, with a FOV range of (160-320) x (160-320) mm, a slice thickness of 3-4 mm, and a slice spacing of 0.3-0.4 mm. In medical imaging (such as MRI and CT), the FOV (field of view) refers to the actual size of the body region imaged during the scan. For example, 25 cm is typically used for head imaging, while 35 cm is required for the upper abdomen to cover the entire cross-section. Therefore, this range is sufficient for the actual medical imaging needs of the anus.

[0055] S2 Initial layer selection and labeling step: select the middle layer containing the tumor from the input data as the initial layer, and manually or semi-automatically label the tumor area of ​​the initial layer; divide the image sequence of the input data into the front segment and the back segment, and reverse the front segment to form a rearranged sequence starting from the initial layer. Figure 1 The details are as follows:

[0056] The image sequence of the input data is represented as , from which the intermediate initial layer containing the tumor is determined , k is the index of the initial layer mask, and the initial mask only needs to be in the middle layer of the tumor.

[0057] The image sequence is rearranged to optimize segmentation propagation, splitting the sequence into two parts: and ,Will Reverse and get The rearranged sequence is As the starting point, the segmentation task is ensured to propagate from the tumor salient area. The tumor regions in the image are manually or semi-automatically labeled to serve as semi-supervised data for subsequent model training. The tumor salient region refers to the layer where the tumor area is more than half of the maximum layer of the tumor.

[0058] S3 model construction and inference steps: Construct an inference propagation model based on a feature propagation segmentation neural network, which includes a key encoder, a value encoder, a decoder, and a memory read module. The memory read module's short-term memory, long-term memory, and working memory collaboratively store and retrieve features, combined with an attention mechanism to achieve segmentation propagation of tumor regions. The key encoder uses a ResNet50 architecture to extract the key feature tensor of the image; the value encoder uses a ResNet18 architecture to extract the value feature tensor of the image; and the decoder consists of four stacked decoding blocks, each of which sequentially includes an upsampling layer, a convolutional layer, and a regularization and activation function layer.

[0059] Each decoding block specifically includes an upsampling layer, a first convolutional layer, a regularization and activation function layer, a second convolutional layer, and a quadratic regularization and activation function layer in sequence;

[0060] Upsampling layer: The convolution kernel size is 4x4, the stride is 2, the feature map size is restored to 1 / 2 of the original number of channels, and the length and width are doubled;

[0061] Convolutional layer 1: The convolution kernel size is 3x3, the stride is 1, and the output channel remains unchanged;

[0062] Regularization and activation function layer 1: batch normalization calculation and ReLU activation function operation;

[0063] Convolutional layer 2: The convolution kernel size is 3x3, the stride is 1, and the output channel remains unchanged;

[0064] Regularization and activation function layer 2: batch normalization calculation and ReLU activation function operation.

[0065] After four decoding blocks, the feature map is restored to its original size and the channel becomes 1.

[0066] Key encoder The ResNet50 architecture is used to extract image features from a certain layer of the input image and generate a key feature tensor K to represent the core information of the image. The ResNet18 architecture is used to extract features from a certain layer of the input image and its mask, generate a feature map tensor V, capture the spatial relationship of the image, and provide support for subsequent segmentation tasks. It is a mechanism to retrieve features from other slices to guide the generation of the segmentation mask of the current slice, in order to prevent the retention of too many layers from causing excessive computation and memory burden. Short-term memory , long-term memory , working memory .

[0067] The whole process is as follows Figure 2 The specific steps are as follows:

[0068] S301 Initial encoding and memory initialization step: From the input image sequence and Read the initial layer Image, and image sequence and Input key encoder Encode to get the key matrix tensor ,Will Image input value encoder Encode to get the value matrix tensor .

[0069] The key matrix tensor Sum matrix tensor Store in short-term memory , while initializing the working memory and long-term memory Empty. The key matrix tensor Sum matrix tensor Store in memory read module , first stored in short-term memory , then initialize the working memory and long-term memory Empty.

[0070] S302 Attention decoding mask generation step: Read subsequent unlabeled image sequences , the image sequence Input key encoder Encode to get the key matrix tensor As a query matrix ; from short-term memory Read the key matrix tensor Sum matrix tensor ,The relevance weight is calculated through the attention mechanism formula and input into the decoder to generate the segmentation mask of the current image;

[0071] Among them, the calculation formula of the attention mechanism is as follows:

[0072]

[0073] in represents the key vector dimension;

[0074] S303 memory migration and dynamic update step: the key matrix tensor Sum matrix tensor Store in long-term memory , and the obtained image segmentation mask is input into the encoder Encoding generated value matrix tensor , and the query matrix As a key matrix tensor , a matrix tensor with values Stored in working memory ;

[0075] S304 Historical feature weighted integration step: Read subsequent unlabeled sequence images , through the key encoder Code Generation Matrix, as the query matrix ;

[0076] From the memory module Get all historical key feature sets in Sum feature set ; Among them, the key feature set After the learnable weight matrix , perform linear transformation on the historical key features and get , and as a Key; value feature set Specifically, W represents matrix calculation, using a learnable fully connected layer, the number of input channels is the sum of the number of channels of all previous layers, and the number of output channels is the key feature of the current layer. The number of channels is generally 512 channels.

[0077] Key features of the current layer As a query matrix , calculating the correlation through the attention mechanism.

[0078] Will 、 and historical value features are input into the attention mechanism to generate a segmentation mask, and the current and Update to working memory , historical key-value pairs are migrated to long-term memory .

[0079] The attention weight of the attention mechanism is input into the decoder to generate the segmentation mask of the current slice image. After the operation is completed, the key feature set Sum feature set Store in long-term memory . Input the obtained image segmentation mask into the encoder Encoded Matrix tensor. Matrix tensor as Matrix tensor, with Matrix tensors are stored together in working memory .

[0080] S4 model training steps: Based on the labeled data, each time the calculated image sequence is compared with the manual labeling results of experienced radiologists to calculate the loss function, and the model weights are updated through backpropagation.

[0081] That is, after each calculation of the entire 3D image sequence is completed, the loss function is calculated with the manual annotation results of experienced radiologists, and the model weights are updated through back propagation. It can be expressed as a weighted sum of two parts, as follows:

[0082]

[0083] in is the dice loss, in dice loss represents the predicted area, and GT represents the real labeled area. represents the intersection of the two; is a constant, usually 0.8; The i in the cross entropy loss function ce loss represents the i-th pixel, c represents the category of the pixel, and y represents whether the actual classification is the current category (1 or 0). represents the classification probability; N represents the total number of samples, and C represents the total number of categories.

[0084] S5 Anal Verge Distance Measurement Step: The distance between the tumor and the anal verge is automatically measured for unknown new data based on the model's inference results. Specifically, the model is used to segment the tumor region and rectal margin for edge detection. The weighted Euclidean distance from the lowest point of the tumor along the midline of the intestinal wall to the anal verge is calculated, and the distance from the tumor to the anal verge is output.

[0085] The steps for measuring the distance between the tumor and the anus in an unknown image are as follows:

[0086] S501 processes the unknown image using steps S1 and S2, and then inputs the model built in step S3 and loaded with the training weights in step S4 to obtain the segmentation mask. The result is as follows: Figure 3 .

[0087] S502 performs edge detection on the resulting tumor segmentation mask.

[0088] The specific steps are: represents the segmented image, where x and y represent pixel coordinates. The edges of the rectum and tumor are detected using the Canny edge detection algorithm. The generated edge map of the tumor is represented as , the rectal edge map is represented as .

[0089] The Canny edge detection algorithm is a classic image processing algorithm that detects edges in an image. It performs smoothing, gradient calculation, non-maximum suppression, and double thresholding through a series of steps. The specific formula is as follows:

[0090]

[0091] Among them, S represents the smoothing operation, Represented as a convolution operation, Represents the non-maximum suppression operation; T represents the application of double thresholds and edge connections, They are high threshold and low threshold respectively, used for further processing of weak edges.

[0092] lowest point of the tumor Determined to be The point with the maximum y coordinate in . According to the different sizes of the x values ​​of the same y-axis coordinate, it is divided into the inner edge With the outer edge The formula is:

[0093]

[0094]

[0095] The midline of the intestinal wall can be calculated:

[0096]

[0097] S503 calculates the distance of the tumor along the midline to the anal verge, which can be expressed as , the lowest point of the tumor The distance from the anal verge to the projection is calculated as the sum of its distances. The projection of the midline can be expressed as:

[0098]

[0099] The total distance calculation from the anal verge can be expressed as a weighted Euclidean distance:

[0100]

[0101]

[0102] It is the distance between the tumor and the anal verge. dx represents the horizontal axis distance. and As weight, in this model .

[0103] In one embodiment, the present invention further provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the segmentation method provided in the above embodiment are implemented.

[0104] In one embodiment, the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the segmentation method provided in the above embodiment are implemented.

[0105] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

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

[0107] The descriptions of the various embodiments of the present application are relatively specific and detailed, but this should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, and such modifications and refinements should be considered within the scope of protection of the present invention. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.

Claims

1. A method for measuring the distance to the anal verge based on an inference propagation model, characterized in that: The following steps are involved: S1 Data Collection and Processing Steps: Obtain the patient's MRI sequence and select the required proton density-weighted sagittal MRI sequence as input data, and ensure that the input data meets the subsequent segmentation and ranging requirements; S2 initial layer selection and labeling step: select the middle layer containing the tumor from the input data as the initial layer, and manually or semi-automatically label the tumor area in the initial layer; divide the image sequence of the input data into the front segment and the back segment, and reverse the front segment to form a rearranged sequence starting from the initial layer; S3 model construction and inference steps: Build an inference propagation model based on the feature propagation segmentation neural network, which includes a key encoder, value encoder, decoder, and memory reading module; The short-term memory, long-term memory, and working memory of the memory read module are used to collaboratively store and retrieve features, and the attention mechanism is used to achieve segmentation and propagation of the tumor area. S4 model training step: Based on the labeled data, the calculated image sequence is compared with the manual annotation results of experienced radiologists to calculate the loss function, and the model weights are updated through backpropagation; S5 Anal edge distance measurement steps: The unknown new data is segmented into the tumor area and the rectal edge according to the constructed model for edge detection. The weighted Euclidean distance from the lowest point of the tumor along the midline of the intestinal wall to the anal edge is calculated, and the distance from the tumor to the anal edge is output.

2. The anal verge distance measurement method based on the inference propagation model according to claim 1 is characterized in that: In step S1, the FOV of the input data is (160-320) mm×(160-320) mm, the layer thickness is 3-4 mm, and the layer spacing is 0.3-0.4 mm.

3. The anal verge distance measurement method based on the inference propagation model according to claim 1 is characterized in that: In step S2, the image sequence of the input data is represented as , from which the initial layer is determined , k is the index of the initial layer; Rearrange the image sequence and split the sequence into two parts: and ,Will Reverse and get The rearranged sequence is As the starting point, the segmentation task is ensured to propagate from the tumor salient region; the tumor salient region refers to the layer where the tumor area is more than half of the largest layer of the tumor.

4. The anal verge distance measurement method based on the inference propagation model according to claim 1, characterized in that: In step S3, the key encoder uses the ResNet50 architecture to extract the key feature tensor of the image; the value encoder uses the ResNet18 architecture to extract the value feature tensor of the image.

5. The anal verge distance measurement method based on the inference propagation model according to claim 3 is characterized in that: The decoder comprises four stacked decoding blocks, each decoding block sequentially comprising an upsampling layer, a first convolutional layer, a regularization and activation function layer, a second convolutional layer, and a quadratic regularization and activation function layer; Upsampling layer: The convolution kernel size is 4x4, the stride is 2, the feature map size is restored to 1 / 2 of the original number of channels, and the length and width are doubled; Convolutional layer 1: The convolution kernel size is 3x3, the stride is 1, and the output channel remains unchanged; Regularization and activation function layer 1: batch normalization calculation and ReLU activation function operation; Convolutional layer 2: The convolution kernel size is 3x3, the stride is 1, and the output channel remains unchanged; Regularization and activation function layer 2: batch normalization calculation and ReLU activation function operation.

6. The anal verge distance measurement method based on the inference propagation model according to claim 1 is characterized in that: In step S3, the short-term memory is used to store the key features and value features of the current slice and adjacent slices; Long-term memory, used to store key features and value features of historical slices; Working memory, used to dynamically update the key and value features of the current slice; The memory reading module calculates the correlation between the current slice and the historical slices through a learnable weight matrix combined with the attention mechanism to generate a segmentation mask.

7. The anal verge distance measurement method based on the inference propagation model according to claim 1 is characterized in that: In step S4, the loss function is expressed as: in, The value is 0.8, is the dice loss, is the cross entropy loss.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Suspicious region segmentation method and device for MRI image, and computer readable storage medium

    CN115439439A

  • Nuclear magnetic resonance image colorectal tumor segmentation method based on multi-branch guide network

    CN119810071A