Disclosure of Invention
The invention provides a domain adaptation cross-mode medical image segmentation method, device, equipment and medium based on boundary contrast, so as to improve at least one of the technical problems.
In a first aspect, the present invention provides a domain-adaptive cross-modality medical image segmentation method based on boundary contrast, which includes steps S1 to S7.
S1, acquiring a source sample from a source domain data set of a first modality. The source sample contains a source domain image and a source tag.
S2, acquiring a target domain image corresponding to the source domain image from a target domain data set of a second modality.
S3, taking a first image segmentation model trained based on the first modal data as a teacher model, inputting the target domain image into the teacher model, obtaining a pseudo tag, and distributing different weights for the pseudo tag according to the prediction entropy of the pixel based on a dynamic weight distribution strategy.
S4, mixing the source domain image and the target domain image into a mixed image through a bidirectional cross-domain cutmix, mixing the source label and the pseudo label into a mixed label, and obtaining a training sample.
S5, taking the first image segmentation model with the weight capable of being learned as a student model, inputting the source sample into the student model for supervision training, and inputting the training sample into the student model for self training.
And S6, during training, acquiring a query sample based on the characteristics extracted by the student model, acquiring a prototype positive sample based on the characteristics extracted by the teacher model from the source domain image, acquiring a boundary negative sample based on the boundary characteristics extracted by the source label from the boundary of each object, performing iterative training by combining the supervision loss and the contrast loss, pulling the query sample to the prototype positive sample to push away from the boundary negative sample as a target, optimizing parameters of the student model, enhancing the distinguishing capability of the model in the boundary area, and acquiring a second image segmentation model.
S7, dividing the medical image of the second mode according to the second image dividing model, and acquiring the divided medical image of the second mode.
In an alternative embodiment, the dynamic weight allocation policy is:
;
;
wherein, Is confidence weight,Representing the number of current training iterations,Is the serial number of the image,A serial number of a pixel in the image,Is the prediction entropy,AndRespectively the firstA first entropy threshold and a second entropy threshold of the multiple iterations,Confidence weights for predefined target unsupervised loss,Indicating the number of categories of labels,A serial number of the label type,To predict probability,Is the firstFirst iterationFirst of imagesThe first pixel ofPredictive probability of class label category,AndRepresenting the height and width of the image, respectively.
AndRespectively byAndCalculating quantiles to obtain:
;
;
;
;
wherein, Is a function in numpy libraries for calculating quantiles,Is a pixel level entropy diagram,Representing the conversion of a two-dimensional array into a one-dimensional array for quantile calculation,AndRespectively distributing related first parameters and second parameters for dynamic weights,Respectively isAndAn initial ratio of (2),Representing the maximum number of iterations.
In an alternative embodiment, step S4 specifically includes steps S41 to S43.
S41, generating a zero center maskAnd the method is used for carrying out bidirectional mixing on the source image and the target image to obtain a mixed image.
;
Wherein, Is the firstA mixed image,Representing a mixture of,Is the firstA source domain image,A serial number representing an image,Is the firstA target domain image,Representing the target domain,Zero center mask,Representing multiplication,AndRepresenting the height and width of the image, respectively.
S42, mixing the source tag and the pseudo tag by adopting a mixing mode with the same mixed image to obtain the mixed tag。
S43, acquiring training samples according to the mixed image and the mixed label,A serial number representing an image,Representing the number of blended images.
In an alternative embodiment, the query sample is obtained based on the features extracted by the student model, which specifically includes:
For each category other than the background category, reliable pixels in the current small lot below a preset entropy threshold are taken as query candidates.
In an alternative embodiment, obtaining a prototype positive sample based on features extracted from a source domain image by a teacher model specifically includes:
initializing class-level prototypes using class centers for original source domain pixel features :
;
Wherein, A number of samples representing a source domain dataset,Representing the source domain,Is the serial number of the image,AndHeight and width of representative feature,A serial number of a pixel in the image,An instruction head for the teacher model,Is the firstOutput of teacher model indication head corresponding to each pixel,To output corresponding real labelsDownsampling(s),Representing a real number set,Is thatChannel dimension of (2),A serial number of the label type,As an index function, when meeting the conditionsThe index function has a value of 1 when it is present, and 0 when it is not present.
The class-level prototype is updated in each iteration in a progressive refinement manner. Wherein, the firstSecond iteration (a)Personal class prototypesDefinition is performed by a class-level mean vector of pixel features in a small batch:
;
wherein, Is a momentum coefficient,Represent the firstFirst iterationEach category prototype,The representation belonging to the firstThe number of the pixels,Representing the size of the small lot.
In an alternative embodiment, the boundary negative sample is obtained based on the boundary features extracted from the boundary of each object by the source tag, specifically including:
Pixels which do not belong to the current object class are sampled from the periphery of each object area, the corresponding feature vectors are used as boundary negative samples, and class-level memory banks are used for storing the boundary negative samples. Wherein the output of the instruction head is directed to the teacher model Is the first of (2)Class object, tag with downsamplingPerforming morphological operation to obtain a binary boundary maskThen, useAnd downsampled labelsExtracting feature vector to obtain boundary negative sample. Wherein, 。
In an alternative embodiment, the loss function during trainingThe method comprises the following steps:
;
wherein, A supervision loss for a tagged source domain image,Representing minimization of predictor and hybrid pseudo tag weighted cross entropy loss,AndIs a balance coefficient,Pixel level contrast learning loss for source domain images,The loss is learned for pixel level contrast of the blended image.
;
Wherein, A number of samples representing a source domain dataset,Is the serial number of the image,Is cross entropy loss,Is the Dice loss,Is a real label,Labels predicted for student models.
;
Wherein, For mixing the number of images, subscripts, or superscriptsRepresenting a mixed image,AndRespectively representing the height and width of the image,For mixing the weights of the pixels in the image,A serial number of a pixel in the image,Is an index function,Is the first of the mixed imagesHybrid labels of individual pixels,The prediction probability of the mixed image is used for the student model.
In source domain data setAnd training sample setsThe pixel level contrast loss is calculated by using the prototype positive sample and the boundary negative sample for the query sample, and the pixel level contrast learning loss of the source domain image is obtainedPixel level contrast learning penalty with blended images。
Pixel level contrast loss modelThe method comprises the following steps:
;
wherein, Is the number of label categories,A serial number of the label type,To inquire the sample number,Is a natural exponential function,Category(s)Is the first of (2)Each inquiry sample,Representing a positive prototype,Is the temperature,A negative number of samples,Representing a negative sample.
In an alternative embodiment, the source domain image of the first modality is one of a magnetic resonance imaging MRI image and a tomographic CT image. The target domain image of the second modality is the other of a magnetic resonance imaging MRI image and a tomographic CT image.
The invention provides a domain adaptation cross-mode medical image segmentation device based on boundary contrast, which comprises a source sample acquisition module, a target domain image acquisition module, a pseudo tag acquisition module, a mixing module, a training module and a segmentation module.
And the source sample acquisition module is used for acquiring a source sample from the source domain data set of the first modality. The source sample contains a source domain image and a source tag.
And the target domain image acquisition module is used for acquiring a target domain image corresponding to the source domain image from the target domain data set of the second modality.
The pseudo tag acquisition module is used for taking a first image segmentation model trained based on first modal data as a teacher model, inputting a target domain image into the teacher model to acquire a pseudo tag, and distributing different weights for the pseudo tag according to the prediction entropy of the pixel based on a dynamic weight distribution strategy.
And the mixing module is used for mixing the source domain image and the target domain image into a mixed image through a bidirectional cross-domain cutmix, mixing the source label and the pseudo label into a mixed label, and obtaining a training sample.
And the student model module is used for taking the first image segmentation model with the weight capable of being learned as a student model, inputting the source sample into the student model for supervision training, and inputting the training sample into the student model for self training.
And the training module is used for acquiring a query sample based on the characteristics extracted by the student model, acquiring a prototype positive sample based on the characteristics extracted by the teacher model from the source domain image, acquiring a boundary negative sample based on the boundary characteristics extracted by the source label from the boundary of each object, performing iterative training by combining the supervision loss and the contrast loss, pulling the query sample to the prototype positive sample to push away from the boundary negative sample as a target, optimizing parameters of the student model, enhancing the discrimination capability of the model in the boundary region, and acquiring a second image segmentation model.
And the segmentation module is used for segmenting the medical image of the second modality according to the second image segmentation model and acquiring the segmented medical image of the second modality.
In a third aspect, the invention provides a boundary contrast-based domain-adaptive cross-modality medical image segmentation apparatus comprising a processor, a memory, and a computer program stored within the memory. The computer program is executable by the processor to implement a domain-adaptive cross-modality medical image segmentation method based on boundary contrast as described in any of the paragraphs of the first aspect.
In a fourth aspect, the present invention provides a computer readable storage medium, the computer readable storage medium including a stored computer program, wherein the computer program when run controls a device in which the computer readable storage medium is located to perform a method for domain-adaptive cross-modality medical image segmentation based on boundary contrast according to any one of the first aspects.
By adopting the technical scheme, the invention can obtain the following technical effects:
Compared with the traditional frame, the domain adaptation cross-mode medical image segmentation method based on boundary comparison is capable of focusing on fuzzy boundary areas positively and achieving excellent segmentation effect at class boundaries. When the cross-modal heart dataset is segmented, the entropy at the boundary of different heart structure categories is low and the confidence is high, so that the segmentation performance is effectively improved. Secondly, unlike the previous method of unidirectional mixing samples, the method creates a mixed image from two directions for self-training, and greatly promotes the middle domain to better learn domain invariant features by pasting blocks of the source domain to the target domain and pasting blocks of the target domain to the source domain. Moreover, the proposed strategy can finely adjust the confidence weight of the pseudo tag, and effectively prevent unstable training and early performance degradation.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1 and 2, a first embodiment of the present invention provides a domain-adaptive cross-modality medical image segmentation method based on boundary contrast, which includes steps S1 to S7.
S1, acquiring a source sample from a source domain data set of a first modality. The source sample contains a source domain image and a source tag.
S2, acquiring a target domain image corresponding to the source domain image from a target domain data set of a second modality.
In this embodiment, the source domain image of the first modality is one of a magnetic resonance imaging MRI image and a tomographic CT image. The target domain image of the second modality is the other of a magnetic resonance imaging MRI image and a tomographic CT image. In other embodiments, the first modality and the second modality may be other medical image acquisition modes, which are not particularly limited by the present invention.
The invention first defines a labeled source domain datasetAnd a label-free target domain data set=. Our goal is to train a segmentation model, which willIs migrated toIs a kind of medium.Is a source domain image,Is a source label,Is the number of source samples,Is a target domain image,Is the target domain sample number.
Fig. 2 shows the overall framework of the unsupervised domain adaptation for medical image segmentation of the present invention. The whole frame has two segmentation models, namely student models with learning weightsAnd a teacher model for calculating weights using an Exponential Moving Average (EMA). Each model consists of an encoder, a classifier and an indicator head.
In the training process, target data is input into a teacher model to obtain a prediction probabilityPseudo tagAnd dynamically assigns weights in the following. Wherein, AndRepresenting the height and width of the image respectively,Representing the number of categories. The training samples are then constructed by blending the two domain images and the source domain label and the target pseudo label using bi-directional cross-domain cutmix. The specific operation is as step S3 to step S6.
S3, taking a first image segmentation model trained based on the first modal data as a teacher model, inputting the target domain image into the teacher model, obtaining a pseudo tag, and distributing different weights for the pseudo tag according to the prediction entropy of the pixel based on a dynamic weight distribution strategy. Specifically, the invention provides a strategy to fine tune the confidence weight of the pseudo tag to prevent training instability and early performance degradation.
Preferably, the dynamic weight allocation policy is:
;
;
wherein, Is confidence weight,Representing the number of current training iterations,Is the serial number of the image,A serial number of a pixel in the image,Is the prediction entropy,AndRespectively the firstA first entropy threshold and a second entropy threshold of the multiple iterations,Confidence weights for predefined target unsupervised loss,Indicating the number of categories of labels,A serial number of the label type,To predict probability,Is the firstFirst iterationFirst of imagesThe first pixel ofPredictive probability of class label category,AndRepresenting the height and width of the image, respectively.
AndRespectively byAndCalculating quantiles to obtain:
;
;
wherein, Is a function in numpy libraries for calculating quantiles,Is a pixel level entropy diagram,Representing the conversion of a two-dimensional array into a one-dimensional array for quantile calculation,AndThe first and second parameters are associated for dynamic weight allocation, respectively. The first parameter and the second parameter are dynamically changed during the training process for determining different entropy thresholds.
In an alternative embodiment, the dynamic partition adjustment strategy is used in a linear fashion.
;
;
Wherein, Respectively isAndAn initial ratio of (2),Representing the number of current training iterations,Representing the maximum number of iterations.
The present invention proposes a new strategy to dynamically assign weights to different parts of the pseudo tag to prevent early performance degradation. In particular, because pseudo tags are typically noisy, domain Adaptation (DACS) of cross-domain mixed samples defines a confidence weight for target unsupervised lossI.e. the proportion of pixels in the whole image that exceed the threshold value. However, this approach allows the confidence weight of each pixel in the entire image to be the same, meaning that it neither removes unreliable pixels nor assigns higher weights to reliable pixels, resulting in a validation bias. In this case, model degradation will occur as training proceeds. To solve this problem, we assign different weights to the pixels based on entropy.
S4, mixing the source domain image and the target domain image into a mixed image through a bidirectional cross-domain cutmix, mixing the source label and the pseudo label into a mixed label, and obtaining a training sample. Specifically, unlike the conventional method of unidirectional blending samples, the present invention creates a blended image from training in two directions, namely, pasting blocks (pacth) of the source domain to the target domain and pasting blocks (patch) of the target domain to the source domain. This facilitates better learning domain invariant features for the intermediate domain.
On the basis of the above embodiment, in an alternative embodiment of the present invention, step S4 specifically includes steps S41 to S43.
S41, generating a zero center maskAnd the method is used for carrying out bidirectional mixing on the source image and the target image to obtain a mixed image.
;
Wherein, Is the firstA mixed image,Representing a mixture of,Is the firstA source domain image,A serial number representing an image,Is the firstA target domain image,Representing the target domain,Zero center mask,Representing multiplication,AndRepresenting the height and width of the image, respectively.
S42, mixing the source tag and the pseudo tag by adopting a mixing mode with the same mixed image to obtain the mixed tag。
S43, acquiring training samples according to the mixed image and the mixed label,A serial number representing an image,Representing the number of blended images.
Specifically, as shown in FIG. 2, two source images are randomly selected from the training set in each iterationAnd two target images. And generates a zero center maskThe method for bi-directionally copy-paste the source image and the target image is as follows:
;
;
wherein, Is the image sequence number.
The source tag and the target pseudo tag are mixed in the same way to generate a mixed tagAnd. Thus we get training samples. Furthermore, we will beConfidence weights for individual source images are set to. Will beCalculated with dynamic weight allocation strategyMixing to obtain。
According to the invention, the self-training is carried out by constructing a bidirectional cross-domain mixed sample, and the domain invariant feature is better learned by utilizing the intermediate domain. Specifically, the patch of the source image is pasted onto the target image, while the patch of the target image is also pasted onto the source image.
S5, taking the first image segmentation model with the weight capable of being learned as a student model, inputting the source sample into the student model for supervision training, and inputting the training sample into the student model for self training.
And S6, during training, acquiring a query sample based on the characteristics extracted by the student model, acquiring a prototype positive sample based on the characteristics extracted by the teacher model from the source domain image, acquiring a boundary negative sample based on the boundary characteristics extracted by the source label from the boundary of each object, performing iterative training by combining the supervision loss and the contrast loss, pulling the query sample to the prototype positive sample to push away from the boundary negative sample as a target, optimizing parameters of the student model, enhancing the distinguishing capability of the model in the boundary area, and acquiring a second image segmentation model.
The invention constructs positive prototype and negative boundary samples for comparison adaptation, so that the model actively focuses on the ambiguous boundary region. Compared with the traditional adaptive segmentation framework in the medical image field, the adaptive framework in the boundary contrast domain for the cross-mode medical image segmentation actively focuses on the fuzzy boundary region so as to improve the segmentation performance. When the method is used for cross-mode heart dataset segmentation, entropy comparison is lower at boundaries of different heart structure categories, confidence is high, and the segmentation effect is better at category boundaries.
In an alternative embodiment of the present invention based on the above embodiment, the obtaining a prototype positive sample based on the features extracted from the source domain image by the teacher model specifically includes:
initializing class-level prototypes using class centers for original source domain pixel features :
;
Wherein, A number of samples representing a source domain dataset,Representing the source domain,Is the serial number of the image,AndHeight and width of representative feature,A serial number of a pixel in the image,An instruction head for the teacher model,Is the firstOutput of teacher model indication head corresponding to each pixel,To output corresponding real labelsDownsampling(s),Representing a real number set,Is thatChannel dimension of (2),A serial number of the label type,As an index function, when meeting the conditionsThe index function has a value of 1 when it is present, and 0 when it is not present.
To improve the domain-invariant representation capability of prototypes, we updated class-level prototypes in a progressive refinement fashion in each iteration. Wherein, the firstSecond iteration (a)Personal class prototypesDefinition is performed by class-level mean vectors of pixel features in a small batch (mini-batch):
;
wherein, Is a momentum coefficient,Represent the firstFirst iterationEach category prototype,The representation belonging to the firstThe number of the pixels,Representing the size of the small lot.
Based on the above embodiments, in an optional embodiment of the present invention, obtaining a boundary negative sample based on boundary features extracted from a boundary of each object by a source tag specifically includes:
In order to enhance the discriminant of the boundary region, pixels not belonging to the current object class are sampled from the periphery of each object region, and their corresponding feature vectors are taken as boundary negative samples.
Output of instruction header for teacher modelIs the first of (2)Class object, tag with downsamplingPerforming morphological operation to obtain a binary boundary maskThen, useAnd downsampled labelsExtracting feature vector to obtain boundary negative sample。
The acquisition model of the boundary negative sample is:。
To keep the number of negative samples stable, a class-level memory bank is used to store the boundary negative samples.
Based on the foregoing embodiments, in an optional embodiment of the present invention, obtaining a query sample based on features extracted by a student model specifically includes:
for each category other than the background category, reliable pixels with low entropy (reliable pixels below a preset entropy threshold) in the current small lot (mini-batch) are taken as query candidates. I.e. smaller than Is a pixel of (c).
Based on the above embodiments, in an alternative embodiment of the present invention, the loss function during trainingThe method comprises the following steps:
;
wherein, A supervision loss for a tagged source domain image,Representing minimization of predictor and hybrid pseudo tag weighted cross entropy loss,AndIs a balance coefficient,Pixel level contrast learning loss for source domain images,The loss is learned for pixel level contrast of the blended image.
;
Wherein, A number of samples representing a source domain dataset,Is the serial number of the image,Is cross entropy loss,Is the Dice loss,Is a real label,Labels predicted for student models.
;
Wherein, For mixing the number of images, subscripts, or superscriptsRepresenting a mixed image,AndRespectively representing the height and width of the image,For mixing the weights of the pixels in the image,A serial number of a pixel in the image,Is an index function,Is the first of the mixed imagesHybrid labels of individual pixels,The prediction probability of the mixed image is used for the student model.
Each query sample is combined with a positive prototypeAndNegative samples ofPairing. In source domain data setAnd training sample setsThe pixel level contrast loss is calculated by using the prototype positive sample and the boundary negative sample for the query sample, and the pixel level contrast learning loss of the source domain image is obtainedPixel level contrast learning penalty with blended images。
Pixel level contrast loss modelThe method comprises the following steps:
;
wherein, Is the number of label categories,A serial number of the label type,To inquire the sample number,Is a natural exponential function,Category(s)Is the first of (2)Each inquiry sample,Representing a positive prototype,Is the temperature,A negative number of samples,Representing a negative sample.
The current state-of-the-art Unsupervised Domain Adaptation (UDA) method typically focuses on the overall segmentation performance of the entire object, while ignoring the boundaries of the object. The segmentation results given by the previous methods generally have higher entropy and lower confidence in the boundary region, resulting in poor segmentation performance. In cross-modal medical image segmentation, the intensity contrast between different classes of organ structures is lower due to the large distribution gap between different modalities, which is more serious.
The embodiment of the invention provides a new unsupervised domain adaptation framework based on boundary comparison. First, the centroid of the feature on the source domain is calculated to obtain a class prototype feature. Meanwhile, boundary features are extracted from the boundary of each object according to the real tags and stored in a class-level repository. Contrast learning is then introduced into the domain adaptation process. A set of pixel-level representations (queries) are pulled closer to their respective prototypes (positive samples) and farther from their respective boundary features (negative samples). In this way we explicitly enhance the similarity between pixel features and corresponding prototypes to reduce class-level distribution differences between domains while increasing discrimination capability at boundaries.
S7, dividing the medical image of the second mode according to the second image dividing model, and acquiring the divided medical image of the second mode.
It should be noted that in the medical imaging field, different image modes (such as MRI, CT, etc.) generally provide different image information, but when a trained model is applied to different mode images, the performance of the model tends to be significantly reduced. While retraining is typically required to effectively predict a new modality image. This not only requires a significant amount of computational and memory resources to be expended, but also requires pixel-level annotation of new modality data by experienced radiologists, which is costly and time consuming and not practical. Currently, unsupervised Domain Adaptation (UDA) for medical image segmentation, mostly uses countermeasure training to align the distribution between two domains. Although effective, these methods have problems such as difficulty in network convergence and easy collapse during training.
As shown in fig. 2, the domain adaptation cross-mode medical image segmentation method based on boundary contrast is disclosed. First, source data is directly input into a student model for supervised training. Second, we construct a hybrid training sample for self-training by bi-directional cross-domain cutmix and dynamically assign weights. Third, the query samples are pulled toward their respective prototypes and pushed away from the respective boundary features. Where the query samples are all from students and the positive and negative samples are from teachers. Negative samples are stored in a class level repository. According to the method, the boundary fuzzy region is actively focused to improve the segmentation performance, meanwhile, training samples are built through bi-directional cross-domain cutmix, the domain gap is further reduced, and a dynamic weight distribution strategy is introduced to prevent early performance degradation of the model.
Compared with the traditional frame, the domain adaptation cross-mode medical image segmentation method based on boundary comparison is capable of focusing on fuzzy boundary areas positively and achieving excellent segmentation effect at class boundaries. When the cross-modal heart dataset is segmented, the entropy at the boundary of different heart structure categories is low and the confidence is high, so that the segmentation performance is effectively improved. Secondly, unlike the previous method of unidirectional mixing samples, the method creates training samples from two directions for self-training, and greatly promotes the middle domain to better learn domain invariant features by pasting blocks of the source domain to the target domain and pasting blocks of the target domain to the source domain. Moreover, the proposed strategy can finely adjust the confidence weight of the pseudo tag, and effectively prevent unstable training and early performance degradation.
The second embodiment of the invention provides a domain adaptation cross-modal medical image segmentation device based on boundary contrast, which comprises a source sample acquisition module, a target domain image acquisition module, a pseudo tag acquisition module, a mixing module, a training module and a segmentation module.
And the source sample acquisition module is used for acquiring a source sample from the source domain data set of the first modality. The source sample contains a source domain image and a source tag.
And the target domain image acquisition module is used for acquiring a target domain image corresponding to the source domain image from the target domain data set of the second modality.
The pseudo tag acquisition module is used for taking a first image segmentation model trained based on first modal data as a teacher model, inputting a target domain image into the teacher model to acquire a pseudo tag, and distributing different weights for the pseudo tag according to the prediction entropy of the pixel based on a dynamic weight distribution strategy.
And the mixing module is used for mixing the source domain image and the target domain image into a mixed image through a bidirectional cross-domain cutmix, mixing the source label and the pseudo label into a mixed label, and obtaining a training sample.
And the student model module is used for taking the first image segmentation model with the weight capable of being learned as a student model, inputting the source sample into the student model for supervision training, and inputting the training sample into the student model for self training.
And the training module is used for acquiring a query sample based on the characteristics extracted by the student model, acquiring a prototype positive sample based on the characteristics extracted by the teacher model from the source domain image, acquiring a boundary negative sample based on the boundary characteristics extracted by the source label from the boundary of each object, performing iterative training by combining the supervision loss and the contrast loss, pulling the query sample to the prototype positive sample to push away from the boundary negative sample as a target, optimizing parameters of the student model, enhancing the discrimination capability of the model in the boundary region, and acquiring a second image segmentation model.
And the segmentation module is used for segmenting the medical image of the second modality according to the second image segmentation model and acquiring the segmented medical image of the second modality.
The third embodiment provides a domain adaptive cross-modal medical image segmentation device based on boundary contrast, which comprises a processor, a memory and a computer program stored in the memory. The computer program is executable by the processor to implement a boundary contrast based domain-adaptive cross-modality medical image segmentation method as set forth in any one of the embodiments.
The fourth embodiment of the present invention provides a computer readable storage medium, where the computer readable storage medium includes a stored computer program, and when the computer program runs, controls a device where the computer readable storage medium is located to execute a domain adaptation cross-modal medical image segmentation method based on boundary contrast as described in any one of the first embodiments.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. The apparatus and method embodiments described above are merely illustrative, for example, flow diagrams and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present invention may be integrated together to form a single part, or each module may exist alone, or two or more modules may be integrated to form a single part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. The storage medium includes a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, an optical disk, or other various media capable of storing program codes. It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely an association relationship describing the associated object, and means that there may be three relationships, e.g., a and/or B, and that there may be three cases where a exists alone, while a and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
The term "if" as used herein may be interpreted as "at" or "when" depending on the context "or" in response to a determination "or" in response to a detection. Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
References to "first\second" in the embodiments are merely to distinguish similar objects and do not represent a particular ordering for the objects, it being understood that "first\second" may interchange a particular order or precedence where allowed. It is to be understood that the "first\second" distinguishing aspects may be interchanged where appropriate, such that the embodiments described herein may be implemented in sequences other than those illustrated or described herein.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.