CN116433692A - Medical image segmentation method, device, equipment and storage medium - Google Patents
Medical image segmentation method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN116433692A CN116433692A CN202310332460.3A CN202310332460A CN116433692A CN 116433692 A CN116433692 A CN 116433692A CN 202310332460 A CN202310332460 A CN 202310332460A CN 116433692 A CN116433692 A CN 116433692A
- Authority
- CN
- China
- Prior art keywords
- image
- medical
- domain
- image segmentation
- loss function
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000003709 image segmentation Methods 0.000 title claims abstract description 226
- 238000000034 method Methods 0.000 title claims abstract description 36
- 230000011218 segmentation Effects 0.000 claims abstract description 27
- 230000006870 function Effects 0.000 claims description 77
- 238000012549 training Methods 0.000 claims description 24
- 238000004590 computer program Methods 0.000 claims description 4
- 230000003287 optical effect Effects 0.000 description 6
- 238000012545 processing Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 238000004458 analytical method Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000011976 chest X-ray Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
- G06N3/0455—Auto-encoder networks; Encoder-decoder networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0475—Generative networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/094—Adversarial learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0012—Biomedical image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computing Systems (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Quality & Reliability (AREA)
- Radiology & Medical Imaging (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Image Analysis (AREA)
Abstract
The embodiment of the invention discloses a medical image segmentation method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring a medical image to be segmented; inputting the medical image to be segmented into a target medical image segmentation model to obtain a segmentation result of the medical image to be segmented; the target medical image segmentation model is a model trained by generating a countermeasure mode based on a preset source domain medical sample image and a preset target domain medical sample image, wherein the preset target domain medical sample image is a medical sample image which has the same region to be segmented as the preset source domain medical image and has at least one different image characteristic. The technical scheme of the embodiment of the invention solves the problem of insufficient accuracy when the medical image segmentation model trained by the prior art performs medical image segmentation, and can train the medical image segmentation model in a countermeasure mode by generating, thereby improving the segmentation accuracy of the medical image segmentation model.
Description
Technical Field
The embodiment of the invention relates to the technical field of image processing, in particular to a medical image segmentation method, a device, equipment and a storage medium.
Background
Medical image segmentation the region of interest in a medical image may be segmented by analysis of the medical image, which is a very important part of medical analysis. However, images generated by different hospitals have different data distribution and styles, so that the performance of the segmentation model is lower when the segmentation model is popularized and applied, the problem of the difference between source domain data and target domain data distribution is called as a domain shift problem, and the domain shift problem can cause the insufficient accuracy of the trained medical image segmentation model when medical image segmentation is performed.
Disclosure of Invention
The embodiment of the invention provides a medical image segmentation method, a device, equipment and a storage medium, which can improve the segmentation accuracy of a medical image segmentation model.
In a first aspect, an embodiment of the present invention provides a medical image segmentation method, including:
acquiring a medical image to be segmented;
inputting the medical image to be segmented into a target medical image segmentation model to obtain a segmentation result of the medical image to be segmented;
the target medical image segmentation model is a model trained by generating a countermeasure mode based on a preset source domain medical sample image and a preset target domain medical sample image, wherein the preset target domain medical sample image is a medical sample image which has the same region to be segmented as the preset source domain medical image and has at least one different image characteristic.
In a second aspect, an embodiment of the present invention provides a medical image segmentation apparatus, including:
the medical image acquisition module to be segmented is used for acquiring medical images to be segmented;
the medical image segmentation module is used for inputting the medical image to be segmented into a target medical image segmentation model to obtain a segmentation result of the medical image to be segmented;
the target medical image segmentation model is a model trained by generating a countermeasure mode based on a preset source domain medical sample image and a preset target domain medical sample image, wherein the preset target domain medical sample image is a medical sample image which has the same region to be segmented as the preset source domain medical image and has at least one different image characteristic.
In a third aspect, an embodiment of the present invention provides a computer apparatus, including:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the medical image segmentation method as set forth in any one of the embodiments.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the medical image segmentation method according to any of the embodiments.
According to the technical scheme provided by the embodiment of the invention, the medical image to be segmented is input into the target medical image segmentation model, so that the segmentation result of the medical image to be segmented is obtained; the target medical image segmentation model is a model trained by generating a countermeasure mode based on a preset source domain medical sample image and a preset target domain medical sample image, wherein the preset target domain medical sample image is a medical sample image which has the same region to be segmented as the preset source domain medical image and has at least one different image characteristic. The technical scheme of the embodiment of the invention solves the problem of insufficient accuracy when the medical image segmentation model trained by the prior art performs medical image segmentation, and can train the medical image segmentation model in a countermeasure mode by generating, thereby improving the segmentation accuracy of the medical image segmentation model.
Drawings
FIG. 1 is a flow chart of a medical image segmentation method provided by an embodiment of the present invention;
FIG. 2 is a flowchart of a medical image segmentation method according to an embodiment of the present invention;
FIG. 3 is a training flow chart of a medical image segmentation model provided by an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a medical image segmentation apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of 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, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present 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.
Fig. 1 is a flowchart of a medical image segmentation method according to an embodiment of the present invention, where the embodiment of the present invention is applicable to a scenario in which a medical image is segmented, the method may be performed by a medical image segmentation apparatus, and the apparatus may be implemented in software and/or hardware.
As shown in fig. 1, the medical image segmentation method comprises the steps of:
s110, acquiring a medical image to be segmented.
The medical image to be segmented may be a medical image that needs to be segmented, for example, the medical image to be segmented may be an X-ray image of a certain part of a patient.
S120, inputting the medical image to be segmented into a target medical image segmentation model to obtain a segmentation result of the medical image to be segmented.
The target medical image segmentation model may be a model trained by generating a countermeasure based on a preset source domain medical sample image and a preset target domain medical sample image, where the preset target domain medical sample image is a medical sample image having the same region to be segmented as the preset source domain medical image and having at least one different image feature.
Specifically, a preset source domain medical sample image and a preset target domain medical sample image can be respectively input into an initial medical image segmentation model, and feature extraction is respectively carried out on a sample image pair through an encoder of the initial medical image segmentation model to obtain source domain image features and target domain image features; inputting the source domain image characteristics and the target domain image characteristics into a preset image domain identifier and a decoder of an initial medical image segmentation model to respectively obtain a corresponding image domain identification result and an image segmentation result; and then, adjusting parameters of the initial medical image segmentation model based on the image domain identification result and the image segmentation result to obtain a target medical image segmentation model.
The encoder in the initial medical image segmentation model can be reversely adjusted based on the image domain identification result, so that the preset image domain identifier cannot identify whether the input medical image is a preset source domain medical sample image or a preset target domain medical sample image, and further a training mode for generating countermeasures is realized. The target medical image segmentation model is obtained by generating the training initial medical image segmentation model of the countermeasure training mode, so that the generalization capability and the segmentation accuracy of the target medical image segmentation model can be improved, namely the accuracy of the medical image segmentation result to be segmented is improved.
According to the technical scheme provided by the embodiment of the invention, the medical image to be segmented is input into the target medical image segmentation model, so that the segmentation result of the medical image to be segmented is obtained; the target medical image segmentation model is a model obtained by training in a countermeasure generation mode based on a preset source domain medical sample image and a preset target domain medical sample image, wherein the preset target domain medical sample image is a medical sample image which has the same region to be segmented as the preset source domain medical image and has at least one different image characteristic. The technical scheme of the embodiment of the invention solves the problem of insufficient accuracy when the medical image segmentation model trained by the prior art performs medical image segmentation, and can train the medical image segmentation model in a countermeasure mode by generating, thereby improving the segmentation accuracy of the medical image segmentation model.
Fig. 2 is a flowchart of a medical image segmentation method provided by the embodiment of the present invention, which is applicable to a scenario in which a medical image is segmented, and further illustrates how, based on the above embodiment, a preset source domain medical sample image and a preset target domain medical sample image are used to train to obtain a target medical image segmentation model by generating a countermeasure mode, and medical image segmentation is performed based on the target medical image segmentation model. The apparatus may be implemented in software and/or hardware, and integrated into a computer device having application development functionality.
As shown in fig. 2, the medical image segmentation method comprises the steps of:
s210, taking a preset source domain medical sample image with a sample label and a preset target domain medical sample image without a label as a group of sample image pairs.
The preset source domain medical sample image may be a medical sample image with a sample tag, the target domain medical sample image may be a medical sample image without a sample tag, the preset target domain medical sample image and the preset source domain medical image have the same region to be segmented and have at least one different image feature, for example, the preset target domain medical sample image and the preset source domain medical image may be chest X-ray images of different patients. A preset source domain medical sample image and a preset target domain medical sample image are used as a group of sample image pairs, and can be used as a group of samples for training a subsequent medical image segmentation model.
S220, respectively inputting the sample image pairs into an initial medical image segmentation model, and respectively extracting features of the sample image pairs through an encoder of the initial medical image segmentation model to obtain source domain image features and target domain image features.
The initial medical image segmentation model may be an untrained original medical image segmentation model, and specifically, the initial medical image segmentation model includes a U-Net network, where the U-Net network includes an encoder and a decoder, the encoder may be used to extract features of a medical image, and the decoder may be used to upsample the features and restore the segmented image. The source domain image features are image features of a preset source domain medical sample image, the target domain image features are image features of a preset target domain medical sample image, after sample image pairs are respectively input into an initial medical image segmentation model, the encoder can respectively extract features in the preset source domain medical sample image and the preset target domain medical sample image to obtain the source domain image features and the target domain image features.
S230, inputting the source domain image features and the target domain image features into a preset image domain identifier and a decoder of the initial medical image segmentation model to respectively obtain a corresponding image domain identification result and an image segmentation result.
The preset image domain identifier may be an identifier preset to identify a preset source domain medical sample image and a preset target domain medical sample image, that is, the preset image domain identifier may analyze input medical image features to identify whether a medical image corresponding to the medical image features is a preset source domain medical sample image or a preset target domain medical sample image, and the identification result output by the preset image domain identifier is an image domain identification result. The decoder of the initial medical image segmentation model may analyze the image features to segment features of the region of interest to obtain an image segmentation result, where the image segmentation result includes an image domain identification result of a preset target domain medical sample image and an image domain identification result of a preset source domain medical sample image.
S240, adjusting parameters of the initial medical image segmentation model based on the image domain identification result and the image segmentation result to obtain a target medical image segmentation model.
The target medical image segmentation model can be a model obtained by training the initial medical image segmentation model, and parameters of the initial medical image segmentation model can be adjusted based on an image domain identification result and an image segmentation result to obtain the target medical image segmentation model.
Specifically, the image domain identification loss function can be determined according to the image domain identification result of the preset target domain medical sample image and the image domain identification result of the preset source domain medical sample image; determining a target domain image segmentation loss function according to an image segmentation result of a preset target domain medical sample image; determining a source domain image segmentation loss function according to an image segmentation result of a preset source domain medical sample image; and adjusting the parameter values of the encoder and the decoder based on the image domain identification loss function, the target domain image segmentation loss function and the source domain image segmentation loss function to obtain a target medical image segmentation model.
The process of determining the target domain image segmentation loss function according to the image segmentation result of the preset target domain medical sample image comprises the following steps: calculating image pixel point entropy of each pixel point in the preset target domain medical sample image according to the image segmentation result of the preset target domain medical sample image; and determining a target domain image segmentation loss function according to the image pixel point entropy. Specifically, the formula for calculating the entropy of the pixel point of the image is as follows:wherein->Entropy of the pixel point of the image with coordinates of (h, w), and Px is the image segmentation result of the pixel point; the calculation formula of the target domain image segmentation loss function is as follows: />Wherein L is ent (x t ) Representation ofThe target domain image partitions the loss function. The process of determining the source domain image segmentation loss function according to the image segmentation result of the preset source domain medical sample image comprises the following steps: and performing cross entropy loss calculation on an image segmentation result of a preset source domain medical sample image and a sample label of the image to obtain a source domain image segmentation loss function.
Fig. 3 is a training flowchart of a medical image segmentation model according to an embodiment of the present invention, as shown in fig. 3, where the medical image segmentation model includes an encoder and a decoder, and the training flowchart of the medical image segmentation model is as follows: inputting the source domain image with the label and the target domain image without the label into an encoder for feature extraction to obtain source domain image features and target domain image features; inputting the source domain image characteristics and the target domain image characteristics into a domain classifier and a decoder to respectively obtain corresponding image domain identification results and image segmentation results; then determining an image domain identification loss function L according to the image domain identification result dis Determining a target domain image segmentation loss function L according to an image segmentation result of a preset target domain medical sample image ent (x t ) Determining a source domain image segmentation loss function L according to an image segmentation result of a preset source domain medical sample image seg The method comprises the steps of carrying out a first treatment on the surface of the Finally, according to the image domain identification loss function, the target domain image segmentation loss function and the source domain image segmentation loss function, the parameter values of the medical image segmentation model are adjusted, and the training process of the medical image segmentation model is completed.
Further, since the initial medical image segmentation model needs to be trained by generating the countermeasure, the preset image domain identifier is required to be incapable of identifying the preset source domain medical sample image and the preset target domain medical sample image. Namely, the encoder and the preset image domain identifier are respectively used as a simulator and a discriminator in countermeasure training, and the parameter values of the encoder are adjusted based on the image domain identification result and the image segmentation result, so that the preset image domain identifier cannot identify whether an input medical image is a preset source domain medical sample image or a preset target domain medical sample image.
Specifically, the opposite numbers of the target domain image segmentation loss function, the source domain image segmentation loss function and the image domain identification loss function can be added to obtain an encoder loss function; and determining an encoder parameter adjustment value according to the encoder loss function, and adjusting the parameter value of the encoder according to the encoder parameter adjustment value. When determining the encoder loss function, adding the opposite numbers of the target domain image segmentation loss function, the source domain image segmentation loss function and the image domain identification loss function, and adjusting the parameter value of the encoder according to the opposite numbers of the image domain identification loss function, so that the adjusted encoder can extract the image characteristics which enable the preset image domain identifier to not accurately perform domain identification, thereby realizing a training mode for generating countermeasures. The target medical image segmentation model is obtained by generating the training initial medical image segmentation model of the countermeasure training mode, so that the generalization capability and the segmentation accuracy of the target medical image segmentation model can be improved.
Correspondingly, the parameter value of the encoder is adjusted, and the parameter value of the decoder is also required to be adjusted, specifically, the target domain image segmentation loss function, the source domain image segmentation loss function and the image domain identification loss function can be summed to obtain the decoder loss function; and determining a decoder parameter adjustment value according to the decoder loss function, and adjusting the parameter value of the decoder according to the decoder parameter adjustment value.
S250, acquiring a medical image to be segmented, and inputting the medical image to be segmented into the target medical image segmentation model to obtain a segmentation result of the medical image to be segmented.
The medical image to be segmented can be a medical image which needs to be segmented, the medical image to be segmented is input into the target medical image segmentation model obtained through the training, and a segmentation result of the medical image to be segmented can be obtained. The target medical image segmentation model is obtained by generating the training initial medical image segmentation model of the countermeasure training mode, so that the generalization capability and the segmentation accuracy of the target medical image segmentation model can be improved, and the segmentation accuracy of the medical image to be segmented is correspondingly improved.
According to the technical scheme provided by the embodiment of the invention, one preset source domain medical sample image with a sample label and one preset target domain medical sample image without a label are used as a group of sample image pairs; respectively inputting the sample image pairs into an initial medical image segmentation model, and respectively extracting features of the sample image pairs through an encoder of the initial medical image segmentation model to obtain source domain image features and target domain image features; inputting the source domain image characteristics and the target domain image characteristics into a preset image domain identifier and a decoder of an initial medical image segmentation model to respectively obtain a corresponding image domain identification result and an image segmentation result; adjusting parameters of an initial medical image segmentation model based on the image domain identification result and the image segmentation result to obtain a target medical image segmentation model; obtaining a medical image to be segmented, and inputting the medical image to be segmented into a target medical image segmentation model to obtain a segmentation result of the medical image to be segmented. The technical scheme of the embodiment of the invention solves the problem of insufficient accuracy when the medical image segmentation model trained by the prior art performs medical image segmentation, and can train the medical image segmentation model in a countermeasure mode by generating, thereby improving the segmentation accuracy of the medical image segmentation model.
Fig. 4 is a schematic structural diagram of a medical image segmentation apparatus according to an embodiment of the present invention, where the embodiment of the present invention is applicable to a scenario in which a medical image is segmented, and the apparatus may be implemented in software and/or hardware, and integrated into a computer device with an application development function.
As shown in fig. 4, the medical image segmentation apparatus includes: a medical image acquisition module 310 to be segmented, a medical image segmentation module 320.
Wherein the medical image acquisition module to be segmented 310 is configured to; the method comprises the steps of acquiring a medical image to be segmented; the medical image segmentation module 320 is configured to input the medical image to be segmented into a target medical image segmentation model, and obtain a segmentation result of the medical image to be segmented.
According to the technical scheme provided by the embodiment of the invention, the medical image to be segmented is input into the target medical image segmentation model, so that the segmentation result of the medical image to be segmented is obtained; the target medical image segmentation model is a model obtained by training in a countermeasure generation mode based on a preset source domain medical sample image and a preset target domain medical sample image, wherein the preset target domain medical sample image is a medical sample image which has the same region to be segmented as the preset source domain medical image and has at least one different image characteristic. The technical scheme of the embodiment of the invention solves the problem of insufficient accuracy when the medical image segmentation model trained by the prior art performs medical image segmentation, and can train the medical image segmentation model in a countermeasure mode by generating, thereby improving the segmentation accuracy of the medical image segmentation model.
In an alternative embodiment, the medical image segmentation apparatus further comprises: the medical image segmentation model training module is used for: taking a preset source domain medical sample image with a sample label and a preset target domain medical sample image without a label as a group of sample image pairs; respectively inputting the sample image pairs into an initial medical image segmentation model, and respectively extracting features of the sample image pairs through an encoder of the initial medical image segmentation model to obtain source domain image features and target domain image features; inputting the source domain image characteristics and the target domain image characteristics into a preset image domain identifier and a decoder of an initial medical image segmentation model to respectively obtain a corresponding image domain identification result and an image segmentation result; and adjusting parameters of the initial medical image segmentation model based on the image domain identification result and the image segmentation result to obtain a target medical image segmentation model.
In an alternative embodiment, the medical image segmentation model training module is specifically configured to: determining an image domain identification loss function according to an image domain identification result of a preset target domain medical sample image and an image domain identification result of a preset source domain medical sample image; determining a target domain image segmentation loss function according to an image segmentation result of a preset target domain medical sample image; determining a source domain image segmentation loss function according to an image segmentation result of a preset source domain medical sample image; and adjusting the parameter values of the encoder and the decoder based on the image domain identification loss function, the target domain image segmentation loss function and the source domain image segmentation loss function to obtain a target medical image segmentation model.
In an alternative embodiment, the medical image segmentation model training module is specifically configured to: adding the opposite numbers of the target domain image segmentation loss function, the source domain image segmentation loss function and the image domain identification loss function to obtain an encoder loss function; and determining an encoder parameter adjustment value according to the encoder loss function, and adjusting the parameter value of the encoder according to the encoder parameter adjustment value.
In an alternative embodiment, the medical image segmentation model training module is specifically configured to: adding the target domain image segmentation loss function, the source domain image segmentation loss function and the image domain identification loss function to obtain a decoder loss function; and determining a decoder parameter adjustment value according to the decoder loss function, and adjusting the parameter value of the decoder according to the decoder parameter adjustment value.
In an alternative embodiment, the medical image segmentation model training module is specifically configured to: calculating image pixel point entropy of each pixel point in the preset target domain medical sample image according to the image segmentation result of the preset target domain medical sample image; and determining a target domain image segmentation loss function according to the image pixel point entropy.
In an alternative embodiment, the target medical image segmentation model includes a U-Net network structure.
The medical image segmentation device provided by the embodiment of the invention can execute the medical image segmentation method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 5 is a schematic structural diagram of a computer device according to an embodiment of the present invention. Fig. 5 illustrates a block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention. The computer device 12 shown in fig. 5 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention. The computer device 12 may be any terminal device with computing capabilities and may be configured in a medical image segmentation device.
As shown in FIG. 5, the computer device 12 is in the form of a general purpose computing device. Components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard disk drive"). Although not shown in fig. 5, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Moreover, computer device 12 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be appreciated that although not shown in fig. 5, other hardware and/or software modules may be used in connection with computer device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing a medical image segmentation method provided by the present embodiment, the method including:
acquiring a medical image to be segmented;
inputting the medical image to be segmented into a target medical image segmentation model to obtain a segmentation result of the medical image to be segmented;
the target medical image segmentation model is a model trained by generating a countermeasure mode based on a preset source domain medical sample image and a preset target domain medical sample image, wherein the preset target domain medical sample image is a medical sample image which has the same region to be segmented as the preset source domain medical image and has at least one different image characteristic.
The present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the medical image segmentation method as provided by any embodiment of the present invention, comprising:
acquiring a medical image to be segmented;
inputting the medical image to be segmented into a target medical image segmentation model to obtain a segmentation result of the medical image to be segmented;
the target medical image segmentation model is a model trained by generating a countermeasure mode based on a preset source domain medical sample image and a preset target domain medical sample image, wherein the preset target domain medical sample image is a medical sample image which has the same region to be segmented as the preset source domain medical image and has at least one different image characteristic.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium may be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
It will be appreciated by those of ordinary skill in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be centralized on a single computing device, or distributed over a network of computing devices, or they may alternatively be implemented in program code executable by a computer device, such that they are stored in a memory device and executed by the computing device, or they may be separately fabricated as individual integrated circuit modules, or multiple modules or steps within them may be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.
Claims (10)
1. A medical image segmentation method, comprising:
acquiring a medical image to be segmented;
inputting the medical image to be segmented into a target medical image segmentation model to obtain a segmentation result of the medical image to be segmented;
the target medical image segmentation model is a model trained by generating a countermeasure mode based on a preset source domain medical sample image and a preset target domain medical sample image, wherein the preset target domain medical sample image is a medical sample image which has the same region to be segmented as the preset source domain medical image and has at least one different image characteristic.
2. The method according to claim 1, wherein training the target medical image segmentation model by generating a countermeasure based on a preset source domain medical sample image and a preset target domain medical sample image comprises:
taking a preset source domain medical sample image with a sample label and a preset target domain medical sample image without a label as a group of sample image pairs;
respectively inputting the sample image pairs to an initial medical image segmentation model, and respectively extracting features of the sample image pairs through an encoder of the initial medical image segmentation model to obtain source domain image features and target domain image features;
inputting the source domain image features and the target domain image features into a preset image domain identifier and a decoder of the initial medical image segmentation model to respectively obtain a corresponding image domain identification result and an image segmentation result;
and adjusting parameters of the initial medical image segmentation model based on the image domain identification result and the image segmentation result to obtain the target medical image segmentation model.
3. The method of claim 2, wherein adjusting parameters of the initial medical image segmentation model based on the image domain identification result and the image segmentation result to obtain the target medical image segmentation model comprises:
determining an image domain identification loss function according to an image domain identification result of the preset target domain medical sample image and an image domain identification result of the preset source domain medical sample image;
determining a target domain image segmentation loss function according to an image segmentation result of the preset target domain medical sample image;
determining a source domain image segmentation loss function according to an image segmentation result of the preset source domain medical sample image;
and adjusting parameter values of the encoder and the decoder based on the image domain identification loss function, the target domain image segmentation loss function and the source domain image segmentation loss function to obtain the target medical image segmentation model.
4. A method according to claim 3, wherein adjusting the parameter values of the encoder based on the image domain identification loss function, the target domain image segmentation loss function, and the source domain image segmentation loss function comprises:
adding the opposite numbers of the target domain image segmentation loss function, the source domain image segmentation loss function and the image domain identification loss function to obtain an encoder loss function;
and determining an encoder parameter adjustment value according to the encoder loss function, and adjusting the parameter value of the encoder according to the encoder parameter adjustment value.
5. A method according to claim 3, wherein adjusting the parameter values of the decoder based on the image domain identification loss function, the target domain image segmentation loss function, and the source domain image segmentation loss function comprises:
adding the target domain image segmentation loss function, the source domain image segmentation loss function and the image domain identification loss function to obtain a decoder loss function;
and determining a decoder parameter adjustment value according to the decoder loss function, and adjusting the parameter value of the decoder according to the decoder parameter adjustment value.
6. A method according to claim 3, wherein said determining a target domain image segmentation loss function from the image segmentation result of the preset target domain medical sample image comprises:
calculating the image pixel point entropy of each pixel point in the preset target domain medical sample image according to the image segmentation result of the preset target domain medical sample image;
and determining the target domain image segmentation loss function according to the image pixel point entropy.
7. The method of claim 1, wherein the target medical image segmentation model comprises a U-Net network structure.
8. A medical image segmentation apparatus, the apparatus comprising:
the medical image acquisition module to be segmented is used for acquiring medical images to be segmented;
the medical image segmentation module is used for inputting the medical image to be segmented into a target medical image segmentation model to obtain a segmentation result of the medical image to be segmented;
the target medical image segmentation model is a model trained by generating a countermeasure mode based on a preset source domain medical sample image and a preset target domain medical sample image, wherein the preset target domain medical sample image is a medical sample image which has the same region to be segmented as the preset source domain medical image and has at least one different image characteristic.
9. A computer device, the computer device comprising:
one or more processors;
a memory for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the medical image segmentation method as set forth in any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the medical image segmentation method according to any one of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310332460.3A CN116433692A (en) | 2023-03-30 | 2023-03-30 | Medical image segmentation method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310332460.3A CN116433692A (en) | 2023-03-30 | 2023-03-30 | Medical image segmentation method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116433692A true CN116433692A (en) | 2023-07-14 |
Family
ID=87091964
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310332460.3A Pending CN116433692A (en) | 2023-03-30 | 2023-03-30 | Medical image segmentation method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116433692A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117649668A (en) * | 2023-12-22 | 2024-03-05 | 南京天溯自动化控制系统有限公司 | Medical equipment metering certificate identification and analysis method |
CN117934855A (en) * | 2024-03-22 | 2024-04-26 | 北京壹点灵动科技有限公司 | Medical image segmentation method and device, storage medium and electronic equipment |
-
2023
- 2023-03-30 CN CN202310332460.3A patent/CN116433692A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117649668A (en) * | 2023-12-22 | 2024-03-05 | 南京天溯自动化控制系统有限公司 | Medical equipment metering certificate identification and analysis method |
CN117934855A (en) * | 2024-03-22 | 2024-04-26 | 北京壹点灵动科技有限公司 | Medical image segmentation method and device, storage medium and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108509915B (en) | Method and device for generating face recognition model | |
CN109117831B (en) | Training method and device of object detection network | |
CN109214238B (en) | Multi-target tracking method, device, equipment and storage medium | |
CN108427939B (en) | Model generation method and device | |
CN116433692A (en) | Medical image segmentation method, device, equipment and storage medium | |
CN109918513B (en) | Image processing method, device, server and storage medium | |
CN111028246A (en) | Medical image segmentation method and device, storage medium and electronic equipment | |
CN109885628B (en) | Tensor transposition method and device, computer and storage medium | |
CN110728673A (en) | Target part analysis method and device, computer equipment and storage medium | |
WO2022089267A1 (en) | Sample data acquisition method, image segmentation method and apparatus, device and medium | |
CN111311613A (en) | Image segmentation model training method, image segmentation method and device | |
CN115861462B (en) | Training method and device for image generation model, electronic equipment and storage medium | |
CN116109824A (en) | Medical image and pixel-level label generation method and device based on diffusion model | |
CN111382647A (en) | Picture processing method, device, equipment and storage medium | |
CN113177957B (en) | Cell image segmentation method and device, electronic equipment and storage medium | |
CN113888566B (en) | Target contour curve determination method and device, electronic equipment and storage medium | |
CN115239655A (en) | Thyroid ultrasonic image tumor segmentation and classification method and device | |
CN110781849A (en) | Image processing method, device, equipment and storage medium | |
CN109064464B (en) | Method and device for detecting burrs of battery pole piece | |
CN111815748A (en) | Animation processing method and device, storage medium and electronic equipment | |
CN114266777A (en) | Segmentation model training method, segmentation device, electronic device, and medium | |
CN115049546A (en) | Sample data processing method and device, electronic equipment and storage medium | |
CN113642443A (en) | Model testing method and device, electronic equipment and storage medium | |
CN113627611A (en) | Model training method and device, electronic equipment and storage medium | |
CN109460511B (en) | Method and device for acquiring user portrait, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |