WO2021179205A1 - Medical image segmentation method, medical image segmentation apparatus and terminal device - Google Patents

Medical image segmentation method, medical image segmentation apparatus and terminal device Download PDF

Info

Publication number
WO2021179205A1
WO2021179205A1 PCT/CN2020/078800 CN2020078800W WO2021179205A1 WO 2021179205 A1 WO2021179205 A1 WO 2021179205A1 CN 2020078800 W CN2020078800 W CN 2020078800W WO 2021179205 A1 WO2021179205 A1 WO 2021179205A1
Authority
WO
WIPO (PCT)
Prior art keywords
medical image
segmentation
output
result
model
Prior art date
Application number
PCT/CN2020/078800
Other languages
French (fr)
Chinese (zh)
Inventor
王书强
陈卓
申妍燕
张炽堂
吴国宝
Original Assignee
深圳先进技术研究院
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 深圳先进技术研究院 filed Critical 深圳先进技术研究院
Priority to PCT/CN2020/078800 priority Critical patent/WO2021179205A1/en
Publication of WO2021179205A1 publication Critical patent/WO2021179205A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation

Definitions

  • This application relates to the field of image segmentation technology, and in particular to medical image segmentation methods, medical image segmentation devices, terminal equipment, and computer-readable storage media.
  • Medical image segmentation is a key step in medical image processing and analysis.
  • information technology and high-end medical imaging technology represented by artificial intelligence have continued to develop, and the application of deep learning in the field of medical image segmentation has also received more and more attention.
  • the embodiments of the present application provide a medical image segmentation method, a medical image segmentation device, a terminal device, and a computer-readable storage medium, which can improve the accuracy of image segmentation of a medical image.
  • the first aspect of the embodiments of the present application provides a medical image segmentation method, including:
  • the medical image to be detected is input into a trained segmentation model, wherein the segmentation model includes an encoder and a decoder, the encoder includes a plurality of first hierarchical structures, and the plurality of first hierarchical structures includes a first An input layer, at least one first intermediate layer, and a first output layer, the decoder includes a second input layer, at least one second intermediate layer, and a second output layer, wherein the input of any second intermediate layer includes the first 2.
  • the medical image to be detected is processed by the segmentation model to obtain an output result of the segmentation model, wherein the output result includes a segmentation result of the medical feature region in the medical image to be detected.
  • a second aspect of the embodiments of the present application provides a medical image segmentation device.
  • the medical image segmentation device may include a module for implementing the steps of the medical image segmentation method described above.
  • a third aspect of the embodiments of the present application provides a computer-readable storage medium, the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the processor executes the foregoing Steps of medical image segmentation method.
  • a fourth aspect of the embodiments of the present application provides a computer device, which includes a memory and a processor.
  • the memory stores computer-readable instructions.
  • the processor implements the above-mentioned medical image segmentation when the computer-readable instructions are executed. Method steps.
  • FIG. 1 is a schematic flowchart of a medical image segmentation method provided by an embodiment of the present application
  • Fig. 2 is an exemplary structure of the segmentation model provided by an embodiment of the present application
  • FIG. 3 is a schematic flowchart of step S103 according to an embodiment of the present application.
  • FIG. 4 is an exemplary schematic diagram of performing second processing on the first feature matrix by the weight obtaining module according to an embodiment of the present application
  • FIG. 5 is an exemplary schematic diagram of the segmentation model and the discrimination model provided by an embodiment of the present application.
  • Fig. 6 is a schematic structural diagram of a medical image segmentation device provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the medical image segmentation method provided by the embodiments of this application can be applied to servers, desktop computers, mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, and notebooks.
  • terminal devices such as computers, ultra-mobile personal computers (UMPC), netbooks, and personal digital assistants (PDAs)
  • UMPC ultra-mobile personal computers
  • PDAs personal digital assistants
  • FIG. 1 shows a flowchart of a medical image segmentation method provided by an embodiment of the present application, and the medical image segmentation method may be applied to terminal equipment.
  • the medical image segmentation method may include:
  • Step S101 Obtain a medical image to be detected.
  • the type and acquisition method of the medical image to be detected are not limited here.
  • the medical image to be detected may include one or more of endoscopic images, angiography images, computed tomography images, positron emission tomography images, nuclear magnetic resonance images, and ultrasound images.
  • the medical image to be detected often includes a medical characteristic area, where the medical characteristic area may be, for example, a lesion area, a specific tissue or organ area, and so on.
  • Step S102 Input the medical image to be detected into a trained segmentation model, where the segmentation model includes an encoder and a decoder, the encoder includes a plurality of first hierarchical structures, and the plurality of first hierarchical structures It includes a first input layer, at least one first intermediate layer, and a first output layer.
  • the decoder includes a second input layer, at least one second intermediate layer, and a second output layer.
  • the input of any second intermediate layer includes The fusion result of the output of the previous layer of the second intermediate layer and the output of the at least two first hierarchical structures.
  • the trained segmentation model may be used to perform image segmentation on the medical image to be detected, so as to obtain information such as the contour of the medical feature region in the medical image to be detected.
  • the trained segmentation model may include an encoder and a decoder, wherein the specific structure of the encoder and the decoder may be determined based on an existing or future machine learning model.
  • the structure of the encoder and the decoder may be symmetrical.
  • the number of first-level structures in the encoder is the same as the number of second-level structures included in the decoder.
  • the number of the first hierarchical structure can be determined according to actual requirements.
  • the first hierarchical structure may have 5 layers.
  • the encoder may include 3 first intermediate layers.
  • any one of the first hierarchical structures may include one or more sub-layers.
  • any hierarchical structure in the encoder may include a convolutional layer and a down-sampling layer.
  • decoding The second hierarchical structure corresponding to the first hierarchical structure in the device may include an up-sampling layer and a convolutional layer.
  • the output of any first hierarchical structure in the encoder may be the output of the down-sampling layer in the first hierarchical structure.
  • the trained segmentation model may be improved based on an existing model such as U-Net.
  • the existing U-Net model is designed based on a jump-connected full convolutional network, which includes an encoder and decoder with a symmetric structure.
  • the encoder and decoder of the existing U-Net model There is a one-to-one corresponding intermediate layer.
  • the output of the intermediate layer of the encoder can be transferred to the corresponding intermediate layer in the decoder, and after the transfer, it is spliced and fused with the output of the previous layer of the corresponding intermediate layer in the decoder , And use the result of the splicing and fusion as the input of the corresponding middle layer in the decoder.
  • the input of any second intermediate layer in the decoder may include the fusion result of the output of the previous layer of the second intermediate layer and the output of at least two first-level structures.
  • the input of any second intermediate layer in the decoder may include the output of the previous layer of the second intermediate layer, the output of the first hierarchical structure corresponding to the second intermediate layer, and the output of the first layer corresponding to the second intermediate layer.
  • the decoder can obtain the extracted features of different scales of multiple first-level structures, thereby fusing the multi-scale features to make full use of the context information of the pixels in the medical image to make the medical image segmentation.
  • the output of the previous layer of the second intermediate layer may be spliced with the output of at least two first-level structures to obtain the fusion result.
  • the fusion result of the output of the previous layer of the second intermediate layer and the output of the at least two first hierarchical structures is the output of the previous layer of the second intermediate layer and the output of the second intermediate layer.
  • the second intermediate layer can obtain and make full use of feature information of different depths through multiple jump connections from the encoder to the decoder, thereby improving the efficiency of feature expression and improving the segmentation model The segmentation performance.
  • the encoder of the segmentation network may have a first-level structure of 5 layers, namely A, B, C, D, and E.
  • the structure of the decoder is symmetrical to the encoder, that is, the A, B, C, D, and E layers of the encoder correspond to the A', B', C', D', and E'layers in the decoder, then
  • the A'layer in the decoder can obtain the fusion result of the output of the A layer of the encoder and the output of the B'layer of the decoder, and the B'layer in the decoder can obtain the output of the A layer and the B layer of the encoder.
  • the output is fused with the output of the decoder C'layer.
  • the C'layer in the decoder can obtain the output of the B layer of the encoder, the output of the C layer and the output of the decoder D'layer, and so on .
  • FIG. 2 is only an exemplary structure of the segmentation model, and is not a limitation.
  • step S103 the medical image to be detected is processed by the segmentation model to obtain an output result of the segmentation model, where the output result includes a segmentation result of the medical feature region in the medical image to be detected.
  • the segmentation model may output a segmentation result about the medical feature region in the medical image to be detected, wherein, specifically, the segmentation result includes contour information of the medical feature region.
  • the segmentation model includes a weight acquisition module, and the weight acquisition module is located between the encoder and the decoder;
  • the processing the medical image to be detected by the segmentation model to obtain the output result of the segmentation model includes:
  • Step S301 Perform first processing on the medical image to be detected by the encoder to obtain a first feature matrix output by the encoder;
  • Step S302 input the first feature matrix to the weight acquisition module
  • Step S303 Perform a second process on the first feature matrix by the weight acquisition module to obtain the weight matrix output by the weight acquisition module;
  • Step S304 fusing the weight matrix and the first feature matrix to obtain a second feature matrix
  • Step S305 Based on the second feature matrix, perform third processing by the decoder to obtain the output result.
  • the weight acquisition module may be set between the encoder and the decoder, thereby using the attention mechanism to improve the segmentation model's ability to represent the segmented region .
  • the weight obtaining module may perform a second processing on the first feature matrix through a preset correlation function, so as to obtain the weight matrix output by the weight obtaining module.
  • the correlation function may be obtained by combining convolution operation and activation function, or may be obtained by combining multiplication, addition, and other specific functions.
  • each element in the weight matrix may respectively represent the weight value of the corresponding element in the corresponding first feature matrix.
  • the weight matrix and the first feature matrix can be fused in multiple ways. For example, the weight matrix can be added to the first feature matrix, or the corresponding elements in the weight matrix can be combined with the first feature matrix. The corresponding elements in the first feature matrix are multiplied; in addition, the fusion may also include matrix dimension transformation, etc., for example, the weight matrix, the first feature matrix, or both may be added after The obtained matrix is dimensionally transformed to obtain the second feature matrix.
  • the performing the second processing on the first feature matrix by the weight obtaining module to obtain the weight matrix output by the weight obtaining module includes:
  • performing the first convolution processing on the first feature matrix may be performing a convolution operation on the first convolution matrix and the first feature matrix, wherein the first convolution matrix may have a dimension of 1*1 matrix;
  • the performing the second convolution processing on the first feature matrix may be performing a convolution operation on the second convolution matrix and the first feature matrix, wherein the second convolution matrix It can be a matrix with a dimension of 1*1.
  • the activation function may be a Softmax activation function or the like.
  • the above-mentioned second processing performed on the first feature matrix by the weight obtaining module may be represented by an association function.
  • the element at each position (x i , x j ) in the first feature matrix can be calculated through the correlation function f(x i , x j ) to obtain the corresponding
  • the weight value, the correlation function f(x i , x j ) can be expressed as:
  • ⁇ (x i ) is the first convolution process performed by the first embedding layer in the weight obtaining module
  • ⁇ (x j ) is the second convolution process performed by the second embedding layer in the weight obtaining module.
  • the third processing performed by the decoder based on the second feature matrix to obtain the output result includes:
  • the decoder Based on the sixth feature matrix, the decoder performs third processing to obtain the output result.
  • FIG. 4 it is an exemplary schematic diagram of performing the second processing on the first feature matrix by the weight obtaining module.
  • the first convolution processing may be the performing the first convolution processing on the first feature matrix, which may be convolving a first convolution matrix with a dimension of 1*1 with the first feature matrix Operation; said performing the second convolution processing on the first feature matrix may be performing a convolution operation on the second convolution matrix with a dimension of 1*1 and the first feature matrix.
  • the activation function may be a Softmax activation function.
  • the second feature matrix may be further combined with the first output
  • the output of the previous layer of the layer is fused to obtain the sixth feature matrix, and then the sixth feature matrix is input to the decoder.
  • the second input layer of the decoder can obtain the encoder
  • the feature information extracted from different depths can be fused, so that the second input layer of the encoder can better utilize some context information in the medical image for processing, thereby improving The segmentation performance of the segmentation model.
  • the method before inputting the medical image to be detected into the trained segmentation model, the method further includes:
  • the segmentation model to be trained is trained through the discriminant model until the training is completed, and the trained segmentation model is obtained, wherein the input of the discriminant model includes at least part of the output of the segmentation model to be trained, and the discriminant model includes volume A product neural network and an up-sampling layer, the output of the convolutional neural network is the input of the up-sampling layer.
  • training is based on the form of generating a confrontation network, so that a small amount of labeled medical image data and a large amount of unlabeled medical image data can be used for training, thereby reducing The dependence on the large number of finely labeled medical image data is reduced, and the training performance is improved.
  • the discriminant model may include a convolutional neural network and an up-sampling layer, where the up-sampling layer may be used to output a confidence map, and the confidence map may be used to indicate the difference between each predicted segmentation result.
  • the discriminant model may include other structures besides the convolutional neural network model and the upsampling layer, for example, the input or output of the convolutional neural network, or The input or output of the up-sampling layer is subjected to other processing, such as image enhancement processing, image binarization processing, and so on.
  • the input of the discriminant model may include at least a part of the output of the segmentation model to be trained.
  • it may also include real segmentation labels annotated with medical image samples to train the discriminant performance of the discriminant model.
  • training the segmentation model to be trained by the discrimination model until the training is completed and obtaining the trained segmentation model includes:
  • the medical image samples include labeled medical image samples and unlabeled medical image samples
  • the labeled medical image samples are medical image samples labeled with real segmentation labels
  • the unlabeled medical image samples are unlabeled medical image samples.
  • the medical image sample may be obtained by normalizing the corresponding original medical image.
  • the medical image sample may also be a medical image that has not been normalized.
  • the confidence map may be used to indicate the location regions where the similarity of the real medical feature region corresponding to the real segmentation label in each of the predicted segmentation results meets the preset similarity condition.
  • the loss value may include a cross-entropy loss related to the segmentation network, a supervision loss related to annotated medical image samples, a semi-supervised loss related to an unlabeled medical image sample, and/or a discrimination loss of the discriminant model, etc. One or more of etc.
  • the semi-supervised loss regarding the unlabeled medical image sample may be determined based on the confidence map. Specifically, after the confidence map is obtained, the semi-supervised loss regarding the unlabeled medical image sample can be determined according to the confidence map. Among them, in some examples, the confidence map may be further processed, for example, the confidence map may be binarized or other encoding processing to highlight the credible region in the confidence map, so as to calculate the Semi-supervised loss of unlabeled medical image samples.
  • the discriminant model and the to-be-trained segmentation model can be adjusted by means of backpropagation to update the gradient. Divide the parameters of the model until the loss value obtained meets the preset loss condition.
  • Exemplary preset loss conditions may be that the loss value is less than the preset loss threshold, and conditions such as convergence.
  • the correlation between the labeled medical image sample and the unlabeled medical image sample can be effectively used to obtain the relationship between the labeled medical image sample and the unlabeled medical image sample.
  • the calculating the loss value of the segmentation model to be trained and the discrimination model based on a preset loss function according to the discrimination result, the confidence map, and the predicted segmentation result includes:
  • the first predicted segmentation sub-result corresponding to the annotated medical image sample and the real segmentation label of the annotated medical image sample calculating a first loss value for the segmentation model
  • the loss value is calculated according to the first loss value, the second loss value, and the third loss value.
  • the first loss value may be calculated according to the first predicted segmentation sub-result corresponding to the labeled medical image sample and the real segmentation label of the labeled medical image sample, and the first loss value
  • the specific calculation method and the type of loss function included can be determined based on actual experience.
  • the first loss value may include a cross-entropy loss related to the segmentation network and/or a supervision loss related to annotated medical image samples, and so on.
  • the third loss value may refer to the discrimination loss of the discrimination model.
  • the second loss value may be calculated according to the second predicted segmentation sub-result corresponding to the unlabeled medical image sample and the confidence map.
  • the second loss value may also be referred to as a semi-supervised loss.
  • the first loss value, the second loss value, and the third loss value there may be multiple specific ways to calculate the loss value.
  • the first loss value, the first loss value and the third loss value may be calculated.
  • the weight values corresponding to the first loss value, the second loss value, and the third loss value may be preset, and the weight values corresponding to the first loss value and the second loss value may be set in advance.
  • the weight value corresponding to the third loss value and the third loss value and the first loss value, the second loss value, and the third loss value are calculated to obtain the loss value.
  • the calculating the second loss value of the segmentation model according to the second predicted segmentation sub-result corresponding to the unlabeled medical image sample in the predicted segmentation result and the confidence map includes:
  • the encoding operation may be used to encode each position in the confidence map, and there may be multiple specific encoding methods, and the encoding may be used to encode each position in the confidence map.
  • Carry out category labeling Exemplarily, when the category of each position in the confidence map includes two categories, the encoding operation may be a binarization operation; of course, the encoding operation may also include other encoding methods, for example, the encoding The calculation can be based on one-hot encoding (One-Hot Encoding) and other methods for encoding and so on.
  • the encoded image may be used to annotate the credible region in the second predicted segmentation sub-result, wherein the credible region can be based on the authentic medical features in the second predicted segmentation sub-result.
  • the similarity of the region is determined by the location region that meets the preset similarity condition.
  • the relevant loss corresponding to the unlabeled medical image sample may be determined according to the credible region in the encoded image, that is, the second loss value.
  • the following uses a specific example to illustrate an exemplary specific calculation method of the loss value in the embodiment of the present application.
  • the labeled medical image sample is ⁇ I f , L f ⁇ , where L f is a true segmentation label of the labeled medical image sample.
  • the unlabeled medical image sample is ⁇ I 0 ⁇ .
  • the labeled medical image sample and the unlabeled medical image sample are input into the segmentation model to be trained, and the predicted segmentation result of each medical image sample by the segmentation model to be trained is obtained, wherein the first segment corresponding to the labeled medical image sample is obtained.
  • the result of a predicted segmentation is
  • the second predicted segmentation sub-result corresponding to the unlabeled medical image sample is S(L f ).
  • the confidence map of the second predicted segmentation sub-result can be obtained through the up-sampling layer in the discriminant model At this time, according to the second predicted segmentation sub-result corresponding to the unlabeled medical image sample in the predicted segmentation result and the confidence map, the second loss value of the segmentation model is calculated
  • I( ⁇ ) is an indicator function
  • T semi is a preset confidence threshold
  • Y( ⁇ I f ,L 0 ⁇ ) is used to indicate the coding category of the coded image corresponding to the confidence map
  • the preset signal threshold T semi can be set according to actual experience or test results. By setting the preset signal threshold T semi , the sensitivity of model training can be controlled.
  • the loss value may be calculated according to the first loss value, the second loss value, and the third loss value
  • the ⁇ adv may be the supervision loss
  • the ⁇ semi may be the second loss value The corresponding weight coefficient.
  • the training results of the segmentation model and the discriminant model can be weighed and adjusted, for example, excessive correction can be avoided, and the effect such as cross entropy loss can be avoided.
  • the cross entropy loss There may also be a weight coefficient corresponding to the third loss value.
  • the discriminant model and the segmentation model to be trained are trained based on the loss value, until the obtained loss value meets the preset loss condition, it can also pass the medical image test for testing Samples and medical image verification samples for verification test and verify the segmentation model, so as to select the optimal segmentation model as the trained segmentation from the segmentation models whose loss values meet the preset loss conditions. Model.
  • FIG. 5 it is an exemplary schematic diagram of the segmentation model and the discrimination model.
  • the segmentation model and the discriminant model can use labeled medical image samples and unlabeled medical image samples to implement semi-supervised training.
  • the medical image to be detected can be obtained, and the medical image to be detected can be input into a trained segmentation model, where the segmentation model includes an encoder and a decoder, and the encoder includes a plurality of first Hierarchical structure, the plurality of first hierarchical structures include a first input layer, at least one first intermediate layer, and a first output layer, and the decoder includes a second input layer, at least one second intermediate layer, and a second output layer , Wherein the input of any second intermediate layer includes the fusion result of the output of the previous layer of the second intermediate layer and the output of at least two first-level structures; at this time, it can pass through at least each of the decoders
  • the middle layer acquires features of different scales extracted by multiple layers in the decoder, so as to make full use of the context information of the pixels in the medical image to perform medical image segmentation; to obtain the medical features in the medical image to be detected The segmentation result of the region.
  • FIG. 6 shows a structural block diagram of a medical image segmentation device provided by an embodiment of the present application. part.
  • the medical image segmentation device 6 includes:
  • the first obtaining module 601 is used to obtain medical images to be detected
  • the input module 602 is configured to input the medical image to be detected into a trained segmentation model, where the segmentation model includes an encoder and a decoder, the encoder includes a plurality of first-level structures, and the plurality of first-level structures
  • the hierarchical structure includes a first input layer, at least one first intermediate layer, and a first output layer.
  • the decoder includes a second input layer, at least one second intermediate layer, and a second output layer, wherein any second intermediate layer
  • the input of includes the fusion result of the output of the previous layer of the second intermediate layer and the output of at least two first-level structures;
  • the processing module 603 is configured to process the medical image to be detected by the segmentation model to obtain the output result of the segmentation model, wherein the output result includes information about the medical feature region in the medical image to be detected Segmentation result.
  • the segmentation model includes a weight acquisition module, and the weight acquisition module is located between the encoder and the decoder;
  • the processing module 603 specifically includes:
  • a first processing unit configured to perform first processing on the medical image to be detected by the encoder to obtain a first feature matrix output by the encoder
  • a first input unit configured to input the first feature matrix into the weight obtaining module
  • a second processing unit configured to perform second processing on the first feature matrix by the weight acquisition module to obtain the weight matrix output by the weight acquisition module;
  • a first fusion unit configured to fuse the weight matrix and the first feature matrix to obtain a second feature matrix
  • the third processing unit is configured to perform third processing by the decoder based on the second feature matrix to obtain the output result.
  • the second processing unit specifically includes:
  • the first processing subunit is configured to perform first convolution processing on the first feature matrix to obtain a third feature matrix
  • a second processing subunit configured to perform a second convolution process on the first feature matrix to obtain a fourth feature matrix
  • the third processing subunit is configured to multiply the third feature matrix and the fourth feature matrix to obtain a fifth feature matrix
  • the fourth processing subunit is configured to activate the fifth feature matrix through an activation function to obtain the weight matrix.
  • the third processing unit specifically includes:
  • the first fusion subunit is used to fuse the second feature matrix with the output of the previous layer of the first output layer to obtain a sixth feature matrix
  • the first input subunit is used to input the sixth feature matrix to the decoder
  • the fifth processing subunit is configured to perform third processing by the decoder based on the sixth feature matrix to obtain the output result.
  • the medical image segmentation device 6 further includes:
  • the training module is used to train the segmentation model to be trained through the discriminant model until the training is completed, and obtain the trained segmentation model, wherein the input of the discriminant model includes at least part of the output of the segmentation model to be trained, so
  • the discriminant model includes a convolutional neural network and an upsampling layer, and the output of the convolutional neural network is the input of the upsampling layer.
  • the training module specifically includes:
  • An acquiring unit for acquiring medical image samples wherein the medical image samples include labeled medical image samples and unlabeled medical image samples, the labeled medical image samples are medical image samples labeled with real segmentation tags, and the unlabeled medical image samples
  • the medical image sample is a medical image sample that has not been labeled
  • the fourth processing unit is configured to input the labeled medical image sample and the unlabeled medical image sample into the segmentation model to be trained, and obtain the predicted segmentation result of each medical image sample by the segmentation model to be trained;
  • the fifth processing unit is configured to input the predicted segmentation result into the discriminant model to obtain the discriminant result and confidence map of the discriminant model, wherein the confidence map is output by the upsampling layer in the discriminant model, so The discrimination result is output by the convolutional neural network in the discrimination model;
  • a calculation unit configured to calculate a loss value regarding the segmentation model to be trained and the discrimination model based on a preset loss function according to the discrimination result, the confidence map, and the predicted segmentation result;
  • the training unit is configured to train the discriminant model and the segmentation model to be trained based on the loss value, until the obtained loss value meets the preset loss condition, then the training is completed and the trained segmentation model is obtained.
  • the calculation unit specifically includes:
  • the first calculation subunit is configured to calculate the information about the segmentation model according to the first predicted segmentation sub-result corresponding to the labeled medical image sample and the real segmentation label of the labeled medical image sample in the predicted segmentation result.
  • a second calculation subunit configured to calculate a second loss value of the segmentation model according to the second predicted segmentation sub-result corresponding to the unlabeled medical image sample in the predicted segmentation result and the confidence map;
  • the third calculation subunit is configured to calculate the third loss value of the discriminant model according to the predicted segmentation result
  • the fourth calculation subunit is configured to calculate the loss value according to the first loss value, the second loss value, and the third loss value.
  • the second calculation subunit is specifically configured to:
  • the fusion result of the output of the previous layer of the second intermediate layer and the output of the at least two first hierarchical structures is the output of the previous layer of the second intermediate layer and the output of the second intermediate layer.
  • FIG. 7 is a schematic structural diagram of a terminal device provided by an embodiment of this application.
  • the terminal device 7 of this embodiment includes: at least one processor 70 (only one is shown in FIG. 7), a memory 71, and is stored in the above-mentioned memory 71 and can run on the above-mentioned at least one processor 70
  • the processor 70 executes the computer program 72, the steps in any of the medical image segmentation method embodiments described above are implemented.
  • the aforementioned terminal device 7 may be a computing device such as a server, a mobile phone, a wearable device, an augmented reality (AR)/virtual reality (VR) device, a desktop computer, a notebook, a desktop computer, and a palmtop computer.
  • the terminal device may include, but is not limited to, a processor 70 and a memory 71.
  • FIG. 7 is only an example of the terminal device 7 and does not constitute a limitation on the terminal device 7. It may include more or less components than shown in the figure, or a combination of certain components, or different components. , For example, can also include input devices, output devices, network access devices, and so on.
  • the above-mentioned input device may include a keyboard, a touch panel, a fingerprint collection sensor (used to collect user fingerprint information and fingerprint orientation information), a microphone, a camera, etc., and an output device may include a display, a speaker, and the like.
  • the processor 70 may be a central processing unit (Central Processing Unit, CPU), and the processor 70 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the foregoing memory 71 may be an internal storage unit of the foregoing terminal device 7 in some embodiments, such as a hard disk or memory of the terminal device 7.
  • the above-mentioned memory 71 may also be an external storage device of the above-mentioned terminal device 7 in other embodiments, for example, a plug-in hard disk equipped on the above-mentioned terminal device 7, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital). ,SD) card, flash card (Flash Card), etc.
  • the aforementioned memory 71 may also include both an internal storage unit of the aforementioned terminal device 7 and an external storage device.
  • the above-mentioned memory 71 is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, for example, the program code of the above-mentioned computer program.
  • the aforementioned memory 71 can also be used to temporarily store data that has been output or will be output.
  • the embodiments of the present application also provide a computer-readable storage medium, and the above-mentioned computer-readable storage medium stores a computer program, and when the above-mentioned computer program is executed by a processor, the steps in each of the above-mentioned method embodiments can be realized.
  • the embodiments of the present application provide a computer program product.
  • the terminal device can realize the steps in the foregoing method embodiments when the terminal device is executed.
  • the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • this application implements all or part of the processes in the above-mentioned embodiments and methods, which can be completed by instructing relevant hardware through a computer program.
  • the above-mentioned computer program can be stored in a computer-readable storage medium. When executed by the processor, the steps of the foregoing method embodiments can be implemented.
  • the above-mentioned computer program includes computer program code, and the above-mentioned computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the above-mentioned computer-readable medium may at least include: any entity or device capable of carrying computer program code to the camera device/terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunications signal and software distribution medium.
  • ROM read-only memory
  • RAM random access memory
  • electric carrier signal telecommunications signal and software distribution medium.
  • U disk mobile hard disk, floppy disk or CD-ROM, etc.
  • computer-readable media cannot be electrical carrier signals and telecommunication signals.
  • the disclosed apparatus/network equipment and method may be implemented in other ways.
  • the device/network device embodiments described above are merely illustrative, and the division of the modules or units mentioned above is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be It can be combined or integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.

Abstract

Provided is a medical image segmentation method. The method comprises: acquiring a medical image to be detected; inputting said medical image into a trained segmentation model, wherein the segmentation model comprises an encoder and a decoder, the encoder comprises a plurality of first hierarchical structures, the plurality of first hierarchical structures comprise a first input layer, at least one first intermediate layer and a first output layer, the decoder comprises a second input layer, at least one second intermediate layer and a second output layer, and the input of any second intermediate layer comprises a fusion result of the output of the previous layer of the second intermediate layer and the output of at least two first hierarchical structures; and processing said medical image by means of the segmentation model so as to obtain an output result of the segmentation model, wherein the output result comprises a segmentation result regarding a medical feature region in said medical image. By means of the method, the accuracy of image segmentation of a medical image can be improved.

Description

医学图像分割方法、医学图像分割装置及终端设备Medical image segmentation method, medical image segmentation device and terminal equipment 技术领域Technical field
本申请涉及图像分割技术领域,尤其涉及医学图像分割方法、医学图像分割装置、终端设备及计算机可读存储介质。This application relates to the field of image segmentation technology, and in particular to medical image segmentation methods, medical image segmentation devices, terminal equipment, and computer-readable storage media.
背景技术Background technique
医学图像分割是医学图像处理与分析的关键步骤。近年来,以人工智能为代表的信息技术和高端医学影像技术不断发展,深度学习在医学影像分割领域的应用也获得了越来越多的关注。Medical image segmentation is a key step in medical image processing and analysis. In recent years, information technology and high-end medical imaging technology represented by artificial intelligence have continued to develop, and the application of deep learning in the field of medical image segmentation has also received more and more attention.
然而,在对医学图像进行分割时,传统的分割模型往往难以很好地利用医学图像中的一些上下文信息,难以很好地捕捉诸如病变区域等医学特征区域中的像素点之间的依赖关系,导致分割模型所获取到的有效特征信息不够充分,从而影响了对医学图像进行图像分割的准确性。However, when segmenting medical images, traditional segmentation models are often difficult to make good use of some contextual information in the medical image, and it is difficult to well capture the dependency relationship between pixels in medical feature areas such as diseased areas. As a result, the effective feature information obtained by the segmentation model is not sufficient, which affects the accuracy of image segmentation for medical images.
技术问题technical problem
本申请实施例提供了医学图像分割方法、医学图像分割装置、终端设备及计算机可读存储介质,可以提升对医学图像进行图像分割的准确性。The embodiments of the present application provide a medical image segmentation method, a medical image segmentation device, a terminal device, and a computer-readable storage medium, which can improve the accuracy of image segmentation of a medical image.
技术解决方案Technical solutions
本申请实施例的第一方面提供了一种医学图像分割方法,包括:The first aspect of the embodiments of the present application provides a medical image segmentation method, including:
获取待检测医学图像;Obtain medical images to be tested;
将所述待检测医学图像输入已训练的分割模型,其中,所述分割模型包括编码器和解码器,所述编码器包括多个第一层级结构,所述多个第一层级结构包括第一输入层、至少一个第一中间层和第一输出层,所述解码器包括第二输入层、至少一个第二中间层和第二输出层,其中,任意第二中间层的输入包括所述第二中间层的前一层的输出与至少两个第一层级结构的输出的融合结果;The medical image to be detected is input into a trained segmentation model, wherein the segmentation model includes an encoder and a decoder, the encoder includes a plurality of first hierarchical structures, and the plurality of first hierarchical structures includes a first An input layer, at least one first intermediate layer, and a first output layer, the decoder includes a second input layer, at least one second intermediate layer, and a second output layer, wherein the input of any second intermediate layer includes the first 2. The fusion result of the output of the previous layer of the middle layer and the output of at least two first-level structures;
通过所述分割模型对所述待检测医学图像进行处理,获得所述分割模型的输出结果,其中,所述输出结果包括关于所述待检测医学图像中的医学特征区域的分割结果。The medical image to be detected is processed by the segmentation model to obtain an output result of the segmentation model, wherein the output result includes a segmentation result of the medical feature region in the medical image to be detected.
本申请实施例的第二方面提供了一种医学图像分割装置,所述医学图像分割装置可以包括用于实现上述医学图像分割方法的步骤的模块。A second aspect of the embodiments of the present application provides a medical image segmentation device. The medical image segmentation device may include a module for implementing the steps of the medical image segmentation method described above.
本申请实施例的第三方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时使所述处理器执行上述医学图像分割方法的步骤。A third aspect of the embodiments of the present application provides a computer-readable storage medium, the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the processor executes the foregoing Steps of medical image segmentation method.
本申请实施例的第四方面提供了一种计算机设备,其包括存储器及处理器,所述存储器上存储有计算机可读指令,所述处理器执行所述计算机可读指令时实现上述医 学图像分割方法的步骤。A fourth aspect of the embodiments of the present application provides a computer device, which includes a memory and a processor. The memory stores computer-readable instructions. The processor implements the above-mentioned medical image segmentation when the computer-readable instructions are executed. Method steps.
附图说明Description of the drawings
图1是本申请一实施例提供的一种医学图像分割方法的流程示意图;FIG. 1 is a schematic flowchart of a medical image segmentation method provided by an embodiment of the present application;
图2是本申请一实施例提供的所述分割模型的一种示例性结构;Fig. 2 is an exemplary structure of the segmentation model provided by an embodiment of the present application;
图3是本申请一实施例提供的步骤S103的一种流程示意图;FIG. 3 is a schematic flowchart of step S103 according to an embodiment of the present application;
图4是本申请一实施例提供的通过所述权重获取模块对所述第一特征矩阵进行第二处理的一种示例性示意图;FIG. 4 is an exemplary schematic diagram of performing second processing on the first feature matrix by the weight obtaining module according to an embodiment of the present application;
图5是本申请一实施例提供的所述分割模型和所述判别模型的一种示例性示意图;FIG. 5 is an exemplary schematic diagram of the segmentation model and the discrimination model provided by an embodiment of the present application;
图6是本申请一实施例提供的一种医学图像分割装置的结构示意图;Fig. 6 is a schematic structural diagram of a medical image segmentation device provided by an embodiment of the present application;
图7是本申请一实施例提供的终端设备的结构示意图。FIG. 7 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
本发明的实施方式Embodiments of the present invention
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details such as a specific system structure and technology are proposed for a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from obstructing the description of this application.
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。Reference to "one embodiment" or "some embodiments" described in the specification of this application means that one or more embodiments of this application include a specific feature, structure, or characteristic described in combination with the embodiment. Therefore, the sentences "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless it is specifically emphasized otherwise. The terms "including", "including", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
本申请实施例提供的医学图像分割方法可以应用于服务器、台式电脑、手机、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personal digital assistant,PDA)等终端设备上,本申请实施例对终端设备的具体类型不作任何限制。The medical image segmentation method provided by the embodiments of this application can be applied to servers, desktop computers, mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, and notebooks. For terminal devices such as computers, ultra-mobile personal computers (UMPC), netbooks, and personal digital assistants (PDAs), the embodiments of this application do not impose any restrictions on the specific types of terminal devices.
具体地,图1示出了本申请实施例提供的一种医学图像分割方法的流程图,该医学图像分割方法可以应用于终端设备。该医学图像分割方法可以包括:Specifically, FIG. 1 shows a flowchart of a medical image segmentation method provided by an embodiment of the present application, and the medical image segmentation method may be applied to terminal equipment. The medical image segmentation method may include:
步骤S101,获取待检测医学图像。Step S101: Obtain a medical image to be detected.
本申请实施例中,所述待检测医学图像的类型以及获取方式等在此不做限制。示例性的,所述待检测医学图像可以包括诸如内窥镜图像、血管造影图像、计算机断层 扫描图像、正子发射断层扫描图像、核磁共振图像以及超声图像等中的一种或多种。所述待检测医学图像中往往包括医学特征区域,其中,该医学特征区域可以是诸如病灶区域、特定组织或者器官区域等等。In the embodiment of the present application, the type and acquisition method of the medical image to be detected are not limited here. Exemplarily, the medical image to be detected may include one or more of endoscopic images, angiography images, computed tomography images, positron emission tomography images, nuclear magnetic resonance images, and ultrasound images. The medical image to be detected often includes a medical characteristic area, where the medical characteristic area may be, for example, a lesion area, a specific tissue or organ area, and so on.
步骤S102,将所述待检测医学图像输入已训练的分割模型,其中,所述分割模型包括编码器和解码器,所述编码器包括多个第一层级结构,所述多个第一层级结构包括第一输入层、至少一个第一中间层和第一输出层,所述解码器包括第二输入层、至少一个第二中间层和第二输出层,其中,任意第二中间层的输入包括所述第二中间层的前一层的输出与至少两个第一层级结构的输出的融合结果。Step S102: Input the medical image to be detected into a trained segmentation model, where the segmentation model includes an encoder and a decoder, the encoder includes a plurality of first hierarchical structures, and the plurality of first hierarchical structures It includes a first input layer, at least one first intermediate layer, and a first output layer. The decoder includes a second input layer, at least one second intermediate layer, and a second output layer. The input of any second intermediate layer includes The fusion result of the output of the previous layer of the second intermediate layer and the output of the at least two first hierarchical structures.
本申请实施例中,所述已训练的分割模型可以用于对所述待检测医学图像进行图像分割,以获得所述待检测医学图像中的医学特征区域的轮廓等信息。所述已训练的分割模型可以包括编码器和解码器,其中,所述编码器和所述解码器的具体结构可以基于现有的或者以后出现的机器学习模型而确定。In the embodiment of the present application, the trained segmentation model may be used to perform image segmentation on the medical image to be detected, so as to obtain information such as the contour of the medical feature region in the medical image to be detected. The trained segmentation model may include an encoder and a decoder, wherein the specific structure of the encoder and the decoder may be determined based on an existing or future machine learning model.
所述编码器和所述解码器的结构可以对称,此时,所述编码器中的第一层级结构的个数与所述解码器所包含的第二层级结构的个数相同。所述第一层级结构的个数可以根据实际需求来确定。在一种示例中,所述第一层级结构可以有5层,则此时,所述编码器中可以包括3个第一中间层。需要说明的是,任一所述第一层级结构中可以包括一个或多个子层,例如,所述编码器中的任一层级结构可以包括一个卷积层和一个下采样层,相应的,解码器中与该第一层级结构对应的第二层级结构可以包括一个上采样层和一个卷积层。此时,所述编码器中的任意第一层级结构的输出可以是该第一层级结构中的下采样层的输出。The structure of the encoder and the decoder may be symmetrical. In this case, the number of first-level structures in the encoder is the same as the number of second-level structures included in the decoder. The number of the first hierarchical structure can be determined according to actual requirements. In an example, the first hierarchical structure may have 5 layers. In this case, the encoder may include 3 first intermediate layers. It should be noted that any one of the first hierarchical structures may include one or more sub-layers. For example, any hierarchical structure in the encoder may include a convolutional layer and a down-sampling layer. Correspondingly, decoding The second hierarchical structure corresponding to the first hierarchical structure in the device may include an up-sampling layer and a convolutional layer. At this time, the output of any first hierarchical structure in the encoder may be the output of the down-sampling layer in the first hierarchical structure.
在一些实施例中,所述已训练的分割模型可以基于现有的诸如U-Net模型改进得到。In some embodiments, the trained segmentation model may be improved based on an existing model such as U-Net.
其中,现有的U-Net模型基于跳跃式连接的全卷积网络而设计得到,其中包括结构对称的编码器和解码器,此时,现有的U-Net模型的编码器和解码器中存在一一对应的中间层,该编码器的中间层的输出可以传递至解码器中的对应中间层,并且,传递之后,与解码器中的该对应中间层的前一层的输出进行拼接融合,并将该拼接融合的结果作为解码器中该对应中间层的输入。Among them, the existing U-Net model is designed based on a jump-connected full convolutional network, which includes an encoder and decoder with a symmetric structure. At this time, the encoder and decoder of the existing U-Net model There is a one-to-one corresponding intermediate layer. The output of the intermediate layer of the encoder can be transferred to the corresponding intermediate layer in the decoder, and after the transfer, it is spliced and fused with the output of the previous layer of the corresponding intermediate layer in the decoder , And use the result of the splicing and fusion as the input of the corresponding middle layer in the decoder.
然而,现有技术中,基于编码器和解码器的对称性,仅考虑到U-Net模型中的相对应的中间层之间的特征的传递。However, in the prior art, based on the symmetry of the encoder and the decoder, only the transfer of features between the corresponding intermediate layers in the U-Net model is considered.
而本申请实施例中,所述解码器中的任意第二中间层的输入可以包括所述第二中间层的前一层的输出与至少两个第一层级结构的输出的融合结果。例如,所述解码器中的任意第二中间层的输入可以包括所述第二中间层的前一层的输出、与所述第二中 间层相对应的第一层级结构的输出以及与所述第二中间层相对应的第一层级结构的至少一个相邻层(如前一层和/或后一层)的输出的融合结果。此时,该解码器可以获取到多个第一层级结构的所提取到的不同尺度的特征,从而对多尺度的特征进行融合,以充分利用医学图像中的像素点的上下文信息来进行医学图像分割。In the embodiment of the present application, the input of any second intermediate layer in the decoder may include the fusion result of the output of the previous layer of the second intermediate layer and the output of at least two first-level structures. For example, the input of any second intermediate layer in the decoder may include the output of the previous layer of the second intermediate layer, the output of the first hierarchical structure corresponding to the second intermediate layer, and the output of the first layer corresponding to the second intermediate layer. The output fusion result of at least one adjacent layer (such as the previous layer and/or the next layer) of the first hierarchical structure corresponding to the second intermediate layer. At this time, the decoder can obtain the extracted features of different scales of multiple first-level structures, thereby fusing the multi-scale features to make full use of the context information of the pixels in the medical image to make the medical image segmentation.
其中,具体的融合方式可以有多种,例如,可以将所述第二中间层的前一层的输出与至少两个第一层级结构的输出进行拼接,获得所述融合结果。There may be multiple specific fusion methods. For example, the output of the previous layer of the second intermediate layer may be spliced with the output of at least two first-level structures to obtain the fusion result.
在一些实施例中,所述第二中间层的前一层的输出与至少两个第一层级结构的输出的融合结果为所述第二中间层的前一层的输出、与所述第二中间层相对应的第一层级结构的输出以及与所述第二中间层相对应的第一层级结构的前一层的输出的融合结果。In some embodiments, the fusion result of the output of the previous layer of the second intermediate layer and the output of the at least two first hierarchical structures is the output of the previous layer of the second intermediate layer and the output of the second intermediate layer. A fusion result of the output of the first hierarchical structure corresponding to the intermediate layer and the output of the previous layer of the first hierarchical structure corresponding to the second intermediate layer.
本申请实施例中,此时,所述第二中间层可以通过多个从编码器到解码器的跳跃连接,获取到并充分利用不同深度的特征信息,从而提高特征表达的效率,提升分割模型的分割性能。In the embodiment of the present application, at this time, the second intermediate layer can obtain and make full use of feature information of different depths through multiple jump connections from the encoder to the decoder, thereby improving the efficiency of feature expression and improving the segmentation model The segmentation performance.
下面一个具体示例示例性说明本申请实施例中,所述分割模型的一种示例结构。The following specific example illustrates an example structure of the segmentation model in an embodiment of the present application.
如图2所示,为所述分割模型的一种示例性结构,其中,所述分割网络的编码器可以有5层第一层级结构,分别为A、B、C、D、E,所述解码器的结构与所述编码器对称,即所述编码器的A、B、C、D、E层分别对应解码器中的A’、B’、C’、D’、E’层,那么解码器中的A’层可以获取到编码器的A层的输出与解码器B’层的输出的融合结果,解码器中的B’层可以获取到编码器的A层的输出、B层的输出与解码器C’层的输出的融合结果,解码器中的C’层可以获取到编码器的B层的输出、C层的输出与解码器D’层的输出的融合结果,以此类推。需要说明的是,图2仅为所述分割模型的一种示例性结构,而非限制。As shown in Figure 2, it is an exemplary structure of the segmentation model, where the encoder of the segmentation network may have a first-level structure of 5 layers, namely A, B, C, D, and E. The structure of the decoder is symmetrical to the encoder, that is, the A, B, C, D, and E layers of the encoder correspond to the A', B', C', D', and E'layers in the decoder, then The A'layer in the decoder can obtain the fusion result of the output of the A layer of the encoder and the output of the B'layer of the decoder, and the B'layer in the decoder can obtain the output of the A layer and the B layer of the encoder. The output is fused with the output of the decoder C'layer. The C'layer in the decoder can obtain the output of the B layer of the encoder, the output of the C layer and the output of the decoder D'layer, and so on . It should be noted that FIG. 2 is only an exemplary structure of the segmentation model, and is not a limitation.
步骤S103,通过所述分割模型对所述待检测医学图像进行处理,获得所述分割模型的输出结果,其中,所述输出结果包括关于所述待检测医学图像中的医学特征区域的分割结果。In step S103, the medical image to be detected is processed by the segmentation model to obtain an output result of the segmentation model, where the output result includes a segmentation result of the medical feature region in the medical image to be detected.
本申请实施例中,所述分割模型可以输出关于所述待检测医学图像中的医学特征区域的分割结果,其中,具体的,该分割结果中包含所述医学特征区域的轮廓信息。In the embodiment of the present application, the segmentation model may output a segmentation result about the medical feature region in the medical image to be detected, wherein, specifically, the segmentation result includes contour information of the medical feature region.
在一些实施例中,所述分割模型包括权重获取模块,所述权重获取模块位于所述编码器和所述解码器之间;In some embodiments, the segmentation model includes a weight acquisition module, and the weight acquisition module is located between the encoder and the decoder;
所述通过所述分割模型对所述待检测医学图像进行处理,获得所述分割模型的输出结果,包括:The processing the medical image to be detected by the segmentation model to obtain the output result of the segmentation model includes:
步骤S301,通过所述编码器对所述待检测医学图像进行第一处理,获得所述编码器输出的第一特征矩阵;Step S301: Perform first processing on the medical image to be detected by the encoder to obtain a first feature matrix output by the encoder;
步骤S302,将所述第一特征矩阵输入所述权重获取模块;Step S302, input the first feature matrix to the weight acquisition module;
步骤S303,通过所述权重获取模块对所述第一特征矩阵进行第二处理,获得所述权重获取模块输出的权重矩阵;Step S303: Perform a second process on the first feature matrix by the weight acquisition module to obtain the weight matrix output by the weight acquisition module;
步骤S304,将所述权重矩阵与所述第一特征矩阵进行融合,获得第二特征矩阵;Step S304, fusing the weight matrix and the first feature matrix to obtain a second feature matrix;
步骤S305,基于所述第二特征矩阵,通过所述解码器进行第三处理,获得所述输出结果。Step S305: Based on the second feature matrix, perform third processing by the decoder to obtain the output result.
本申请实施例中,为了进一步提高分割模型的分割性能,可以在所述编码器和所述解码器之间设置所述权重获取模块,从而利用注意力机制,提高分割模型对分割区域的表征能力。In the embodiment of the present application, in order to further improve the segmentation performance of the segmentation model, the weight acquisition module may be set between the encoder and the decoder, thereby using the attention mechanism to improve the segmentation model's ability to represent the segmented region .
其中,所述权重获取模块可以通过预设的关联函数,对所述第一特征矩阵进行第二处理,从而获得所述权重获取模块输出的权重矩阵。该关联函数的具体设置方式可以有多种,例如,所述关联函数可以是结合卷积运算和激活函数得到,或者,也可以结合乘法、加法以及其他特定函数得到。Wherein, the weight obtaining module may perform a second processing on the first feature matrix through a preset correlation function, so as to obtain the weight matrix output by the weight obtaining module. There may be multiple specific setting methods for the correlation function. For example, the correlation function may be obtained by combining convolution operation and activation function, or may be obtained by combining multiplication, addition, and other specific functions.
在一些实施例中,所述权重矩阵中的各个元素可以分别表示对应的第一特征矩阵中的相应元素的权重值。所述权重矩阵与所述第一特征矩阵的融合方式可以有多种,例如,可以是所述权重矩阵与所述第一特征矩阵相加,或者可以是所述权重矩阵中的相应元素分别与所述第一特征矩阵中的相应元素相乘;此外,所述融合还可以包括矩阵的维度变换等等,例如,还可以对所述权重矩阵、所述第一特征矩阵或者二者相加之后所得的矩阵进行维度变换,以获得所述第二特征矩阵。In some embodiments, each element in the weight matrix may respectively represent the weight value of the corresponding element in the corresponding first feature matrix. The weight matrix and the first feature matrix can be fused in multiple ways. For example, the weight matrix can be added to the first feature matrix, or the corresponding elements in the weight matrix can be combined with the first feature matrix. The corresponding elements in the first feature matrix are multiplied; in addition, the fusion may also include matrix dimension transformation, etc., for example, the weight matrix, the first feature matrix, or both may be added after The obtained matrix is dimensionally transformed to obtain the second feature matrix.
在一些实施例中,所述通过所述权重获取模块对所述第一特征矩阵进行第二处理,获得所述权重获取模块输出的权重矩阵,包括:In some embodiments, the performing the second processing on the first feature matrix by the weight obtaining module to obtain the weight matrix output by the weight obtaining module includes:
对所述第一特征矩阵进行第一卷积处理,获得第三特征矩阵;Performing first convolution processing on the first feature matrix to obtain a third feature matrix;
对所述第一特征矩阵进行第二卷积处理,获得第四特征矩阵;Performing a second convolution process on the first feature matrix to obtain a fourth feature matrix;
将所述第三特征矩阵与第四特征矩阵相乘,获得第五特征矩阵;Multiply the third feature matrix and the fourth feature matrix to obtain a fifth feature matrix;
通过激活函数对所述第五特征矩阵进行激活,获得所述权重矩阵。Activate the fifth feature matrix through an activation function to obtain the weight matrix.
其中,所述对所述第一特征矩阵进行第一卷积处理可以是将第一卷积矩阵与所述第一特征矩阵进行卷积运算,其中,所述第一卷积矩阵可以是维度为1*1的矩阵;所述对所述第一特征矩阵进行第二卷积处理可以是将第二卷积矩阵与所述第一特征矩阵进行卷积运算,其中,所述第二卷积矩阵可以是维度为1*1的矩阵。示例性的,所述激活函数可以为Softmax激活函数等。Wherein, performing the first convolution processing on the first feature matrix may be performing a convolution operation on the first convolution matrix and the first feature matrix, wherein the first convolution matrix may have a dimension of 1*1 matrix; the performing the second convolution processing on the first feature matrix may be performing a convolution operation on the second convolution matrix and the first feature matrix, wherein the second convolution matrix It can be a matrix with a dimension of 1*1. Exemplarily, the activation function may be a Softmax activation function or the like.
在一种示例中,通过所述权重获取模块对所述第一特征矩阵进行的上述第二处理可以通过一个关联函数来表示。其中,示例性的,通过所述权重获取模块,可以对所述第一特征矩阵中的每个位置(x i,x j)的元素通过关联函数f(x i,x j)计算得到相应的权重值,所述关联函数f(x i,x j)可以表示为: In an example, the above-mentioned second processing performed on the first feature matrix by the weight obtaining module may be represented by an association function. Wherein, exemplarily, through the weight acquisition module, the element at each position (x i , x j ) in the first feature matrix can be calculated through the correlation function f(x i , x j ) to obtain the corresponding The weight value, the correlation function f(x i , x j ) can be expressed as:
Figure PCTCN2020078800-appb-000001
Figure PCTCN2020078800-appb-000001
其中,α(x i)为权重获取模块中的第一嵌入层所做的第一卷积处理,β(x j)为权重获取模块中的第二嵌入层所做的第二卷积处理。 Among them, α(x i ) is the first convolution process performed by the first embedding layer in the weight obtaining module, and β(x j ) is the second convolution process performed by the second embedding layer in the weight obtaining module.
在一些实施例中,所述基于所述第二特征矩阵,通过所述解码器进行第三处理,获得所述输出结果,包括:In some embodiments, the third processing performed by the decoder based on the second feature matrix to obtain the output result includes:
将所述第二特征矩阵与所述第一输出层的前一层的输出进行融合,获得第六特征矩阵;Fusing the second feature matrix with the output of the previous layer of the first output layer to obtain a sixth feature matrix;
将所述第六特征矩阵输入所述解码器;Input the sixth feature matrix to the decoder;
基于所述第六特征矩阵,通过所述解码器进行第三处理,获得所述输出结果。Based on the sixth feature matrix, the decoder performs third processing to obtain the output result.
如图4所示,为通过所述权重获取模块对所述第一特征矩阵进行第二处理的一种示例性示意图。As shown in FIG. 4, it is an exemplary schematic diagram of performing the second processing on the first feature matrix by the weight obtaining module.
其中,所述第一卷积处理可以为所述对所述第一特征矩阵进行第一卷积处理可以是将维度为1*1的第一卷积矩阵与所述第一特征矩阵进行卷积运算;所述对所述第一特征矩阵进行第二卷积处理可以是将维度为1*1的第二卷积矩阵与所述第一特征矩阵进行卷积运算。所述激活函数可以为Softmax激活函数。此外,还可以通过reshape操作,对所述第一特征矩阵等进行矩阵变换,以调整相应矩阵的维度,实现矩阵之间的融合。Wherein, the first convolution processing may be the performing the first convolution processing on the first feature matrix, which may be convolving a first convolution matrix with a dimension of 1*1 with the first feature matrix Operation; said performing the second convolution processing on the first feature matrix may be performing a convolution operation on the second convolution matrix with a dimension of 1*1 and the first feature matrix. The activation function may be a Softmax activation function. In addition, it is also possible to perform a matrix transformation on the first feature matrix and the like through a reshape operation, so as to adjust the dimensions of the corresponding matrix and realize the fusion between the matrices.
本申请实施例中,在获得所述第二特征矩阵之后,为了使得所述解码器的第一输入层可以获得更多尺度的特征,可以进一步将所述第二特征矩阵与所述第一输出层的前一层的输出进行融合,获得第六特征矩阵,再将所述第六特征矩阵输入所述解码器,此时,所述解码器的第二输入层可以获取到所述编码器在不同深度所提取到的特征信息,并可以将不同深度的特征信息进行融合,从而使得所述编码器的第二输入层可以更好地利用医学图像中的一些上下文信息,以进行处理,从而提高所述分割模型的分割性能。In the embodiment of the present application, after the second feature matrix is obtained, in order to enable the first input layer of the decoder to obtain features of more scales, the second feature matrix may be further combined with the first output The output of the previous layer of the layer is fused to obtain the sixth feature matrix, and then the sixth feature matrix is input to the decoder. At this time, the second input layer of the decoder can obtain the encoder The feature information extracted from different depths can be fused, so that the second input layer of the encoder can better utilize some context information in the medical image for processing, thereby improving The segmentation performance of the segmentation model.
在一些实施例中,在将所述待检测医学图像输入已训练的分割模型之前,还包括:In some embodiments, before inputting the medical image to be detected into the trained segmentation model, the method further includes:
通过判别模型对待训练的分割模型进行训练,直到训练完成,并获得已训练的分 割模型,其中,所述判别模型的输入包括所述待训练的分割模型的至少部分输出,所述判别模型包括卷积神经网络和上采样层,所述卷积神经网络的输出为所述上采样层的输入。The segmentation model to be trained is trained through the discriminant model until the training is completed, and the trained segmentation model is obtained, wherein the input of the discriminant model includes at least part of the output of the segmentation model to be trained, and the discriminant model includes volume A product neural network and an up-sampling layer, the output of the convolutional neural network is the input of the up-sampling layer.
在现有技术中,医学图像分割面临的一大挑战是大量高质量标注数据的获取,足够的标注数据是深度学习模型可靠与否的重要因素。然而,医学图像标注高度依赖专业医师,成本高,且涉及到病人隐私问题,此外,目前国内尚未就医学影像质量和规范实现完全的同质化,不同种类和质量的影像数据不但会影响模型的准确性和普适性,更限制了有效标注的医学图像数据集的规模,从而提高了用于医学图像分割的各类深度学习模型的训练难度。In the prior art, a major challenge faced by medical image segmentation is the acquisition of a large amount of high-quality annotation data. Sufficient annotation data is an important factor for the reliability of a deep learning model. However, medical image annotation is highly dependent on professional physicians, cost is high, and patient privacy issues are involved. In addition, at present, medical image quality and standards have not yet been fully homogenized in China. Different types and quality of image data will not only affect the model’s performance Accuracy and universality limit the size of effectively annotated medical image data sets, thereby increasing the difficulty of training various deep learning models for medical image segmentation.
而本申请实施例中,通过结合所述判别模型和所述分割模型,基于生成对抗网络的形式进行训练,从而可以利用少量标注的医学图像数据和大量未标注的医学图像数据进行训练,从而减小了对所述大量精细标注的医学图像数据的依赖,并提升了训练性能。However, in the embodiment of the present application, by combining the discriminant model and the segmentation model, training is based on the form of generating a confrontation network, so that a small amount of labeled medical image data and a large amount of unlabeled medical image data can be used for training, thereby reducing The dependence on the large number of finely labeled medical image data is reduced, and the training performance is improved.
具体的,所述判别模型中可以包括卷积神经网络和上采样层,其中,所述上采样层可以用于输出置信图,所述置信图可以用于指示各个所述预测分割结果中与所述真实分割标签所对应的真实医学特征区域的相似度符合预设相似度条件的位置区域。通过在判别模型中加入所述上采样层,加大了判别模型对空间置信度的学习难度,能够使得判别模型的判别性能更强,并且通过对抗学习,可以进一步提升分割模型的分割性能。Specifically, the discriminant model may include a convolutional neural network and an up-sampling layer, where the up-sampling layer may be used to output a confidence map, and the confidence map may be used to indicate the difference between each predicted segmentation result. The location area where the similarity of the real medical feature region corresponding to the real segmentation label meets the preset similarity condition. By adding the up-sampling layer to the discriminant model, the difficulty of learning the spatial confidence of the discriminant model is increased, and the discriminative performance of the discriminant model can be made stronger, and through adversarial learning, the segmentation performance of the segmentation model can be further improved.
需要说明的是,所述判别模型中,可以包括除所述卷积神经网络模型和所述上采样层之外的其他结构,以用于诸如对所述卷积神经网络的输入或者输出、或者所述上采样层的输入或者输出做其他处理,例如,图像增强处理、图像二值化处理等等。并且,所述判别模型的输入可以包括所述待训练的分割模型的至少部分输出,此外,还可以包括标注医学图像样本的真实分割标签,以用于训练所述判别模型的判别性能。It should be noted that the discriminant model may include other structures besides the convolutional neural network model and the upsampling layer, for example, the input or output of the convolutional neural network, or The input or output of the up-sampling layer is subjected to other processing, such as image enhancement processing, image binarization processing, and so on. In addition, the input of the discriminant model may include at least a part of the output of the segmentation model to be trained. In addition, it may also include real segmentation labels annotated with medical image samples to train the discriminant performance of the discriminant model.
可选的,在一些实施例中,所述通过判别模型对待训练的分割模型进行训练,直到训练完成,并获得已训练的分割模型,包括:Optionally, in some embodiments, training the segmentation model to be trained by the discrimination model until the training is completed and obtaining the trained segmentation model includes:
获取医学图像样本,其中,所述医学图像样本包括标注医学图像样本和未标注医学图像样本,所述标注医学图像样本为标注有真实分割标签的医学图像样本,所述未标注医学图像样本为未进行标注的医学图像样本;Obtain medical image samples, where the medical image samples include labeled medical image samples and unlabeled medical image samples, the labeled medical image samples are medical image samples labeled with real segmentation labels, and the unlabeled medical image samples are unlabeled medical image samples. Annotated medical image samples;
将所述标注医学图像样本和未标注医学图像样本输入待训练的分割模型,获得所述待训练的分割模型对各个医学图像样本的预测分割结果;Input the labeled medical image sample and the unlabeled medical image sample into the segmentation model to be trained, and obtain the predicted segmentation result of each medical image sample by the segmentation model to be trained;
将所述预测分割结果输入所述判别模型,获得所述判别模型的判别结果和置信图, 其中,所述置信图由所述判别模型中的上采样层输出,所述判别结果由所述判别模型中的卷积神经网络输出;Input the predicted segmentation result into the discriminant model to obtain the discriminant result and confidence map of the discriminant model, wherein the confidence map is output by the upsampling layer in the discriminant model, and the discriminant result is determined by the discriminant model. The output of the convolutional neural network in the model;
根据所述判别结果、所述置信图和所述预测分割结果,基于预设损失函数计算关于所述待训练的分割模型和所述判别模型的损失值;Calculating a loss value regarding the segmentation model to be trained and the discrimination model based on a preset loss function according to the discrimination result, the confidence map, and the predicted segmentation result;
基于所述损失值对所述判别模型和所述待训练的分割模型进行训练,直到所得到的损失值符合预设损失条件,则训练完成,并获得已训练的分割模型。Training the discriminant model and the segmentation model to be trained based on the loss value, until the obtained loss value meets the preset loss condition, the training is completed, and the trained segmentation model is obtained.
本申请实施例中,在一些示例中,所述医学图像样本可以是对相应的原始医学图像进行归一化处理后得到的。当然,在一些示例中,所述医学图像样本也可以是未做归一化处理的医学图像。In the embodiment of the present application, in some examples, the medical image sample may be obtained by normalizing the corresponding original medical image. Of course, in some examples, the medical image sample may also be a medical image that has not been normalized.
其中,所述置信图可以用于指示各个所述预测分割结果中与所述真实分割标签所对应的真实医学特征区域的相似度符合预设相似度条件的位置区域。Wherein, the confidence map may be used to indicate the location regions where the similarity of the real medical feature region corresponding to the real segmentation label in each of the predicted segmentation results meets the preset similarity condition.
本申请实施例中,关于所述待训练的分割模型和所述判别模型的损失值的类型和具体计算方式可以有多种。示例性的,所述损失值可以包括关于所述分割网络的交叉熵损失、关于标注医学图像样本的监督损失、关于未标注医学图像样本的半监督损失和/或所述判别模型的判别损失等等中的一种或多种。In the embodiment of the present application, there may be multiple types and specific calculation methods for the segmentation model to be trained and the loss value of the discrimination model. Exemplarily, the loss value may include a cross-entropy loss related to the segmentation network, a supervision loss related to annotated medical image samples, a semi-supervised loss related to an unlabeled medical image sample, and/or a discrimination loss of the discriminant model, etc. One or more of etc.
其中,所述关于未标注医学图像样本的半监督损失可以基于所述置信图确定。具体的,在获得所述置信图之后,可以根据所述置信图,判断关于所述未标注医学图像样本的半监督损失。其中,在一些示例中,可以对所述置信图做进一步处理,例如,可以对所述置信图做二值化或者其他编码处理,以突出所述置信图中的可信区域,从而计算所述未标注医学图像样本的半监督损失。Wherein, the semi-supervised loss regarding the unlabeled medical image sample may be determined based on the confidence map. Specifically, after the confidence map is obtained, the semi-supervised loss regarding the unlabeled medical image sample can be determined according to the confidence map. Among them, in some examples, the confidence map may be further processed, for example, the confidence map may be binarized or other encoding processing to highlight the credible region in the confidence map, so as to calculate the Semi-supervised loss of unlabeled medical image samples.
在基于所述损失值和所述置信图对所述判别模型和所述待训练的分割模型进行训练时,可以通过反向传播进行梯度更新等方式,调整所述判别模型和所述待训练的分割模型的参数,直到所得到的损失值符合预设损失条件。示例性的预设损失条件可以是所述损失值小于预设损失阈值,并且收敛等条件。When training the discriminant model and the segmentation model to be trained based on the loss value and the confidence map, the discriminant model and the to-be-trained segmentation model can be adjusted by means of backpropagation to update the gradient. Divide the parameters of the model until the loss value obtained meets the preset loss condition. Exemplary preset loss conditions may be that the loss value is less than the preset loss threshold, and conditions such as convergence.
现有技术中,传统的半监督训练中,不能很好地评估未标注样本的训练损失,从而导致对采用大量未标注的医学图像数据结合少量标注的医学图像数据对分割模型的训练效果不佳。In the prior art, in traditional semi-supervised training, the training loss of unlabeled samples cannot be evaluated well, which leads to poor training effects on segmentation models using a large amount of unlabeled medical image data combined with a small amount of labeled medical image data. .
而本申请实施例中,通过结合所述置信图,可以有效利用所述标注医学图像样本和未标注医学图像样本之间的关联性,获取所述标注医学图像样本和未标注医学图像样本之间的映射关系,以对所述未标注医学图像样本所对应的第二预测分割子结果与标注医学图像样本所对应的第一预测分割子结果进行比较评估,从而有效提升半监督训练的有效性。In the embodiment of the present application, by combining the confidence map, the correlation between the labeled medical image sample and the unlabeled medical image sample can be effectively used to obtain the relationship between the labeled medical image sample and the unlabeled medical image sample. To compare and evaluate the second predicted segmentation sub-result corresponding to the unlabeled medical image sample and the first predicted segmentation sub-result corresponding to the labeled medical image sample, thereby effectively improving the effectiveness of semi-supervised training.
在一些实施例中,所述根据所述判别结果、所述置信图和所述预测分割结果,基于预设损失函数计算关于所述待训练的分割模型和所述判别模型的损失值,包括:In some embodiments, the calculating the loss value of the segmentation model to be trained and the discrimination model based on a preset loss function according to the discrimination result, the confidence map, and the predicted segmentation result includes:
根据所述预测分割结果中,所述标注医学图像样本所对应的第一预测分割子结果与所述标注医学图像样本的真实分割标签,计算关于所述分割模型的第一损失值;According to the predicted segmentation result, the first predicted segmentation sub-result corresponding to the annotated medical image sample and the real segmentation label of the annotated medical image sample, calculating a first loss value for the segmentation model;
根据所述预测分割结果中所述未标注医学图像样本所对应的第二预测分割子结果和所述置信图,计算所述分割模型的第二损失值;Calculating a second loss value of the segmentation model according to the second predicted segmentation sub-result corresponding to the unlabeled medical image sample in the predicted segmentation result and the confidence map;
根据所述预测分割结果,计算关于所述判别模型的第三损失值;According to the predicted segmentation result, calculating a third loss value with respect to the discriminant model;
根据所述第一损失值、第二损失值和第三损失值,计算得到所述损失值。The loss value is calculated according to the first loss value, the second loss value, and the third loss value.
本申请实施例中,所述第一损失值可以根据所述标注医学图像样本所对应的第一预测分割子结果与所述标注医学图像样本的真实分割标签计算得到,而所述第一损失值的具体计算方式和所包含的损失函数类型等可以根据实际经验等来确定。例如,所述第一损失值可以包括关于所述分割网络的交叉熵损失和/或关于标注医学图像样本的监督损失等等。所述第三损失值可以指所述判别模型的判别损失。In the embodiment of the present application, the first loss value may be calculated according to the first predicted segmentation sub-result corresponding to the labeled medical image sample and the real segmentation label of the labeled medical image sample, and the first loss value The specific calculation method and the type of loss function included can be determined based on actual experience. For example, the first loss value may include a cross-entropy loss related to the segmentation network and/or a supervision loss related to annotated medical image samples, and so on. The third loss value may refer to the discrimination loss of the discrimination model.
而所述第二损失值可以根据所述未标注医学图像样本所对应的第二预测分割子结果和所述置信图计算得到,此时,所述第二损失值也可以称为半监督损失。The second loss value may be calculated according to the second predicted segmentation sub-result corresponding to the unlabeled medical image sample and the confidence map. In this case, the second loss value may also be referred to as a semi-supervised loss.
本申请实施例中,根据所述第一损失值、第二损失值和第三损失值,计算得到所述损失值的具体方式可以有多种,例如,可以将所述第一损失值、第二损失值和第三损失值,或者,也可以预先设置所述第一损失值、第二损失值和第三损失值所分别对应的权重值,并根据所述第一损失值、第二损失值和第三损失值所分别对应的权重值以及所述第一损失值、第二损失值和第三损失值,计算得到所述损失值。In the embodiment of the present application, according to the first loss value, the second loss value, and the third loss value, there may be multiple specific ways to calculate the loss value. For example, the first loss value, the first loss value and the third loss value may be calculated. The second loss value and the third loss value. Alternatively, the weight values corresponding to the first loss value, the second loss value, and the third loss value may be preset, and the weight values corresponding to the first loss value and the second loss value may be set in advance. The weight value corresponding to the third loss value and the third loss value and the first loss value, the second loss value, and the third loss value are calculated to obtain the loss value.
在一些实施例中,所述根据所述预测分割结果中所述未标注医学图像样本所对应的第二预测分割子结果和所述置信图,计算所述分割模型的第二损失值,包括:In some embodiments, the calculating the second loss value of the segmentation model according to the second predicted segmentation sub-result corresponding to the unlabeled medical image sample in the predicted segmentation result and the confidence map includes:
对所述置信图中的各个位置进行编码运算,获得所述置信图所对应的编码图像,所述编码图像包含所述置信图中的每个位置的编码值;Performing an encoding operation on each position in the confidence map to obtain an encoded image corresponding to the confidence map, where the encoded image includes the encoding value of each position in the confidence map;
根据编码图像和所述未标注医学图像样本所对应的第二预测分割子结果,计算所述分割模型的第二损失值。Calculate the second loss value of the segmentation model according to the second predicted segmentation sub-result corresponding to the encoded image and the unlabeled medical image sample.
本申请实施例中,所述编码运算可以根据用于对所述置信图中的各个位置进行编码,编码的具体方式可以有多种,所述编码可以用于对所述置信图中的各个位置进行类别标注。示例性的,当所述置信图中的各个位置的类别包括两个类别时,所述编码运算可以是二值化运算;当然,所述编码运算还可以包括其他编码方式,例如,所述编码运算可以基于独热编码(One-Hot Encoding)等方式来进行编码等等。In the embodiment of the present application, the encoding operation may be used to encode each position in the confidence map, and there may be multiple specific encoding methods, and the encoding may be used to encode each position in the confidence map. Carry out category labeling. Exemplarily, when the category of each position in the confidence map includes two categories, the encoding operation may be a binarization operation; of course, the encoding operation may also include other encoding methods, for example, the encoding The calculation can be based on one-hot encoding (One-Hot Encoding) and other methods for encoding and so on.
在一些实施例中,所述编码图像可以用于标注所述第二预测分割子结果中的可信 区域,其中,所述可信区域可以基于所述第二预测分割子结果中与真实医学特征区域的相似度符合预设相似度条件的位置区域来确定。此时,在一些情况下,可以根据所述编码图像中的可信区域判断所述未标注医学图像样本所对应的相关损失,即所述第二损失值。In some embodiments, the encoded image may be used to annotate the credible region in the second predicted segmentation sub-result, wherein the credible region can be based on the authentic medical features in the second predicted segmentation sub-result. The similarity of the region is determined by the location region that meets the preset similarity condition. At this time, in some cases, the relevant loss corresponding to the unlabeled medical image sample may be determined according to the credible region in the encoded image, that is, the second loss value.
下面以一个具体示例,说明本申请实施例中所述损失值的一种示例性具体计算方式。The following uses a specific example to illustrate an exemplary specific calculation method of the loss value in the embodiment of the present application.
在一些示例中,所述标注医学图像样本为{I f,L f},其中,所述L f为所述标注医学图像样本的真实分割标签。所述未标注医学图像样本为{I 0}。 In some examples, the labeled medical image sample is {I f , L f }, where L f is a true segmentation label of the labeled medical image sample. The unlabeled medical image sample is {I 0 }.
将所述标注医学图像样本和未标注医学图像样本输入待训练的分割模型,获得所述待训练的分割模型对各个医学图像样本的预测分割结果,其中,所述标注医学图像样本所对应的第一预测分割子结果为
Figure PCTCN2020078800-appb-000002
所述未标注医学图像样本所对应的第二预测分割子结果为S(L f)。
The labeled medical image sample and the unlabeled medical image sample are input into the segmentation model to be trained, and the predicted segmentation result of each medical image sample by the segmentation model to be trained is obtained, wherein the first segment corresponding to the labeled medical image sample is obtained. The result of a predicted segmentation is
Figure PCTCN2020078800-appb-000002
The second predicted segmentation sub-result corresponding to the unlabeled medical image sample is S(L f ).
此时,根据所述标注医学图像样本为{I f,L f}和第一预测分割子结果
Figure PCTCN2020078800-appb-000003
计算关于所述分割模型的第一损失值。
At this time, according to the labeled medical image sample as {I f , L f } and the first predicted segmentation sub-result
Figure PCTCN2020078800-appb-000003
Calculate the first loss value with respect to the segmentation model.
所述第一损失值可以包括所述分割网络的交叉熵损失
Figure PCTCN2020078800-appb-000004
和关于标注医学图像样本的监督损失
Figure PCTCN2020078800-appb-000005
The first loss value may include the cross entropy loss of the segmentation network
Figure PCTCN2020078800-appb-000004
And about the supervision loss of labeling medical image samples
Figure PCTCN2020078800-appb-000005
其中,所述交叉熵损失
Figure PCTCN2020078800-appb-000006
Wherein, the cross entropy loss
Figure PCTCN2020078800-appb-000006
Figure PCTCN2020078800-appb-000007
Figure PCTCN2020078800-appb-000007
所述监督损失
Figure PCTCN2020078800-appb-000008
Said supervision loss
Figure PCTCN2020078800-appb-000008
Figure PCTCN2020078800-appb-000009
Figure PCTCN2020078800-appb-000009
此外,可以通过所述判别模型中的上采样层,获得所述第二预测分割子结果的置信图
Figure PCTCN2020078800-appb-000010
此时,根据所述预测分割结果中所述未标注医学图像样本所对应的第二预测分割子结果和所述置信图,计算所述分割模型的第二损失值
Figure PCTCN2020078800-appb-000011
In addition, the confidence map of the second predicted segmentation sub-result can be obtained through the up-sampling layer in the discriminant model
Figure PCTCN2020078800-appb-000010
At this time, according to the second predicted segmentation sub-result corresponding to the unlabeled medical image sample in the predicted segmentation result and the confidence map, the second loss value of the segmentation model is calculated
Figure PCTCN2020078800-appb-000011
Figure PCTCN2020078800-appb-000012
Figure PCTCN2020078800-appb-000012
其中,所述I(·)是指示函数,T semi为预设置信阈值,所述Y({I f,L 0})用于指示所述置信图所对应的编码图像的编码类别,所述编码类别指示所述编码图像是否对应未标注 医学图像样本,其中,若编码类别指示所述编码图像对应未标注医学图像样本,则所述Y({I f,L 0})=1。 Wherein, I(·) is an indicator function, T semi is a preset confidence threshold, and Y({I f ,L 0 }) is used to indicate the coding category of the coded image corresponding to the confidence map, and The encoding category indicates whether the encoded image corresponds to an unlabeled medical image sample, wherein, if the encoding category indicates that the encoded image corresponds to an unlabeled medical image sample, then the Y({I f ,L 0 })=1.
其中,所述预设置信阈值T semi可以根据实际经验或者测试结果等来设置。通过设置所述预设置信阈值T semi,可以控制模型训练的敏感性。 Wherein, the preset signal threshold T semi can be set according to actual experience or test results. By setting the preset signal threshold T semi , the sensitivity of model training can be controlled.
此外,还可以计算关于所述判别模型的判别损失,即所述第三损失值
Figure PCTCN2020078800-appb-000013
In addition, it is also possible to calculate the discriminant loss on the discriminant model, that is, the third loss value
Figure PCTCN2020078800-appb-000013
Figure PCTCN2020078800-appb-000014
Figure PCTCN2020078800-appb-000014
其中,当λ=0时,对应的是待训练的分割模型输出的预测分割结果;当λ=1时,对应的是标注有真实分割标签的标注医学图像样本。Among them, when λ=0, it corresponds to the predicted segmentation result output by the segmentation model to be trained; when λ=1, it corresponds to an annotated medical image sample with a real segmentation label.
在得到所述第一损失值、第二损失值和第三损失值之后,可以根据所述第一损失值、第二损失值和第三损失值,计算得到所述损失值
Figure PCTCN2020078800-appb-000015
After obtaining the first loss value, the second loss value, and the third loss value, the loss value may be calculated according to the first loss value, the second loss value, and the third loss value
Figure PCTCN2020078800-appb-000015
Figure PCTCN2020078800-appb-000016
Figure PCTCN2020078800-appb-000016
其中,所述λ adv可以是所述监督损失
Figure PCTCN2020078800-appb-000017
所对应的权值系数,所述λ semi可以是所述第二损失值
Figure PCTCN2020078800-appb-000018
所对应的权值系数。
Wherein, the λ adv may be the supervision loss
Figure PCTCN2020078800-appb-000017
Corresponding weight coefficient, the λ semi may be the second loss value
Figure PCTCN2020078800-appb-000018
The corresponding weight coefficient.
此时,通过调节所述λ adv、λ semi,可以权衡调整所述分割模型和所述判别模型的训练结果,例如可以避免过度修正,避免削弱诸如交叉熵损失的效果等。当然,在一些情况下,所述交叉熵损失
Figure PCTCN2020078800-appb-000019
和所述第三损失值也可以存在对应的权值系数。
At this time, by adjusting the λ adv and λ semi , the training results of the segmentation model and the discriminant model can be weighed and adjusted, for example, excessive correction can be avoided, and the effect such as cross entropy loss can be avoided. Of course, in some cases, the cross entropy loss
Figure PCTCN2020078800-appb-000019
There may also be a weight coefficient corresponding to the third loss value.
在一些情况下,在基于所述损失值对所述判别模型和所述待训练的分割模型进行训练,直到所得到的损失值符合预设损失条件之后,还可以通过用于测试的医学图像测试样本以及用于验证的医学图像验证样本对所述分割模型进行测试和验证,以从所得到的损失值符合预设损失条件的分割模型中,选择最优的分割模型作为所述已训练的分割模型。In some cases, after the discriminant model and the segmentation model to be trained are trained based on the loss value, until the obtained loss value meets the preset loss condition, it can also pass the medical image test for testing Samples and medical image verification samples for verification test and verify the segmentation model, so as to select the optimal segmentation model as the trained segmentation from the segmentation models whose loss values meet the preset loss conditions. Model.
如图5所示,为所述分割模型和所述判别模型的一种示例性示意图。As shown in FIG. 5, it is an exemplary schematic diagram of the segmentation model and the discrimination model.
其中,所述分割模型和所述判别模型可以利用标注医学图像样本和未标注医学图像样本,实现半监督训练。Wherein, the segmentation model and the discriminant model can use labeled medical image samples and unlabeled medical image samples to implement semi-supervised training.
本申请实施例中,可以获取待检测医学图像,并将所述待检测医学图像输入已训练的分割模型,其中,所述分割模型包括编码器和解码器,所述编码器包括多个第一层级结构,所述多个第一层级结构包括第一输入层、至少一个第一中间层和第一输出层,所述解码器包括第二输入层、至少一个第二中间层和第二输出层,其中,任意第二中间层的输入包括所述第二中间层的前一层的输出与至少两个第一层级结构的输出的融合结果;此时,至少可以通过所述解码器中的各个中间层获取到解码器中的多个层所提取的不同尺度的特征,从而充分利用医学图像中的像素点的上下文信息来进行 医学图像分割;以获取到所述待检测医学图像中的医学特征区域的分割结果。通过本申请实施例,可以在通过分割模型对医学图像进行处理时有效地利用所提取到的多尺度特征,实现多信息融合,从而提高分割模型的泛化性能,并提升对医学图像进行图像分割的准确性。In the embodiment of the present application, the medical image to be detected can be obtained, and the medical image to be detected can be input into a trained segmentation model, where the segmentation model includes an encoder and a decoder, and the encoder includes a plurality of first Hierarchical structure, the plurality of first hierarchical structures include a first input layer, at least one first intermediate layer, and a first output layer, and the decoder includes a second input layer, at least one second intermediate layer, and a second output layer , Wherein the input of any second intermediate layer includes the fusion result of the output of the previous layer of the second intermediate layer and the output of at least two first-level structures; at this time, it can pass through at least each of the decoders The middle layer acquires features of different scales extracted by multiple layers in the decoder, so as to make full use of the context information of the pixels in the medical image to perform medical image segmentation; to obtain the medical features in the medical image to be detected The segmentation result of the region. Through the embodiments of this application, the extracted multi-scale features can be effectively used when medical images are processed through the segmentation model to achieve multi-information fusion, thereby improving the generalization performance of the segmentation model and improving the image segmentation of medical images. Accuracy.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.
对应于上文实施例所述的医学图像分割方法,图6示出了本申请实施例提供的一种医学图像分割装置的结构框图,为了便于说明,仅示出了与本申请实施例相关的部分。Corresponding to the medical image segmentation method described in the above embodiment, FIG. 6 shows a structural block diagram of a medical image segmentation device provided by an embodiment of the present application. part.
参照图6,该医学图像分割装置6包括:Referring to FIG. 6, the medical image segmentation device 6 includes:
第一获取模块601,用于获取待检测医学图像;The first obtaining module 601 is used to obtain medical images to be detected;
输入模块602,用于将所述待检测医学图像输入已训练的分割模型,其中,所述分割模型包括编码器和解码器,所述编码器包括多个第一层级结构,所述多个第一层级结构包括第一输入层、至少一个第一中间层和第一输出层,所述解码器包括第二输入层、至少一个第二中间层和第二输出层,其中,任意第二中间层的输入包括所述第二中间层的前一层的输出与至少两个第一层级结构的输出的融合结果;The input module 602 is configured to input the medical image to be detected into a trained segmentation model, where the segmentation model includes an encoder and a decoder, the encoder includes a plurality of first-level structures, and the plurality of first-level structures The hierarchical structure includes a first input layer, at least one first intermediate layer, and a first output layer. The decoder includes a second input layer, at least one second intermediate layer, and a second output layer, wherein any second intermediate layer The input of includes the fusion result of the output of the previous layer of the second intermediate layer and the output of at least two first-level structures;
处理模块603,用于通过所述分割模型对所述待检测医学图像进行处理,获得所述分割模型的输出结果,其中,所述输出结果包括关于所述待检测医学图像中的医学特征区域的分割结果。The processing module 603 is configured to process the medical image to be detected by the segmentation model to obtain the output result of the segmentation model, wherein the output result includes information about the medical feature region in the medical image to be detected Segmentation result.
可选的,所述分割模型包括权重获取模块,所述权重获取模块位于所述编码器和所述解码器之间;Optionally, the segmentation model includes a weight acquisition module, and the weight acquisition module is located between the encoder and the decoder;
所述处理模块603具体包括:The processing module 603 specifically includes:
第一处理单元,用于通过所述编码器对所述待检测医学图像进行第一处理,获得所述编码器输出的第一特征矩阵;A first processing unit, configured to perform first processing on the medical image to be detected by the encoder to obtain a first feature matrix output by the encoder;
第一输入单元,用于将所述第一特征矩阵输入所述权重获取模块;A first input unit, configured to input the first feature matrix into the weight obtaining module;
第二处理单元,用于通过所述权重获取模块对所述第一特征矩阵进行第二处理,获得所述权重获取模块输出的权重矩阵;A second processing unit, configured to perform second processing on the first feature matrix by the weight acquisition module to obtain the weight matrix output by the weight acquisition module;
第一融合单元,用于将所述权重矩阵与所述第一特征矩阵进行融合,获得第二特征矩阵;A first fusion unit, configured to fuse the weight matrix and the first feature matrix to obtain a second feature matrix;
第三处理单元,用于基于所述第二特征矩阵,通过所述解码器进行第三处理,获得所述输出结果。The third processing unit is configured to perform third processing by the decoder based on the second feature matrix to obtain the output result.
可选的,所述第二处理单元具体包括:Optionally, the second processing unit specifically includes:
第一处理子单元,用于对所述第一特征矩阵进行第一卷积处理,获得第三特征矩阵;The first processing subunit is configured to perform first convolution processing on the first feature matrix to obtain a third feature matrix;
第二处理子单元,用于对所述第一特征矩阵进行第二卷积处理,获得第四特征矩阵;A second processing subunit, configured to perform a second convolution process on the first feature matrix to obtain a fourth feature matrix;
第三处理子单元,用于将所述第三特征矩阵与第四特征矩阵相乘,获得第五特征矩阵;The third processing subunit is configured to multiply the third feature matrix and the fourth feature matrix to obtain a fifth feature matrix;
第四处理子单元,用于通过激活函数对所述第五特征矩阵进行激活,获得所述权重矩阵。The fourth processing subunit is configured to activate the fifth feature matrix through an activation function to obtain the weight matrix.
可选的,所述第三处理单元具体包括:Optionally, the third processing unit specifically includes:
第一融合子单元,用于将所述第二特征矩阵与所述第一输出层的前一层的输出进行融合,获得第六特征矩阵;The first fusion subunit is used to fuse the second feature matrix with the output of the previous layer of the first output layer to obtain a sixth feature matrix;
第一输入子单元,用于将所述第六特征矩阵输入所述解码器;The first input subunit is used to input the sixth feature matrix to the decoder;
第五处理子单元,用于基于所述第六特征矩阵,通过所述解码器进行第三处理,获得所述输出结果。The fifth processing subunit is configured to perform third processing by the decoder based on the sixth feature matrix to obtain the output result.
可选的,该医学图像分割装置6还包括:Optionally, the medical image segmentation device 6 further includes:
训练模块,用于通过判别模型对待训练的分割模型进行训练,直到训练完成,并获得已训练的分割模型,其中,所述判别模型的输入包括所述待训练的分割模型的至少部分输出,所述判别模型包括卷积神经网络和上采样层,所述卷积神经网络的输出为所述上采样层的输入。The training module is used to train the segmentation model to be trained through the discriminant model until the training is completed, and obtain the trained segmentation model, wherein the input of the discriminant model includes at least part of the output of the segmentation model to be trained, so The discriminant model includes a convolutional neural network and an upsampling layer, and the output of the convolutional neural network is the input of the upsampling layer.
可选的,所述训练模块具体包括:Optionally, the training module specifically includes:
获取单元,用于获取医学图像样本,其中,所述医学图像样本包括标注医学图像样本和未标注医学图像样本,所述标注医学图像样本为标注有真实分割标签的医学图像样本,所述未标注医学图像样本为未进行标注的医学图像样本;An acquiring unit for acquiring medical image samples, wherein the medical image samples include labeled medical image samples and unlabeled medical image samples, the labeled medical image samples are medical image samples labeled with real segmentation tags, and the unlabeled medical image samples The medical image sample is a medical image sample that has not been labeled;
第四处理单元,用于将所述标注医学图像样本和未标注医学图像样本输入待训练的分割模型,获得所述待训练的分割模型对各个医学图像样本的预测分割结果;The fourth processing unit is configured to input the labeled medical image sample and the unlabeled medical image sample into the segmentation model to be trained, and obtain the predicted segmentation result of each medical image sample by the segmentation model to be trained;
第五处理单元,用于将所述预测分割结果输入所述判别模型,获得所述判别模型的判别结果和置信图,其中,所述置信图由所述判别模型中的上采样层输出,所述判别结果由所述判别模型中的卷积神经网络输出;The fifth processing unit is configured to input the predicted segmentation result into the discriminant model to obtain the discriminant result and confidence map of the discriminant model, wherein the confidence map is output by the upsampling layer in the discriminant model, so The discrimination result is output by the convolutional neural network in the discrimination model;
计算单元,用于根据所述判别结果、所述置信图和所述预测分割结果,基于预设损失函数计算关于所述待训练的分割模型和所述判别模型的损失值;A calculation unit, configured to calculate a loss value regarding the segmentation model to be trained and the discrimination model based on a preset loss function according to the discrimination result, the confidence map, and the predicted segmentation result;
训练单元,用于基于所述损失值对所述判别模型和所述待训练的分割模型进行训 练,直到所得到的损失值符合预设损失条件,则训练完成,并获得已训练的分割模型。The training unit is configured to train the discriminant model and the segmentation model to be trained based on the loss value, until the obtained loss value meets the preset loss condition, then the training is completed and the trained segmentation model is obtained.
可选的,所述计算单元具体包括:Optionally, the calculation unit specifically includes:
第一计算子单元,用于根据所述预测分割结果中,所述标注医学图像样本所对应的第一预测分割子结果与所述标注医学图像样本的真实分割标签,计算关于所述分割模型的第一损失值;The first calculation subunit is configured to calculate the information about the segmentation model according to the first predicted segmentation sub-result corresponding to the labeled medical image sample and the real segmentation label of the labeled medical image sample in the predicted segmentation result. First loss value
第二计算子单元,用于根据所述预测分割结果中所述未标注医学图像样本所对应的第二预测分割子结果和所述置信图,计算所述分割模型的第二损失值;A second calculation subunit, configured to calculate a second loss value of the segmentation model according to the second predicted segmentation sub-result corresponding to the unlabeled medical image sample in the predicted segmentation result and the confidence map;
第三计算子单元,用于根据所述预测分割结果,计算关于所述判别模型的第三损失值;The third calculation subunit is configured to calculate the third loss value of the discriminant model according to the predicted segmentation result;
第四计算子单元,用于根据所述第一损失值、第二损失值和第三损失值,计算得到所述损失值。The fourth calculation subunit is configured to calculate the loss value according to the first loss value, the second loss value, and the third loss value.
可选的,所述第二计算子单元具体用于:Optionally, the second calculation subunit is specifically configured to:
对所述置信图中的各个位置进行编码运算,获得所述置信图所对应的编码图像,所述编码图像包含所述置信图中的每个位置的编码值;Performing an encoding operation on each position in the confidence map to obtain an encoded image corresponding to the confidence map, where the encoded image includes the encoding value of each position in the confidence map;
根据编码图像和所述未标注医学图像样本所对应的第二预测分割子结果,计算所述分割模型的第二损失值。Calculate the second loss value of the segmentation model according to the second predicted segmentation sub-result corresponding to the encoded image and the unlabeled medical image sample.
可选的,所述第二中间层的前一层的输出与至少两个第一层级结构的输出的融合结果为所述第二中间层的前一层的输出、与所述第二中间层相对应的第一层级结构的输出以及与所述第二中间层相对应的第一层级结构的前一层的输出的融合结果。Optionally, the fusion result of the output of the previous layer of the second intermediate layer and the output of the at least two first hierarchical structures is the output of the previous layer of the second intermediate layer and the output of the second intermediate layer. The fusion result of the output of the corresponding first hierarchical structure and the output of the previous layer of the first hierarchical structure corresponding to the second intermediate layer.
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information interaction and execution process between the above-mentioned devices/units are based on the same concept as the method embodiment of this application, and its specific functions and technical effects can be found in the method embodiment section. I won't repeat it here.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as needed. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist alone physically, or two or more units can be integrated into one unit. The above-mentioned integrated units can be hardware-based Formal realization can also be realized in the form of a software functional unit. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the foregoing system, reference may be made to the corresponding process in the foregoing method embodiment, which will not be repeated here.
图7为本申请一实施例提供的终端设备的结构示意图。如图7所示,该实施例的 终端设备7包括:至少一个处理器70(图7中仅示出一个)、存储器71以及存储在上述存储器71中并可在上述至少一个处理器70上运行的计算机程序72,上述处理器70执行上述计算机程序72时实现上述任意各个医学图像分割方法实施例中的步骤。FIG. 7 is a schematic structural diagram of a terminal device provided by an embodiment of this application. As shown in FIG. 7, the terminal device 7 of this embodiment includes: at least one processor 70 (only one is shown in FIG. 7), a memory 71, and is stored in the above-mentioned memory 71 and can run on the above-mentioned at least one processor 70 When the processor 70 executes the computer program 72, the steps in any of the medical image segmentation method embodiments described above are implemented.
上述终端设备7可以是服务器、手机、可穿戴设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、桌上型计算机、笔记本、台式电脑以及掌上电脑等计算设备。该终端设备可包括,但不仅限于,处理器70、存储器71。本领域技术人员可以理解,图7仅仅是终端设备7的举例,并不构成对终端设备7的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如还可以包括输入设备、输出设备、网络接入设备等。其中,上述输入设备可以包括键盘、触控板、指纹采集传感器(用于采集用户的指纹信息和指纹的方向信息)、麦克风、摄像头等,输出设备可以包括显示器、扬声器等。The aforementioned terminal device 7 may be a computing device such as a server, a mobile phone, a wearable device, an augmented reality (AR)/virtual reality (VR) device, a desktop computer, a notebook, a desktop computer, and a palmtop computer. The terminal device may include, but is not limited to, a processor 70 and a memory 71. Those skilled in the art can understand that FIG. 7 is only an example of the terminal device 7 and does not constitute a limitation on the terminal device 7. It may include more or less components than shown in the figure, or a combination of certain components, or different components. , For example, can also include input devices, output devices, network access devices, and so on. The above-mentioned input device may include a keyboard, a touch panel, a fingerprint collection sensor (used to collect user fingerprint information and fingerprint orientation information), a microphone, a camera, etc., and an output device may include a display, a speaker, and the like.
所述处理器70可以是中央处理单元(Central Processing Unit,CPU),该处理器70还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The processor 70 may be a central processing unit (Central Processing Unit, CPU), and the processor 70 may also be other general-purpose processors, digital signal processors (Digital Signal Processors, DSPs), and application specific integrated circuits (Application Specific Integrated Circuits). , ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
上述存储器71在一些实施例中可以是上述终端设备7的内部存储单元,例如终端设备7的硬盘或内存。上述存储器71在另一些实施例中也可以是上述终端设备7的外部存储设备,例如上述终端设备7上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,上述存储器71还可以既包括上述终端设备7的内部存储单元也包括外部存储设备。上述存储器71用于存储操作系统、应用程序、引导装载程序(Boot Loader)、数据以及其他程序等,例如上述计算机程序的程序代码等。上述存储器71还可以用于暂时地存储已经输出或者将要输出的数据。The foregoing memory 71 may be an internal storage unit of the foregoing terminal device 7 in some embodiments, such as a hard disk or memory of the terminal device 7. The above-mentioned memory 71 may also be an external storage device of the above-mentioned terminal device 7 in other embodiments, for example, a plug-in hard disk equipped on the above-mentioned terminal device 7, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital). ,SD) card, flash card (Flash Card), etc. Further, the aforementioned memory 71 may also include both an internal storage unit of the aforementioned terminal device 7 and an external storage device. The above-mentioned memory 71 is used to store an operating system, an application program, a boot loader (Boot Loader), data, and other programs, for example, the program code of the above-mentioned computer program. The aforementioned memory 71 can also be used to temporarily store data that has been output or will be output.
本申请实施例还提供了一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序被处理器执行时实现可实现上述各个方法实施例中的步骤。The embodiments of the present application also provide a computer-readable storage medium, and the above-mentioned computer-readable storage medium stores a computer program, and when the above-mentioned computer program is executed by a processor, the steps in each of the above-mentioned method embodiments can be realized.
本申请实施例提供了一种计算机程序产品,当计算机程序产品在终端设备上运行时,使得终端设备执行时实现可实现上述各个方法实施例中的步骤。The embodiments of the present application provide a computer program product. When the computer program product runs on a terminal device, the terminal device can realize the steps in the foregoing method embodiments when the terminal device is executed.
上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例 方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,上述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,上述计算机程序包括计算机程序代码,上述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。上述计算机可读介质至少可以包括:能够将计算机程序代码携带到拍照装置/终端设备的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, this application implements all or part of the processes in the above-mentioned embodiments and methods, which can be completed by instructing relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium. When executed by the processor, the steps of the foregoing method embodiments can be implemented. Wherein, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The above-mentioned computer-readable medium may at least include: any entity or device capable of carrying computer program code to the camera device/terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory ( RAM, Random Access Memory), electric carrier signal, telecommunications signal and software distribution medium. For example, U disk, mobile hard disk, floppy disk or CD-ROM, etc. In some jurisdictions, according to legislation and patent practices, computer-readable media cannot be electrical carrier signals and telecommunication signals.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own focus. For parts that are not described in detail or recorded in an embodiment, reference may be made to related descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/网络设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/网络设备实施例仅仅是示意性的,上述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/network equipment and method may be implemented in other ways. For example, the device/network device embodiments described above are merely illustrative, and the division of the modules or units mentioned above is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be It can be combined or integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
以上上述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still compare the foregoing embodiments. The recorded technical solutions are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and should be included in this Within the scope of protection applied for.

Claims (20)

  1. 一种医学图像分割方法,其特征在于,包括:A medical image segmentation method, which is characterized in that it includes:
    获取待检测医学图像;Obtain medical images to be tested;
    将所述待检测医学图像输入已训练的分割模型,其中,所述分割模型包括编码器和解码器,所述编码器包括多个第一层级结构,所述多个第一层级结构包括第一输入层、至少一个第一中间层和第一输出层,所述解码器包括第二输入层、至少一个第二中间层和第二输出层,其中,任意第二中间层的输入包括所述第二中间层的前一层的输出与至少两个第一层级结构的输出的融合结果;The medical image to be detected is input into a trained segmentation model, wherein the segmentation model includes an encoder and a decoder, the encoder includes a plurality of first hierarchical structures, and the plurality of first hierarchical structures includes a first An input layer, at least one first intermediate layer, and a first output layer, the decoder includes a second input layer, at least one second intermediate layer, and a second output layer, wherein the input of any second intermediate layer includes the first 2. The fusion result of the output of the previous layer of the middle layer and the output of at least two first-level structures;
    通过所述分割模型对所述待检测医学图像进行处理,获得所述分割模型的输出结果,其中,所述输出结果包括关于所述待检测医学图像中的医学特征区域的分割结果。The medical image to be detected is processed by the segmentation model to obtain an output result of the segmentation model, wherein the output result includes a segmentation result of the medical feature region in the medical image to be detected.
  2. 如权利要求1所述的医学图像分割方法,其特征在于,所述分割模型包括权重获取模块,所述权重获取模块位于所述编码器和所述解码器之间;The medical image segmentation method according to claim 1, wherein the segmentation model comprises a weight acquisition module, and the weight acquisition module is located between the encoder and the decoder;
    所述通过所述分割模型对所述待检测医学图像进行处理,获得所述分割模型的输出结果,包括:The processing the medical image to be detected by the segmentation model to obtain the output result of the segmentation model includes:
    通过所述编码器对所述待检测医学图像进行第一处理,获得所述编码器输出的第一特征矩阵;Performing first processing on the medical image to be detected by the encoder to obtain a first feature matrix output by the encoder;
    将所述第一特征矩阵输入所述权重获取模块;Inputting the first feature matrix into the weight obtaining module;
    通过所述权重获取模块对所述第一特征矩阵进行第二处理,获得所述权重获取模块输出的权重矩阵;Performing a second process on the first feature matrix by the weight obtaining module to obtain the weight matrix output by the weight obtaining module;
    将所述权重矩阵与所述第一特征矩阵进行融合,获得第二特征矩阵;Fusing the weight matrix and the first feature matrix to obtain a second feature matrix;
    基于所述第二特征矩阵,通过所述解码器进行第三处理,获得所述输出结果。Based on the second feature matrix, third processing is performed by the decoder to obtain the output result.
  3. 如权利要求2所述的医学图像分割方法,其特征在于,所述通过所述权重获取模块对所述第一特征矩阵进行第二处理,获得所述权重获取模块输出的权重矩阵,包括:3. The medical image segmentation method according to claim 2, wherein the second processing of the first feature matrix by the weight acquisition module to obtain the weight matrix output by the weight acquisition module comprises:
    对所述第一特征矩阵进行第一卷积处理,获得第三特征矩阵;Performing first convolution processing on the first feature matrix to obtain a third feature matrix;
    对所述第一特征矩阵进行第二卷积处理,获得第四特征矩阵;Performing a second convolution process on the first feature matrix to obtain a fourth feature matrix;
    将所述第三特征矩阵与第四特征矩阵相乘,获得第五特征矩阵;Multiply the third feature matrix and the fourth feature matrix to obtain a fifth feature matrix;
    通过激活函数对所述第五特征矩阵进行激活,获得所述权重矩阵。Activate the fifth feature matrix through an activation function to obtain the weight matrix.
  4. 如权利要求2所述的医学图像分割方法,其特征在于,所述基于所述第二特征矩阵,通过所述解码器进行第三处理,获得所述输出结果,包括:The medical image segmentation method according to claim 2, wherein the third processing is performed by the decoder based on the second feature matrix to obtain the output result, comprising:
    将所述第二特征矩阵与所述第一输出层的前一层的输出进行融合,获得第六特征矩阵;Fusing the second feature matrix with the output of the previous layer of the first output layer to obtain a sixth feature matrix;
    将所述第六特征矩阵输入所述解码器;Input the sixth feature matrix to the decoder;
    基于所述第六特征矩阵,通过所述解码器进行第三处理,获得所述输出结果。Based on the sixth feature matrix, the decoder performs third processing to obtain the output result.
  5. 如权利要求1所述的医学图像分割方法,其特征在于,在将所述待检测医学图像输入已训练的分割模型之前,还包括:The medical image segmentation method according to claim 1, wherein before inputting the medical image to be detected into a trained segmentation model, the method further comprises:
    通过判别模型对待训练的分割模型进行训练,直到训练完成,并获得已训练的分割模型,其中,所述判别模型的输入包括所述待训练的分割模型的至少部分输出,所述判别模型包括卷积神经网络和上采样层,所述卷积神经网络的输出为所述上采样层的输入。The segmentation model to be trained is trained through the discriminant model until the training is completed, and the trained segmentation model is obtained, wherein the input of the discriminant model includes at least part of the output of the segmentation model to be trained, and the discriminant model includes volume A product neural network and an up-sampling layer, the output of the convolutional neural network is the input of the up-sampling layer.
  6. 如权利要求5所述的医学图像分割方法,其特征在于,所述通过判别模型对待训练的分割模型进行训练,直到训练完成,并获得已训练的分割模型,包括:The medical image segmentation method according to claim 5, wherein the training the segmentation model to be trained by the discriminant model until the training is completed and obtaining the trained segmentation model comprises:
    获取医学图像样本,其中,所述医学图像样本包括标注医学图像样本和未标注医学图像样本,所述标注医学图像样本为标注有真实分割标签的医学图像样本,所述未标注医学图像样本为未进行标注的医学图像样本;Obtain medical image samples, where the medical image samples include labeled medical image samples and unlabeled medical image samples, the labeled medical image samples are medical image samples labeled with real segmentation labels, and the unlabeled medical image samples are unlabeled medical image samples. Annotated medical image samples;
    将所述标注医学图像样本和未标注医学图像样本输入待训练的分割模型,获得所述待训练的分割模型对各个医学图像样本的预测分割结果;Input the labeled medical image sample and the unlabeled medical image sample into the segmentation model to be trained, and obtain the predicted segmentation result of each medical image sample by the segmentation model to be trained;
    将所述预测分割结果输入所述判别模型,获得所述判别模型的判别结果和置信图,其中,所述置信图由所述判别模型中的上采样层输出,所述判别结果由所述判别模型中的卷积神经网络输出;Input the predicted segmentation result into the discriminant model to obtain the discriminant result and confidence map of the discriminant model, wherein the confidence map is output by the upsampling layer in the discriminant model, and the discriminant result is determined by the discriminant model. The output of the convolutional neural network in the model;
    根据所述判别结果、所述置信图和所述预测分割结果,基于预设损失函数计算关于所述待训练的分割模型和所述判别模型的损失值;Calculating a loss value regarding the segmentation model to be trained and the discrimination model based on a preset loss function according to the discrimination result, the confidence map, and the predicted segmentation result;
    基于所述损失值对所述判别模型和所述待训练的分割模型进行训练,直到所得到的损失值符合预设损失条件,则训练完成,并获得已训练的分割模型。Training the discriminant model and the segmentation model to be trained based on the loss value, until the obtained loss value meets the preset loss condition, the training is completed, and the trained segmentation model is obtained.
  7. 如权利要求6所述的医学图像分割方法,其特征在于,所述根据所述判别结果、所述置信图和所述预测分割结果,基于预设损失函数计算关于所述待训练的分割模型和所述判别模型的损失值,包括:7. The medical image segmentation method according to claim 6, wherein the segmentation model to be trained and the segmentation model to be trained are calculated based on a preset loss function according to the discrimination result, the confidence map, and the predicted segmentation result. The loss value of the discriminant model includes:
    根据所述预测分割结果中,所述标注医学图像样本所对应的第一预测分割子结果与所述标注医学图像样本的真实分割标签,计算关于所述分割模型的第一损失值;According to the predicted segmentation result, the first predicted segmentation sub-result corresponding to the annotated medical image sample and the real segmentation label of the annotated medical image sample, calculating a first loss value for the segmentation model;
    根据所述预测分割结果中所述未标注医学图像样本所对应的第二预测分割子结果和所述置信图,计算所述分割模型的第二损失值;Calculating a second loss value of the segmentation model according to the second predicted segmentation sub-result corresponding to the unlabeled medical image sample in the predicted segmentation result and the confidence map;
    根据所述预测分割结果,计算关于所述判别模型的第三损失值;According to the predicted segmentation result, calculating a third loss value with respect to the discriminant model;
    根据所述第一损失值、第二损失值和第三损失值,计算得到所述损失值。The loss value is calculated according to the first loss value, the second loss value, and the third loss value.
  8. 如权利要求7所述的医学图像分割方法,其特征在于,所述根据所述预测分割 结果中所述未标注医学图像样本所对应的第二预测分割子结果和所述置信图,计算所述分割模型的第二损失值,包括:The medical image segmentation method according to claim 7, wherein the prediction segmentation result is based on the second predicted segmentation sub-result corresponding to the unlabeled medical image sample and the confidence map to calculate the The second loss value of the segmentation model includes:
    对所述置信图中的各个位置进行编码运算,获得所述置信图所对应的编码图像,所述编码图像包含所述置信图中的每个位置的编码值;Performing an encoding operation on each position in the confidence map to obtain an encoded image corresponding to the confidence map, where the encoded image includes the encoding value of each position in the confidence map;
    根据编码图像和所述未标注医学图像样本所对应的第二预测分割子结果,计算所述分割模型的第二损失值。Calculate the second loss value of the segmentation model according to the second predicted segmentation sub-result corresponding to the encoded image and the unlabeled medical image sample.
  9. 如权利要求1至8任意一项所述的医学图像分割方法,其特征在于,所述第二中间层的前一层的输出与至少两个第一层级结构的输出的融合结果为所述第二中间层的前一层的输出、与所述第二中间层相对应的第一层级结构的输出以及与所述第二中间层相对应的第一层级结构的前一层的输出的融合结果。The medical image segmentation method according to any one of claims 1 to 8, wherein the fusion result of the output of the previous layer of the second intermediate layer and the output of at least two first hierarchical structures is the first The fusion result of the output of the previous layer of the second intermediate layer, the output of the first hierarchical structure corresponding to the second intermediate layer, and the output of the previous layer of the first hierarchical structure corresponding to the second intermediate layer .
  10. 一种医学图像分割装置,其特征在于,包括:A medical image segmentation device, characterized in that it comprises:
    第一获取模块,用于获取待检测医学图像;The first acquisition module is used to acquire the medical image to be detected;
    输入模块,用于将所述待检测医学图像输入已训练的分割模型,其中,所述分割模型包括编码器和解码器,所述编码器包括多个第一层级结构,所述多个第一层级结构包括第一输入层、至少一个第一中间层和第一输出层,所述解码器包括第二输入层、至少一个第二中间层和第二输出层,其中,任意第二中间层的输入包括所述第二中间层的前一层的输出与至少两个第一层级结构的输出的融合结果;The input module is used to input the medical image to be detected into a trained segmentation model, where the segmentation model includes an encoder and a decoder, the encoder includes a plurality of first-level structures, and the plurality of first-level structures The hierarchical structure includes a first input layer, at least one first intermediate layer, and a first output layer. The decoder includes a second input layer, at least one second intermediate layer, and a second output layer. The input includes a fusion result of the output of the previous layer of the second intermediate layer and the output of at least two first-level structures;
    处理模块,用于通过所述分割模型对所述待检测医学图像进行处理,获得所述分割模型的输出结果,其中,所述输出结果包括关于所述待检测医学图像中的医学特征区域的分割结果。The processing module is configured to process the medical image to be detected through the segmentation model to obtain the output result of the segmentation model, wherein the output result includes segmentation of the medical feature region in the medical image to be detected result.
  11. 一种终端设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如下步骤:A terminal device includes a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the following steps when the processor executes the computer program:
    获取待检测医学图像;Obtain medical images to be tested;
    将所述待检测医学图像输入已训练的分割模型,其中,所述分割模型包括编码器和解码器,所述编码器包括多个第一层级结构,所述多个第一层级结构包括第一输入层、至少一个第一中间层和第一输出层,所述解码器包括第二输入层、至少一个第二中间层和第二输出层,其中,任意第二中间层的输入包括所述第二中间层的前一层的输出与至少两个第一层级结构的输出的融合结果;The medical image to be detected is input into a trained segmentation model, wherein the segmentation model includes an encoder and a decoder, the encoder includes a plurality of first hierarchical structures, and the plurality of first hierarchical structures includes a first An input layer, at least one first intermediate layer, and a first output layer, the decoder includes a second input layer, at least one second intermediate layer, and a second output layer, wherein the input of any second intermediate layer includes the first 2. The fusion result of the output of the previous layer of the middle layer and the output of at least two first-level structures;
    通过所述分割模型对所述待检测医学图像进行处理,获得所述分割模型的输出结果,其中,所述输出结果包括关于所述待检测医学图像中的医学特征区域的分割结果。The medical image to be detected is processed by the segmentation model to obtain an output result of the segmentation model, wherein the output result includes a segmentation result of the medical feature region in the medical image to be detected.
  12. 如权利要求11所述的终端设备,其特征在于,所述分割模型包括权重获取模 块,所述权重获取模块位于所述编码器和所述解码器之间;The terminal device according to claim 11, wherein the segmentation model includes a weight acquisition module, and the weight acquisition module is located between the encoder and the decoder;
    所述处理器执行所述计算机程序时,所述通过所述分割模型对所述待检测医学图像进行处理,获得所述分割模型的输出结果,包括:When the processor executes the computer program, the processing the medical image to be detected by the segmentation model to obtain the output result of the segmentation model includes:
    通过所述编码器对所述待检测医学图像进行第一处理,获得所述编码器输出的第一特征矩阵;Performing first processing on the medical image to be detected by the encoder to obtain a first feature matrix output by the encoder;
    将所述第一特征矩阵输入所述权重获取模块;Inputting the first feature matrix into the weight obtaining module;
    通过所述权重获取模块对所述第一特征矩阵进行第二处理,获得所述权重获取模块输出的权重矩阵;Performing a second process on the first feature matrix by the weight obtaining module to obtain the weight matrix output by the weight obtaining module;
    将所述权重矩阵与所述第一特征矩阵进行融合,获得第二特征矩阵;Fusing the weight matrix and the first feature matrix to obtain a second feature matrix;
    基于所述第二特征矩阵,通过所述解码器进行第三处理,获得所述输出结果。Based on the second feature matrix, third processing is performed by the decoder to obtain the output result.
  13. 如权利要求12所述的终端设备,其特征在于,所述处理器执行所述计算机程序时,所述通过所述权重获取模块对所述第一特征矩阵进行第二处理,获得所述权重获取模块输出的权重矩阵,包括:The terminal device according to claim 12, wherein when the processor executes the computer program, the weight acquisition module performs a second process on the first feature matrix to obtain the weight acquisition The weight matrix output by the module includes:
    对所述第一特征矩阵进行第一卷积处理,获得第三特征矩阵;Performing first convolution processing on the first feature matrix to obtain a third feature matrix;
    对所述第一特征矩阵进行第二卷积处理,获得第四特征矩阵;Performing a second convolution process on the first feature matrix to obtain a fourth feature matrix;
    将所述第三特征矩阵与第四特征矩阵相乘,获得第五特征矩阵;Multiply the third feature matrix and the fourth feature matrix to obtain a fifth feature matrix;
    通过激活函数对所述第五特征矩阵进行激活,获得所述权重矩阵。Activate the fifth feature matrix through an activation function to obtain the weight matrix.
  14. 如权利要求12所述的终端设备,其特征在于,所述处理器执行所述计算机程序时,所述基于所述第二特征矩阵,通过所述解码器进行第三处理,获得所述输出结果,包括:The terminal device according to claim 12, wherein when the processor executes the computer program, the third processing is performed by the decoder based on the second feature matrix to obtain the output result ,include:
    将所述第二特征矩阵与所述第一输出层的前一层的输出进行融合,获得第六特征矩阵;Fusing the second feature matrix with the output of the previous layer of the first output layer to obtain a sixth feature matrix;
    将所述第六特征矩阵输入所述解码器;Input the sixth feature matrix to the decoder;
    基于所述第六特征矩阵,通过所述解码器进行第三处理,获得所述输出结果。Based on the sixth feature matrix, the decoder performs third processing to obtain the output result.
  15. 如权利要求11所述的终端设备,其特征在于,所述处理器执行所述计算机程序时,在将所述待检测医学图像输入已训练的分割模型之前,还包括:The terminal device according to claim 11, wherein when the processor executes the computer program, before inputting the medical image to be detected into the trained segmentation model, the method further comprises:
    通过判别模型对待训练的分割模型进行训练,直到训练完成,并获得已训练的分割模型,其中,所述判别模型的输入包括所述待训练的分割模型的至少部分输出,所述判别模型包括卷积神经网络和上采样层,所述卷积神经网络的输出为所述上采样层的输入。The segmentation model to be trained is trained through the discriminant model until the training is completed, and the trained segmentation model is obtained, wherein the input of the discriminant model includes at least part of the output of the segmentation model to be trained, and the discriminant model includes volume A product neural network and an up-sampling layer, the output of the convolutional neural network is the input of the up-sampling layer.
  16. 如权利要求15所述的终端设备,其特征在于,所述处理器执行所述计算机程序时,所述通过判别模型对待训练的分割模型进行训练,直到训练完成,并获得已训 练的分割模型,包括:The terminal device according to claim 15, wherein when the processor executes the computer program, the segmentation model to be trained is trained by the discriminant model until the training is completed, and the trained segmentation model is obtained, include:
    获取医学图像样本,其中,所述医学图像样本包括标注医学图像样本和未标注医学图像样本,所述标注医学图像样本为标注有真实分割标签的医学图像样本,所述未标注医学图像样本为未进行标注的医学图像样本;Obtain medical image samples, where the medical image samples include labeled medical image samples and unlabeled medical image samples, the labeled medical image samples are medical image samples labeled with real segmentation labels, and the unlabeled medical image samples are unlabeled medical image samples. Annotated medical image samples;
    将所述标注医学图像样本和未标注医学图像样本输入待训练的分割模型,获得所述待训练的分割模型对各个医学图像样本的预测分割结果;Input the labeled medical image sample and the unlabeled medical image sample into the segmentation model to be trained, and obtain the predicted segmentation result of each medical image sample by the segmentation model to be trained;
    将所述预测分割结果输入所述判别模型,获得所述判别模型的判别结果和置信图,其中,所述置信图由所述判别模型中的上采样层输出,所述判别结果由所述判别模型中的卷积神经网络输出;Input the predicted segmentation result into the discriminant model to obtain the discriminant result and confidence map of the discriminant model, wherein the confidence map is output by the upsampling layer in the discriminant model, and the discriminant result is determined by the discriminant model. The output of the convolutional neural network in the model;
    根据所述判别结果、所述置信图和所述预测分割结果,基于预设损失函数计算关于所述待训练的分割模型和所述判别模型的损失值;Calculating a loss value regarding the segmentation model to be trained and the discrimination model based on a preset loss function according to the discrimination result, the confidence map, and the predicted segmentation result;
    基于所述损失值对所述判别模型和所述待训练的分割模型进行训练,直到所得到的损失值符合预设损失条件,则训练完成,并获得已训练的分割模型。Training the discriminant model and the segmentation model to be trained based on the loss value, until the obtained loss value meets the preset loss condition, the training is completed, and the trained segmentation model is obtained.
  17. 如权利要求16所述的终端设备,其特征在于,所述处理器执行所述计算机程序时,所述根据所述判别结果、所述置信图和所述预测分割结果,基于预设损失函数计算关于所述待训练的分割模型和所述判别模型的损失值,包括:The terminal device according to claim 16, wherein when the processor executes the computer program, the calculation is based on a preset loss function according to the discrimination result, the confidence map, and the predicted segmentation result The loss values of the segmentation model to be trained and the discrimination model include:
    根据所述预测分割结果中,所述标注医学图像样本所对应的第一预测分割子结果与所述标注医学图像样本的真实分割标签,计算关于所述分割模型的第一损失值;According to the predicted segmentation result, the first predicted segmentation sub-result corresponding to the annotated medical image sample and the real segmentation label of the annotated medical image sample, calculating a first loss value for the segmentation model;
    根据所述预测分割结果中所述未标注医学图像样本所对应的第二预测分割子结果和所述置信图,计算所述分割模型的第二损失值;Calculating a second loss value of the segmentation model according to the second predicted segmentation sub-result corresponding to the unlabeled medical image sample in the predicted segmentation result and the confidence map;
    根据所述预测分割结果,计算关于所述判别模型的第三损失值;According to the predicted segmentation result, calculating a third loss value with respect to the discriminant model;
    根据所述第一损失值、第二损失值和第三损失值,计算得到所述损失值。The loss value is calculated according to the first loss value, the second loss value, and the third loss value.
  18. 如权利要求17所述的终端设备,其特征在于,所述处理器执行所述计算机程序时,所述根据所述预测分割结果中所述未标注医学图像样本所对应的第二预测分割子结果和所述置信图,计算所述分割模型的第二损失值,包括:The terminal device of claim 17, wherein when the processor executes the computer program, the second predicted segmentation sub-result corresponding to the unlabeled medical image sample in the predicted segmentation result And the confidence map, calculating the second loss value of the segmentation model, including:
    对所述置信图中的各个位置进行编码运算,获得所述置信图所对应的编码图像,所述编码图像包含所述置信图中的每个位置的编码值;Performing an encoding operation on each position in the confidence map to obtain an encoded image corresponding to the confidence map, where the encoded image includes the encoding value of each position in the confidence map;
    根据编码图像和所述未标注医学图像样本所对应的第二预测分割子结果,计算所述分割模型的第二损失值。Calculate the second loss value of the segmentation model according to the second predicted segmentation sub-result corresponding to the encoded image and the unlabeled medical image sample.
  19. 如权利要求11至18任意一项所述的终端设备,其特征在于,所述处理器执行所述计算机程序时,所述第二中间层的前一层的输出与至少两个第一层级结构的输出的融合结果为所述第二中间层的前一层的输出、与所述第二中间层相对应的第一层级 结构的输出以及与所述第二中间层相对应的第一层级结构的前一层的输出的融合结果。The terminal device according to any one of claims 11 to 18, wherein when the processor executes the computer program, the output of the previous layer of the second intermediate layer and at least two first-level structures The fusion result of the output of the second intermediate layer is the output of the previous layer of the second intermediate layer, the output of the first hierarchical structure corresponding to the second intermediate layer, and the first hierarchical structure corresponding to the second intermediate layer The fusion result of the output of the previous layer.
  20. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至9任一项所述的医学图像分割方法。A computer-readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the medical image segmentation method according to any one of claims 1 to 9 .
PCT/CN2020/078800 2020-03-11 2020-03-11 Medical image segmentation method, medical image segmentation apparatus and terminal device WO2021179205A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/078800 WO2021179205A1 (en) 2020-03-11 2020-03-11 Medical image segmentation method, medical image segmentation apparatus and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/078800 WO2021179205A1 (en) 2020-03-11 2020-03-11 Medical image segmentation method, medical image segmentation apparatus and terminal device

Publications (1)

Publication Number Publication Date
WO2021179205A1 true WO2021179205A1 (en) 2021-09-16

Family

ID=77671674

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/078800 WO2021179205A1 (en) 2020-03-11 2020-03-11 Medical image segmentation method, medical image segmentation apparatus and terminal device

Country Status (1)

Country Link
WO (1) WO2021179205A1 (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113902827A (en) * 2021-12-02 2022-01-07 北京鹰瞳科技发展股份有限公司 System and method for predicting effect after healing of skin disease and electronic equipment
CN114066913A (en) * 2022-01-12 2022-02-18 广东工业大学 Heart image segmentation method and system
CN114724133A (en) * 2022-04-18 2022-07-08 北京百度网讯科技有限公司 Character detection and model training method, device, equipment and storage medium
US20220230321A1 (en) * 2021-01-15 2022-07-21 Adobe Inc. Generating class-agnostic object masks in digital images
CN114912575A (en) * 2022-04-06 2022-08-16 西安交通大学 Medical image segmentation model and method based on Swin transform connection path
CN114972293A (en) * 2022-06-14 2022-08-30 深圳市大数据研究院 Video polyp segmentation method and device based on semi-supervised spatio-temporal attention network
CN115147526A (en) * 2022-06-30 2022-10-04 北京百度网讯科技有限公司 Method and device for training clothing generation model and method and device for generating clothing image
CN115546239A (en) * 2022-11-30 2022-12-30 珠海横琴圣澳云智科技有限公司 Target segmentation method and device based on boundary attention and distance transformation
CN115661449A (en) * 2022-09-22 2023-01-31 北京百度网讯科技有限公司 Image segmentation and training method and device of image segmentation model
CN115713535A (en) * 2022-11-07 2023-02-24 阿里巴巴(中国)有限公司 Image segmentation model determination method and image segmentation method
US11631234B2 (en) 2019-07-22 2023-04-18 Adobe, Inc. Automatically detecting user-requested objects in images
CN116188879A (en) * 2023-04-27 2023-05-30 广州医思信息科技有限公司 Image classification and image classification model training method, device, equipment and medium
US11681919B2 (en) 2020-03-12 2023-06-20 Adobe Inc. Automatically selecting query objects in digital images
CN116503420A (en) * 2023-04-26 2023-07-28 佛山科学技术学院 Image segmentation method based on federal learning and related equipment
WO2023165033A1 (en) * 2022-03-02 2023-09-07 深圳硅基智能科技有限公司 Method for training model for recognizing target in medical image, method for recognizing target in medical image, and device and medium
US11797847B2 (en) 2019-07-22 2023-10-24 Adobe Inc. Selecting instances of detected objects in images utilizing object detection models
CN116993762A (en) * 2023-09-26 2023-11-03 腾讯科技(深圳)有限公司 Image segmentation method, device, electronic equipment and storage medium
CN117115444A (en) * 2023-09-08 2023-11-24 北京卓视智通科技有限责任公司 Multitasking image segmentation method, system, computer equipment and storage medium
US11886494B2 (en) 2020-02-25 2024-01-30 Adobe Inc. Utilizing natural language processing automatically select objects in images
US11972569B2 (en) 2021-01-26 2024-04-30 Adobe Inc. Segmenting objects in digital images utilizing a multi-object segmentation model framework

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108876792A (en) * 2018-04-13 2018-11-23 北京迈格威科技有限公司 Semantic segmentation methods, devices and systems and storage medium
CN109034162A (en) * 2018-07-13 2018-12-18 南京邮电大学 A kind of image, semantic dividing method
CN109784380A (en) * 2018-12-27 2019-05-21 西安交通大学 A kind of various dimensions weeds in field recognition methods based on generation confrontation study
CN110197493A (en) * 2019-05-24 2019-09-03 清华大学深圳研究生院 Eye fundus image blood vessel segmentation method
US20190333198A1 (en) * 2018-04-25 2019-10-31 Adobe Inc. Training and utilizing an image exposure transformation neural network to generate a long-exposure image from a single short-exposure image
CN110503654A (en) * 2019-08-01 2019-11-26 中国科学院深圳先进技术研究院 A kind of medical image cutting method, system and electronic equipment based on generation confrontation network
CN110675406A (en) * 2019-09-16 2020-01-10 南京信息工程大学 CT image kidney segmentation algorithm based on residual double-attention depth network
CN110689083A (en) * 2019-09-30 2020-01-14 苏州大学 Context pyramid fusion network and image segmentation method
CN110807762A (en) * 2019-09-19 2020-02-18 温州大学 Intelligent retinal blood vessel image segmentation method based on GAN

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108876792A (en) * 2018-04-13 2018-11-23 北京迈格威科技有限公司 Semantic segmentation methods, devices and systems and storage medium
US20190333198A1 (en) * 2018-04-25 2019-10-31 Adobe Inc. Training and utilizing an image exposure transformation neural network to generate a long-exposure image from a single short-exposure image
CN109034162A (en) * 2018-07-13 2018-12-18 南京邮电大学 A kind of image, semantic dividing method
CN109784380A (en) * 2018-12-27 2019-05-21 西安交通大学 A kind of various dimensions weeds in field recognition methods based on generation confrontation study
CN110197493A (en) * 2019-05-24 2019-09-03 清华大学深圳研究生院 Eye fundus image blood vessel segmentation method
CN110503654A (en) * 2019-08-01 2019-11-26 中国科学院深圳先进技术研究院 A kind of medical image cutting method, system and electronic equipment based on generation confrontation network
CN110675406A (en) * 2019-09-16 2020-01-10 南京信息工程大学 CT image kidney segmentation algorithm based on residual double-attention depth network
CN110807762A (en) * 2019-09-19 2020-02-18 温州大学 Intelligent retinal blood vessel image segmentation method based on GAN
CN110689083A (en) * 2019-09-30 2020-01-14 苏州大学 Context pyramid fusion network and image segmentation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JIAWEI ZHANG , YUZHEN JIN , JILAN XU , XIAOWEI XU , YANCHUN ZHANG: "MDU-Net: Multi-scale Densely Connected U-Net for biomedical image segmentation", ARXIV.ORG, 2 December 2018 (2018-12-02), pages 1 - 10, XP080987964 *

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11797847B2 (en) 2019-07-22 2023-10-24 Adobe Inc. Selecting instances of detected objects in images utilizing object detection models
US11631234B2 (en) 2019-07-22 2023-04-18 Adobe, Inc. Automatically detecting user-requested objects in images
US11886494B2 (en) 2020-02-25 2024-01-30 Adobe Inc. Utilizing natural language processing automatically select objects in images
US11681919B2 (en) 2020-03-12 2023-06-20 Adobe Inc. Automatically selecting query objects in digital images
US20220230321A1 (en) * 2021-01-15 2022-07-21 Adobe Inc. Generating class-agnostic object masks in digital images
US11900611B2 (en) 2021-01-15 2024-02-13 Adobe Inc. Generating object masks of object parts utlizing deep learning
US11587234B2 (en) * 2021-01-15 2023-02-21 Adobe Inc. Generating class-agnostic object masks in digital images
US20230136913A1 (en) * 2021-01-15 2023-05-04 Adobe Inc. Generating object masks of object parts utlizing deep learning
US11972569B2 (en) 2021-01-26 2024-04-30 Adobe Inc. Segmenting objects in digital images utilizing a multi-object segmentation model framework
CN113902827B (en) * 2021-12-02 2022-03-22 北京鹰瞳科技发展股份有限公司 System and method for predicting effect after healing of skin disease and electronic equipment
CN113902827A (en) * 2021-12-02 2022-01-07 北京鹰瞳科技发展股份有限公司 System and method for predicting effect after healing of skin disease and electronic equipment
CN114066913A (en) * 2022-01-12 2022-02-18 广东工业大学 Heart image segmentation method and system
WO2023165033A1 (en) * 2022-03-02 2023-09-07 深圳硅基智能科技有限公司 Method for training model for recognizing target in medical image, method for recognizing target in medical image, and device and medium
CN114912575A (en) * 2022-04-06 2022-08-16 西安交通大学 Medical image segmentation model and method based on Swin transform connection path
CN114912575B (en) * 2022-04-06 2024-04-09 西安交通大学 Medical image segmentation model and method based on connection Swin transducer path
CN114724133A (en) * 2022-04-18 2022-07-08 北京百度网讯科技有限公司 Character detection and model training method, device, equipment and storage medium
CN114724133B (en) * 2022-04-18 2024-02-02 北京百度网讯科技有限公司 Text detection and model training method, device, equipment and storage medium
CN114972293A (en) * 2022-06-14 2022-08-30 深圳市大数据研究院 Video polyp segmentation method and device based on semi-supervised spatio-temporal attention network
CN115147526A (en) * 2022-06-30 2022-10-04 北京百度网讯科技有限公司 Method and device for training clothing generation model and method and device for generating clothing image
CN115147526B (en) * 2022-06-30 2023-09-26 北京百度网讯科技有限公司 Training of clothing generation model and method and device for generating clothing image
CN115661449A (en) * 2022-09-22 2023-01-31 北京百度网讯科技有限公司 Image segmentation and training method and device of image segmentation model
CN115661449B (en) * 2022-09-22 2023-11-21 北京百度网讯科技有限公司 Image segmentation and training method and device for image segmentation model
CN115713535A (en) * 2022-11-07 2023-02-24 阿里巴巴(中国)有限公司 Image segmentation model determination method and image segmentation method
CN115546239A (en) * 2022-11-30 2022-12-30 珠海横琴圣澳云智科技有限公司 Target segmentation method and device based on boundary attention and distance transformation
CN115546239B (en) * 2022-11-30 2023-04-07 珠海横琴圣澳云智科技有限公司 Target segmentation method and device based on boundary attention and distance transformation
CN116503420A (en) * 2023-04-26 2023-07-28 佛山科学技术学院 Image segmentation method based on federal learning and related equipment
CN116188879B (en) * 2023-04-27 2023-11-28 广州医思信息科技有限公司 Image classification and image classification model training method, device, equipment and medium
CN116188879A (en) * 2023-04-27 2023-05-30 广州医思信息科技有限公司 Image classification and image classification model training method, device, equipment and medium
CN117115444A (en) * 2023-09-08 2023-11-24 北京卓视智通科技有限责任公司 Multitasking image segmentation method, system, computer equipment and storage medium
CN117115444B (en) * 2023-09-08 2024-04-16 北京卓视智通科技有限责任公司 Multitasking image segmentation method, system, computer equipment and storage medium
CN116993762B (en) * 2023-09-26 2024-01-19 腾讯科技(深圳)有限公司 Image segmentation method, device, electronic equipment and storage medium
CN116993762A (en) * 2023-09-26 2023-11-03 腾讯科技(深圳)有限公司 Image segmentation method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
WO2021179205A1 (en) Medical image segmentation method, medical image segmentation apparatus and terminal device
CN111429464B (en) Medical image segmentation method, medical image segmentation device and terminal equipment
CN112992308B (en) Training method of medical image report generation model and image report generation method
Duong et al. Detection of tuberculosis from chest X-ray images: Boosting the performance with vision transformer and transfer learning
Borsting et al. Applied deep learning in plastic surgery: classifying rhinoplasty with a mobile app
CN113077434B (en) Method, device and storage medium for lung cancer identification based on multi-modal information
CN112712879A (en) Information extraction method, device, equipment and storage medium for medical image report
WO2024011835A1 (en) Image processing method and apparatus, device, and readable storage medium
EP4266195A1 (en) Training of text and image models
Kaur et al. Methods for automatic generation of radiological reports of chest radiographs: a comprehensive survey
CN116304307A (en) Graph-text cross-modal retrieval network training method, application method and electronic equipment
Liang et al. Dense networks with relative location awareness for thorax disease identification
Chung et al. Prediction of oxygen requirement in patients with COVID-19 using a pre-trained chest radiograph xAI model: efficient development of auditable risk prediction models via a fine-tuning approach
CN117112829B (en) Medical data cross-modal retrieval method and device and related equipment
Chen et al. HADCNet: Automatic segmentation of COVID-19 infection based on a hybrid attention dense connected network with dilated convolution
Liang et al. FCF: Feature complement fusion network for detecting COVID-19 through CT scan images
Takagi et al. Transformer-based personalized attention mechanism for medical images with clinical records
Qiu et al. A novel tongue feature extraction method on mobile devices
CN113159053A (en) Image recognition method and device and computing equipment
Shetty et al. Multimodal medical tensor fusion network-based DL framework for abnormality prediction from the radiology CXRs and clinical text reports
Pang et al. Correlation matters: multi-scale fine-grained contextual information extraction for hepatic tumor segmentation
Li et al. Deep skin diseases diagnostic system with Dual-channel Image and Extracted Text
Yang et al. Multi‐scale attention network for segmentation of electron dense deposits in glomerular microscopic images
Song et al. Multi-scale Superpixel based Hierarchical Attention model for brain CT classification
Zaeri AI Modeling to Combat COVID-19 Using CT Scan Imaging Algorithms and Simulations: A Study

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20924952

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20924952

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20924952

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 10.07.2023)