Method for training an image processing model

An image processing model with object coordinate graph is constructed through self-attention mechanism layer and auxiliary regression task, which solves the problem of inconvenient segmentation in colorectal cancer detection and achieves high-accuracy segmentation without intestinal preparation, which is suitable for colorectal cancer screening.

CN115131289BActive Publication Date: 2025-10-21ALIBABA (CHINA) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210570705.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-24
Publication Date
2025-10-21
Estimated Expiration
2042-05-24

AI Technical Summary

Technical Problem

In the existing technology, colorectal cancer detection methods such as MRI and CT colonography are time-consuming and cause adverse reactions, which makes colorectal and tumor segmentation inconvenient, especially in routine abdominal CT scans without bowel preparation. It is difficult to achieve accurate segmentation.

Method used

An image processing model training method is used to construct an object coordinate map through a self-attention mechanism layer and auxiliary regression tasks to improve the segmentation accuracy of colorectal and colorectal cancer. The self-attention mechanism layer is combined to enhance the model's ability to model global context.

Benefits of technology

Improved segmentation accuracy and continuity of colorectal and colorectal cancer in routine abdominal CT scans without bowel preparation, and improved recognition accuracy in data-assisted scenarios for colorectal cancer screening.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115131289B_ABST
    Figure CN115131289B_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a training method of an image processing model, comprising: obtaining a sample image containing a target object, and determining an object segmentation map of the target object in the sample image; constructing an object coordinate map corresponding to the object segmentation map according to the object segmentation map; and training an image processing model containing a self-attention mechanism layer according to the sample image, the object segmentation map and the object coordinate map. Specifically, the method constructs a new object coordinate map according to the object segmentation map, and trains the image processing model by combining the segmentation task generated by the object segmentation map, the auxiliary regression task generated by the object coordinate map and the self-attention mechanism layer, so as to enhance the architecture ability of the model for global context modeling and improve the prediction accuracy of the image processing model for the target object. The above method is suitable for application in a data assistance scene of colorectal cancer screening.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of computer technology, and in particular to a training method for an image processing model. Background Art

[0002] Colorectal cancer is a highly lethal cancer. Early detection of curable colorectal cancer has significant potential to reduce mortality. Currently, colorectal cancer can be detected using magnetic resonance imaging (MRI) or computed tomography (CT) colonography (CTC). However, MRI is only used for staging, and CTC is not widely used because of the time-consuming bowel preparation and dilation, which can cause adverse reactions such as pain and vasovagal syncope.

[0003] Therefore, how to successfully segment the colorectum and tumor without bowel preparation will have broader applications and impact. Summary of the Invention

[0004] In view of this, embodiments of this specification provide a method for training an image processing model. One or more embodiments of this specification also relate to an image processing model training device, an image processing method and device, a colorectal CT image processing method and device, a computing device, a computer-readable storage medium, and a computer program to address technical deficiencies in the prior art.

[0005] According to a first aspect of an embodiment of this specification, a method for training an image processing model is provided, comprising:

[0006] Acquire a sample image containing a target object, and determine an object segmentation map of the target object in the sample image;

[0007] constructing an object coordinate map corresponding to the object segmentation map according to the object segmentation map;

[0008] An image processing model including a self-attention mechanism layer is trained according to the sample image, the object segmentation map, and the object coordinate map.

[0009] According to a second aspect of the embodiments of this specification, a training device for an image processing model is provided, comprising:

[0010] an image acquisition module, configured to acquire a sample image containing a target object and determine an object segmentation map of the target object in the sample image;

[0011] a coordinate map construction module, configured to construct an object coordinate map corresponding to the object segmentation map according to the object segmentation map;

[0012] The model training module is configured to train an image processing model including a self-attention mechanism layer based on the sample image, the object segmentation map and the object coordinate map.

[0013] According to a third aspect of the embodiments of this specification, there is provided an image processing method, including:

[0014] receiving an image to be processed containing a target object;

[0015] Inputting the image to be processed into the image processing model to obtain an object segmentation map of the target object in the image to be processed;

[0016] The image processing model is a model obtained by training the above-mentioned image processing model.

[0017] According to a fourth aspect of the embodiments of this specification, there is provided an image processing apparatus, including:

[0018] An image receiving module is configured to receive an image to be processed containing a target object;

[0019] a segmentation map prediction module, configured to input the image to be processed into the image processing model to obtain an object segmentation map of the target object in the image to be processed;

[0020] The image processing model is a model obtained by training the above-mentioned image processing model.

[0021] According to a fifth aspect of the embodiments of this specification, a colorectal CT image processing method is provided, comprising:

[0022] receiving a user's request for processing a colorectal CT image, wherein the colorectal CT image is an image of the colorectum scanned by a computerized tomography scanner;

[0023] inputting the CT image into an image processing model to obtain an object segmentation map of the colorectum in the CT image, and displaying the object segmentation map to the user;

[0024] The image processing model is a model obtained by training the above-mentioned image processing model.

[0025] According to a sixth aspect of the embodiments of this specification, a colorectal CT image processing device is provided, comprising:

[0026] a request receiving module configured to receive a user's request for processing a colorectal CT image, wherein the colorectal CT image is an image of the colorectum scanned by an electronic computed tomography scanner;

[0027] a segmentation map obtaining module configured to input the CT image into an image processing model, obtain an object segmentation map of the colorectal area in the CT image, and display the object segmentation map to the user;

[0028] The image processing model is a model obtained by training the above-mentioned image processing model.

[0029] According to a seventh aspect of the embodiments of this specification, a computing device is provided, including:

[0030] memory and processor;

[0031] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the above-mentioned image processing method, image processing model training method or colorectal CT image processing method are implemented.

[0032] According to the eighth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned image processing method, image processing model training method, or colorectal CT image processing method.

[0033] According to the ninth aspect of the embodiments of this specification, a computer program is provided, wherein, when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned image processing method, image processing model training method or colorectal CT image processing method.

[0034] One embodiment of the present specification implements a method for training an image processing model, including: obtaining a sample image containing a target object, and determining an object segmentation map of the target object in the sample image; constructing an object coordinate map corresponding to the object segmentation map based on the object segmentation map; and training an image processing model containing a self-attention mechanism layer based on the sample image, the object segmentation map, and the object coordinate map.

[0035] Specifically, the training method for this image processing model constructs a new object coordinate map based on the object segmentation map. During training, the image processing model is trained through a segmentation task generated by the object segmentation map and an auxiliary regression task generated by the object coordinate map, combined with a self-attention mechanism layer. This enhances the model's architectural ability to model global context and subsequently improves the model's accuracy in predicting target objects. This method is suitable for use in colorectal cancer screening scenarios and provides data support. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1This is a schematic diagram of a specific scenario in which an image processing method provided by an embodiment of this specification is applied to colorectal segmentation;

[0037] Figure 2 This is a flowchart of a method for training an image processing model provided by one embodiment of this specification;

[0038] Figure 3 This is a flowchart of a processing process of a training method for an image processing model provided by one embodiment of this specification;

[0039] Figure 4 This is a schematic diagram of the structure of a training device for an image processing model provided by one embodiment of this specification;

[0040] Figure 5 This is a flowchart of a processing process of an image processing method provided by one embodiment of this specification;

[0041] Figure 6 This is a schematic diagram of the structure of an image processing device provided by one embodiment of this specification;

[0042] Figure 7 This is a flowchart of a colorectal CT image processing method provided in one embodiment of this specification;

[0043] Figure 8 This is a schematic structural diagram of a colorectal CT image processing device provided in one embodiment of this specification;

[0044] Figure 9 This is a structural block diagram of a computing device provided by one embodiment of this specification. DETAILED DESCRIPTION

[0045] The following description sets forth many specific details to facilitate a thorough understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0046] The terms used in one or more embodiments of this specification are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of this specification. The singular forms "a," "the," and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0047] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0048] First, the terms involved in one or more embodiments of this specification are explained.

[0049] CRC: colorectal cancer.

[0050] DeepCRC: A topology-aware deep learning approach for automatic segmentation of colorectum and colorectal cancer in routine abdominal CT scans.

[0051] CT: Computed Tomography, also known as electronic computer tomography, uses precisely collimated X-ray beams, gamma rays, ultrasound, etc., together with extremely sensitive detectors to perform cross-sectional scans around a certain part of the human body one by one. It has the characteristics of fast scanning time and clear images, and can be used to detect a variety of diseases.

[0052] 3D: Three-dimensional, which refers to three-dimensional plain scan CT in the embodiments of this specification.

[0053] Conv: Convolution, which represents the convolution layer of the image processing model.

[0054] Attention: Self-attention, which represents the self-attention mechanism layer of the image processing model.

[0055] Colorectal cancer is a highly lethal cancer. CT provides locational and morphological information about colorectal cancer, which is commonly used for cancer detection, surgical planning, and monitoring of treatment response, as well as structural assessment of the entire colorectum. Automatic segmentation of the colorectum, particularly CRC, is key to automating these clinical tasks, significantly improving the efficiency and potential accuracy of the entire clinical workflow.

[0056] The embodiments of this specification are suitable for application in data-assisted scenarios for colorectal cancer screening, with the goal of achieving automatic segmentation of the colorectum (colon and rectum) and colorectal cancer in routine abdominal CT scans (without bowel preparation) to improve the accuracy of the segmentation results.

[0057] Compared with MRI (magnetic resonance imaging), CT is much cheaper and generally superior to MRI for the treatment of hollow tissues such as the colon. In clinical practice, MRI is mainly used only for the staging of rectal cancer. For CT colonography (CTC), it is still not widely used because the bowel preparation and dilation are time-consuming and sometimes cause adverse reactions such as examination-related pain and vasovagal syncope. Another CRC segmentation task uses CT but requires barium coating enhancement after bowel preparation. Therefore, successfully segmenting the colorectum and tumors in routine abdominal CT without bowel preparation will have wider applications and impact.

[0058] Furthermore, this task is more challenging for the following reasons. (i) The colorectum occupies a large space in the abdomen and is always difficult to track continuously due to the admixture of other organs such as the small intestine. (ii) In conventional CT scans (which do not require bowel preparation), CRCs are often small and difficult to distinguish from colorectal contents, compared to a) CT colonography, which requires full distension of the colon via laxative cleansing and colon inflation, and b) pelvic MRI, which only contains rectal structures. Furthermore, discontinuous segmentation of the colorectum may ultimately lead to poor recognition accuracy in data-assisted scenarios for colorectal cancer screening.

[0059] In order to solve the above technical problems, the training method of the image processing model provided in the embodiment of this specification proposes a deep colorectal coordinate transformation to simultaneously improve the accuracy of colorectal and colorectal cancer segmentation. In terms of topological structure, the colorectum has a single path and continuous structure between the cecum and the rectum. This special pattern prompts this scheme to propose an auxiliary voxel-level regression problem to improve the continuity of segmentation. For example, a new one-dimensional coordinate system is established based on the centerline of the colorectum. Technically speaking, by projecting each foreground colorectal voxel into a one-dimensional coordinate system, the three-dimensional voxel space is converted into a one-dimensional colorectal coordinate space, thereby obtaining a normalized scalar for each voxel. In addition to the voxel-level classification in the traditional segmentation task formula, this scheme also directly regresses the coordinate value of the relative position in this coordinate system. This auxiliary regression task forces the image processing model to learn the global structural information of the colorectum and the location information of CRC, thereby helping the image processing model achieve better segmentation performance.

[0060] This specification provides a method for training an image processing model. One or more embodiments of this specification also relate to an image processing model training device, an image processing method and device, a colorectal CT image processing method and device, a computing device, a computer-readable storage medium, and a computer program, each of which is described in detail in the following embodiments.

[0061] See also Figure 1 , Figure 1A schematic diagram of a specific scenario in which an image processing method provided according to an embodiment of this specification is applied to colorectal segmentation is shown.

[0062] Figure 1 The system includes a CT scanner 102 , a terminal 104 and a server 106 .

[0063] In a specific implementation, the CT scanner 102 performs a CT scan on the user who is to undergo colorectal segmentation, obtaining a colorectal CT image of the user; the terminal 104 obtains the colorectal CT image from the CT scanner 102 and sends the colorectal CT image to the server 106. The server 106 inputs the colorectal CT image into a pre-trained image processing model, outputs a colorectal segmentation image corresponding to the colorectal CT image, and returns the colorectal segmentation image to the terminal 104; the user operating the terminal 104 (e.g., a doctor) can then judge the user's colorectal condition based on the colorectal segmentation image, thereby determining whether the user's colorectum is normal, benign, or cancerous. The image processing model can be understood as a deep learning model pre-trained using a global self-attention mechanism combined with historical colorectal CT images.

[0064] The image processing methods provided in the embodiments of this specification are applied to the specific scenario of colorectal segmentation. DeepCRC, a colorectal and colorectal tumor segmentation framework in conventional enhanced CT, is proposed. During training, this image processing model introduces an additional auxiliary regression task to directly predict the relative position of each voxel in the colorectal topology and a self-attention layer to model global context, thereby improving the accuracy of subsequent colorectal segmentation.

[0065] See also Figure 2 , Figure 2 A flowchart of a method for training an image processing model according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0066] Step 202: Acquire a sample image containing a target object, and determine an object segmentation map of the target object in the sample image.

[0067] Specifically, the image processing model can be applied to colorectal segmentation scenarios, and can also be applied to other applicable scenarios, such as scenarios similar to colorectal segmentation.

[0068] The specific application scenarios of the image processing model are different, and the sample images containing the target object obtained are also different; for example, when the image processing model is applied to the colorectal segmentation scenario, the sample image containing the target object can be understood as a CT image containing the colorectum, that is, the sample image containing the target object is a CT image containing the colorectum.

[0069] For ease of understanding, in the following embodiments, a CT image containing a colorectum is used as an example for detailed description.

[0070] In practical applications, multiple 3D CT images of colorectal cancer patients can be collected as sample images, and each sample image can be segmented by professionals using some annotation tools to obtain an object segmentation map; and the 3D CT images include normal colorectal images, benign colorectal cancer images, and colorectal cancer images. These images and the object segmentation maps corresponding to each image constitute a training data set for subsequent model training; for example, the training data set S = {(X i , Y i )|i=1,2,..M},where, represents the colorectal CT image of the i-th patient, Indicates the label annotated by voxel direction, (i.e. object segmentation map), and X i Use the same (H i , W i , D i ) three-dimensional dimensions, Represents the segmentation targets, namely background, colorectum, and colorectal cancer; that is, a set of labels, 0 represents background, 1 represents colorectum, and 2 represents colorectal cancer.

[0071] Taking the sample image containing the target object as a CT image containing the colorectum as an example, the sample image containing the target object is obtained, and the object segmentation map of the target object in the sample image is determined; it can be understood that the CT image containing the colorectum is obtained, and the object segmentation map of the colorectum in each CT image is determined.

[0072] Step 204: constructing an object coordinate map corresponding to the object segmentation map according to the object segmentation map.

[0073] In practical applications, in order to improve the continuity of image segmentation in the subsequently trained image processing model, the embodiment of this specification adopts a coordinate transformation method to train the image processing model through auxiliary regression tasks. Specifically, the specific implementation of the coordinate transformation method provided in the embodiment of this specification is as follows:

[0074] The step of constructing an object coordinate map corresponding to the object segmentation map according to the object segmentation map includes:

[0075] Extracting a sample centerline of the target object in the object segmentation image according to a preset centerline extraction algorithm;

[0076] Establishing an initial coordinate map according to the object segmentation map, and determining the starting position of the sample centerline;

[0077] The sample center line is tracked from the starting position according to a preset tracking algorithm, and an object coordinate map corresponding to the object segmentation map is constructed by combining the foreground voxels in the object segmentation map and the coordinates in the initial coordinate map.

[0078] Among them, the preset centerline extraction algorithm includes but is not limited to f cl Algorithm, where f cl It is a formula symbol, the subscript of f is cl, which indicates a centerline extraction algorithm.

[0079] Still using the above example, taking the target object as the colorectum as an example, the transformation of the object coordinate map based on the CT image of the colorectum is described in detail.

[0080] First, according to f cl The algorithm extracts the centerline C of the colorectum from the real object segmentation map Y, that is, C = f cl (Y), where f cl is a centerline extraction algorithm, where C represents the extracted three-dimensional centerline image of the same size as the colorectal CT image X and the true object segmentation map Y. Specifically, this scheme uses a robust centerline extraction algorithm to avoid false centerlines generated by irregular colorectal boundaries. C is also guaranteed to be a single-pixel-thick three-dimensional centerline map with 26 connectivity. Automatic algorithms may not be able to extract the correct centerline in certain areas with severe intestinal adhesions. The f of this scheme cl The algorithm adds manual corrections based on the results of the above automatic algorithm, which is more accurate than the automatic one; these centerlines can be corrected semi-automatically by erasing these attachments in Y and re-running the algorithm.

[0081] Secondly, an initial coordinate map is established based on the object segmentation map, and the starting position of the sample centerline is determined. That is, an initial colorectal coordinate mapping map E is established based on the object segmentation map. E is initialized to an all-zero matrix with the same shape as Y. Then, the lowest foreground position j is found on the centerline C, and the foreground position j is used as the starting position to subsequently track the centerline C.

[0082] Finally, the centerline C is tracked from the starting point using a preset tracking algorithm. The object coordinate map E corresponding to the object segmentation map is constructed by combining the foreground voxels in the object segmentation map with the coordinates in the initial coordinate map. Foreground voxels can be understood as the colorectal voxels in the object segmentation map. During the tracking of the centerline C, a coordinate value between 0 and 1 is assigned to each tracked point.

[0083] In a specific implementation, the sample center line is tracked from the starting position according to a preset tracking algorithm, and an object coordinate map corresponding to the object segmentation map is constructed by combining the foreground voxels in the object segmentation map and the coordinates in the initial coordinate map, including:

[0084] Tracking the sample centerline from the starting position according to a preset tracking algorithm, and incrementally marking the sample centerline in the initial coordinate map;

[0085] Propagate coordinate positions to foreground voxels in the object segmentation map according to sample centerlines in the initial coordinate map;

[0086] According to the coordinate positions corresponding to the foreground voxels in the object segmentation map, the corresponding foreground voxels are mapped to the initial coordinate map to construct an object coordinate map corresponding to the object segmentation map.

[0087] Specifically, the sample center line is tracked from the starting position of the sample center line to the end position according to the preset tracking algorithm, and the tracked points in the sample center line are incrementally marked in the initial coordinate map during the tracking process. At the same time, a coordinate value between 0 and 1 is set for each tracked point during the tracking process. At this time, the center line can be determined in the initial coordinate map.

[0088] Then, according to the sample center line in the initial coordinate map, the coordinate position is propagated to the foreground voxel in the object segmentation map, that is, the coordinate value is propagated to the foreground voxel of the object segmentation map along the sample center line; finally, according to the coordinate position of the foreground voxel in the object segmentation map, the foreground voxel is mapped to the initial coordinate map to construct the object coordinate map corresponding to the object segmentation map.

[0089] Continuing with the above example, we use the foreground position j as the starting position to track the centerline, and incrementally mark the centerline on E. At the same time, we set a coordinate value between 0 and 1 for each tracked position, and finally propagate the coordinate value along the centerline to the foreground voxel in Y. For each foreground position p, find the nearest point q on the centerline and update E. p The coordinates on the center line are the same as the coordinates of q. Finally, Y is converted into an object coordinate map E, that is, E∈[0,1] H×W×D .

[0090] In practical applications, the input of colorectal coordinate transformation is The output is E∈[0, 1] H×W×D ; The specific implementation is as follows:

[0091] Step 1: Extract the center line based on Y (1 voxel thick, 26 connected, that is, a line as thick as a 3D voxel and 26 connected in 3D space), denoted as C = f cl(Y);

[0092] Step 2: Find the lowest foreground position j on C;

[0093] Step 3: Initialize the zero map E with the same shape Y and set it to E j ←1;

[0094] Step 4: As long as there is an unvisited point k in the 26 neighborhoods of j;

[0095] Step 5: E k ←E j +1, then trace the center line and mark it incrementally;

[0096] Step 6: j←k; represents a step-by-step iterative process. Once an adjacent point K is found, the next reference point is used as the next reference point.

[0097] Step 7: Normalize E to [0,1]: Coordinate system;

[0098] Step 8: Determine each foreground voxel P of Y;

[0099] Step 9: Find the nearest point q to each P on the center line C;

[0100] Step 10: Project the coordinates onto each foreground voxel;

[0101] Step 11: Return to E.

[0102] In the embodiments of this specification, based on the real object segmentation map of the sample image, the real object segmentation map is converted into a real object coordinate map, and the three-dimensional voxel space is converted into a one-dimensional object coordinate space, thereby obtaining a normalized scalar for each voxel; in addition to the voxel-level classification in the original segmentation task, this scheme also directly regresses the coordinate value of the relative position in this coordinate system. Through this auxiliary task, the model can not only learn the global structural information of the features, but also learn the position information, thereby helping the model achieve better segmentation performance.

[0103] Step 206: Train an image processing model including a self-attention mechanism layer based on the sample image, the object segmentation map, and the object coordinate map.

[0104] Specifically, after obtaining the object coordinate map corresponding to the object segmentation map, the image processing model including the self-attention mechanism layer can be trained based on the sample image, the object segmentation map, and the object coordinate map. The specific implementation method is as follows:

[0105] The image processing model includes an encoder and a decoder;

[0106] Accordingly, the training of the image processing model including the self-attention mechanism layer according to the sample image, the object segmentation map, and the object coordinate map includes:

[0107] Inputting the sample image into the convolution layer of the encoder to obtain an initial sample feature map of the sample image;

[0108] Inputting the initial sample feature map into the self-attention mechanism layer of the encoder, learning the feature relationship between each feature in the initial feature map and other features, and obtaining a target sample feature map corresponding to the initial sample feature map;

[0109] Inputting the target sample feature map into the decoder for processing to obtain a predicted object segmentation map and a predicted object coordinate map of the target object in the sample image;

[0110] An image processing model is trained based on the object segmentation map, the object coordinate map, the predicted object segmentation map, and the predicted object coordinate map.

[0111] Still using the above example, taking the sample image as a colorectal CT image as an example, the colorectal CT image is input into the convolution layer of the encoder for convolution to obtain the initial sample feature map of the colorectal CT image, and the initial sample feature map is input into the self-attention mechanism layer of the encoder to learn the feature relationship between each initial sample feature in the initial sample feature map and other sample features, that is, for each initial sample feature in the initial sample feature map, new features are extracted based on all other global sample features, so that each initial sample feature has global knowledge; the target sample feature map is obtained after feature learning of each initial sample feature map; finally, the target sample feature map is determined based on the target sample feature.

[0112] Secondly, the target sample feature map is input into the decoder for processing to obtain the predicted object segmentation map and predicted object coordinate map of the target object in the sample image; finally, the image processing model is trained based on the object segmentation map, object coordinate map, predicted object segmentation map and predicted object coordinate map of the colorectal CT image.

[0113] The image processing model provided in the embodiments of this specification has an architectural improvement by adding a global self-attention mechanism layer to enhance the model's ability to model global context; combined with the object coordinate map, an additional auxiliary regression task is generated during model training to directly predict the topological structure of each voxel in the colorectum, further improving the continuity of the image processing model for colorectal segmentation.

[0114] In practical applications, in order to reduce the computational complexity of the self-attention mechanism layer, the initial sample feature map can be downsampled before being used for global context feature learning in the self-attention mechanism layer, and then upsampled when it is output through the self-attention mechanism layer. The specific implementation method is as follows:

[0115] Inputting the initial sample feature map into the self-attention mechanism layer of the encoder, learning the feature relationship between each feature in the initial feature map and other features, and obtaining a target sample feature map corresponding to the initial sample feature map, includes:

[0116] Inputting the initial sample feature map into the self-attention mechanism layer of the encoder, performing downsampling in the self-attention mechanism layer, and obtaining a downsampled initial sample feature map;

[0117] Processing the downsampled initial sample feature map through the multi-head self-attention mechanism in the self-attention mechanism layer, learning the feature relationship between each feature and other features in the downsampled initial sample feature map, and obtaining a candidate sample feature map;

[0118] The candidate sample feature map is upsampled to obtain an upsampled target sample feature map corresponding to the initial sample feature map.

[0119] Among them, learning the feature relationship between each feature and other features in the initial sample feature map can be understood as extracting new features based on all other sample features globally, so that each initial sample feature has global knowledge.

[0120] In practical applications, in order to increase the complexity of the image processing model and further improve the accuracy of subsequent use of the image processing model, a self-attention mechanism layer can be added after multiple convolutional layers.

[0121] Specifically, the self-attention mechanism layer is a global self-attention mechanism layer, and the global self-attention mechanism layer includes at least two, and both are arranged after the convolution layer of the encoder.

[0122] Taking at least two layers of self-attention mechanism as three layers as an example; first, the initial sample feature map is input into the first self-attention mechanism layer of the encoder, and in the first self-attention mechanism layer, the target sample feature map corresponding to the initial sample feature map is obtained according to the above calculation method; the target sample feature map is input into the next convolution layer for convolution to obtain the convolved feature map, and the convolved feature map is input into the next self-attention mechanism layer for calculation, and the corresponding target sample feature map is output. This process is iterated until the target sample feature map output by the last self-attention mechanism layer is obtained.

[0123] After obtaining the object segmentation map, the object coordinate map, the predicted object segmentation map, and the predicted object coordinate map, a first loss function and a second loss function can be obtained based on the object segmentation map, the object coordinate map, the predicted object segmentation map, and the predicted object coordinate map. The image processing model is trained based on the first loss function and the second loss function to improve the subsequent prediction accuracy of the image processing model. The specific implementation method is as follows:

[0124] The step of training an image processing model according to the object segmentation map, the object coordinate map, the predicted object segmentation map, and the predicted object coordinate map comprises:

[0125] Determining a first loss function formed based on the object segmentation map and the predicted object segmentation map;

[0126] determining a second loss function formed based on the object coordinate map and the predicted object coordinate map;

[0127] The image processing model is trained according to the first loss function and the second loss function.

[0128] The determining of a second loss function formed according to the object coordinate graph and the predicted object coordinate graph includes:

[0129] A second loss function is obtained according to the object coordinate map and the predicted object coordinate map through a first preset algorithm.

[0130] Specifically, the first preset algorithm can refer to Formula 1:

[0131]

[0132] in, represents the second loss function, j represents the j-th voxel position of E, P represents each foreground voxel, C represents the centerline, and E represents the object coordinate map.

[0133] Formula 1 allows the model to output the predicted object coordinate map P c Consistent with the object coordinate map E, by sharing parameters, the object segmentation map predicted by the image processing model can be made more continuous when the subsequent image processing model is applied; and the calculated loss function can be used to optimize the model parameters of the image processing model.

[0134] In the embodiment of this specification, after obtaining the predicted object coordinate map, a second loss function can be obtained through a first preset algorithm based on the object coordinate map and the predicted object coordinate map, and the model is subsequently adjusted through the second loss function so that the model can better learn the positional relationship between features; and the subsequent image processing model not only considers the relationship between features and segments the image during specific predictions, but also combines the coordinate positional relationship between features to ensure the continuity of segmentation during the image segmentation process, so as to improve the segmentation accuracy of the image processing model.

[0135] After obtaining the first loss function and the second loss function, the target loss function can be obtained based on the first loss function and the second loss function, and the image processing model can be accurately trained through the target loss function. The specific implementation method is as follows:

[0136] The step of training the image processing model according to the first loss function and the second loss function includes:

[0137] Obtaining a target loss function through a second preset algorithm according to the first loss function and the second loss function;

[0138] The image processing model is trained according to the target loss function.

[0139] Specifically, the second preset algorithm can refer to Formula 2:

[0140]

[0141] in, represents the first loss function, Represents the second loss function, and α is the balance value that controls the two loss functions. For example, if α is set to 1, the ratio of the two loss functions is 1:1. If α is set to 0.1, the first loss function is 10 times the second loss function.

[0142] After the image processing model is trained, in subsequent applications, the image to be processed can be accurately segmented according to the image processing model to obtain an accurate object segmentation map. The specific implementation method is as follows:

[0143] After training the image processing model including the self-attention mechanism layer, the method further includes:

[0144] receiving an image to be processed containing a target object;

[0145] The image to be processed is input into the image processing model to obtain an object segmentation map of the target object in the image to be processed.

[0146] The training method for the image processing model provided in the embodiments of this specification constructs a new object coordinate map based on the object segmentation map. During image processing model training, the image processing model is trained by combining the segmentation task generated by the object segmentation map and the auxiliary regression task generated by the object coordinate map with a self-attention mechanism layer. This enhances the model's architectural ability to model global context and subsequently improves the image processing model's accuracy in predicting target objects. This method is suitable for use in data-assisted scenarios for colorectal cancer screening, improving the accuracy of image processing models for colorectal segmentation in CT images.

[0147] The following combined Figure 3 Taking the application of the image processing method provided in this specification in the colorectal segmentation scenario as an example, the training method of the image processing model is further explained. Figure 3 A flowchart of a processing process of a training method for an image processing model provided in one embodiment of this specification is shown, which specifically includes the following steps.

[0148] Step 302: Obtain a colorectal CT image X of a historical patient.

[0149] Step 304: Determine a colorectal segmentation map Y of the colorectal CT image X.

[0150] like Figure 3 Label Map Y in.

[0151] Specifically, a training data set is formed according to the colorectal CT images and the colorectal segmentation map of each colorectal CT image, and the image processing model is trained using the training data set.

[0152] Step 306: Extract the center line C of the colorectal segmentation image.

[0153] like Figure 3 Centerline C in.

[0154] Step 308: Build a colorectal coordinate map E and initialize it to an all-zero matrix with the same shape as Y. Find the lowest foreground position j on the centerline C, use this position as the starting point to track the centerline, and incrementally mark the centerline on E, further normalized to the range [0,1].

[0155] Specifically, the all-zero matrix with the same shape as Y can be found in Figure 3 The Coordinate System in .

[0156] Step 310: Propagate the coordinates to the foreground voxels in Y along the center line C; obtain the colorectal coordinate map E corresponding to the colorectal segmentation map.

[0157] like Figure 3Coordinate Map E in.

[0158] Step 312: Input the colorectal CT image into the convolutional layer of the encoder of the image processing model to obtain an initial feature map of the colorectal CT image, and input the initial feature map into the self-attention mechanism layer following the convolutional layer.

[0159] Specifically, the initial feature map is input ( Figure 3 After the self-attention mechanism layer, the self-attention mechanism layer is downsampled and normalized for the first time. Figure 3 Norm in), multi-head self-attention mechanism ( Figure 3 Multi-head Attention in), Multi-layer Perceptron (MLP), Second Normalization ( Figure 3 Norm in), Downsampled (downsampling), etc., output ( Figure 3 The output in is the target feature map with the same size as the input.

[0160] Step 314: Input the target feature map output by the self-attention mechanism layer into the decoder of the image processing model to obtain the predicted colorectal segmentation map of the colorectal CT image.

[0161] Step 316: Simultaneously obtain the predicted colorectal coordinate map of the colorectal CT scan.

[0162] Step 318: Obtain the first loss function L according to the predicted colorectal segmentation map and the predicted coordinate map. seg .

[0163] Step 320: Obtain a second loss function L according to the predicted colorectal coordinate map and the colorectal coordinate map reg , and train the image processing model according to the first loss function and the second loss function.

[0164] The training method of the image processing model provided in the embodiments of this specification proposes DeepCRC, a colorectal and colorectal tumor segmentation framework in conventional enhanced CT. An additional auxiliary regression task is introduced to directly predict the relative position of each voxel in the colorectal topology and self-attention layer to model the global context. Experimental results show that when trained only on small-size (n<100) data, the image processing model provided in the embodiments of this specification outperforms nnUNet in colorectal segmentation, has better completeness, and significantly improves the accuracy of tumor segmentation, achieving an accuracy similar to inter-observer variability.

[0165] Specifically, this image processing model uses DeepCRC to improve the completeness of colorectal predictions, reliably predicting the topological structure surrounding the tumor region and distinguishing the tumor from organs and background. It is hypothesized that tumors affect the appearance of the colorectum, making the affected area more difficult to distinguish from non-colorectal areas. This approach integrates topological knowledge into the network embedding and enhances global contextual information; this helps improve the continuity of colorectal segmentation and enhances the accuracy of colorectal segmentation in CT images.

[0166] Corresponding to the above method embodiment, this specification also provides an embodiment of a training device for an image processing model. Figure 4 FIG. 1 shows a schematic diagram of a training device for an image processing model provided by an embodiment of this specification. Figure 4 As shown, the device includes:

[0167] The image acquisition module 402 is configured to acquire a sample image containing a target object and determine an object segmentation map of the target object in the sample image;

[0168] A coordinate map construction module 404 is configured to construct an object coordinate map corresponding to the object segmentation map based on the object segmentation map;

[0169] The model training module 406 is configured to train the image processing model including the self-attention mechanism layer according to the sample image, the object segmentation map and the object coordinate map.

[0170] Optionally, the coordinate graph construction module 404 is further configured to:

[0171] Extracting a sample centerline of the target object in the object segmentation image according to a preset centerline extraction algorithm;

[0172] Establishing an initial coordinate map according to the object segmentation map, and determining the starting position of the sample centerline;

[0173] The sample center line is tracked from the starting position according to a preset tracking algorithm, and an object coordinate map corresponding to the object segmentation map is constructed by combining the foreground voxels in the object segmentation map and the coordinates in the initial coordinate map.

[0174] Optionally, the coordinate graph construction module 404 is further configured to:

[0175] Tracking the sample centerline from the starting position according to a preset tracking algorithm, and incrementally marking the sample centerline in the initial coordinate map;

[0176] Propagate coordinate positions to foreground voxels in the object segmentation map according to sample centerlines in the initial coordinate map;

[0177] According to the coordinate positions corresponding to the foreground voxels in the object segmentation map, the corresponding foreground voxels are mapped to the initial coordinate map to construct an object coordinate map corresponding to the object segmentation map.

[0178] Optionally, the image processing model includes an encoder and a decoder;

[0179] Accordingly, the model training module 406 is further configured to:

[0180] Inputting the sample image into the convolution layer of the encoder to obtain an initial sample feature map of the sample image;

[0181] Inputting the initial sample feature map into the self-attention mechanism layer of the encoder, learning the feature relationship between each feature in the initial feature map and other features, and obtaining a target sample feature map corresponding to the initial sample feature map;

[0182] Inputting the target sample feature map into the decoder for processing to obtain a predicted object segmentation map and a predicted object coordinate map of the target object in the sample image;

[0183] An image processing model is trained based on the object segmentation map, the object coordinate map, the predicted object segmentation map, and the predicted object coordinate map.

[0184] Optionally, the model training module 406 is further configured to:

[0185] Determining a first loss function formed based on the object segmentation map and the predicted object segmentation map;

[0186] determining a second loss function formed based on the object coordinate map and the predicted object coordinate map;

[0187] The image processing model is trained according to the first loss function and the second loss function.

[0188] Optionally, the model training module 406 is further configured to:

[0189] Inputting the initial sample feature map into the self-attention mechanism layer of the encoder, performing downsampling in the self-attention mechanism layer, and obtaining a downsampled initial sample feature map;

[0190] Processing the downsampled initial sample feature map through the multi-head self-attention mechanism in the self-attention mechanism layer, learning the feature relationship between each feature and other features in the downsampled initial sample feature map, and obtaining a candidate sample feature map;

[0191] The candidate sample feature map is upsampled to obtain an upsampled target sample feature map corresponding to the initial sample feature map.

[0192] Optionally, the model training module 406 is further configured to:

[0193] A second loss function is obtained according to the object coordinate map and the predicted object coordinate map through a first preset algorithm.

[0194] Optionally, the model training module 406 is further configured to:

[0195] Obtaining a target loss function through a second preset algorithm according to the first loss function and the second loss function;

[0196] The image processing model is trained according to the target loss function.

[0197] Optionally, the device further includes:

[0198] The model processing module is configured as follows:

[0199] receiving an image to be processed containing a target object;

[0200] The image to be processed is input into the image processing model to obtain an object segmentation map of the target object in the image to be processed.

[0201] Optionally, the self-attention mechanism layer is a global self-attention mechanism layer, and the global self-attention mechanism layer includes at least two, and both are arranged after the convolution layer of the encoder.

[0202] Optionally, the sample image containing the target object is a CT image containing the colorectum.

[0203] The training device for the image processing model provided in the embodiments of this specification constructs a new object coordinate map based on the object segmentation map. During image processing model training, the image processing model is trained by combining the segmentation task generated by the object segmentation map and the auxiliary regression task generated by the object coordinate map with a self-attention mechanism layer. This enhances the model's architectural ability to model global context and subsequently improves the image processing model's accuracy in predicting target objects. This device is suitable for use in data-assisted scenarios for colorectal cancer screening, improving the accuracy of image processing models for colorectal segmentation in CT images.

[0204] The above is a schematic diagram of an image processing model training device according to this embodiment. It should be noted that the technical solution of this image processing model training device and the technical solution of the image processing model training method described above are based on the same concept. For details not described in detail in the technical solution of the image processing model training device, please refer to the description of the technical solution of the image processing model training method described above.

[0205] See also Figure 5 , Figure 5 A flowchart of a processing process of an image processing method provided by an embodiment of this specification is shown, which specifically includes the following steps.

[0206] Step 502: receiving an image to be processed containing a target object;

[0207] Step 504: inputting the image to be processed into the image processing model to obtain an object segmentation map of the target object in the image to be processed;

[0208] The image processing model is a model obtained by training using the above-mentioned image processing model training method.

[0209] In the image processing method provided in the embodiments of this specification, after receiving the image to be processed, the object segmentation map of the target object in the image to be processed can be accurately obtained based on the pre-trained image processing model, thereby greatly improving the segmentation efficiency and user experience.

[0210] The above is a schematic diagram of an image processing method according to this embodiment. It should be noted that the technical solution of this image processing method and the technical solution of the image processing model training method described above are based on the same concept. For details not described in detail in the technical solution of the image processing method, please refer to the description of the technical solution of the image processing model training method described above.

[0211] Corresponding to the above method embodiment, this specification also provides an image processing device embodiment, Figure 6 FIG. 1 shows a schematic diagram of the structure of an image processing device provided by an embodiment of this specification. Figure 6 As shown, the device includes:

[0212] An image receiving module 602 is configured to receive an image to be processed containing a target object;

[0213] The segmentation map prediction module 604 is configured to input the image to be processed into the image processing model to obtain an object segmentation map of the target object in the image to be processed;

[0214] The image processing model is a model obtained by training using the above-mentioned image processing model training method.

[0215] The image processing device provided in the embodiment of this specification can, after receiving the image to be processed, accurately obtain the object segmentation map of the target object in the image to be processed based on a pre-trained image processing model, thereby greatly improving the segmentation efficiency and user experience.

[0216] The above is a schematic diagram of an image processing device according to this embodiment. It should be noted that the technical solution of the image processing device and the technical solution of the above-mentioned image processing method are based on the same concept. For details not described in detail in the technical solution of the image processing device, please refer to the description of the technical solution of the above-mentioned image processing method.

[0217] See also Figure 7 , Figure 7 A flowchart of a colorectal CT image processing method provided in one embodiment of this specification is shown, which specifically includes the following steps.

[0218] Step 702: receiving a user's request for processing a colorectal CT image, wherein the colorectal CT image is an image of the colorectum scanned by a computerized tomography scanner;

[0219] Step 704: input the CT image into an image processing model, obtain an object segmentation map of the colorectum in the CT image, and display the object segmentation map to the user;

[0220] The image processing model is a model obtained by training the above-mentioned image processing model.

[0221] The colorectal CT image processing method provided in the embodiment of this specification can input the colorectal CT image into the image processing model after receiving the user's processing request for the colorectal TC image to obtain an accurate colorectal segmentation image, so that it can be subsequently applied in data-assisted scenarios for colorectal cancer screening to improve screening efficiency.

[0222] The above is a schematic diagram of a colorectal CT image processing method according to this embodiment. It should be noted that the technical solution of this colorectal CT image processing method and the technical solution of the aforementioned image processing model training method are based on the same concept. For details not described in detail in the technical solution of the colorectal CT image processing method, please refer to the description of the technical solution of the aforementioned image processing model training method.

[0223] Corresponding to the above method embodiment, this specification also provides a colorectal CT image processing device embodiment, Figure 8 FIG. 1 shows a schematic diagram of the structure of a colorectal CT image processing device provided by an embodiment of this specification. Figure 8 As shown, the device includes:

[0224] The request receiving module 802 is configured to receive a user's request for processing a colorectal CT image, wherein the colorectal CT image is an image of the colorectum scanned by a computerized tomography scanner;

[0225] a segmentation map obtaining module 804 configured to input the CT image into an image processing model, obtain an object segmentation map of the colorectal region in the CT image, and display the object segmentation map to the user;

[0226] The image processing model is the training method of the above-mentioned image processing model, and the model obtained by training is

[0227] The colorectal CT image processing device provided in the embodiment of this specification can input the colorectal CT image into the image processing model after receiving the user's processing request for the colorectal TC image to obtain an accurate colorectal segmentation image, so that it can be subsequently applied in data-assisted scenarios for colorectal cancer screening to improve screening efficiency.

[0228] The above is a schematic diagram of a colorectal CT image processing device according to this embodiment. It should be noted that the technical solution of the colorectal CT image processing device and the technical solution of the colorectal CT image processing method described above share the same concept. For details not described in detail in the technical solution of the colorectal CT image processing device, please refer to the description of the technical solution of the colorectal CT image processing method described above.

[0229] Figure 9 The block diagram of a computing device 900 according to one embodiment of the present disclosure is shown. Components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930, and a database 950 is used to store data.

[0230] The computing device 900 also includes an access device 940 that enables the computing device 900 to communicate via one or more networks 960. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 940 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0231] In one embodiment of the present specification, the above components of the computing device 900 and Figure 9 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 9 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art may add or replace other components as needed.

[0232] The computing device 900 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 900 can also be a mobile or stationary server.

[0233] The processor 920 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-mentioned image processing method, image processing model training method, or colorectal CT image processing method.

[0234] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of the computing device is based on the same concept as the technical solution of the aforementioned image processing method, image processing model training method, or colorectal CT image processing method. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the aforementioned image processing method, image processing model training method, or colorectal CT image processing method.

[0235] An embodiment of the present specification also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the above-mentioned image processing method, image processing model training method, or colorectal CT image processing method.

[0236] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium is based on the same concept as the technical solution of the aforementioned image processing method, image processing model training method, or colorectal CT image processing method. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the aforementioned image processing method, image processing model training method, or colorectal CT image processing method.

[0237] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of the above-mentioned image processing method, image processing model training method, or colorectal CT image processing method.

[0238] The above is a schematic diagram of a computer program according to this embodiment. It should be noted that the technical solution of this computer program is based on the same concept as the technical solution of the aforementioned image processing method, image processing model training method, or colorectal CT image processing method. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solution of the aforementioned image processing method, image processing model training method, or colorectal CT image processing method.

[0239] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0240] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0241] It should be noted that for the aforementioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0242] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0243] The preferred embodiments disclosed above are intended only to help illustrate this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that those skilled in the art can better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A method for training an image processing model, comprising: Acquire a sample image containing a target object, and determine an object segmentation map of the target object in the sample image; Constructing an object coordinate map corresponding to the object segmentation map according to the object segmentation map, wherein constructing an object coordinate map corresponding to the object segmentation map according to the object segmentation map includes: Extracting a sample centerline of the target object in the object segmentation image according to a preset centerline extraction algorithm; Establishing an initial coordinate map according to the object segmentation map, and determining the starting position of the sample centerline; Tracking the sample centerline from the starting position according to a preset tracking algorithm, and constructing an object coordinate map corresponding to the object segmentation map by combining the foreground voxels in the object segmentation map and the coordinates in the initial coordinate map; Training an image processing model including a self-attention mechanism layer according to the sample image, the object segmentation map, and the object coordinate map, wherein the image processing model includes an encoder and a decoder. Accordingly, training the image processing model including a self-attention mechanism layer according to the sample image, the object segmentation map, and the object coordinate map includes: Inputting the sample image into the convolution layer of the encoder to obtain an initial sample feature map of the sample image; Inputting the initial sample feature map into the self-attention mechanism layer of the encoder, learning the feature relationship between each feature in the initial feature map and other features, and obtaining a target sample feature map corresponding to the initial sample feature map; Inputting the target sample feature map into the decoder for processing to obtain a predicted object segmentation map and a predicted object coordinate map of the target object in the sample image; An image processing model is trained based on the object segmentation map, the object coordinate map, the predicted object segmentation map, and the predicted object coordinate map.

2. The image processing model training method according to claim 1, wherein tracking the sample centerline from the starting position according to a preset tracking algorithm and combining the foreground voxels in the object segmentation map and the coordinates in the initial coordinate map to construct an object coordinate map corresponding to the object segmentation map comprises: Tracking the sample centerline from the starting position according to a preset tracking algorithm, and incrementally marking the sample centerline in the initial coordinate map; Propagate coordinate positions to foreground voxels in the object segmentation map according to sample centerlines in the initial coordinate map; According to the coordinate positions corresponding to the foreground voxels in the object segmentation map, the corresponding foreground voxels are mapped to the initial coordinate map to construct an object coordinate map corresponding to the object segmentation map.

3. The method for training an image processing model according to claim 1, wherein training the image processing model based on the object segmentation map, the object coordinate map, the predicted object segmentation map, and the predicted object coordinate map comprises: Determining a first loss function formed based on the object segmentation map and the predicted object segmentation map; determining a second loss function formed based on the object coordinate map and the predicted object coordinate map; The image processing model is trained according to the first loss function and the second loss function.

4. The image processing model training method according to claim 1, wherein the step of inputting the initial sample feature map into the self-attention mechanism layer of the encoder, learning the feature relationship between each feature in the initial feature map and other features, and obtaining a target sample feature map corresponding to the initial sample feature map comprises: Inputting the initial sample feature map into the self-attention mechanism layer of the encoder, performing downsampling in the self-attention mechanism layer, and obtaining a downsampled initial sample feature map; Processing the downsampled initial sample feature map through the multi-head self-attention mechanism in the self-attention mechanism layer, learning the feature relationship between each feature and other features in the downsampled initial sample feature map, and obtaining a candidate sample feature map; The candidate sample feature map is upsampled to obtain an upsampled target sample feature map corresponding to the initial sample feature map.

5. The method for training an image processing model according to claim 3, wherein determining a second loss function formed based on the object coordinate map and the predicted object coordinate map comprises: A second loss function is obtained according to the object coordinate map and the predicted object coordinate map through a first preset algorithm.

6. The image processing model training method according to claim 5, wherein training the image processing model according to the first loss function and the second loss function comprises: Obtaining a target loss function through a second preset algorithm according to the first loss function and the second loss function; The image processing model is trained according to the target loss function.

7. The image processing model training method according to claim 1, further comprising: receiving an image to be processed containing a target object; The image to be processed is input into the image processing model to obtain an object segmentation map of the target object in the image to be processed.

8. According to the training method of the image processing model according to claim 1, the self-attention mechanism layer is a global self-attention mechanism layer, and the global self-attention mechanism layer includes at least two, and both are arranged after the convolution layer of the encoder.

9. The training method of the image processing model according to any one of claims 1 to 8, wherein the image to be processed containing the target object is a CT image containing the colorectum.

10. A training device for an image processing model, comprising: an image acquisition module, configured to acquire a sample image containing a target object and determine an object segmentation map of the target object in the sample image; a coordinate map construction module configured to construct an object coordinate map corresponding to the object segmentation map based on the object segmentation map, extract sample centerlines of target objects in the object segmentation map based on a preset centerline extraction algorithm, establish an initial coordinate map based on the object segmentation map, and determine a starting position of the sample centerline; track the sample centerline from the starting position based on a preset tracking algorithm, and construct an object coordinate map corresponding to the object segmentation map by combining foreground voxels in the object segmentation map and coordinates in the initial coordinate map; A model training module is configured to train an image processing model including a self-attention mechanism layer based on the sample image, the object segmentation map, and the object coordinate map, wherein the image processing model includes an encoder and a decoder, inputting the sample image into the convolution layer of the encoder to obtain an initial sample feature map of the sample image; inputting the initial sample feature map into the self-attention mechanism layer of the encoder to learn the feature relationship between each feature in the initial feature map and other features, and obtaining a target sample feature map corresponding to the initial sample feature map; inputting the target sample feature map into the decoder for processing to obtain a predicted object segmentation map and a predicted object coordinate map of the target object in the sample image; and training the image processing model based on the object segmentation map, the object coordinate map, the predicted object segmentation map, and the predicted object coordinate map.

11. An image processing method, comprising: receiving an image to be processed containing a target object; Inputting the image to be processed into the image processing model to obtain an object segmentation map of the target object in the image to be processed; The image processing model is a model obtained by training according to the training method of any one of claims 1 to 9.

12. A colorectal CT image processing method, comprising: receiving a user's request for processing a colorectal CT image, wherein the colorectal CT image is an image of the colorectum scanned by a computerized tomography scanner; inputting the CT image into an image processing model to obtain an object segmentation map of the colorectum in the CT image, and displaying the object segmentation map to the user; The image processing model is a model obtained by training according to the training method of any one of claims 1 to 9.

Citation Information

Patent Citations

  • Coronary vessel center line matching method and system

    CN108335284A

  • Cerebral stroke feature extraction and intelligent risk prediction method and system based on traditional Chinese medicine inspection diagnosis

    CN113658702A