Three-dimensional medical image segmentation method and device, equipment and storage medium
Through the three-dimensional medical image segmentation method, the image segmentation model is used to automatically combine two-dimensional medical images, which solves the problem of inefficient acquisition of text topics in the prior art, improves the acquisition efficiency and reliability, and reduces manual intervention.
Patent Information
- Application Number
- CN202411150194.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2025-01-03
AI Technical Summary
In the prior art, the text subject acquisition process of text to be processed is cumbersome, resulting in inefficiency and susceptible to manual intervention.
Using the three-dimensional medical image segmentation method, by obtaining preset two-dimensional medical images, training the image segmentation model, using the bidirectional GRU layer to extract image features, and generating segmentation diagrams through the cross entropy loss function and the Dice loss function, automatically combining two-dimensional images to generate three-dimensional Segment results to reduce manual intervention.
It improves the efficiency and reliability of text theme acquisition, reduces the impact of manual intervention, and realizes an automated text theme acquisition process.
Smart Images

Figure CN119251486A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of artificial intelligence and smart medicine, and in particular to a three-dimensional medical image segmentation method, device, equipment and storage medium. Background Art
[0002] The text theme provides a clear direction and framework for information transmission and understanding, ensuring the focus and depth of the content. A clear text theme can quickly attract readers' attention, guide them to focus on the core issues, and avoid redundant and scattered information. In academic research and writing, a clear text theme is conducive to ensuring the pertinence and innovation of research and promoting the development and progress of the discipline.
[0003] However, the existing process of acquiring the text theme of the text to be processed is cumbersome, which is not conducive to improving the efficiency of acquiring the text theme. The reason is that the existing technology mainly adopts the manual acquisition method to acquire the text theme of the text to be processed, and the manual acquisition method consumes a lot of human resources and time resources, increases the acquisition time of the text theme of the text to be processed, and is easily affected by manual intervention, so it is not conducive to improving the efficiency of acquiring the text theme. Summary of the invention
[0004] The present invention provides a three-dimensional medical image segmentation method, device, computer equipment and storage medium to solve the technical problem that the existing process of acquiring the text subject of the text to be processed is cumbersome and is not conducive to improving the efficiency of acquiring the text subject.
[0005] In a first aspect, a three-dimensional medical image segmentation method is provided, comprising:
[0006] Acquire a preset two-dimensional medical image, combine the preset two-dimensional medical image and a preset segmentation map corresponding to the preset two-dimensional medical image into a sample, and combine different samples into a training set;
[0007] Training a preset image segmentation model based on the training set, and extracting preset image features of the preset two-dimensional medical image through a first encoder of the image segmentation model;
[0008] Obtaining a first hidden state sequence vector and a second hidden state sequence vector corresponding to the preset image feature through a bidirectional GRU layer of the image segmentation model;
[0009] Acquire a predicted segmentation map according to the first hidden state sequence vector, the second hidden state sequence vector, and a predefined acquisition method;
[0010] Generate a total loss value between the preset segmentation map and the predicted segmentation map through a cross entropy loss function, a Dice loss function and a predefined generation method;
[0011] When the total loss value is less than the preset loss value, multiple current two-dimensional medical images are determined according to the three-dimensional medical image, and a current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained. The current segmentation maps corresponding to each of the current two-dimensional medical images are combined to generate a segmentation result of the three-dimensional medical image.
[0012] Furthermore, the step of training a preset image segmentation model based on the training set and extracting preset image features of the preset two-dimensional medical image through a first encoder of the image segmentation model includes:
[0013] Training the image segmentation model based on the training set;
[0014] During the training process of the image segmentation model, the preset image features of the preset two-dimensional medical image are extracted through the first encoder of the image segmentation model.
[0015] Furthermore, obtaining the first hidden state sequence vector and the second hidden state sequence vector corresponding to the preset image feature through the bidirectional GRU layer of the image segmentation model includes:
[0016] Inputting the preset image features into the bidirectional GRU layer of the image segmentation model;
[0017] The preset image features are encoded through the forward GRU layer of the bidirectional GRU layer to generate a first hidden state sequence vector corresponding to the preset image features, and the preset image features are encoded through the reverse GRU layer of the bidirectional GRU layer to generate a second hidden state sequence vector corresponding to the preset image features.
[0018] Furthermore, acquiring the predicted segmentation map according to the first hidden state sequence vector, the second hidden state sequence vector and a predefined acquisition method includes:
[0019] Concatenate the first hidden state sequence vector and the second hidden state sequence vector to generate a third hidden state sequence;
[0020] The third hidden state sequence is input into the classifier of the image segmentation model, and a predicted segmentation map output by the classifier based on the third hidden state sequence is obtained.
[0021] Furthermore, the total loss value between the preset segmentation map and the predicted segmentation map is generated by using the cross entropy loss function, the Dice loss function and a predefined generation method, including:
[0022] Obtaining a cross entropy loss value between the preset segmentation map and the predicted segmentation map through the cross entropy loss function, and obtaining a Dice loss value between the preset segmentation map and the predicted segmentation map through the Dice loss function;
[0023] The cross entropy loss value and the Dice loss value are added to generate a total loss value between the preset segmentation map and the predicted segmentation map.
[0024] Furthermore, when the total loss value is less than a preset loss value, a plurality of current two-dimensional medical images are determined according to the three-dimensional medical image, a current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained, and the current segmentation maps corresponding to the respective current two-dimensional medical images are combined to generate a segmentation result of the three-dimensional medical image, including:
[0025] When the total loss value is less than a preset loss value, stop training the image segmentation model, save the trained image segmentation model, acquire a three-dimensional medical image, slice the three-dimensional medical image along a preset axis, and generate a plurality of current two-dimensional medical images, where the axis includes one of an X-axis, a Y-axis, or a Z-axis;
[0026] Through the second encoder of the image segmentation model, the current image features corresponding to the current two-dimensional medical image are extracted, and the current image features corresponding to the current two-dimensional medical image are input into the trained image segmentation model, and the current segmentation map corresponding to the current two-dimensional medical image output by the trained image segmentation model is obtained, and the current segmentation maps corresponding to the current two-dimensional medical images are combined to generate the segmentation result of the three-dimensional medical image.
[0027] Furthermore, when the total loss value is less than the preset loss value, a plurality of current two-dimensional medical images are determined according to the three-dimensional medical image, a current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained, and the current segmentation maps corresponding to the respective current two-dimensional medical images are combined to generate the segmentation result of the three-dimensional medical image. Then, the three-dimensional medical image segmentation method includes:
[0028] A preset storage area is acquired, and the current three-dimensional medical image and the segmentation result are stored in the storage area.
[0029] In a second aspect, a three-dimensional medical image segmentation device is provided, comprising:
[0030] A first acquisition module is used to acquire a preset two-dimensional medical image, combine the preset two-dimensional medical image and a preset segmentation map corresponding to the preset two-dimensional medical image into a sample, and combine different samples into a training set;
[0031] An extraction module, used for training a preset image segmentation model based on the training set, and extracting preset image features of the preset two-dimensional medical image through a first encoder of the image segmentation model;
[0032] A second acquisition module, used for acquiring a first hidden state sequence vector and a second hidden state sequence vector corresponding to the preset image feature through a bidirectional GRU layer of the image segmentation model;
[0033] A third acquisition module, configured to acquire a predicted segmentation map according to the first hidden state sequence vector, the second hidden state sequence vector and a predefined acquisition method;
[0034] A first generating module, used to generate a total loss value between the preset segmentation map and the predicted segmentation map through a cross entropy loss function, a Dice loss function and a predefined generating method;
[0035] The second generation module is used to determine multiple current two-dimensional medical images based on the three-dimensional medical image when the total loss value is less than the preset loss value, obtain the current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model, combine the current segmentation maps corresponding to each of the current two-dimensional medical images, and generate the segmentation result of the three-dimensional medical image.
[0036] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned three-dimensional medical image segmentation method when executing the computer program.
[0037] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned three-dimensional medical image segmentation method are implemented.
[0038] The present application provides a three-dimensional medical image segmentation method, apparatus, computer equipment and storage medium, which obtain a preset two-dimensional medical image, form a sample with the preset two-dimensional medical image and a preset segmentation map corresponding to the preset two-dimensional medical image, and form a training set with different samples; train a preset image segmentation model based on the training set, extract preset image features of the preset two-dimensional medical image through a first encoder of the image segmentation model; obtain a first hidden state sequence vector and a second hidden state sequence vector corresponding to the preset image features through a bidirectional GRU layer of the image segmentation model; obtain a predicted segmentation map according to the first hidden state sequence vector, the second hidden state sequence vector and a predefined acquisition method; generate a total loss value between the preset segmentation map and the predicted segmentation map through a cross entropy loss function, a Dice loss function and a predefined generation method; when the total loss value is less than the preset loss value, the predicted segmentation map is generated according to the three-dimensional medical image segmentation method. According to the method, a plurality of current two-dimensional medical images are determined, a current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained, and the current segmentation maps corresponding to the current two-dimensional medical image are combined to generate the segmentation result of the three-dimensional medical image. The beneficial effects are in two aspects. On the one hand, when the total loss value is less than the preset loss value, a plurality of current two-dimensional medical images are determined according to the three-dimensional medical image, and the current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained. The current segmentation maps corresponding to the current two-dimensional medical image are combined to generate the segmentation result of the three-dimensional medical image. Since no manual acquisition is required, the acquisition time of the text topic of the text to be processed is reduced, which is beneficial to improving the acquisition efficiency of the text topic of the text to be processed. On the other hand, since the topic generation model will not be affected by manual intervention, it is beneficial to improve the reliability of the acquired text topic of the text to be processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0040] Figure 1 is a schematic diagram of an application environment of a three-dimensional medical image segmentation method in one embodiment of the present invention;
[0041] Figure 2 A schematic flow chart of a three-dimensional medical image segmentation method provided by an embodiment of the present invention;
[0042] Figure 3 yes Figure 1A schematic flow chart of a specific implementation of step S23;
[0043] Figure 4 yes Figure 1 A schematic flow chart of a specific implementation of step S25;
[0044] Figure 5 yes Figure 1 A schematic flow chart of a specific implementation of step S26;
[0045] Figure 6 is a structural schematic diagram of a three-dimensional medical image segmentation device in one embodiment of the present invention;
[0046] Figure 7 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0047] Figure 8 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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 are within the scope of protection of the present invention.
[0049] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an application environment of a three-dimensional medical image segmentation method according to an embodiment of the present invention. The three-dimensional medical image segmentation method provided by the embodiment of the present invention can be applied in the following embodiments: Figure 1 In an application environment, a client communicates with a server through a network.
[0050] The server obtains a preset two-dimensional medical image through the client, combines the preset two-dimensional medical image and a preset segmentation map corresponding to the preset two-dimensional medical image into a sample, and combines different samples into a training set;
[0051] Training a preset image segmentation model based on the training set, and extracting preset image features of the preset two-dimensional medical image through a first encoder of the image segmentation model;
[0052] Obtaining a first hidden state sequence vector and a second hidden state sequence vector corresponding to the preset image feature through a bidirectional GRU layer of the image segmentation model;
[0053] Acquire a predicted segmentation map according to the first hidden state sequence vector, the second hidden state sequence vector, and a predefined acquisition method;
[0054] Generate a total loss value between the preset segmentation map and the predicted segmentation map through a cross entropy loss function, a Dice loss function and a predefined generation method;
[0055] When the total loss value is less than the preset loss value, multiple current two-dimensional medical images are determined according to the three-dimensional medical image, and a current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained. The current segmentation maps corresponding to each of the current two-dimensional medical images are combined to generate a segmentation result of the three-dimensional medical image.
[0056] In the scheme implemented by the above-mentioned three-dimensional medical image segmentation method, device, equipment and medium, the beneficial effects are in two aspects. On the one hand, when the total loss value is less than the preset loss value, multiple current two-dimensional medical images are determined according to the three-dimensional medical image, and the current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained. The current segmentation maps corresponding to the current two-dimensional medical images are combined to generate the segmentation result of the three-dimensional medical image. Since manual acquisition is not required, the acquisition time of the text topic of the text to be processed is reduced, which is conducive to improving the acquisition efficiency of the text topic of the text to be processed; on the other hand, since the topic generation model will not be affected by manual intervention, it is conducive to improving the reliability of the acquired text topic of the text to be processed.
[0057] The client may include but is not limited to various personal computers, laptops, smart phones, tablet computers, and portable wearable devices.
[0058] The server can be implemented with an independent task database or a task database cluster composed of multiple task databases. The present invention is described in detail below through specific embodiments.
[0059] See also Figure 2 , Figure 2 A flowchart of a three-dimensional medical image segmentation method provided by an embodiment of the present invention includes the following steps:
[0060] S21, obtaining a preset two-dimensional medical image, combining the preset two-dimensional medical image and a preset segmentation map corresponding to the preset two-dimensional medical image into a sample, and combining different samples into a training set;
[0061] Exemplarily, connecting to a preset server and sending an image acquisition request to the server;
[0062] The preset two-dimensional medical image returned by the server is received, the preset two-dimensional medical image and the preset segmentation map corresponding to the preset two-dimensional medical image are combined into a sample, and different samples are combined into a training set.
[0063] S22, training a preset image segmentation model based on the training set, and extracting preset image features of the preset two-dimensional medical image through a first encoder of the image segmentation model;
[0064] The step of training a preset image segmentation model based on the training set and extracting preset image features of the preset two-dimensional medical image through a first encoder of the image segmentation model includes:
[0065] Training the image segmentation model based on the training set;
[0066] During the training process of the image segmentation model, the preset image features of the preset two-dimensional medical image are extracted through the first encoder of the image segmentation model.
[0067] S23, obtaining a first hidden state sequence vector and a second hidden state sequence vector corresponding to the preset image feature through the bidirectional GRU layer of the image segmentation model;
[0068] Among them, the Chinese full name of the bidirectional GRU layer is: Bidirectional Gated Recurrent Unit Layer, and the English full name of the bidirectional GRU layer is: Bidirectional Gated Recurrent Unit Layer.
[0069] S24, acquiring a predicted segmentation map according to the first hidden state sequence vector, the second hidden state sequence vector, and a predefined acquisition method;
[0070] The first hidden state sequence vector and the second hidden state sequence vector are different hidden state sequence vectors.
[0071] Among them, the hidden state sequence vector maps each state in the hidden state sequence to a vector representation, and these vectors together constitute the vector representation of the hidden state sequence.
[0072] The step of acquiring the predicted segmentation map according to the first hidden state sequence vector, the second hidden state sequence vector and a predefined acquisition method includes:
[0073] Concatenate the first hidden state sequence vector and the second hidden state sequence vector to generate a third hidden state sequence;
[0074] The third hidden state sequence is input into the classifier of the image segmentation model, and a predicted segmentation map output by the classifier based on the third hidden state sequence is obtained.
[0075] S25, generating a total loss value between the preset segmentation map and the predicted segmentation map through a cross entropy loss function, a Dice loss function, and a predefined generation method;
[0076] Among them, the full English name of the Dice loss function is: Dice Loss.
[0077] Among them, the total loss value is used to measure the overall difference between the preset segmentation map and the predicted segmentation map; the larger the total loss value, the greater the overall difference between the preset segmentation map and the predicted segmentation map; the smaller the total loss value, the smaller the overall difference between the preset segmentation map and the predicted segmentation map.
[0078] S26, when the total loss value is less than the preset loss value, determine multiple current two-dimensional medical images based on the three-dimensional medical image, obtain the current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model, combine the current segmentation maps corresponding to the current two-dimensional medical images, and generate the segmentation result of the three-dimensional medical image.
[0079] The three-dimensional medical image includes one or a combination of an X-ray image, a computer tomography image, and a magnetic resonance image.
[0080] Among them, the preset loss value is set by the user or by the system default, and is not restricted here.
[0081] Exemplarily, combining the current segmentation maps corresponding to the current two-dimensional medical images to generate the segmentation result of the three-dimensional medical image includes:
[0082] According to the generation time of the current segmentation maps corresponding to the current two-dimensional medical images, from early to late, the current segmentation maps corresponding to the current two-dimensional medical images are placed side by side to generate the segmentation result of the three-dimensional medical image;
[0083] According to the generation time of the current segmentation maps corresponding to the current two-dimensional medical images, the current segmentation maps corresponding to the current two-dimensional medical images are placed side by side from late to early to generate the segmentation result of the three-dimensional medical image.
[0084] Wherein, when the total loss value is less than the preset loss value, a plurality of current two-dimensional medical images are determined according to the three-dimensional medical image, a current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained, and the current segmentation maps corresponding to the respective current two-dimensional medical images are combined to generate the segmentation result of the three-dimensional medical image. Then, the three-dimensional medical image segmentation method comprises:
[0085] Step A: acquiring a preset storage area, and storing the current three-dimensional medical image and the segmentation result in the storage area.
[0086] Exemplarily, when the total loss value is less than a preset loss value, a plurality of current two-dimensional medical images are determined according to the three-dimensional medical image, a current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained, and the current segmentation maps corresponding to the respective current two-dimensional medical images are combined to generate a segmentation result of the three-dimensional medical image. Then, the three-dimensional medical image segmentation method,
[0087] Step B: acquiring a first window and a second window of a display page, displaying the current three-dimensional medical image through the first window, and displaying the segmentation result through the second window.
[0088] Among them, the first window and the second window are different windows.
[0089] Among them, step A is executed before or after step B. Step A can also be executed at the same time as step B. The specific execution order is not limited here.
[0090] In an embodiment of the present invention, the beneficial effects lie in two aspects. On the one hand, when the total loss value is less than a preset loss value, a plurality of current two-dimensional medical images are determined according to the three-dimensional medical image, and a current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained. The current segmentation maps corresponding to the current two-dimensional medical images are combined to generate a segmentation result of the three-dimensional medical image. Since manual acquisition is not required, the acquisition time of the text topic of the text to be processed is reduced, which is beneficial to improving the acquisition efficiency of the text topic of the text to be processed. On the other hand, since the topic generation model will not be affected by manual intervention, it is beneficial to improve the reliability of the acquired text topic of the text to be processed.
[0091] See also Figure 3 , Figure 3 yes Figure 1 A specific implementation flow diagram of step S23 is described in detail as follows:
[0092] S31, inputting the preset image features into the bidirectional GRU layer of the image segmentation model;
[0093] S32, encoding the preset image features through the forward GRU layer of the bidirectional GRU layer to generate a first hidden state sequence vector corresponding to the preset image features, and encoding the preset image features through the reverse GRU layer of the bidirectional GRU layer to generate a second hidden state sequence vector corresponding to the preset image features.
[0094] In an embodiment of the present invention, by capturing the first hidden state sequence vector and the second hidden state sequence vector corresponding to the preset image features, the image segmentation model can better understand the overall structure of the preset image features, thereby improving the generalization ability of the image segmentation model on unseen data.
[0095] See also Figure 4 , Figure 4 yes Figure 1 A specific implementation flow diagram of step S25 is described in detail as follows:
[0096] S41, obtaining a cross entropy loss value between the preset segmentation map and the predicted segmentation map through the cross entropy loss function, and obtaining a Dice loss value between the preset segmentation map and the predicted segmentation map through the Dice loss function;
[0097] S42, adding the cross entropy loss value and the Dice loss value to generate a total loss value between the preset segmentation map and the predicted segmentation map.
[0098] In an embodiment of the present invention, the cross entropy loss value and the Dice loss value are added to generate a total loss value between the preset segmentation map and the predicted segmentation map, which enables the image segmentation model to simultaneously consider multiple performance requirements during the training process, thereby improving the overall performance of the image segmentation model.
[0099] See also Figure 5 , Figure 5 yes Figure 1 A specific implementation flow diagram of step S26 is described in detail as follows:
[0100] S51, when the total loss value is less than a preset loss value, stop training the image segmentation model, save the trained image segmentation model, obtain a three-dimensional medical image, slice the three-dimensional medical image along a preset axis, and generate a plurality of current two-dimensional medical images, where the axis includes one of an X-axis, a Y-axis, or a Z-axis;
[0101] For the sake of illustration, an example is given below:
[0102] For example, when the axis is the X-axis, when the total loss value is less than the preset loss value, stop training the image segmentation model, save the trained image segmentation model, obtain a three-dimensional medical image, slice the three-dimensional medical image along the preset X-axis, and generate multiple current two-dimensional medical images.
[0103] For example, when the axis is the Y axis, when the total loss value is less than the preset loss value, stop training the image segmentation model, save the trained image segmentation model, obtain a three-dimensional medical image, slice the three-dimensional medical image along the preset Y axis, and generate multiple current two-dimensional medical images.
[0104] For example, when the axis is the Z axis, when the total loss value is less than the preset loss value, stop training the image segmentation model, save the trained image segmentation model, obtain a three-dimensional medical image, slice the three-dimensional medical image along the preset Z axis, and generate multiple current two-dimensional medical images.
[0105] S52, extracting the current image features corresponding to the current two-dimensional medical image through the second encoder of the image segmentation model, inputting the current image features corresponding to the current two-dimensional medical image into the trained image segmentation model, obtaining the current segmentation map corresponding to the current two-dimensional medical image output by the trained image segmentation model, combining the current segmentation maps corresponding to the current two-dimensional medical images, and generating the segmentation result of the three-dimensional medical image.
[0106] In an embodiment of the present invention, the current segmentation maps corresponding to the current two-dimensional medical images are combined to generate a segmentation result of the three-dimensional medical image. Since manual acquisition is not required, the acquisition time of the text subject of the text to be processed is reduced, which is conducive to improving the acquisition efficiency of the text subject of the text to be processed.
[0107] See also Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a structure of a three-dimensional medical image segmentation device according to an embodiment of the present invention. Figure 6 As shown, the 3D medical image segmentation device based on 3D medical image segmentation includes a first acquisition module 101, an extraction module 102, a second acquisition module 103, a third acquisition module 104, a first generation module 105, and a second generation module 106. The functional modules are described in detail as follows:
[0108] A first acquisition module 101 is used to acquire a preset two-dimensional medical image, combine the preset two-dimensional medical image and a preset segmentation map corresponding to the preset two-dimensional medical image into a sample, and combine different samples into a training set;
[0109] An extraction module 102, configured to train a preset image segmentation model based on the training set, and extract preset image features of the preset two-dimensional medical image through a first encoder of the image segmentation model;
[0110] A second acquisition module 103 is used to acquire a first hidden state sequence vector and a second hidden state sequence vector corresponding to the preset image feature through a bidirectional GRU layer of the image segmentation model;
[0111] A third acquisition module 104, configured to acquire a predicted segmentation map according to the first hidden state sequence vector, the second hidden state sequence vector, and a predefined acquisition method;
[0112] A first generating module 105, configured to generate a total loss value between the preset segmentation map and the predicted segmentation map by using a cross entropy loss function, a Dice loss function, and a predefined generating method;
[0113] The second generation module 106 is used to determine multiple current two-dimensional medical images based on the three-dimensional medical image when the total loss value is less than the preset loss value, obtain the current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model, combine the current segmentation maps corresponding to the current two-dimensional medical images, and generate the segmentation result of the three-dimensional medical image.
[0114] In one embodiment, the extraction module 102 includes:
[0115] A training subunit, used for training the image segmentation model based on the training set;
[0116] The extraction subunit is used to extract the preset image features of the preset two-dimensional medical image through the first encoder of the image segmentation model during the training process of the image segmentation model.
[0117] In one embodiment, the second acquisition module 103 includes:
[0118] An input subunit, used for inputting the preset image features into the bidirectional GRU layer of the image segmentation model;
[0119] The encoding subunit is used to encode the preset image features through the forward GRU layer of the bidirectional GRU layer to generate a first hidden state sequence vector corresponding to the preset image features, and to encode the preset image features through the reverse GRU layer of the bidirectional GRU layer to generate a second hidden state sequence vector corresponding to the preset image features.
[0120] In one embodiment, the third acquisition module 104 includes:
[0121] a concatenation subunit, configured to concatenate the first hidden state sequence vector and the second hidden state sequence vector to generate a third hidden state sequence;
[0122] An acquisition subunit is used to input the third hidden state sequence into a classifier of the image segmentation model, and acquire a predicted segmentation map output by the classifier based on the third hidden state sequence.
[0123] In one embodiment, the first generating module 105 includes:
[0124] A loss value acquisition subunit, used to obtain a cross entropy loss value between the preset segmentation map and the predicted segmentation map through the cross entropy loss function, and to obtain a Dice loss value between the preset segmentation map and the predicted segmentation map through the Dice loss function;
[0125] The first generating subunit is used to add the cross entropy loss value and the Dice loss value to generate a total loss value between the preset segmentation map and the predicted segmentation map.
[0126] In one embodiment, the second generating module 106 includes:
[0127] A saving subunit is used to stop training the image segmentation model when the total loss value is less than a preset loss value, save the trained image segmentation model, obtain a three-dimensional medical image, slice the three-dimensional medical image along a preset axis, and generate a plurality of current two-dimensional medical images, wherein the axis includes one of an X-axis, a Y-axis, or a Z-axis;
[0128] The second generating subunit is used to extract the current image features corresponding to the current two-dimensional medical image through the second encoder of the image segmentation model, input the current image features corresponding to the current two-dimensional medical image into the trained image segmentation model, obtain the current segmentation map corresponding to the current two-dimensional medical image output by the trained image segmentation model, combine the current segmentation maps corresponding to the current two-dimensional medical images, and generate the segmentation result of the three-dimensional medical image.
[0129] In one embodiment, the 3D medical image segmentation apparatus further includes:
[0130] The storage module is used to obtain a preset storage area, and store the current three-dimensional medical image and the segmentation result in the storage area.
[0131] In an embodiment of the present invention, the beneficial effects lie in two aspects. On the one hand, when the total loss value is less than a preset loss value, a plurality of current two-dimensional medical images are determined according to the three-dimensional medical image, and a current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained. The current segmentation maps corresponding to the current two-dimensional medical images are combined to generate a segmentation result of the three-dimensional medical image. Since manual acquisition is not required, the acquisition time of the text topic of the text to be processed is reduced, which is beneficial to improving the acquisition efficiency of the text topic of the text to be processed. On the other hand, since the topic generation model will not be affected by manual intervention, it is beneficial to improve the reliability of the acquired text topic of the text to be processed.
[0132] The specific limitations on the three-dimensional medical image segmentation device can be found in the above limitations on the three-dimensional medical image segmentation method, which will not be repeated here.
[0133] Each module in the above-mentioned three-dimensional medical image segmentation device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0134] See also Figure 7 , Figure 7 is a schematic diagram of a computer device in one embodiment of the present invention. In one embodiment, a computer device is provided. The computer device may be a server. The internal structure diagram thereof may be as shown in FIG. Figure 7 The computer device includes a processor, a memory, a network interface and a database connected through a system bus.
[0135] The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, the functions or steps on the server side of a three-dimensional medical image segmentation method are implemented.
[0136] See also Figure 8 , Figure 8 is another structural diagram of a computer device in one embodiment of the present invention. In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as shown in FIG. Figure 8As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external task database through a network connection. When the computer program is executed by the processor, the functions or steps of a three-dimensional medical image segmentation method are implemented.
[0137] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor.
[0138] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0139] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0140] The above description and accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of a stated sub-sample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0141] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0142] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, 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 implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0143] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A three-dimensional medical image segmentation method, characterized in that: include: Acquire a preset two-dimensional medical image, combine the preset two-dimensional medical image and a preset segmentation map corresponding to the preset two-dimensional medical image into a sample, and combine different samples into a training set; Training a preset image segmentation model based on the training set, and extracting preset image features of the preset two-dimensional medical image through a first encoder of the image segmentation model; Obtaining a first hidden state sequence vector and a second hidden state sequence vector corresponding to the preset image feature through a bidirectional GRU layer of the image segmentation model; Acquire a predicted segmentation map according to the first hidden state sequence vector, the second hidden state sequence vector, and a predefined acquisition method; Generate a total loss value between the preset segmentation map and the predicted segmentation map through a cross entropy loss function, a Dice loss function and a predefined generation method; When the total loss value is less than the preset loss value, multiple current two-dimensional medical images are determined according to the three-dimensional medical image, and a current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained. The current segmentation maps corresponding to each of the current two-dimensional medical images are combined to generate a segmentation result of the three-dimensional medical image.
2. The three-dimensional medical image segmentation method according to claim 1, characterized in that: The step of training a preset image segmentation model based on the training set and extracting preset image features of the preset two-dimensional medical image through a first encoder of the image segmentation model includes: Training the image segmentation model based on the training set; During the training process of the image segmentation model, the preset image features of the preset two-dimensional medical image are extracted through the first encoder of the image segmentation model.
3. The three-dimensional medical image segmentation method according to claim 1, characterized in that: The step of obtaining the first hidden state sequence vector and the second hidden state sequence vector corresponding to the preset image feature through the bidirectional GRU layer of the image segmentation model includes: Inputting the preset image features into the bidirectional GRU layer of the image segmentation model; The preset image features are encoded through the forward GRU layer of the bidirectional GRU layer to generate a first hidden state sequence vector corresponding to the preset image features, and the preset image features are encoded through the reverse GRU layer of the bidirectional GRU layer to generate a second hidden state sequence vector corresponding to the preset image features.
4. The three-dimensional medical image segmentation method according to claim 1, characterized in that: The step of acquiring the predicted segmentation map according to the first hidden state sequence vector, the second hidden state sequence vector and a predefined acquisition method includes: Concatenate the first hidden state sequence vector and the second hidden state sequence vector to generate a third hidden state sequence; The third hidden state sequence is input into the classifier of the image segmentation model, and a predicted segmentation map output by the classifier based on the third hidden state sequence is obtained.
5. The three-dimensional medical image segmentation method according to claim 1, characterized in that: The generating a total loss value between the preset segmentation map and the predicted segmentation map by using a cross entropy loss function, a Dice loss function and a predefined generating method includes: Obtaining a cross entropy loss value between the preset segmentation map and the predicted segmentation map through the cross entropy loss function, and obtaining a Dice loss value between the preset segmentation map and the predicted segmentation map through the Dice loss function; The cross entropy loss value and the Dice loss value are added to generate a total loss value between the preset segmentation map and the predicted segmentation map.
6. The three-dimensional medical image segmentation method according to claim 1, characterized in that: When the total loss value is less than the preset loss value, a plurality of current two-dimensional medical images are determined according to the three-dimensional medical image, a current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained, and the current segmentation maps corresponding to the current two-dimensional medical images are combined to generate a segmentation result of the three-dimensional medical image, including: When the total loss value is less than a preset loss value, stop training the image segmentation model, save the trained image segmentation model, acquire a three-dimensional medical image, slice the three-dimensional medical image along a preset axis, and generate a plurality of current two-dimensional medical images, where the axis includes one of an X-axis, a Y-axis, or a Z-axis; Through the second encoder of the image segmentation model, the current image features corresponding to the current two-dimensional medical image are extracted, and the current image features corresponding to the current two-dimensional medical image are input into the trained image segmentation model, and the current segmentation map corresponding to the current two-dimensional medical image output by the trained image segmentation model is obtained, and the current segmentation maps corresponding to the current two-dimensional medical images are combined to generate the segmentation result of the three-dimensional medical image.
7. The three-dimensional medical image segmentation method according to any one of claims 1 to 6, characterized in that: When the total loss value is less than the preset loss value, a plurality of current two-dimensional medical images are determined according to the three-dimensional medical image, a current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model is obtained, and the current segmentation maps corresponding to the respective current two-dimensional medical images are combined to generate a segmentation result of the three-dimensional medical image. Then, the three-dimensional medical image segmentation method comprises: A preset storage area is acquired, and the current three-dimensional medical image and the segmentation result are stored in the storage area.
8. A three-dimensional medical image segmentation device, characterized in that: include: A first acquisition module is used to acquire a preset two-dimensional medical image, combine the preset two-dimensional medical image and a preset segmentation map corresponding to the preset two-dimensional medical image into a sample, and combine different samples into a training set; An extraction module, used for training a preset image segmentation model based on the training set, and extracting preset image features of the preset two-dimensional medical image through a first encoder of the image segmentation model; A second acquisition module, used for acquiring a first hidden state sequence vector and a second hidden state sequence vector corresponding to the preset image feature through a bidirectional GRU layer of the image segmentation model; A third acquisition module, configured to acquire a predicted segmentation map according to the first hidden state sequence vector, the second hidden state sequence vector and a predefined acquisition method; A first generating module, used to generate a total loss value between the preset segmentation map and the predicted segmentation map through a cross entropy loss function, a Dice loss function and a predefined generating method; The second generation module is used to determine multiple current two-dimensional medical images based on the three-dimensional medical image when the total loss value is less than the preset loss value, obtain the current segmentation map corresponding to the current two-dimensional medical image output by the image segmentation model, combine the current segmentation maps corresponding to each of the current two-dimensional medical images, and generate the segmentation result of the three-dimensional medical image.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the three-dimensional medical image segmentation method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the three-dimensional medical image segmentation method according to any one of claims 1 to 7 are implemented.
