Medical image segmentation method and device, electronic equipment and storage medium

By constructing a student diffusion model based on the teacher diffusion model, the problem of high computing resource consumption of traditional diffusion models is solved, and the efficiency and speed of medical image segmentation are improved.

CN119417845APending Publication Date: 2025-02-11TONGJI HOSPITAL ATTACHED TO TONGJI MEDICAL COLLEGE HUAZHONG SCI TECH
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411470401.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The traditional diffusion model consumes high computing resources during the medical image segmentation process, resulting in slow segmentation speed and reducing segmentation efficiency.

Method used

A student diffusion model based on the teacher diffusion model is adopted to construct a student diffusion model by halving the model parameters, reducing calculation overhead and improving segmentation speed.

Benefits of technology

Segmenting medical images through student diffusion model significantly reduces computational overhead and improves segmentation speed and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119417845A_ABST
    Figure CN119417845A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a medical image segmentation method and device, electronic equipment and a storage medium. The method comprises the following steps: acquiring a target abdominal medical image; inputting the target abdominal medical image into a pre-trained student diffusion model to obtain a liver region image of the target abdominal medical image; wherein the pre-trained student diffusion model is obtained based on the trained teacher diffusion model, and the model parameter quantity of the student diffusion model is less than the model parameter quantity of the teacher diffusion model. According to the technical scheme of the embodiment of the invention, the medical image is segmented through the student diffusion model, so that the calculation overhead is reduced, the segmentation speed is increased, and the segmentation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of image processing technology, and in particular to a medical image segmentation method, device, electronic device and storage medium. Background Art

[0002] Medical image segmentation is a complex and critical step in the field of medical image processing and analysis. Its purpose is to segment parts of medical images with certain special meanings and extract relevant features to provide a reliable basis for clinical diagnosis and pathological research, and to assist doctors in making more accurate diagnoses.

[0003] In the related art, diffusion models are usually used to handle the segmentation task of medical images. However, a significant drawback of the traditional diffusion model is that its generation and inference process often requires a large number of iterative steps, which results in high consumption of computing resources. Therefore, when the traditional diffusion model is applied for image segmentation, a large computational overhead is generated, which makes the image segmentation speed relatively slow, thereby reducing the efficiency of medical image segmentation. Summary of the invention

[0004] The present invention provides a medical image segmentation method, device, electronic device and storage medium, which segments medical images through a Student diffusion model to reduce computational overhead, increase segmentation speed and improve segmentation efficiency.

[0005] According to one aspect of the present invention, a medical image segmentation method is provided, the method comprising:

[0006] Acquire a target abdominal medical image;

[0007] The target abdominal medical image is input into a pre-trained student diffusion model to obtain a liver region image of the target abdominal medical image; wherein the pre-trained student diffusion model is obtained based on a trained teacher diffusion model, and the model parameter amount of the student diffusion model is less than the model parameter amount of the teacher diffusion model.

[0008] According to another aspect of the present invention, a medical image segmentation device is provided. The device comprises:

[0009] An image acquisition module, used for acquiring a target abdominal medical image;

[0010] An image segmentation module is used to input the target abdominal medical image into a pre-trained student diffusion model to obtain a liver region image of the target abdominal medical image; wherein the pre-trained student diffusion model is obtained based on a trained teacher diffusion model, and the model parameter amount of the student diffusion model is less than the model parameter amount of the teacher diffusion model.

[0011] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0012] at least one processor; and

[0013] a memory communicatively connected to the at least one processor; wherein,

[0014] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the medical image segmentation method described in any embodiment of the present invention.

[0015] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the medical image segmentation method described in any embodiment of the present invention when executed.

[0016] The technical solution of the embodiment of the present invention obtains a target abdominal medical image. Then, the target abdominal medical image is input into a pre-trained student diffusion model to obtain a liver region image of the target abdominal medical image; wherein the pre-trained student diffusion model is obtained based on a trained teacher diffusion model, and the model parameter amount of the student diffusion model is less than the model parameter amount of the teacher diffusion model. The technical solution of the embodiment of the present invention uses a student diffusion model to segment medical images to reduce computational overhead, increase segmentation speed, and improve segmentation efficiency.

[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0019] Figure 1 A schematic diagram of a flow chart of a medical image segmentation method provided by an embodiment of the present invention;

[0020] Figure 2 An architecture diagram of a student diffusion model training for a medical image segmentation method provided by an embodiment of the present invention;

[0021] Figure 3A schematic diagram of the structure of a medical image segmentation device provided by an embodiment of the present invention;

[0022] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0025] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0026] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0027] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0028] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0029] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0030] Figure 1 A flow chart of a medical image segmentation method provided in an embodiment of the present invention is provided. This embodiment is applicable to the situation of segmenting medical images, and is particularly applicable to the scenario of segmenting the liver region of abdominal medical images. The method can be performed by a medical image segmentation device, and the medical image segmentation device can be implemented in the form of hardware and / or software. The medical image segmentation device can be configured in an electronic device such as a computer or a server.

[0031] like Figure 1 As shown, the method of this embodiment includes:

[0032] S110, acquiring a target abdominal medical image.

[0033] In an embodiment of the present invention, the target abdominal medical image may be an abdominal medical image that needs to be segmented for the liver region, such as an abdominal CT image. The target abdominal medical image may be a 3D abdominal medical image, i.e., a 3D abdominal CT image, or may be a 2D abdominal medical image. In an embodiment of the present invention, a specific method of obtaining a 2D abdominal medical image may be to extract a 2D slice from a 3D abdominal CT image. In an embodiment of the present invention, the number of target abdominal medical images is one, two, or more than two.

[0034] Specifically, an image segmentation instruction of an abdominal medical image is received, and an abdominal medical image corresponding to the medical segmentation instruction, i.e., a target abdominal medical image, is determined based on the image segmentation instruction. The image segmentation instruction includes an image identifier of the abdominal medical image, and the image identifier can be used to distinguish different abdominal medical images. In an embodiment of the present invention, the specific form of the image identifier may include at least one of numbers, letters, and symbols, etc., which is not specifically limited here.

[0035] S120: Input the target abdominal medical image into a pre-trained Student diffusion model to obtain a liver region image of the target abdominal medical image.

[0036] The pre-trained student diffusion model can be used to identify the liver region in the target abdominal medical image and generate a liver region image containing the liver region. The pre-trained student diffusion model can be obtained based on the trained teacher diffusion model, and the model parameter amount of the student diffusion model is less than the model parameter amount of the teacher diffusion model.

[0037] In the embodiment of the present invention, a relatively complex diffusion model is first constructed as a teacher diffusion model to give full play to the image processing capability of the diffusion model. Afterwards, in order to fully retain the image processing capability of the teacher diffusion model, a model structure similar to the teacher diffusion model is constructed, that is, the model parameters of the teacher diffusion model are halved to obtain a lightweight student diffusion model. The liver region image can be understood as an image containing the liver region in the target abdominal medical image. It should be noted that the training samples for training the teacher diffusion model and the training samples for training the student diffusion model are the same training samples.

[0038] In an embodiment of the present invention, the target abdominal medical image is input into a pre-trained Student diffusion model to identify the liver region in the target abdominal medical image through the pre-trained Student diffusion model, thereby generating a liver region image containing the liver region, that is, obtaining the liver region image of the target abdominal medical image.

[0039] In an embodiment of the present invention, the training method of the teacher diffusion model is specifically as follows: first, training sample data and training expected data corresponding to the training sample data may be obtained, wherein the training sample data may be an abdominal medical training image, and the training expected data may be an expected image of the liver region of the abdominal medical training image. Afterwards, the pre-constructed teacher diffusion model may be trained based on the training sample data and the training expected data, so as to obtain a trained teacher diffusion model.

[0040] In an embodiment of the present invention, after acquiring the training sample data and the training expected data corresponding to the training sample data, the method may further include: performing data enhancement processing on the training sample data and the training expected data, wherein the data enhancement processing may include at least one of data rotation processing, data translation processing, data elastic transformation processing, and data noise addition processing. It should be noted that the data enhancement processing of the training sample data and the data enhancement processing of the training expected data corresponding to the training sample data are the same. Exemplarily, a spatial transformation (e.g., a rotation transformation) is performed on the training sample data. Then, the same spatial transformation needs to be performed on the training expected data corresponding to the training sample data.

[0041] In an embodiment of the present invention, a preset number of samples may be obtained first, each sample consisting of an abdominal medical image and a liver label corresponding to the abdominal medical image. In an embodiment of the present invention, the sample data may be divided into a training set, a validation set, and a test set according to a preset ratio (such as 8:1:1). In an embodiment of the present invention, the training set may include training sample data and training expected data corresponding to the training sample data. The training sample data may be an abdominal medical training image, and the training expected data may be an expected image of the liver region of the abdominal medical training image. The training set may be used to train a teacher diffusion model and a student diffusion model.

[0042] It can be understood that the validation set can be used to select a teacher diffusion model with the best performance from the trained teacher diffusion models, and to select a student diffusion model with the best performance from the trained student diffusion models. The validation set may include validation sample data and validation expected data corresponding to the validation sample data. The validation sample data may be an abdominal medical validation image, and the validation expected data may be an expected image of the liver region of the abdominal medical validation image. The test set may be used to evaluate the performance of the trained teacher diffusion model, and to evaluate the performance of the trained student diffusion model. The test set may include test sample data and test expected data corresponding to the test sample data. The test sample data may be an abdominal medical test image, and the test expected data may be an expected image of the liver region of the abdominal medical test image.

[0043] Optionally, the training of a pre-constructed teacher diffusion model based on the training sample data and the training expected data to obtain a trained teacher diffusion model may include: performing T times of noise processing on the training sample data with preset noise data to obtain sample noise data, inputting the sample noise data and the training sample data into the pre-constructed teacher diffusion model to obtain predicted noise for the sample noise data; calculating a loss function based on the predicted noise and the preset noise data, and adjusting parameters of the pre-constructed teacher diffusion model based on the calculation result of the loss function to obtain a trained teacher diffusion model.

[0044] Among them, the preset noise data can be set according to actual needs, which is not specifically limited here. The sample noise data can be understood as the sample noise data obtained by gradually adding the preset noise data to the expected image of the liver area through continuous T-step iterations. The predicted noise can be understood as the noise data added to the sample noise data predicted by a pre-constructed teacher diffusion model. In an embodiment of the present invention, the loss function is calculated based on the predicted noise and the preset noise data. Specifically, the actual noise added to the sample noise data can be obtained based on the preset noise data; and then the loss function can be calculated based on the actual noise and the predicted noise. In an embodiment of the present invention, the loss function of the teacher diffusion model can be a mean square error loss function.

[0045] Specifically, preset noise data can be gradually added to the desired image of the liver region through continuous T-step iterations to obtain sample noise data. Afterwards, the sample noise data and the training sample data can be input into the pre-constructed teacher diffusion model. For example, the sample noise data and the training sample data are spliced ​​in the channel dimension, and the spliced ​​data are input into the pre-constructed teacher diffusion model. Thus, the output result of the teacher diffusion model can be obtained, that is, the predicted noise for the sample noise data. After obtaining the predicted noise data, the actual noise added to the sample noise data can be calculated based on the preset noise data. Then, the loss function can be calculated based on the actual noise and the predicted noise to obtain the calculation result of the loss function. Then, the parameters of the pre-constructed teacher diffusion model can be adjusted based on the calculation result of the loss function to obtain a trained teacher diffusion model.

[0046] In an embodiment of the present invention, after the trained teacher diffusion model is obtained, the method may include constructing a student diffusion model. In an embodiment of the present invention, there are two ways to construct a student diffusion model. As an optional implementation in an embodiment of the present invention, the model parameters of the trained teacher diffusion model may be subjected to parameter halving processing, so as to obtain a teacher diffusion model with halved parameters. The teacher diffusion model with halved parameters may then be used as a pre-constructed student diffusion model. Specifically, the model parameters of the trained teacher diffusion model are subjected to parameter halving processing, which may be performed by lightweight processing on the U-net in the trained teacher diffusion model to halve the model parameters of the trained teacher diffusion model.

[0047] As an optional implementation in an embodiment of the present invention, an initial network model for constructing a teacher diffusion model can be first determined. Thereafter, the initial network model can be subjected to parameter halving to obtain an initial network model with halved parameters. The initial network model with halved parameters is then used as a pre-constructed student diffusion model. The advantage of such processing is that the complexity of the student diffusion model is effectively reduced. Optionally, the initial network model used to construct the teacher diffusion model may include U-net. Further, the initial network model is subjected to parameter halving processing, specifically, the U-net in the initial network model is lightweight processed to halve the parameters of the initial network model.

[0048] Optionally, the trained teacher diffusion model may include a first encoder and a first decoder. The first encoder may be understood as an encoder in the teacher diffusion model. The first decoder may be understood as a decoder in the teacher diffusion model. The pre-built student diffusion model may include a second encoder and a second decoder. The second encoder may be understood as an encoder in the student diffusion model. The second decoder may be understood as a decoder in the student diffusion model.

[0049] After obtaining the pre-constructed student diffusion model, the method may further include training the pre-constructed student diffusion model. Specifically, the training sample data is input into the first encoder and the second encoder respectively. Thus, the first encoding feature data and the second encoding feature data can be obtained. Then, the encoding loss can be calculated based on the first encoding feature data and the second encoding feature data. Further, the first encoding feature data can be input into the first decoder to obtain the first decoding feature data, and the second encoding feature data can be input into the second decoder to obtain the second decoding feature data. Then, the decoding loss can be calculated based on the first decoding feature data and the second decoding feature data. After obtaining the encoding loss and the decoding loss, the model parameters of the pre-constructed student diffusion model can be adjusted based on the encoding loss and the decoding loss, so as to obtain a trained student diffusion model. In short, an embodiment of the present invention, based on the knowledge distillation technology, proposes a student diffusion model in which the computational overhead and computational time of the teacher diffusion model are halved.

[0050] The first encoding feature data may be encoding feature data obtained by inputting the training sample data into the first encoder. The second encoding feature data may be encoding feature data obtained by inputting the training sample data into the second encoder. The first decoding feature data may be decoding feature data obtained by inputting the first encoding feature data into the first decoder. The second decoding feature data may be decoding feature data obtained by inputting the second encoding feature data into the second decoder. In an embodiment of the present invention, a mean square error may be used to calculate the encoding loss and / or decoding loss.

[0051] In an embodiment of the present invention, the first encoder may include a first number of first residual convolution units with an attention mechanism. The first encoder may include a second number of second residual convolution units with an attention mechanism. The first decoder may include a third number of third residual convolution units with an attention mechanism. The second decoder may include a fourth number of fourth residual convolution units with an attention mechanism. The first number is greater than the second number, and the third number is greater than the fourth number.

[0052] Among them, the first residual convolution unit can be understood as a residual convolution unit with an attention mechanism in the first encoder. The second residual convolution unit can be understood as a residual convolution unit with an attention mechanism in the second encoder. The third residual convolution unit can be understood as a residual convolution unit with an attention mechanism in the first decoder. The fourth residual convolution unit can be understood as a fourth residual convolution unit with an attention mechanism in the second decoder. It should be noted that the first number, the second number, the third number and the fourth number can be set according to actual needs, and they are not specifically limited here.

[0053] In an embodiment of the present invention, the number of first residual convolution units with an attention mechanism in the first encoder and the number of third residual convolution units with an attention mechanism in the first decoder may be the same number, that is, the first number and the third number may be the same number. Similarly, the number of second residual convolution units with an attention mechanism in the second encoder and the number of fourth residual convolution units with an attention mechanism in the second decoder may be the same number, that is, the second number and the fourth number may be the same number.

[0054] Based on this, see Figure 2 , with the training sample data as x (i) , the training expected data of the training sample data is y (i) For example, the pre-built teacher diffusion model is first trained, and then the pre-built student diffusion model is trained.

[0055] First, the pre-built teacher diffusion model is trained, which may include the following steps:

[0056] Step 1: Use the first encoder of the teacher diffusion model to encode the sample data x (i) In the embodiment of the present invention, the first encoder is composed of a plurality of residual convolution units with an attention mechanism. Taking the jth unit of the first encoder as an example, its input is the output of the previous unit. First, you can Input to the residual convolutional network for convolution calculation to get the output Then we can Input the self-attention mechanism to perform attention calculation and get the output Then we can Input to the residual convolutional network for convolution calculation to get the output Then we can Input to the self-attention mechanism for attention calculation to get output Afterwards, Input to the residual convolutional network for downsampling and calculation to get the output

[0057] Step 2: Upsample the encoding features of the last layer of the first encoder until the last layer of the first encoder, and concatenate them with the corresponding encoding features of the same size in the channel dimension. Then input the concatenated feature data into the first decoder of the teacher diffusion model. In this embodiment of the present invention, the first decoder is also composed of a plurality of residual convolution units with an attention mechanism. Taking the jth unit of the first decoder as an example, its input is the decoding feature of the previous layer. and the encoding features of the jth layer First, you can Perform two times upsampling to obtain the sampling result, and compare the sampling result and The sampling results and The concatenated result is input into the residual convolution network of the first decoder for convolution calculation to obtain the output Then we can Input to the self-attention mechanism for attention calculation to get output Then we can and Splicing is performed in the channel dimension. Then, and The concatenated result is input into the residual convolutional network for convolution calculation to obtain the output Then we can Input to the self-attention mechanism for attention calculation to get output By analogy, we can get the sample data x (i)The corresponding training expectation data is y (i) .

[0058] Afterwards, the training of the pre-built student diffusion model may include the following steps:

[0059] Step 1: Train the sample data x (i) The input is sent to the second encoder in the pre-built student diffusion model for encoding. In the embodiment of the present invention, the second encoder is composed of a number of residual convolution units with an attention mechanism. Taking the jth unit of the second encoder as an example, its input is the output of the previous unit. That is, we can Input to the residual convolutional network for convolution calculation to get the output Then we can Input to the self-attention mechanism for attention calculation to get output Then we can Input to the residual convolutional network for downsampling and calculation to get the output

[0060] Step 2: Up to the last layer of the second encoder, the features of the last layer of the second encoder can be upsampled to obtain a sampling result, and the sampling result and the corresponding encoding features of the same size can be spliced ​​in the channel dimension. The splicing result can then be input into the second decoder of the pre-built student diffusion model. In this embodiment of the present invention, the second decoder is also composed of a number of residual convolution units with an attention mechanism. Taking the jth unit of the decoder as an example, its input is the decoding feature of the previous layer. and the encoding features of the jth layer Afterwards, you can Perform upsampling twice and compare the sampling result and The concatenation is performed in the channel dimension. The concatenated result can then be input into the residual convolutional network for convolution calculation to obtain the output Then we can Input to the self-attention mechanism for attention calculation to get output By analogy, we can get the sample data x (i) The corresponding training expectation data is y (i) .

[0061] Step 3: In order to ensure that the student diffusion model has the same ability as the teacher diffusion model, the technical solution of the embodiment of the present invention adopts the method of knowledge distillation, that is, the teacher diffusion model can be calculated based on the mean square error. and the student diffusion model The loss of the teacher diffusion model can be calculated based on the mean square error. and the student diffusion model The loss of the teacher diffusion model can be calculated based on the mean square error. and the student diffusion model The loss of the teacher diffusion model can be calculated based on the mean square error. and the student diffusion model The loss of the teacher diffusion model can be calculated based on the mean square error. and the student diffusion model The loss of is used to ensure that the prediction results of the two are consistent. Afterwards, the model parameters of the student diffusion model can be updated based on at least one of the above losses to obtain a trained student diffusion model.

[0062] The technical solution of the embodiment of the invention obtains a target abdominal medical image. Then, the target abdominal medical image is input into a pre-trained student diffusion model to obtain a liver region image of the target abdominal medical image; wherein the pre-trained student diffusion model is obtained based on a trained teacher diffusion model, and the model parameter amount of the student diffusion model is less than the model parameter amount of the teacher diffusion model. The technical solution of the embodiment of the present invention uses a student diffusion model to segment medical images to reduce computational overhead, increase segmentation speed, and improve segmentation efficiency.

[0063] Figure 3 FIG. 1 is a schematic diagram of the structure of a medical image segmentation device provided by an embodiment of the present invention. Figure 3 As shown, the device includes: an image acquisition module 310 and an image segmentation module 320.

[0064] Among them, the image acquisition module 310 is used to acquire the target abdominal medical image; the image segmentation module 320 is used to input the target abdominal medical image into a pre-trained student diffusion model to obtain a liver area image of the target abdominal medical image; wherein the pre-trained student diffusion model is obtained based on the trained teacher diffusion model, and the model parameter amount of the student diffusion model is less than the model parameter amount of the teacher diffusion model.

[0065] The technical solution of the embodiment of the present invention is to obtain a target abdominal medical image through an image acquisition module; the target abdominal medical image is input into a pre-trained student diffusion model through an image segmentation module to obtain a liver region image of the target abdominal medical image; wherein the pre-trained student diffusion model is obtained based on a trained teacher diffusion model, and the model parameter amount of the student diffusion model is less than the model parameter amount of the teacher diffusion model. The technical solution of the embodiment of the present invention is to segment medical images through a student diffusion model to reduce computational overhead, increase segmentation speed, and improve segmentation efficiency.

[0066] Optionally, the device also includes a teacher diffusion model training module, which includes a training sample data acquisition unit and a teacher diffusion model training unit; wherein the training sample data acquisition unit is used to acquire training sample data and training expected data corresponding to the training sample data, wherein the training sample data is an abdominal medical training image, and the training expected data is an expected image of the liver area of ​​the abdominal medical training image; the teacher diffusion model training unit is used to train a pre-constructed teacher diffusion model based on the training sample data and the training expected data to obtain a trained teacher diffusion model.

[0067] Optionally, the teacher diffusion model training unit is used to perform T times of noise processing on the training sample data with preset noise data to obtain sample noise data, input the sample noise data and the training sample data into the pre-constructed teacher diffusion model to obtain predicted noise for the sample noise data; calculate the loss function based on the predicted noise and the preset noise data, and adjust the parameters of the pre-constructed teacher diffusion model based on the calculation result of the loss function to obtain a trained teacher diffusion model.

[0068] Optionally, the device also includes a student diffusion model construction module, which is used to, after the trained teacher diffusion model is obtained, halve the model parameters of the trained teacher diffusion model to obtain a teacher diffusion model with halved parameters as a pre-constructed student diffusion model; or, determine an initial network model for constructing the teacher diffusion model, halve the parameters of the initial network model to obtain an initial network model with halved parameters as a pre-constructed student diffusion model.

[0069] Optionally, the trained teacher diffusion model includes a first encoder and a first decoder, and the pre-built student diffusion model includes a second encoder and a second decoder; the device also includes a student diffusion model training module, which is used to input the training sample data into the first encoder and the second encoder respectively after obtaining the pre-built student diffusion model to obtain first encoding feature data and second encoding feature data, and calculate the encoding loss based on the first encoding feature data and the second encoding feature data; input the first encoding feature data into the first decoder to obtain first decoding feature data, input the second encoding feature data into the second decoder to obtain second decoding feature data, and calculate the decoding loss based on the first decoding feature data and the second decoding feature data; adjust the model parameters of the pre-built student diffusion model based on the encoding loss and the decoding loss to obtain the trained student diffusion model.

[0070] Optionally, the first encoder includes a first number of first residual convolution units with an attention mechanism, the first encoder includes a second number of second residual convolution units with an attention mechanism, the first decoder includes a third number of third residual convolution units with an attention mechanism, and the second decoder includes a fourth number of fourth residual convolution units with an attention mechanism; wherein the first number is greater than the second number, and the third number is greater than the fourth number.

[0071] Optionally, the device also includes a data enhancement module; wherein the data enhancement module is used to perform data enhancement processing on the training sample data and the training expected data corresponding to the training sample data after acquiring the training sample data and the training expected data, wherein the data enhancement processing includes at least one of data rotation processing, data translation processing, data elastic transformation processing, and data noise addition processing.

[0072] The medical image segmentation device provided in the embodiment of the present invention can execute the medical image segmentation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0073] It is worth noting that the various units and modules included in the above-mentioned medical image segmentation device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.

[0074] Figure 4A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0075] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0076] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0077] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as a medical image segmentation method.

[0078] In some embodiments, the medical image segmentation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the medical image segmentation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the medical image segmentation method in any other appropriate manner (e.g., by means of firmware).

[0079] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0080] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0081] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0082] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0083] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0084] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0085] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0086] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A medical image segmentation method, characterized in that: The method comprises: Acquire a target abdominal medical image; The target abdominal medical image is input into a pre-trained student diffusion model to obtain a liver region image of the target abdominal medical image; wherein the pre-trained student diffusion model is obtained based on a trained teacher diffusion model, and the model parameter amount of the student diffusion model is less than the model parameter amount of the teacher diffusion model.

2. The method according to claim 1, characterized in that The method further comprises: Acquire training sample data and training expected data corresponding to the training sample data, wherein the training sample data is an abdominal medical training image, and the training expected data is an expected image of a liver region of the abdominal medical training image; The pre-constructed teacher diffusion model is trained based on the training sample data and the training expected data to obtain a trained teacher diffusion model.

3. The method according to claim 2, characterized in that The pre-built teacher diffusion model is trained based on the training sample data and the training expected data to obtain a trained teacher diffusion model, including: Performing T times of noise processing on the training sample data with preset noise data to obtain sample noise data, inputting the sample noise data and the training sample data into the pre-built teacher diffusion model to obtain predicted noise for the sample noise data; A loss function is calculated based on the predicted noise and the preset noise data, and parameters of the pre-constructed teacher diffusion model are adjusted based on the calculation result of the loss function to obtain a trained teacher diffusion model.

4. The method according to claim 2, characterized in that: After obtaining the trained teacher diffusion model, the method includes: The model parameters of the trained teacher diffusion model are halved to obtain a teacher diffusion model with halved parameters as a pre-constructed student diffusion model; or An initial network model for constructing a teacher diffusion model is determined, and the parameters of the initial network model are halved to obtain an initial network model with halved parameters as a pre-constructed student diffusion model.

5. The method according to claim 4, characterized in that The trained teacher diffusion model includes a first encoder and a first decoder, and the pre-constructed student diffusion model includes a second encoder and a second decoder; after obtaining the pre-constructed student diffusion model, the method further includes: Inputting the training sample data into the first encoder and the second encoder respectively to obtain first encoding feature data and second encoding feature data, and calculating encoding loss based on the first encoding feature data and the second encoding feature data; Inputting the first encoding feature data into the first decoder to obtain first decoding feature data, inputting the second encoding feature data into the second decoder to obtain second decoding feature data, and calculating decoding loss based on the first decoding feature data and the second decoding feature data; Based on the encoding loss and the decoding loss, the model parameters of the pre-built student diffusion model are adjusted to obtain a trained student diffusion model.

6. The method according to claim 5, characterized in that The first encoder includes a first number of first residual convolution units with an attention mechanism, the first encoder includes a second number of second residual convolution units with an attention mechanism, the first decoder includes a third number of third residual convolution units with an attention mechanism, and the second decoder includes a fourth number of fourth residual convolution units with an attention mechanism; wherein the first number is greater than the second number, and the third number is greater than the fourth number.

7. The method according to claim 2, characterized in that: After acquiring the training sample data and the training expected data corresponding to the training sample data, the method further includes: The training sample data and the training expected data are subjected to data enhancement processing, wherein the data enhancement processing includes at least one of data rotation processing, data translation processing, data elastic transformation processing, and data noise addition processing.

8. A medical image segmentation device, characterized in that: The device comprises: An image acquisition module, used for acquiring a target abdominal medical image; An image segmentation module is used to input the target abdominal medical image into a pre-trained student diffusion model to obtain a liver region image of the target abdominal medical image; wherein the pre-trained student diffusion model is obtained based on a trained teacher diffusion model, and the model parameter amount of the student diffusion model is less than the model parameter amount of the teacher diffusion model.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the medical image segmentation method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the medical image segmentation method according to any one of claims 1 to 7 when executed.

Citation Information

Cited By

  • Medical image segmentation method and device, storage medium and equipment

    CN120411130A

  • Medical image segmentation method and device, storage medium and equipment

    CN120411130B