Rectal tumor image segmentation method and device

By combining a general segmentation model with a target segmentation model and using pseudo-labels to guide correction and feature extraction, the problem of insufficient accuracy and generalization ability in rectal tumor image segmentation across medical institutions was solved, achieving efficient and reliable image segmentation results and reducing data acquisition and annotation costs.

CN121329996BActive Publication Date: 2026-03-24UNIV OF SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing deep learning models have limited generalization ability in rectal tumor image segmentation across medical institutions, resulting in poor segmentation performance. Furthermore, they require a large amount of high-quality labeled data for training, which increases the cost of data collection and labeling.

Method used

By combining a general segmentation model with a target segmentation model, and fusing magnetic resonance images and initial segmentation images, pseudo-labels are generated using the rich visual priors and zero-shot generalization ability of the general segmentation model. These pseudo-labels guide the target segmentation model in correction and feature extraction, thereby improving segmentation accuracy and generalization ability.

Benefits of technology

It improves the accuracy and generalization ability of rectal tumor image segmentation, reduces the sensitivity to differences in data distribution among different medical institutions, lowers the cost of data collection and annotation, and simplifies the model training process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121329996B_ABST
    Figure CN121329996B_ABST
Patent Text Reader

Abstract

The application provides a rectal tumor image segmentation method and device, which can be applied to the technical field of medical image processing. The method comprises the following steps: performing image segmentation on a magnetic resonance image by using a segmentation block in a target segmentation model to obtain an initial segmentation image, wherein the magnetic resonance image is obtained by scanning a rectal region of a target object by an imaging device in a first medical institution, the labeling accuracy of the rectal tumor region in the initial segmentation image does not meet a segmentation accuracy condition, and the training sample of the target segmentation model is obtained by scanning by an imaging device in a second medical institution; performing image segmentation on the magnetic resonance image by using a general segmentation model by fusing the magnetic resonance image and the initial segmentation image to output a corrected segmentation image; performing feature extraction on the corrected segmentation image by using a feature extraction block of the target segmentation model to obtain corrected image features; and performing image segmentation on the magnetic resonance image according to the corrected image features by using the segmentation block to obtain a target segmentation image that meets the segmentation accuracy condition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of medical image processing, in particular to a rectal tumor image segmentation method and device. BACKGROUND

[0002] With the development of computer technology, deep learning-based methods are widely used in the field of medical image segmentation, showing higher segmentation accuracy compared to traditional methods. However, the generalization ability of existing deep learning models is limited, and they usually have good segmentation results for rectal tumor images similar to the distribution of training data. However, the segmentation results for rectal tumor images with large differences from the training data distribution are poor. SUMMARY

[0003] In view of the above problems, the present application provides a rectal tumor image segmentation method and device.

[0004] According to a first aspect of the present application, a rectal tumor image segmentation method is provided, comprising: performing image segmentation on a magnetic resonance image using a segmentation block in a target segmentation model to obtain an initial segmentation image, wherein the magnetic resonance image is obtained by scanning the rectal region of a target object using an imaging device in a first medical institution, the labeling accuracy of the rectal tumor region in the initial segmentation image does not meet the segmentation accuracy condition, and the training samples of the target segmentation model are obtained by scanning using an imaging device in a second medical institution; using a general segmentation model to fuse the magnetic resonance image and the initial segmentation image to output a corrected segmentation image, the corrected segmentation image being an image with corrected labeling of the rectal tumor region, and the general segmentation model being used for image segmentation of magnetic resonance images of multiple tumor types; using a feature extraction block of the target segmentation model to extract features from the corrected segmentation image to obtain corrected image features; and using the segmentation block to perform image segmentation on the magnetic resonance image according to the corrected image features to obtain a target segmentation image that meets the segmentation accuracy condition.

[0005] Optionally, the target segmentation model is trained based on the following operations: using an initial segmentation block to perform image segmentation on a sample magnetic resonance image in a training sample to obtain a sample initial segmentation image; training the initial segmentation block according to the sample initial segmentation image and a sample label to obtain the target segmentation model.

[0006] Optionally, the target segmentation model is obtained according to the sample initial segmentation image and the training initial segmentation block, and the target segmentation model comprises the following steps: training the initial segmentation block according to an initial loss value between the sample initial segmentation image and a sample label to obtain an intermediate segmentation block; outputting a sample corrected segmentation image by fusing the sample magnetic resonance image and the sample initial segmentation image by using the general segmentation model; obtaining sample corrected features by performing feature extraction on the sample corrected segmentation image by using the initial feature extraction block; obtaining a sample target segmentation image by performing image segmentation on the sample magnetic resonance image according to the sample corrected image features by using the intermediate segmentation block; and training the initial feature extraction block and the intermediate segmentation block according to the sample target segmentation image and the sample label to obtain a trained feature extraction block and a trained segmentation block, and the target segmentation model comprises the trained feature extraction block and the trained segmentation block.

[0007] Optionally, the feature extraction block comprises a first encoder and a second encoder; wherein the corrected image features are obtained by performing feature extraction on the corrected segmentation image by using the feature extraction block of the target segmentation model, and the feature extraction comprises the following steps: inputting the corrected segmentation image into the first encoder to obtain first encoding features; inputting the first encoding features into the second encoder to obtain second encoding features, and the corrected image features comprise the first encoding features and the second encoding features.

[0008] Optionally, the segmentation block comprises a third encoder, a fourth encoder, a fifth encoder and a decoding submodule; wherein the target segmentation image satisfying the segmentation precision condition is obtained by performing image segmentation on the magnetic resonance image according to the corrected image features by using the segmentation block, and the image segmentation comprises the following steps: processing the magnetic resonance image by using the third encoder to obtain third encoding features; inputting a fusion result of the first encoding features and the third encoding features into the fourth encoder to obtain fourth encoding features; inputting a fusion result of the second encoding features and the fourth encoding features into the fifth encoder to obtain fifth encoding features; and processing the third encoding features, the fourth encoding features and the fifth encoding features by using the decoding submodule to obtain the target segmentation image.

[0009] Optionally, the third encoder comprises a first convolutional layer and a pooling layer; wherein the third encoding features are obtained by processing the magnetic resonance image by using the third encoder, and the processing comprises the following steps: performing feature extraction on the magnetic resonance image by using the first convolutional layer to obtain first convolutional features; performing pixel splicing on the first convolutional features and the magnetic resonance image to obtain first splicing features; and processing the first splicing features by using the pooling layer to obtain the third encoding features.

[0010] Optionally, the decoding submodule comprises a first decoder, a second decoder and a third decoder; wherein the decoding submodule is configured to process the third encoded feature, the fourth encoded feature and the fifth encoded feature to obtain the target segmentation image, and the processing comprises: the first decoder is configured to process the fifth encoded feature to obtain a first decoded feature; the second decoder is configured to process the fourth encoded feature and the first decoded feature to obtain a second decoded feature; and the third decoder is configured to process the third encoded feature and the second decoded feature to obtain the target segmentation image.

[0011] Optionally, the first decoder comprises a second convolutional layer and an up-sampling layer; wherein the first decoder is configured to process the fifth encoded feature to obtain the first decoded feature, and the processing comprises: the second convolutional layer is configured to perform feature extraction on the fifth encoded feature to obtain a second convolutional feature; the second convolutional feature and the fifth encoded feature are spliced to obtain a second spliced feature; and the up-sampling layer is configured to process the second spliced feature to obtain the first decoded feature.

[0012] The second aspect of the present application provides a rectal tumor image segmentation device, comprising: a first segmentation module configured to perform image segmentation on a magnetic resonance image by using a segmentation block in a target segmentation model to obtain an initial segmentation image, wherein the magnetic resonance image is obtained by scanning a rectal region of a target object by an imaging device in a first medical institution, the accuracy of the label for the rectal tumor region in the initial segmentation image does not meet a segmentation accuracy condition, and training samples of the target segmentation model are obtained by an imaging device in a second medical institution; a correction module configured to fuse the magnetic resonance image and the initial segmentation image by using a general segmentation model to output a corrected segmentation image, the corrected segmentation image being an image in which the rectal tumor region is labeled after correction, and the general segmentation model being configured to perform image segmentation on magnetic resonance images of multiple tumor types; a feature extraction module configured to perform feature extraction on the corrected segmentation image by using a feature extraction block of the target segmentation model to obtain corrected image features; and a second segmentation module configured to perform image segmentation on the magnetic resonance image according to the corrected image features by using the segmentation block to obtain a target segmentation image that meets the segmentation accuracy condition.

[0013] The third aspect of the present application provides an electronic device, comprising: one or more processors; a memory storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the above method.

[0014] The rectal tumor image segmentation method and device provided by the application, in the case that the initial segmentation image does not meet the preset segmentation precision condition, the initial segmentation image is corrected, refined and generalized based on the target object original magnetic resonance image and the general field image segmentation knowledge of the target object by using the general segmentation model, the general segmentation model generates a corrected segmentation image with higher consistency, finer boundary and stronger generalization ability as a pseudo label by virtue of the rich visual priori and excellent zero sample generalization ability learned on the massive heterogeneous image data, effectively making up for the limitations of the target segmentation model as an expert model in the rectal tumor segmentation field when facing data of multiple types of imaging devices deviating from the training distribution; under the 'guidance' of the pseudo label, the target segmentation model can significantly enhance the adaptability and generalization ability to the data distribution differences caused by different imaging devices and target object groups while maintaining its professionalism in the rectal tumor segmentation field, thereby further improving the segmentation precision and providing efficient, reliable and more general technical support for the accurate preoperative diagnosis and treatment planning of rectal tumors; in addition, for the segmentation defects of cross-institutional data in the training process and application process, the improved target segmentation model and the introduction of the general segmentation model can adapt to the differences in data distribution of different medical institutions, and the target segmentation model can maintain high segmentation precision without training based on training samples from the same medical institution as the application data, thereby reducing the cost of data collection and labeling, simplifying the model training process, and the trained target segmentation model can be directly applied to the rectal tumor automatic segmentation task of multi-medical center magnetic resonance images, with good task adaptability and clinical practical value. BRIEF DESCRIPTION OF DRAWINGS

[0015] The above and other objects, features and advantages of the present application will become more apparent from the following description of embodiments of the present application, taken in conjunction with the accompanying drawings.

[0016] Figure 1 A flowchart of the rectal tumor image segmentation method according to an embodiment of the present application is shown.

[0017] Figure 2 A schematic diagram of a third encoder according to an embodiment of the present application is shown.

[0018] Figure 3 A schematic diagram of a target segmentation model according to an embodiment of the present application is shown.

[0019] Figure 4 A schematic diagram of a first decoder according to an embodiment of the present application is shown.

[0020] Figure 5 A structural block diagram of a rectal tumor image segmentation device according to an embodiment of the present application is shown.

[0021] Figure 6 A block diagram of an electronic device suitable for implementing a rectal tumor image segmentation method according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0022] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. It is to be understood, however, that these descriptions are merely exemplary and are intended to limit the scope of the present application. In the following detailed description of the embodiments of the present application, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to one skilled in the art that the embodiments of the present application can be practiced without these specific details. In other instances, well-known structures and functions have been omitted or simplified in order not to obscure the concepts of the present application.

[0023] The terms used herein are merely used to describe specific embodiments and are not intended to limit the present application. The terms "include", "comprise" and the like used herein indicate the presence of the features, steps, operations and / or components, but do not exclude the presence or addition of one or more other features, steps, operations or components.

[0024] All terms used herein, including technical and scientific terms, have the same meanings as those generally understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of the present specification, and should not be interpreted in an idealized or excessively formal manner.

[0025] In the case of using expressions similar to "at least one of A, B, and C, etc.", it should generally be interpreted to include at least one of the items, but not limited to the items (e.g., "a system having at least one of A, B, and C" should include a system having A alone, a system having B alone, a system having C alone, a system having A and B together, a system having A and C together, a system having B and C together, and / or a system having A, B, and C together, etc.).

[0026] In the process of implementing the present application, it is found that in practical applications, the magnetic resonance imaging devices and imaging parameters of different medical institutions differ greatly, resulting in inconsistent data distribution, and the segmentation performance of the image segmentation model on cross-medical-institution data is significantly reduced. Cross-medical-institution data refers to model training data and model application data from different medical institutions. In order to improve the generalization of the model, the prior art generally needs to collect a large amount of high-quality labeled data of the target medical institution for model training, which not only increases the data collection and labeling cost, but also has great difficulty in obtaining high-quality data. Therefore, how to improve the segmentation accuracy and generalization performance of the model on cross-medical-institution rectal tumor data has become a technical problem to be solved.

[0027] In view of this, embodiments of the present application provide a rectal tumor image segmentation method and device. The method comprises: performing image segmentation on a magnetic resonance image using a segmentation block in a target segmentation model to obtain an initial segmentation image, wherein the magnetic resonance image is obtained by scanning a rectal region of a target object by an imaging device in a first medical institution, the labeling accuracy of the rectal tumor region in the initial segmentation image does not meet the segmentation accuracy condition, and the training samples of the target segmentation model are obtained by scanning by an imaging device in a second medical institution; using a general segmentation model to fuse the magnetic resonance image and the initial segmentation image to output a corrected segmentation image, the corrected segmentation image being an image in which the rectal tumor region is labeled, and the general segmentation model is used for image segmentation of magnetic resonance images of multiple tumor types; using a feature extraction block of the target segmentation model to extract features from the corrected segmentation image to obtain corrected image features; and using the segmentation block to perform image segmentation on the magnetic resonance image according to the corrected image features to obtain a target segmentation image that meets the segmentation accuracy condition.

[0028] The present application introduces a general segmentation model, uses the rich visual prior and excellent zero-shot generalization ability learned by the general segmentation model on a large amount of heterogeneous image data to generate a corrected segmentation image with higher consistency, finer boundaries and stronger generalization ability as a pseudo-label, effectively compensating for the limitations of the target segmentation model as an expert model in the field of rectal tumor segmentation when facing data from multiple types of imaging devices that are unknown or deviate from the training distribution; under the 'guidance' of the pseudo-label, the target segmentation model can significantly enhance its adaptability and generalization ability to data distribution differences caused by different imaging devices and target object groups while maintaining its professionalism in rectal tumor segmentation, thereby further improving the segmentation accuracy and adapting to the differences in data distribution of different medical institutions, thereby eliminating the need to collect large-scale multi-center high-quality labeled data and reducing the cost of data collection and labeling.

[0029] In the technical solution of the present application, the user information (including but not limited to user personal information, user image information, user device information such as location information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards, necessary security measures are taken, do not violate public order and good customs, and appropriate operation portals are provided for users to choose authorization or refusal.

[0030] It should be noted that the serial numbers of the various operations in the following method are only used to represent the operations for description, and should not be regarded as representing the execution order of the various operations. Unless explicitly stated, the method does not need to be executed in the order shown.

[0031] Figure 1 A flowchart of a rectal tumor image segmentation method according to an embodiment of the present application is shown.

[0032] As shown in the method 100 includes operations S110-S140. Figure 1

[0033] In operation S110, the magnetic resonance image is image segmented by using a segmentation block in a target segmentation model to obtain an initial segmentation image.

[0034] In operation S120, the general segmentation model is used to fuse the magnetic resonance image and the initial segmentation image to output a corrected segmentation image.

[0035] In operation S130, the corrected segmentation image is feature extracted by using a feature extraction block of the target segmentation model to obtain corrected image features.

[0036] In operation S140, the magnetic resonance image is image segmented according to the corrected image features by using the segmentation block to obtain a target segmentation image that meets the segmentation accuracy condition.

[0037] The target segmentation model can be obtained by making structural improvements based on a basic framework of a U-shaped network structure (Universal-Network, Unet), and the improved Unet network structure is trained based on samples in the field of rectal tumors.

[0038] The magnetic resonance image is obtained by scanning the rectal region of the target object by using an imaging device in a first medical institution where the target object is located, and the magnetic resonance image can be a magnetic resonance imaging image (Magnetic Resonance Imaging, MRI). The target object can be a patient who has been diagnosed with rectal tumor.

[0039] ​The training sample of the target segmentation model is scanned by an imaging device in the second medical institution. The training sample includes a sample magnetic resonance image, which is obtained by scanning a relevant person based on an imaging device such as a nuclear magnetic resonance scanner of the second medical institution, under authorization of the relevant person. The trained target segmentation model can obtain a nuclear magnetic resonance image by scanning a patient object or the like relevant person based on an imaging device of the first medical institution in the application inference stage, and process the magnetic resonance image by the trained target segmentation model to perform the rectal tumor image segmentation method provided in the application embodiment. The imaging device of the first medical institution and the imaging device of the second medical institution can have different working parameters, such as magnetic field strength, magnetic field uniformity, or transmission frequency and the like. Due to the difference in the working parameters of the imaging device, the clarity, contrast, or artifacts of the magnetic resonance images obtained by the two may be different. The segmentation block in the target segmentation model is used to perform image segmentation on the magnetic resonance image to obtain an initial segmentation image, which represents an image preliminarily marking a rectal tumor region.

[0040] The accuracy of the marking of the rectal tumor region in the initial segmentation image can be detected based on the precision checking rule set based on the expert historical experience. In the case where the marking accuracy meets the segmentation accuracy condition, the initial segmentation image is directly taken as the target segmentation image.

[0041] For example, the training sample of the target segmentation model is a sample magnetic resonance image scanned based on the imaging device of medical institution A. When the target segmentation model is applied to segmentation, if the magnetic resonance image of the target object is scanned based on the imaging device of medical institution A, the probability that the marking accuracy of the rectal tumor region in the initial segmentation image obtained by the target segmentation model meets the segmentation accuracy condition is relatively high. Due to the large difference in imaging parameters of the imaging devices of different medical institutions, the data distribution is inconsistent, and the segmentation performance of the target segmentation model on the cross-medical institution data is significantly reduced. In order to improve the model generalization, the related method usually needs to collect a large amount of high-quality labeled data of the same medical institution for model pre-training, which not only increases the data collection and labeling cost, but also has great difficulty in obtaining high-quality data.

[0042] For example, the training sample of the target segmentation model is a sample magnetic resonance image scanned by the imaging equipment of medical institution A. When the target segmentation model is applied for segmentation, if the magnetic resonance image of the target object is scanned by the imaging equipment of medical institution B, compared with the probability that the initial segmentation image obtained by the segmentation of the magnetic resonance image scanned by the imaging equipment of medical institution B by the segmentation model trained by the existing method meets the segmentation accuracy condition, the probability that the initial segmentation image obtained by the segmentation of the magnetic resonance image scanned by the imaging equipment of medical institution B by the segmentation block in the target segmentation model trained by the method of the application meets the segmentation accuracy condition is greatly improved.

[0043] However, in order to improve reliability, it is still necessary to detect the accuracy of the initial segmentation image. If the segmentation accuracy condition is met, the initial segmentation image can be directly used as the target segmentation image, which can save certain calculation consumption. If the segmentation accuracy condition is not met, further segmentation is performed based on the general segmentation model and the complete target segmentation model, thereby double guaranteeing the accuracy of the target segmentation image.

[0044] In the case that the labeling accuracy of the rectal tumor region in the initial segmentation image does not meet the segmentation accuracy condition, the general segmentation model is introduced to refine and correct the initial segmentation image, and then deep feature extraction is performed on the corrected segmentation image based on the feature extraction in the target segmentation model, and the rectal tumor region in the magnetic resonance image is re-segmented by fusing the corrected image features by the segmentation block in the target segmentation model, to obtain the target segmentation image meeting the segmentation accuracy condition.

[0045] The general segmentation model can be constructed based on any segmentation model (Segment Anything Model, SAM). The general segmentation model is trained based on samples of multiple tumor type fields and multiple imaging equipment before training the target segmentation model. The general segmentation model contains general image segmentation knowledge and has general image segmentation capability. Therefore, during the training and application of the target segmentation model, the trained general segmentation model can be directly used for feature correction.

[0046] For example, the tumor type field can be a rectal tumor field, a cervical tumor field, a lung tumor field, or a brain tumor field, etc. The samples of multiple tumor type fields can come from one or more imaging equipment, which is not limited herein.

[0047] The magnetic resonance image and the initial segmentation image are fused, and the fused image is input into the general segmentation model. The general segmentation model performs segmentation correction on the initial segmentation image under the vertical guidance of the rectal tumor region features generated based on the magnetic resonance image and the horizontal guidance of the general image segmentation knowledge of the general segmentation model, to obtain a corrected segmentation image.

[0048] The corrected segmentation image is an image for which a rectal tumor region is corrected and labeled, and the general segmentation model is used for image segmentation of magnetic resonance images of multiple tumor types.

[0049] The corrected segmentation image is a segmentation image with higher consistency, more refined tumor boundaries, and stronger generalization ability after fusing general field image segmentation knowledge.

[0050] The target segmentation model includes a segmentation block and a feature extraction block. The feature extraction block can be constructed based on multiple encoders. The segmentation block can be constructed based on multiple symmetrical encoders and decoders. The segmentation block can be constructed based on a Universal-Network (Unet) basic framework, and the feature extraction block is introduced for structural improvement to obtain the target segmentation model.

[0051] The corrected image features are deep image features further extracted by the feature extraction block based on the professionalism of rectal tumor segmentation.

[0052] The corrected image features and the magnetic resonance image are input into the segmentation block, the segmentation block re-segments the magnetic resonance image under the guidance of the high-quality corrected image features, and a target segmentation image is obtained.

[0053] The labeling accuracy of the rectal tumor region in the target segmentation image meets the segmentation accuracy condition.

[0054] Optionally, in the case that the initial segmentation image does not meet the preset segmentation accuracy condition, the initial segmentation image is corrected, refined and generalized based on the original magnetic resonance image of the target object and the general field image segmentation knowledge of the target object by using the general segmentation model, the general segmentation model generates a corrected segmentation image with higher consistency, finer boundaries and stronger generalization ability as a pseudo label by virtue of its rich visual prior learned on a large amount of heterogeneous image data and excellent zero-shot generalization ability, which effectively makes up for the limitations of the target segmentation model as a specialist model in the field of rectal tumor segmentation when facing data of multiple types of imaging devices deviating from the training distribution; under the 'guidance' of the pseudo label, the target segmentation model can significantly enhance the adaptability and generalization ability to the data distribution differences caused by different imaging devices and target object groups while maintaining its professionalism in the field of rectal tumor segmentation, thereby further improving the segmentation accuracy and providing efficient, reliable and more general technical support for precise preoperative diagnosis and treatment planning of rectal tumors; in addition, for the segmentation defects of cross-institutional data in the training process and application process, the improved target segmentation model and the introduction of the general segmentation model can adapt to the differences in data distribution of different medical institutions, and the target segmentation model can maintain high segmentation accuracy without training based on training samples from the same medical institution as the application data, thereby reducing the cost of data collection and labeling, simplifying the model training process, and the trained target segmentation model can be directly applied to the rectal tumor automatic segmentation task of multi-medical center magnetic resonance images, with good task adaptability and clinical practical value.

[0055] Optionally, the target segmentation model is trained based on the following operations: performing image segmentation on a sample magnetic resonance image in a training sample by using an initial segmentation block to obtain a sample initial segmentation image; and training the initial segmentation block according to the sample initial segmentation image and a sample label to obtain the target segmentation model.

[0056] The training of the target segmentation model includes two stages, and the first stage is the training of the initial segmentation block.

[0057] The training sample includes a sample magnetic resonance image and a sample label, the sample magnetic resonance image is obtained by scanning a sample target object based on an imaging device, and the sample label represents that a pixel in the sample magnetic resonance image is a tumor pixel or a non-tumor pixel.

[0058] The sample initial segmentation image represents a sample image in which the rectal tumor region is preliminarily marked.

[0059] The loss value between the sample initial segmentation image and the sample label is calculated by using a loss function to obtain an initial loss value.

[0060] The initial segmentation block is trained based on an initial loss value and a preset loss threshold. In a case where the initial loss value is less than the preset loss threshold, the model parameters of the initial segmentation block are adjusted until the initial loss value is greater than or equal to the preset loss threshold, the training is stopped, and a target segmentation model is obtained.

[0061] The loss function selects one or more loss functions suitable for the segmentation task of rectal cancer to comprehensively measure the performance of the model in terms of segmentation accuracy, region overlap, and boundary consistency. The loss function includes but is not limited to cross-entropy loss, dice loss, Hausdorff distance loss, or a weighted combination thereof. The specific form of the loss function can be flexibly adjusted according to the task target and data characteristics to optimize the performance of the model.

[0062] An efficient optimization algorithm is used as the optimizer, including but not limited to the stochastic gradient descent algorithm, the adaptive moment estimation (Adam) algorithm, or other optimization algorithms, to ensure the efficiency and stability of parameter updating. The specific selection of the optimizer and the configuration of the hyperparameters can be dynamically adjusted according to the task requirements and the characteristics of the data set.

[0063] Optionally, an initial rectal tumor field expert model (initial segmentation block) is trained using the collected sample magnetic resonance images and sample labels in the vertical field of rectal tumors. The expert model is designed to preliminarily learn the morphological features and segmentation rules of rectal tumor lesions on sample magnetic resonance images. The training process optimizes the designed optimization strategy and loss function to ensure the stability and convergence of model parameter updating, thereby obtaining preliminary segmentation capability in the field of rectal tumors.

[0064] Optionally, the initial segmentation block is trained according to the sample initial segmentation image and the sample label to obtain a target segmentation model, including: training the initial segmentation block according to the initial loss value between the sample initial segmentation image and the sample label to obtain an intermediate segmentation block; using the general segmentation model to fuse the sample magnetic resonance image and the sample initial segmentation image to output a sample corrected segmentation image; using the initial feature extraction block to extract features from the sample corrected segmentation image to obtain sample corrected features; using the intermediate segmentation block to perform image segmentation on the sample magnetic resonance image according to the sample corrected image features to obtain a sample target segmentation image; training the initial feature extraction block and the intermediate segmentation block according to the sample target segmentation image and the sample label to obtain a trained feature extraction block and a trained segmentation block, and the target segmentation model includes the trained feature extraction block and the trained segmentation block.

[0065] The intermediate segmentation block is obtained through the first-stage training on the initial segmentation block, the second stage is the training on the initial feature extraction block and the intermediate segmentation block, the trained feature extraction block and the trained segmentation block are obtained, and thus the trained target segmentation model is obtained.

[0066] The sample magnetic resonance image and the sample initial segmentation image are fused and input to the general segmentation model, and a sample corrected segmentation image is output, the sample corrected segmentation image being a sample image with a rectal tumor region corrected and marked.

[0067] The sample corrected segmentation image and the sample magnetic resonance image are input into the initial target segmentation model to obtain a sample target segmentation image, which can include: performing feature extraction on the sample corrected segmentation image by using an initial feature extraction block to obtain sample corrected features, and then inputting the sample corrected image features and the sample magnetic resonance image into an intermediate segmentation block to obtain the sample target segmentation image.

[0068] A loss value between the sample target segmentation image and a sample label is calculated by using a loss function, and a target loss value is obtained.

[0069] The target segmentation model is trained based on the target loss value and a preset loss threshold, in a case where the target loss value is less than the preset loss threshold, model parameters of the initial feature extraction block and the intermediate segmentation block are adjusted, until the target loss value is greater than or equal to the preset loss threshold, the training is stopped, the trained feature extraction block and the trained segmentation block are obtained, and thus the target segmentation model is obtained.

[0070] In the training process, for example, a sample magnetic resonance image scanned by an imaging device of a medical institution A is used as a training sample, the training sample is divided into a training set and a validation set according to a certain proportion, the model performance is evaluated on the validation set regularly, appropriate evaluation indexes are adopted, including but not limited to a Dice Coefficient, a intersection over union or a precision, to monitor the convergence of the model. According to the performance of the validation set, training hyperparameters (such as a learning rate and a batch size) are dynamically adjusted or a training termination time is determined, to avoid overfitting and ensure the generalization ability of the model.

[0071] Optionally, in the second stage training of the target segmentation model, the general segmentation model is fused to improve the segmentation ability of general images (such as cervical tumor images or other non-tumor images) and specific training of rectal vertical field magnetic resonance images, which significantly improves the generalization performance of the target segmentation model in the rectal tumor segmentation task of multi-center sample images, enhances the adaptability of the target segmentation model to the data distribution of multi-center samples, and significantly reduces the dependence of the target segmentation model on large-scale multi-center sample data, thereby maintaining low computational cost and resource demand; in addition, under the guidance of the sample corrected segmentation image, the target segmentation model can achieve high precision and robustness in the sample magnetic resonance image segmentation task of the rectal vertical field.

[0072] In the two-stage training of the target segmentation model, the general segmentation model is introduced, and the loss value between the sample target segmentation image and the sample label is continuously calculated to optimize the parameters of the segmentation block and the feature extraction block of the target segmentation model, until the loss value reaches the convergence condition, and after the training is completed, the segmentation block and the feature extraction block both reach the optimal performance state. Therefore, compared with the probability that the segmentation model trained by the existing method meets the segmentation accuracy condition when segmenting the magnetic resonance images scanned by the imaging equipment of other centers, the probability that the segmentation block in the target segmentation model obtained by the training method of the present application meets the segmentation accuracy condition when segmenting the magnetic resonance images scanned by the imaging equipment of other centers has been greatly improved.

[0073] In the application stage of the target segmentation model, if the accuracy of the initial segmentation image obtained by using the segmentation block to segment the magnetic resonance images of other centers does not meet the segmentation accuracy condition, the general segmentation model can be introduced again to obtain a corrected segmentation image, the corrected image features are obtained by inputting the corrected segmentation image into the feature extraction block of the target segmentation model, and then the feature extraction block and the magnetic resonance image are re-input into the segmentation block of the target segmentation model, thereby obtaining a high-precision target segmentation image. Compared with the existing method of retraining the segmentation model using the sample scanned by the imaging equipment of this center when the accuracy does not meet the segmentation accuracy condition, although the model segmentation accuracy can be improved by retraining the segmentation model using the sample of this center, the computational cost and resource consumption are significantly increased, and the applicability is also not good.

[0074] Optionally, the feature extraction block includes a first encoder and a second encoder; wherein the feature extraction of the corrected segmentation image by the feature extraction block of the target segmentation model includes: inputting the corrected segmentation image into the first encoder to obtain first encoding features; inputting the first encoding features into the second encoder to obtain second encoding features, and the corrected image features include the first encoding features and the second encoding features.

[0075] The first encoder is used for feature extraction on the corrected segmentation image to obtain first encoding features.

[0076] The second encoder is used for feature extraction on the first encoding features to obtain second encoding features.

[0077] The first encoder and the second encoder have the same structure and are both constructed based on a convolutional neural network.

[0078] Optionally, the segmentation block comprises a third encoder, a fourth encoder, a fifth encoder and a decoding submodule; wherein the segmentation block is used to perform image segmentation on the magnetic resonance image according to the corrected image features to obtain a target segmentation image meeting a segmentation accuracy condition, comprising: the third encoder is used to process the magnetic resonance image to obtain third encoding features; the fusion result of the first encoding features and the third encoding features is input into the fourth encoder to obtain fourth encoding features; the fusion result of the second encoding features and the fourth encoding features is input into the fifth encoder to obtain fifth encoding features; and the decoding submodule is used to process the third encoding features, the fourth encoding features and the fifth encoding features to obtain the target segmentation image.

[0079] The third encoder, the fourth encoder, the fifth encoder, the first encoder and the second encoder all have the same structure and are all constructed based on a convolutional neural network.

[0080] The third encoder is used for feature extraction on the magnetic resonance image to obtain third encoding features.

[0081] The first encoding features and the third encoding features are spliced to obtain a fusion result, and the fourth encoder is used for feature extraction on the fusion result to obtain fourth encoding features.

[0082] The second encoding features and the fourth encoding features are spliced to obtain a fusion result, and the fifth encoder is used for feature extraction on the fusion result to obtain fifth encoding features.

[0083] The decoding submodule can be constructed based on a convolutional neural network, and the decoding submodule is used to process the third encoding features, the fourth encoding features and the fifth encoding features to obtain the target segmentation image.

[0084] Optionally, the target segmentation model comprises a feature extraction block and a segmentation block, the feature extraction block can further learn general image segmentation knowledge contained in the corrected image features, and then the third encoding features, the fourth encoding features and the fifth encoding features specific to the rectal tumor region are fused in the segmentation block to obtain the target segmentation image, which effectively fuses the general image segmentation ability and the specific image segmentation ability in the rectal tumor field to realize efficient and accurate cross-medical-institution magnetic resonance image segmentation.

[0085] Optionally, the third encoder comprises a first convolutional layer and a pooling layer; wherein the third encoder is used to process the magnetic resonance image to obtain the third encoding feature, comprising: using the first convolutional layer to extract features of the magnetic resonance image to obtain first convolutional features; performing pixel splicing on the first convolutional features and the magnetic resonance image to obtain first spliced features; using the pooling layer to process the first spliced features to obtain the third encoding feature.

[0086] The third encoder comprises two first convolutional layers, two activation layers, two normalization layers and a pooling layer.

[0087] The first convolutional layer is a three-dimensional convolutional layer, and the convolution kernel size is 3*3*3, which is used to extract spatial feature information, and the first convolutional features represent the spatial feature information.

[0088] Each first convolutional layer is connected to a normalization layer, and the normalization layer can be a batch normalization layer (Batch Normalization), which inputs the first convolutional features into the batch normalization layer to accelerate network convergence and improve model stability.

[0089] Each normalization layer is connected to an activation layer, and the activation layer uses an activation function (Rectified Linear Unit, ReLU) to introduce nonlinear features.

[0090] The pixel splicing is an element-wise addition operation, which realizes residual connection, and the first spliced features represent enhanced features.

[0091] The pooling layer is a max pooling (Max Pooling) operation, which realizes spatial down-sampling, and the third encoding feature is a more representative high-level feature.

[0092] Figure 2 A schematic diagram of the third encoder according to an embodiment of the application is shown.

[0093] As shown in Figure 2 , the magnetic resonance image is input into the first first convolutional layer to obtain the first first convolutional features; the first first convolutional features are input into the first normalization layer to obtain the first normalized features; the first normalized features are input into the first activation layer to obtain the first activation features; the first activation features are input into the second first convolutional layer to obtain the second first convolutional features; the second first convolutional features are input into the second normalization layer to obtain the second normalized features; the second normalized features are pixel-spliced with the magnetic resonance image to obtain the first spliced features; the first spliced features are input into the second activation layer to obtain the second activation features; and the second activation features are input into the pooling layer to obtain the third encoding feature.

[0094] Optionally, by the structural design of the third encoder, multi-level spatial features can be effectively extracted and fused, while keeping the gradient flow unobstructed, improving the training efficiency and segmentation accuracy of the deep neural network.

[0095] Optionally, the decoding submodule comprises a first decoder, a second decoder and a third decoder; wherein the decoding submodule is used to process the third encoded feature, the fourth encoded feature and the fifth encoded feature to obtain the target segmentation image, comprising: the first decoder is used to process the fifth encoded feature to obtain the first decoded feature; the second decoder is used to process the fourth encoded feature and the first decoded feature to obtain the second decoded feature; and the third decoder is used to process the third encoded feature and the second decoded feature to obtain the target segmentation image.

[0096] The first decoder, the second decoder and the third decoder have the same structure and are all constructed based on a convolutional neural network.

[0097] The first decoder is used to extract features from the fifth encoded feature to obtain the first decoded feature.

[0098] The fourth encoded feature and the first decoded feature are fused, and the fusion result is input into the second decoder to obtain the second decoded feature.

[0099] The third encoded feature and the second decoded feature are fused to obtain a fusion result, and the fusion result is input into the third decoder to obtain the target segmentation image.

[0100] Figure 3 A schematic diagram of a target segmentation model according to an embodiment of the application is shown.

[0101] As shown in Figure 3 , the target segmentation model comprises a feature extraction block and a segmentation block, the feature extraction block comprises a first encoder and a second encoder, the segmentation block comprises a third encoder, a fourth encoder, a fifth encoder and a decoding submodule, the decoding submodule comprises a first decoder, a second decoder and a third decoder. The corrected segmentation image is input into the first encoder to obtain the first encoded feature; the first encoded feature is input into the second encoder to obtain the second encoded feature; the third encoder is used to process the magnetic resonance image to obtain the third encoded feature; the fusion result of the first encoded feature and the third encoded feature is input into the fourth encoder to obtain the fourth encoded feature; the fusion result of the second encoded feature and the fourth encoded feature is input into the fifth encoder to obtain the fifth encoded feature; the first decoder is used to process the fifth encoded feature to obtain the first decoded feature; the second decoder is used to process the fourth encoded feature and the first decoded feature to obtain the second decoded feature; and the third decoder is used to process the third encoded feature and the second decoded feature to obtain the target segmentation image.

[0102] Optionally, the first decoder comprises a second convolutional layer and an up-sampling layer; wherein the first decoding feature is obtained by processing the fifth encoding feature by using the first decoder, comprising: performing feature extraction on the fifth encoding feature by using the second convolutional layer to obtain a second convolutional feature; performing pixel splicing on the second convolutional feature and the fifth encoding feature to obtain a second splicing feature; and processing the second splicing feature by using the up-sampling layer to obtain the first decoding feature.

[0103] The first decoder comprises two second convolutional layers, two activation layers, two normalization layers and an up-sampling layer.

[0104] The second convolutional layer is a three-dimensional convolutional layer, and the convolution kernel size is 3*3*3, which is used for extracting spatial feature information, and the first convolutional feature represents the spatial feature information.

[0105] Each second convolutional layer is connected to a normalization layer, and each normalization layer is connected to an activation layer.

[0106] The up-sampling layer is a linear up-sampling operation, which realizes spatial up-sampling and thus realizes fine reconstruction of the segmentation boundary.

[0107] Figure 4 A schematic diagram of the first decoder according to an embodiment of the present application is shown.

[0108] As shown in Figure 4 the fifth encoding feature is input into the first second convolutional layer to obtain the first second convolutional feature; the first second convolutional feature is input into the first normalization layer to obtain the first normalized feature; the first normalized feature is input into the first activation layer to obtain the first activated feature; the first activated feature is input into the second second convolutional layer to obtain the second second convolutional feature; the second second convolutional feature is input into the second normalization layer to obtain the second normalized feature; the second normalized feature is pixel-spliced with the fifth encoding feature to obtain the second splicing feature; the second splicing feature is input into the second activation layer to obtain the second activated feature; and the second activated feature is input into the up-sampling layer to obtain the first decoding feature.

[0109] Optionally, by designing the structure of the first decoder, multi-level feature information can be effectively fused, the spatial accuracy and overall performance of the segmentation result can be improved, and a high-quality feature basis is provided for the final rectal tumor segmentation output.

[0110] Based on the rectal tumor image segmentation method described above, the present application further provides a rectal tumor image segmentation device. The device will be described in detail below. Figure 5

[0111] Figure 5 A structural block diagram of the rectal tumor image segmentation device according to an embodiment of the present application is shown.

[0112] As​Figure 5 As shown, the rectal tumor image segmentation device 500 of this embodiment includes a first segmentation module 510, a correction module 520, a feature extraction module 530, and a second segmentation module 540.

[0113] The first segmentation module 510 is configured to perform image segmentation on the magnetic resonance image by using a segmentation block in the target segmentation model to obtain an initial segmentation image, wherein the magnetic resonance image is obtained by scanning the rectal region of a target object by an imaging device in a first medical institution, the labeling accuracy for the rectal tumor region in the initial segmentation image does not satisfy the segmentation accuracy condition, and the training sample of the target segmentation model is obtained by scanning by an imaging device in a second medical institution. In an embodiment, the first segmentation module 510 can be configured to perform the operation S110 described above, and thus no further description is given here.

[0114] The correction module 520 is configured to output a corrected segmentation image by fusing the magnetic resonance image and the initial segmentation image by using a general segmentation model, wherein the corrected segmentation image is an image in which the rectal tumor region is labeled after correction, and the general segmentation model is used for image segmentation of magnetic resonance images of multiple tumor types. In an embodiment, the correction module 520 can be configured to perform the operation S120 described above, and thus no further description is given here.

[0115] The feature extraction module 530 is configured to perform feature extraction on the corrected segmentation image by using a feature extraction block of the target segmentation model to obtain corrected image features. In an embodiment, the feature extraction module 530 can be configured to perform the operation S130 described above, and thus no further description is given here.

[0116] The second segmentation module 540 is configured to perform image segmentation on the magnetic resonance image according to the corrected image features by using a segmentation block to obtain a target segmentation image that satisfies the segmentation accuracy condition. In an embodiment, the second segmentation module 540 can be configured to perform the operation S140 described above, and thus no further description is given here.

[0117] Optionally, the first segmentation module 510 includes a first segmentation sub-module and a second segmentation sub-module.

[0118] The first segmentation sub-module is configured to perform image segmentation on a sample magnetic resonance image in the training sample by using an initial segmentation block to obtain a sample initial segmentation image.

[0119] The second segmentation sub-module is configured to train the initial segmentation block according to the sample initial segmentation image and a sample label to obtain the target segmentation model.

[0120] Optionally, the second segmentation sub-module includes a first segmentation unit, a second segmentation unit, a third segmentation unit, a fourth segmentation unit, and a fifth segmentation unit.

[0121] The first segmentation unit is configured to train the initial segmentation block according to an initial loss value between the sample initial segmentation image and the sample label, to obtain an intermediate segmentation block.

[0122] The second segmentation unit is configured to output a sample corrected segmentation image by fusing the sample magnetic resonance image and the sample initial segmentation image using the general segmentation model.

[0123] The third segmentation unit is configured to perform feature extraction on the sample corrected segmentation image using the initial feature extraction block to obtain sample corrected features.

[0124] The fourth segmentation unit is configured to perform image segmentation on the sample magnetic resonance image according to the sample corrected image features using the intermediate segmentation block to obtain a sample target segmentation image.

[0125] The fifth segmentation unit is configured to train the initial feature extraction block and the intermediate segmentation block according to the sample target segmentation image and the sample label, to obtain a trained feature extraction block and a trained segmentation block, and the target segmentation model comprises the trained feature extraction block and the trained segmentation block.

[0126] Optionally, the feature extraction module 530 comprises a first extraction sub-module and a second extraction sub-module.

[0127] The first extraction sub-module is configured to input the corrected segmentation image into the first encoder to obtain first encoded features.

[0128] The second extraction sub-module is configured to input the first encoded features into the second encoder to obtain second encoded features, and the corrected image features comprise the first encoded features and the second encoded features.

[0129] Optionally, the second segmentation module 540 comprises a fifth segmentation sub-module, a sixth segmentation sub-module, a seventh segmentation sub-module and an eighth segmentation sub-module.

[0130] The fifth segmentation sub-module is configured to process the magnetic resonance image using the third encoder to obtain third encoded features.

[0131] The sixth segmentation sub-module is configured to input a fusion result of the first encoded features and the third encoded features into the fourth encoder to obtain fourth encoded features.

[0132] The seventh segmentation sub-module is configured to input a fusion result of the second encoded features and the fourth encoded features into the fifth encoder to obtain fifth encoded features.

[0133] The eighth segmentation sub-module is configured to process the third encoded features, the fourth encoded features and the fifth encoded features using the decoding sub-module to obtain the target segmentation image.

[0134] Optionally, the fifth segmentation sub-module comprises a seventh segmentation unit, an eighth segmentation unit and a ninth segmentation unit.

[0135] The seventh segmentation unit is configured to perform feature extraction on the magnetic resonance image by using a first convolutional layer to obtain first convolutional features.

[0136] The eighth segmentation unit is configured to perform pixel stitching on the first convolutional features and the magnetic resonance image to obtain first stitched features.

[0137] The ninth segmentation unit is configured to process the first stitched features by using a pooling layer to obtain third encoded features.

[0138] Optionally, the eighth segmentation sub-module comprises a first decoding unit, a second decoding unit and a third decoding unit.

[0139] The first decoding unit is configured to process the fifth encoded features by using a first decoder to obtain first decoded features.

[0140] The second decoding unit is configured to process the fourth encoded features and the first decoded features by using a second decoder to obtain second decoded features.

[0141] The third decoding unit is configured to process the third encoded features and the second decoded features by using a third decoder to obtain a target segmentation image.

[0142] Optionally, the first decoding unit comprises a first decoding sub-unit, a second decoding sub-unit and a third decoding sub-unit.

[0143] The first decoding sub-unit is configured to perform feature extraction on the fifth encoded features by using a second convolutional layer to obtain second convolutional features.

[0144] The second decoding sub-unit is configured to perform pixel stitching on the second convolutional features and the fifth encoded features to obtain second stitched features.

[0145] The third decoding sub-unit is configured to process the second stitched features by using an up-sampling layer to obtain the first decoded features.

[0146] Optionally, any of the first segmentation module 510, the correction module 520, the feature extraction module 530 and the second segmentation module 540 can be combined in one module, or any of them can be split into multiple modules. Alternatively, at least part of the function of one or more of these modules can be combined with at least part of the function of other modules, and implemented in one module. Optionally, at least one of the first segmentation module 510, the correction module 520, the feature extraction module 530 and the second segmentation module 540 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of integrating or packaging a circuit, etc. or implemented by hardware or firmware, or implemented in any one of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the first segmentation module 510, the correction module 520, the feature extraction module 530 and the second segmentation module 540 can be at least partially implemented as a computer program module which, when executed, can perform the corresponding function.

[0147] Figure 6 A block diagram of an electronic device suitable for implementing the rectal tumor image segmentation method according to an embodiment of the present application is shown.

[0148] Figure 6 The electronic device shown is only an example and should not impose any limitation on the function and use range of the embodiments of the present application.

[0149] As Figure 6 As shown, the computer electronic device 600 according to an embodiment of the present application includes a processor 601 which can perform various appropriate actions and processes according to the program stored in the ROM 602 (read only memory) or the program loaded from the storage section 608 to the RAM 603 (random access memory). The processor 601 may, for example, include a general purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special purpose microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 601 can also include an on-board memory for cache use. The processor 601 can include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present application.

[0150] In the RAM 603, various programs and data required for the operation of the electronic device 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via the bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present application by executing the programs in the ROM 602 and / or the RAM 603. It should be noted that the programs can also be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 can also perform various operations of the method flow according to the embodiments of the present application by executing the programs stored in the one or more memories.

[0151] Optionally, the electronic device 600 can further include an input / output (I / O) interface 605, which is also connected to the bus 604. The electronic device 600 can further include one or more of the following components connected to the input / output (I / O) interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output (I / O) interface 605 as necessary. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 610 as necessary, so that a computer program read therefrom is installed in the storage portion 608 as necessary.

[0152] Optionally, the method flow according to the embodiments of the present application can be implemented as a computer software program. For example, the embodiments of the present application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program codes for executing the method shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network by the communication portion 609, and / or installed from the removable medium 611. When the computer program is executed by the processor 601, the above-described functions defined in the system according to the embodiments of the present application are performed. Optionally, the system, device, apparatus, module, unit, etc. described above can be implemented by computer program modules.

[0153] The present application also provides a computer-readable storage medium, which can be included in the device / apparatus / system described in the above embodiments; or can exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, which, when executed, implement the rectal tumor image segmentation method according to the embodiments of the present application.

[0154] Optionally, the computer readable storage medium can be a non-transitory computer readable storage medium. For example, it can include, but is not limited to, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disc read-only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing. In this application, the computer readable storage medium can be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.

[0155] For example, optionally, the computer readable storage medium can include one or more memories such as the ROM 602 and / or the RAM 603 and / or one or more memory chips or storage elements other than the ROM 602 and the RAM 603.

[0156] Embodiments of the present application also include a computer program product, which comprises a computer program for executing the method provided by the embodiments of the present application, and the program code contained in the computer program is used to make the electronic device implement the rectal tumor image segmentation method provided by the embodiments of the present application when the computer program product is run on the electronic device.

[0157] When the computer program is executed by the processor 601, the above-mentioned functions defined in the system / apparatus of the embodiments of the present application are executed. Optionally, the system, apparatus, module, unit, etc. described above can be implemented by computer program modules.

[0158] In one embodiment, the computer program can rely on tangible storage media such as optical storage media, magnetic storage media, etc. In another embodiment, the computer program can also be transmitted, distributed, and downloaded in the form of a signal on a network medium, and be downloaded and installed through the communication part 609, and / or be installed from the detachable medium 611. The program code contained in the computer program can be transmitted by any appropriate network medium, including but not limited to wireless, wired, etc., or any suitable combination of the foregoing.

[0159] Alternatively, program code to carry out operations provided in embodiments of the application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like, and / or conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's computing device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device such as through the Internet using an Internet Service Provider.

[0160] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0161] Embodiments of the present application have been described. However, these embodiments are merely meant to be illustrative of the present application and should not be construed as limiting the scope of the present application. Although each of the embodiments has been described above, it should be noted that measures in each of the embodiments can be advantageously used in combination. Various substitutions and modifications are possible within the scope of the present application without departing from the spirit and scope of the present application.​

Claims

1. A method for segmenting rectal tumor images, characterized in that, The method includes: The magnetic resonance image is segmented using the segmentation blocks in the target segmentation model to obtain an initial segmented image. The magnetic resonance image is obtained by scanning the rectal region of the target object using imaging equipment in a first medical institution. The labeling accuracy of the rectal tumor region in the initial segmented image does not meet the segmentation accuracy condition. The training samples of the target segmentation model are obtained by scanning using imaging equipment in a second medical institution. A corrected segmentation image is output by fusing the magnetic resonance image and the initial segmentation image using a general segmentation model. The corrected segmentation image is an image with corrected markings of the rectal tumor region. The general segmentation model is used to perform image segmentation on magnetic resonance images of multiple tumor types. The feature extraction blocks of the target segmentation model are used to extract features from the corrected segmented image to obtain the corrected image features. The magnetic resonance image is segmented using the segmentation blocks based on the features of the corrected image to obtain a target segmented image that meets the segmentation accuracy requirements.

2. The method according to claim 1, characterized in that, The target segmentation model is trained based on the following operations: The initial segmentation blocks are used to segment the magnetic resonance images of the samples in the training samples to obtain the initial segmentation images of the samples. The initial segmentation block is trained based on the initial segmentation image of the sample and the sample label to obtain the target segmentation model.

3. The method according to claim 2, characterized in that, The initial segmentation block is trained based on the initial segmentation image and sample labels to obtain the target segmentation model, including: Based on the initial loss value between the initial segmentation image of the sample and the sample label, train the initial segmentation block to obtain the intermediate segmentation block; The general segmentation model is used to output a corrected segmentation image by fusing the sample magnetic resonance image and the initial segmentation image. The sample correction segmentation image is used to extract features using the initial feature extraction block to obtain sample correction features; The sample magnetic resonance image is segmented using the intermediate segmentation block based on the sample correction image features to obtain the sample target segmentation image; Based on the target segmentation image and the sample label, the initial feature extraction block and the intermediate segmentation block are trained to obtain the trained feature extraction block and the trained segmentation block. The target segmentation model includes the trained feature extraction block and the trained segmentation block.

4. The method according to claim 1, characterized in that, The feature extraction block includes a first encoder and a second encoder; The step of extracting features from the corrected segmented image using the feature extraction block of the target segmentation model to obtain corrected image features includes: The corrected segmented image is input into the first encoder to obtain the first encoded feature; The first encoded feature is input into the second encoder to obtain the second encoded feature, and the corrected image feature includes the first encoded feature and the second encoded feature.

5. The method according to claim 4, characterized in that, The segmentation block includes a third encoder, a fourth encoder, a fifth encoder, and a decoding submodule; The step of segmenting the magnetic resonance image using the segmentation blocks based on the corrected image features to obtain a target segmented image that meets the segmentation accuracy condition includes: The magnetic resonance image is processed using the third encoder to obtain a third encoded feature; The fusion result of the first coding feature and the third coding feature is input into the fourth encoder to obtain the fourth coding feature; The fusion result of the second and fourth coding features is input into the fifth encoder to obtain the fifth coding feature; The target segmentation image is obtained by processing the third, fourth, and fifth encoded features using the decoding submodule.

6. The method according to claim 5, characterized in that, The third encoder includes a first convolutional layer and a pooling layer; The step of processing the magnetic resonance image using the third encoder to obtain the third encoded feature includes: The first convolutional layer is used to extract features from the magnetic resonance image to obtain the first convolutional features; The first convolutional feature and the magnetic resonance image are pixel-wise stitched together to obtain the first stitched feature; The first splicing feature is processed using the pooling layer to obtain the third encoded feature.

7. The method according to claim 5, characterized in that, The decoding submodule includes a first decoder, a second decoder, and a third decoder; The step of processing the third, fourth, and fifth encoded features using the decoding submodule to obtain the target segmentation image includes: The first decoder is used to process the fifth encoded feature to obtain the first decoded feature; The second decoder is used to process the fourth encoded feature and the first decoded feature to obtain the second decoded feature; The target segmentation image is obtained by processing the third encoded feature and the second decoded feature using the third decoder.

8. The method according to claim 7, characterized in that, The first decoder includes a second convolutional layer and an upsampling layer; The step of processing the fifth encoded feature using the first decoder to obtain the first decoded feature includes: The second convolutional layer is used to extract features from the fifth encoded feature to obtain the second convolutional feature; The second convolutional feature and the fifth encoded feature are concatenated pixel by pixel to obtain the second concatenated feature; The second concatenated feature is processed using the upsampling layer to obtain the first decoded feature.

9. A rectal tumor image segmentation device, comprising: The first segmentation module is used to segment the magnetic resonance image using segmentation blocks in the target segmentation model to obtain an initial segmented image. The magnetic resonance image is obtained by scanning the rectal region of the target object using imaging equipment in the first medical institution. The labeling accuracy of the rectal tumor region in the initial segmented image does not meet the segmentation accuracy condition. The training samples of the target segmentation model are obtained by scanning using imaging equipment in the second medical institution. The correction module is used to output a corrected segmentation image by fusing the magnetic resonance image and the initial segmentation image using a general segmentation model. The corrected segmentation image is an image with corrected markings for the rectal tumor region. The general segmentation model is used to perform image segmentation on magnetic resonance images of multiple tumor types. The feature extraction module is used to extract features from the corrected segmented image using the feature extraction block of the target segmentation model to obtain the corrected image features; The second segmentation module is used to segment the magnetic resonance image based on the features of the corrected image using the segmentation blocks, so as to obtain a target segmented image that meets the segmentation accuracy requirements.

10. An electronic device, comprising: One or more processors; Memory, used to store one or more computer programs. The characteristic feature is that the one or more processors invoke the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Tumor T staging detection method and system for rectum MRI image

    CN118982526A

  • Method and system for efficiently marking and segmenting lesion area in medical image

    CN120163981A