Model training method and electronic equipment
Through the introduction of the path to discard the path in the original segmentation model of the lung swelling model, to discard the residual block path randomly, solve the problem of low accuracy of the accuracy of emphysema division model in existing technologies and disappear. High division accuracy and model stability.
Patent Information
- Application Number
- CN202411470412.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-01-24
AI Technical Summary
The model training method in existing deep learning technologies has led to low accuracy of emphysema segmentation model, and there are problems of gradient disappearance and overfitting.
Through the introduction of the path in the original segmentation model, the path corresponding to the residual block is randomly discarded to enhance the stability and performance of the model during the training process.
While maintaining the depth of the model, it effectively improves the stability and performance of the emphysema split model, reduces the problem of gradient disappearance and overfitting, thereby improving the accuracy of emphysema division.
Smart Images

Figure CN119359678A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of model training technology, and in particular to a model training method and electronic equipment. Background Art
[0002] Emphysema segmentation is a critical task in medical image analysis, especially crucial for timely diagnosis and treatment of emphysema.
[0003] Deep learning techniques, especially convolutional neural networks (CNNs), have been widely used in emphysema segmentation.
[0004] However, the model training method in the current deep learning technology has the problem that the accuracy of emphysema segmentation of the trained emphysema segmentation model is low, which needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present invention provide a model training method and electronic equipment, which improve the accuracy of emphysema segmentation of the trained emphysema segmentation model.
[0006] According to one aspect of the present invention, a model training method is provided, which may include: obtaining an original segmentation model, and determining a sample emphysema image containing emphysema, and an emphysema segmentation label of the sample emphysema image for emphysema, wherein the original segmentation model includes at least a first residual block, the first residual block includes at least a first path discarding layer, and the first path discarding layer is used to randomly discard the path corresponding to the first residual block; based on the sample emphysema image and the emphysema segmentation label, the original segmentation model is trained, and the emphysema segmentation model is determined based on the obtained training results.
[0007] According to another aspect of the present invention, an electronic device is provided, which may include: 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 model training method provided by any embodiment of the present invention is implemented when the at least one processor executes it.
[0008] The technical solution of the embodiment of the present invention is to obtain an original segmentation model, determine a sample emphysema image containing emphysema, and an emphysema segmentation label of the sample emphysema image for emphysema, wherein the original segmentation model includes at least a first residual block, the first residual block includes at least a first path discarding layer, and the first path discarding layer is used to randomly discard the path corresponding to the first residual block, so that the path corresponding to the first residual block can be randomly discarded when training the original segmentation model; based on the sample emphysema image and the emphysema segmentation label, the original segmentation model is trained, and the emphysema segmentation model is determined according to the obtained training results to obtain an emphysema segmentation model that can segment emphysema. The above technical solution, through the first path discarding layer in the original segmentation model, randomly discards the path corresponding to the first residual block, so that the trained emphysema segmentation model can effectively improve the stability and performance of the model while maintaining the model depth, reduce the problems of gradient disappearance and overfitting, and thus improve the accuracy of emphysema segmentation of the trained emphysema segmentation model.
[0009] 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
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. 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.
[0011] Figure 1 is a flow chart of a model training method provided according to an embodiment of the present invention;
[0012] Figure 2 is a flowchart of another model training method provided according to an embodiment of the present invention;
[0013] Figure 3 is a flowchart of another model training method provided according to an embodiment of the present invention;
[0014] Figure 4 is a flowchart of an optional example of another model training method provided according to an embodiment of the present invention;
[0015] Figure 5 is a flowchart of data flow in a residual convolution layer in an optional example of another model training method provided in an embodiment of the present invention;
[0016] Figure 6is a structural block diagram of a model training device provided according to an embodiment of the present invention;
[0017] Figure 7 It is a structural schematic diagram of an electronic device for implementing the model training method of an embodiment of the present invention. DETAILED DESCRIPTION
[0018] 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.
[0019] 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 interchangeable 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. The situations of "target", "original", etc. are similar and will not be repeated here. 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 comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0020] Before introducing the embodiments of the present invention, the implementation process of the current model training scheme and the reasons for the low accuracy of emphysema segmentation of the trained emphysema segmentation model are explained by way of example, so as to better understand why the scheme proposed in the embodiments of the present invention improves the accuracy of emphysema segmentation of the trained emphysema segmentation model.
[0021] For example, although significant progress has been made in the field of emphysema segmentation in recent years, it still faces many challenges. Classic segmentation networks such as U-Net (Convolutional Networks for Biomedical Image Segmentation) and its variants have become mainstream. U-Net adopts an encoder-decoder structure and effectively captures information of different scales through symmetrical downsampling and upsampling operations. It is particularly suitable for medical image segmentation tasks. The skip connections in U-Net can directly transfer the features of the encoder layer to the corresponding decoder layer, so that the model can retain and restore fine spatial information, thereby improving the accuracy of segmentation. U-Net has a relatively simple structure, requires less computing resources, and can achieve excellent performance on small data sets. However, emphysema usually only occupies a small part of medical images, and the emphysema of different objects in medical images has significant differences in shape and size, leading to data imbalance. This imbalance not only affects the learning effect of the model, but also makes it easy for the model to ignore smaller hemorrhage areas or generate false positives for non-hemorrhage areas. In addition, emphysema has various manifestations in medical images, which may have different shapes, sizes and positions, which further increases the complexity of the emphysema segmentation task, especially when the boundary of the hemorrhage area is blurred or the contrast with the surrounding tissue is low, the difficulty of segmentation increases significantly. In order to solve the above problems, the network depth is usually increased. However, with the increase of network depth, the number of parameters and computational complexity of U-Net also increase rapidly, which will increase the difficulty of training and easily cause gradient vanishing or explosion problems, affecting the stability and performance of the model, so that the accuracy of emphysema segmentation of the trained emphysema segmentation model is low.
[0022] In view of this, the embodiment of the present invention randomly discards the path corresponding to the first residual block through the first path discarding layer in the original segmentation model, so that the trained emphysema segmentation model can effectively improve the stability and performance of the model while maintaining the model depth, reduce the problems of gradient disappearance and overfitting, and thus improve the accuracy of emphysema segmentation of the trained emphysema segmentation model. This will be explained in detail below.
[0023] Figure 1 It is a flow chart of a model training method provided in an embodiment of the present invention. This embodiment is applicable to the case of model training, and is particularly applicable to the case of obtaining an emphysema segmentation model through model training. The method can be executed by a model training device provided in an embodiment of the present invention, and the device can be implemented by software and / or hardware, and the device can be integrated on an electronic device, and the electronic device can be various user terminals or servers.
[0024] See also Figure 1The method of the embodiment of the present invention specifically includes the following steps:
[0025] S110, obtaining an original segmentation model, and determining a sample emphysema image containing emphysema, and an emphysema segmentation label of the sample emphysema image for emphysema, wherein the original segmentation model includes at least a first residual block, the first residual block includes at least a first path discarding layer, and the first path discarding layer is used to randomly discard a path corresponding to the first residual block.
[0026] Among them, the original segmentation model is an untrained model that can segment emphysema; the original segmentation model can adopt a U-Net network structure, for example. In the embodiment of the present invention, the structure and parameters of the original segmentation model are not specifically limited. The sample emphysema image can be a medical image containing emphysema used to train the original segmentation model; the sample emphysema image can be, for example, a three-dimensional computed tomography (CT) image or a magnetic resonance imaging (MRI) image. The emphysema segmentation label is a label of the emphysema segmentation result obtained after performing emphysema segmentation on the sample emphysema image. The first residual block is a block that can perform residual convolution; the number of the first residual blocks can be one or more, and the first residual block can refer to any residual block in the original segmentation model. The first path drop layer is a layer used to randomly drop the path corresponding to the first residual block.
[0027] In the embodiment of the present invention, the number of sample emphysema images may be one or more, each sample emphysema image may correspond to an emphysema segmentation label, and each sample emphysema image and its corresponding emphysema segmentation label may be used as a group of training samples. Taking training sample i as an example, training sample i may include sample emphysema image x (i) And its corresponding emphysema segmentation label y (i) ,y (i) and x (i) have the same size, y (i) The value of the emphysema region in may be 1, and the value of other normal regions without emphysema may be 0. In the embodiment of the present invention, the method of determining the sample emphysema image containing emphysema and the emphysema segmentation label of the sample emphysema image for emphysema is not specifically limited.
[0028] It should be noted that the first residual block, the second residual block, the third residual block and the fourth residual block and other related expressions below are essentially residual blocks. The different names here are just to distinguish the residual blocks in different application scenarios, and are not specific limitations on their substantive content. The first path drop layer, the second path drop layer, the third path drop layer and the fourth path drop layer and other related expressions above are essentially path drop layers, and the situation is similar. In order to simplify the expression, it is no longer necessary to distinguish between residual blocks or path drop layers in different application scenarios, and they can be uniformly expressed as residual blocks or path drop layers.
[0029] It is understandable that in order to improve the accuracy of emphysema segmentation of the trained emphysema segmentation model, it is necessary to increase the network depth of the original segmentation model, for example, more residual convolutional networks can be introduced to enhance the segmentation efficiency. However, with the increase in the number of network layers, the gradient may gradually decay or expand during the back propagation process, resulting in gradient disappearance or gradient explosion, which not only makes it difficult to update the weights of the first few layers, but may also lead to instability of model parameters and drastic fluctuations in loss values during training, further increasing the difficulty of optimization; in addition, although the model with increased network depth has stronger fitting ability, in the case of small data sets or insufficient data diversity, the model may tend to overfit, that is, remember the details of the training data rather than learn features with strong generalization, resulting in poor performance on new data; skip connections can be used to alleviate the problem of model information loss to a certain extent, but with the increase in network depth, the contextual information transmission between distant layers may still be incomplete, resulting in a decrease in the accuracy of the feature map in spatial resolution, thereby affecting the detailed performance of the segmentation results. In order to solve the above problems, a path dropout layer can be set in the residual block of the model and applied to the residual convolutional network. Randomly removing part of the calculation path through the path dropout layer can effectively improve the stability and performance of the model while maintaining the depth of the model, alleviate the problems of gradient vanishing and overfitting, and ultimately improve the overall accuracy and robustness of the segmentation task.
[0030] It should be noted that the randomly discarded path corresponding to the residual block mentioned in the embodiment of the present invention refers to a specific line for signal propagation from the input to the output of the residual block. The path is usually composed of multiple convolutional layers, activation functions and residual connections (skip connections) to form a specific line for data to flow in the network. The path discarding layer randomly discards the path corresponding to the residual block, which means that the path discarding layer can randomly select and temporarily close the path corresponding to the residual block. Specifically, when a path is discarded, the output of the path will be ignored in the current forward propagation process, which is equivalent to the output of the path being zero.
[0031] S120: Based on the sample emphysema image and the emphysema segmentation label, the original segmentation model is trained, and the emphysema segmentation model is determined according to the obtained training result.
[0032] Among them, the emphysema segmentation model is a trained model that can segment emphysema.
[0033] In an embodiment of the present invention, the sample emphysema image can be input into the original segmentation model so that the original segmentation model performs model calculation to obtain the prediction result output by the original segmentation model, compare the prediction result and the emphysema segmentation label, calculate the loss by means of cross entropy loss, etc., and update the original segmentation model according to the calculated loss result to obtain the training result. In an embodiment of the present invention, there is no specific limitation on the method of training the original segmentation model based on the sample emphysema image and the emphysema segmentation label.
[0034] In an embodiment of the present invention, the original segmentation model can be trained based on the sample emphysema image and the emphysema segmentation label to obtain the training result, and the original segmentation model can be updated according to the training result, and then a new sample emphysema image containing emphysema and the emphysema segmentation label of the new sample emphysema image for emphysema are determined, and the original segmentation model is trained based on other sample emphysema images containing emphysema and the emphysema segmentation label of the sample emphysema image for emphysema to obtain the training result, and the original segmentation model is updated according to the training result, and so on, until the emphysema segmentation model is obtained or the sample emphysema image and the emphysema segmentation label cannot be determined, and the original segmentation model finally updated is used as the emphysema segmentation model. In an embodiment of the present invention, there is no specific limitation on the method of determining the emphysema segmentation model according to the obtained training result.
[0035] In an embodiment of the present invention, a three-dimensional sample emphysema image can be sliced along the z-axis to obtain a first preset number of two-dimensional slice images; the first preset number of slice images are grouped, each group having a second preset number of connected and adjacent slice images, or less than or equal to the second preset number of slice images; for each group, the slice images in the group are input into the original segmentation model to train the original segmentation model based on the slice images in the group and the emphysema segmentation labels.
[0036] In an embodiment of the present invention, before training the original segmentation model based on the sample emphysema image and the emphysema segmentation label, the sample emphysema image may be data enhanced by rotating, translating or adding noise, and the sample emphysema image may be updated according to the data enhancement result. For example, the number of sample emphysema images is a first number, and the number of updated sample emphysema images is a second number, and the second number is greater than the first number. After slicing the three-dimensional sample emphysema image, the first preset number of slice images may be data enhanced by rotating, translating or adding noise to obtain a third preset number of slice images, and the third preset number of slice images may be grouped, each group having a fourth preset number of slice images that are connected and adjacent, or less than or equal to the fourth preset number of slice images. For each group, the slice images in the group are input into the original segmentation model to train the original segmentation model according to the slice images and the emphysema segmentation label in the group. It should be noted that in the process of data enhancement of the sample emphysema image or slice image, the emphysema segmentation label corresponding to the sample emphysema image or slice image is also processed by corresponding data enhancement methods such as rotation, translation or noise addition.
[0037] The technical solution of the embodiment of the present invention is to obtain an original segmentation model, determine a sample emphysema image containing emphysema, and an emphysema segmentation label of the sample emphysema image for emphysema, wherein the original segmentation model includes at least a first residual block, the first residual block includes at least a first path discarding layer, and the first path discarding layer is used to randomly discard the path corresponding to the first residual block, so that the path corresponding to the first residual block can be randomly discarded when training the original segmentation model; based on the sample emphysema image and the emphysema segmentation label, the original segmentation model is trained, and the emphysema segmentation model is determined according to the obtained training results to obtain an emphysema segmentation model that can segment emphysema. The above technical solution, through the first path discarding layer in the original segmentation model, randomly discards the path corresponding to the first residual block, so that the trained emphysema segmentation model can effectively improve the stability and performance of the model while maintaining the model depth, reduce the problems of gradient disappearance and overfitting, and thus improve the accuracy of emphysema segmentation of the trained emphysema segmentation model.
[0038] An optional technical solution, the first residual block also includes a residual sub-network and a residual connection layer; based on the sample emphysema image and the emphysema segmentation label, the original segmentation model is trained, including: determining the first image processing result according to the sample emphysema image; processing the first image processing result based on the residual sub-network to obtain a residual sub-result; based on the first path discard layer, randomly discarding the residual sub-result to obtain a random discard result; based on the residual connection layer, performing residual connection processing on the image processing result and the random discard result to obtain a residual connection result; based on the residual connection result, determining the model output result, and training the original segmentation model according to the model output result and the emphysema segmentation label.
[0039] Among them, the residual subnetwork is a subnetwork that implements the function corresponding to the residual block, that is, the path corresponding to the first residual block randomly discarded by the first path discarding layer is the path corresponding to the residual subnetwork. The residual connection layer is a layer that performs residual connection processing on the image processing result and the random discarding result. The first image processing result is the result obtained by the network structure located before the first residual block in the original segmentation model to process the sample emphysema image. The residual sub-result is the result obtained by the residual sub-network processing the first image processing result. The random discarding result is the result obtained by randomly discarding the residual sub-result. The residual connection result is the result obtained by performing residual connection processing on the image processing result and the random discarding result based on the residual connection layer. The model output result is the output result of the original segmentation model.
[0040] In the embodiment of the present invention, the sample emphysema image can be processed by the network structure located before the first residual block in the data flow direction in the original segmentation model to obtain the first image processing result. In the embodiment of the present invention, the method for determining the first image processing result based on the sample emphysema image is not specifically limited.
[0041] In an embodiment of the present invention, for example, the first image processing result x can be input into the residual sub-network f to obtain a residual sub-result f(x), and the size of the residual sub-result can be consistent with the size of the first image processing result; the residual sub-result is input into the first path discarding layer to obtain a random discarding result g(f(x)), where g represents the random discarding operation of the first path discarding layer; based on the residual connection layer, the image processing result and the random discarding result are subjected to residual connection processing to obtain a residual connection result x+g(f(x)). It should be noted that, when the random discarding result g(f(x)) is discarded by the first path discarding layer, the residual connection result will be a separate first image processing result x, that is, the calculation path x=>f(x) is completely discarded; when the random discarding result g(f(x)) is not discarded, the residual connection result will be the conventional x+f(x). The above scheme can enhance the robustness of the model, that is, when the path corresponding to the first residual block is randomly discarded, the original segmentation model must rely on other paths to propagate information to prevent over-reliance on a single path, thereby improving the overall robustness of the model. In the embodiments of the present invention, there are no specific limitations on the method of processing the first image processing result based on the residual sub-network to obtain a residual sub-result, the method of performing random discarding processing on the residual sub-result based on the first path discarding layer to obtain a random discarding result, and the method of performing residual connection processing on the image processing result and the random discarding result based on the residual connection layer to obtain a residual connection result.
[0042] In an embodiment of the present invention, noise can be introduced into the first path drop layer and other path drop layers to prevent the original segmentation model from overfitting to the training data during the training process. For example, when the random drop result represents that the residual sub-result is discarded, noise can be added to the random drop result according to the noise addition rule, and the random drop result can be updated according to the noise addition result.
[0043] In the embodiment of the present invention, the residual connection result can be processed by the network structure located after the first residual block in the data flow direction in the original segmentation model to obtain the model output result. In the embodiment of the present invention, the method for determining the model output result based on the residual connection result is not specifically limited.
[0044] In an embodiment of the present invention, by randomly discarding the residual sub-results to randomly close the path corresponding to the first residual block, the original segmentation model can better adapt to different data distributions, thereby learning more diverse feature representations. It can also prevent the training of the original segmentation model from over-relying on a single path, thereby improving the overall robustness of the model and improving the accuracy of emphysema segmentation of the trained emphysema segmentation model.
[0045] Another optional technical solution is to determine a sample emphysema image containing emphysema, and an emphysema segmentation label of the sample emphysema image for emphysema, including: taking out the sample emphysema image from at least one alternative emphysema image containing emphysema, and determining the emphysema segmentation label of the sample emphysema image for emphysema; determining an emphysema segmentation model based on the obtained training results, including: updating the original segmentation model and determining an intermediate segmentation model based on the obtained training results; repeating the step of taking out the sample emphysema image from at least one alternative emphysema image containing emphysema when at least one alternative emphysema image is not emptied; and determining the emphysema segmentation model based on the obtained at least one intermediate segmentation model.
[0046] The candidate emphysema image is an image that is selected as a sample emphysema image; at least one candidate emphysema image can constitute a training set for training the original segmentation model. The intermediate segmentation model is a model that is selected as an emphysema segmentation model.
[0047] In the embodiment of the present invention, for example, a sample emphysema image may be taken out from at least one candidate emphysema image containing emphysema at any time or in a certain order, and an emphysema segmentation label of the sample emphysema image for emphysema may be determined. In the embodiment of the present invention, there is no specific limitation on the manner of taking out a sample emphysema image from at least one candidate emphysema image containing emphysema and determining an emphysema segmentation label of the sample emphysema image for emphysema.
[0048] In an embodiment of the present invention, a validation set may be obtained, the validation set including at least one validation emphysema image and at least one validation segmentation label corresponding to the validation emphysema image; at least one intermediate segmentation model is validated according to the validation set, and the intermediate segmentation model with the highest accuracy of the validation result obtained in the at least one intermediate segmentation model is used as the emphysema segmentation model. In an embodiment of the present invention, there is no specific limitation on the method of determining the emphysema segmentation model according to the obtained at least one intermediate segmentation model.
[0049] In an embodiment of the present invention, a third number of emphysema images to be selected and the selected segmentation labels corresponding to each of the emphysema images to be selected can be obtained, and the emphysema images to be selected can be CT images or MRI images; the third number of emphysema images to be selected and the selected segmentation labels corresponding to each of the emphysema images to be selected can be divided into a training set, a validation set and a test set according to a preset ratio, and the preset ratio can be 8:1:1, for example. The emphysema images to be selected in the training set are at least one candidate emphysema image, which is used to train the original segmentation model, the validation set is used to select the best performing model from at least one trained intermediate segmentation model as the emphysema segmentation model, and the test set is used to evaluate the performance of the emphysema segmentation model.
[0050] In an embodiment of the present invention, at least one intermediate segmentation model can be determined during the training process of the original segmentation model, and the emphysema segmentation model can be determined based on the at least one intermediate segmentation model obtained. The best performing model can be obtained as the emphysema segmentation model, thereby improving the accuracy of emphysema segmentation of the trained emphysema segmentation model.
[0051] Another optional technical solution, after determining the emphysema segmentation model based on the obtained training results, also includes: obtaining a target emphysema image containing emphysema to be segmented; based on the target emphysema image and the emphysema segmentation model, determining the emphysema segmentation result of the target emphysema image; wherein the model path discarding layer in the emphysema segmentation model does not randomly discard paths.
[0052] The target emphysema image is an emphysema image to be segmented; the target emphysema image may be, for example, a CT image or an MRI image. The model path drop layer may be understood as the path drop layer corresponding to the first path drop layer, the second path drop layer, the third path drop layer, and the fourth path drop layer in the original segmentation model in the emphysema segmentation model.
[0053] In the embodiment of the present invention, for example, the target emphysema image can be input into the emphysema segmentation model, and the emphysema segmentation result of the target emphysema image can be determined according to the output result of the emphysema segmentation model. In the embodiment of the present invention, the method of determining the emphysema segmentation result of the target emphysema image based on the target emphysema image and the emphysema segmentation model is not specifically limited.
[0054] In an embodiment of the present invention, path discarding may be effective only during training. During the testing and use phases, all paths will be re-enabled to ensure the integrity and stability of the network, that is, the model path discarding layer in the emphysema segmentation model does not randomly discard paths.
[0055] In an embodiment of the present invention, by not randomly discarding paths in the model path discarding layer in the emphysema segmentation model during the process of determining the emphysema segmentation result of the target emphysema image based on the target emphysema image and the emphysema segmentation model, the integrity and stability of the emphysema segmentation model can be ensured, thereby improving the accuracy of emphysema segmentation of the emphysema segmentation model.
[0056] Figure 2It is a flowchart of another model training method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the original segmentation model also includes a first processing network and a second processing network; based on the sample emphysema image and the emphysema segmentation label, the original segmentation model is trained, including: based on the first processing network, the sample emphysema image is processed to obtain a first processing result; based on the first residual block, the first processing result is processed to obtain a first block result; based on the second processing network, the first block result is processed to obtain a model output result; according to the model output result and the emphysema segmentation label, the original segmentation model is trained.
[0057] The explanations of the terms that are the same as or corresponding to the above embodiments are not repeated here.
[0058] See also Figure 2 The method of this embodiment may specifically include the following steps:
[0059] S210, obtaining an original segmentation model, and determining a sample emphysema image containing emphysema, and an emphysema segmentation label of the sample emphysema image for emphysema, wherein the original segmentation model includes at least a first residual block, the first residual block includes at least a first path discarding layer, the first path discarding layer is used to randomly discard the path corresponding to the first residual block, and the original segmentation model also includes a first processing network and a second processing network.
[0060] S220: Process the sample emphysema image based on the first processing network to obtain a first processing result.
[0061] The first processing network is a network located before the first residual block in the data flow direction in the original segmentation model. The first processing result is a result obtained by processing the sample emphysema image based on the first processing network.
[0062] In the embodiment of the present invention, there is no specific limitation on the structure of the first processing network and the method of processing the sample emphysema image based on the first processing network to obtain the first processing result.
[0063] S230: Based on the first residual block, process the first processing result to obtain a first block result.
[0064] The first block result is a result obtained by processing the first processing result based on the first residual block.
[0065] In the embodiment of the present invention, for example, the first image processing result can be processed based on the residual sub-network to obtain a residual sub-result; based on the first path drop layer, the residual sub-result is randomly dropped to obtain a random drop result; based on the residual connection layer, the image processing result and the random drop result are residually connected to obtain a residual connection result, and the residual connection result is used as the first block result. In the embodiment of the present invention, the method of processing the first processing result based on the first residual block to obtain the first block result is not specifically limited.
[0066] S240: Based on the second processing network, the first block result is processed to obtain a model output result.
[0067] The second processing network is a network located after the first residual block in the data flow direction in the original segmentation model. The second processing result is a result obtained by processing the first block result based on the second processing network.
[0068] In the embodiment of the present invention, there is no specific limitation on the structure of the second processing network and the manner of processing the first block result based on the second processing network to obtain the model output result.
[0069] S250. Training the original segmentation model according to the model output results and the emphysema segmentation label.
[0070] S260: Determine an emphysema segmentation model according to the obtained training results.
[0071] The technical solution of the embodiment of the present invention processes the sample emphysema image based on the first processing network to obtain the first processing result, and processes the first processing result based on the first residual block including the first path discarding layer to obtain the first block result, and finally processes the first block result based on the second processing network to obtain the model output result, and then trains the original segmentation model according to the model output result and the emphysema segmentation label, so as to realize the random discarding of the path corresponding to the randomly discarded first residual block, so as to effectively improve the stability and performance of the model while maintaining the depth of the first processing network and the second processing network of the trained emphysema segmentation model, alleviate the problems of gradient vanishing and overfitting, and thus improve the accuracy of emphysema segmentation of the trained emphysema segmentation model.
[0072] An optional technical solution, the first processing network also includes a third residual block, the third residual block at least includes a third path discarding layer, the third path discarding layer is used to randomly discard the path corresponding to the third residual block; based on the first processing network, the sample emphysema image is processed to obtain a first processing result, including: according to the sample emphysema image, determining the second image processing result; based on the third residual block, processing the second image processing result to obtain a third block result; based on the third block result, determining the first processing result.
[0073] Among them, the third residual block is a block in the original segmentation model that can perform residual convolution before the first residual block in the data flow direction; the number of the third residual blocks can be one or more, and the third residual block can refer to any residual block in the original segmentation model. The third path discarding layer is a layer for randomly discarding the path corresponding to the third residual block. The second image processing result is the result obtained by processing the sample emphysema image by the network structure located before the third residual block in the original segmentation model. The third block result is the result obtained by processing the second image processing result based on the third residual block.
[0074] In the embodiment of the present invention, the sample emphysema image can be processed by the network structure located before the third residual block in the data flow direction in the original segmentation model to obtain the second image processing result. In the embodiment of the present invention, the method for determining the second image processing result based on the sample emphysema image is not specifically limited.
[0075] In the embodiment of the present invention, one or more residual blocks including a path drop layer may be included before the first residual block in the data flow direction in the original segmentation model to randomly drop part of the path in the original segmentation model. It should be noted that multiple residual blocks may be included in the original segmentation model, but not every residual block includes a path drop layer.
[0076] In the embodiment of the present invention, the manner of processing the second image processing result based on the third residual block to obtain the third block result and the manner of processing the first processing result based on the first residual block to obtain the first block result may be the same as or different from the manner of processing the first processing result based on the first residual block to obtain the first block result. In the embodiment of the present invention, the manner of processing the second image processing result based on the third residual block to obtain the third block result is not specifically limited.
[0077] In the embodiment of the present invention, the third block result can be processed by the network structure located after the third residual block in the data flow direction in the original segmentation model to obtain the first processing result. In the embodiment of the present invention, the method for determining the first processing result based on the third block result is not specifically limited.
[0078] In an embodiment of the present invention, by including a third residual block of a third path discarding layer, it is possible to achieve random discarding of the paths corresponding to the third residual block, so as to randomly close the paths corresponding to the third residual block, so that the original segmentation model randomly discards the paths corresponding to multiple residual blocks through multiple path discarding layers, which can further better adapt to different data distributions, thereby learning more diverse feature representations, and can also prevent the training of the original segmentation model from over-relying on a single path, thereby improving the overall robustness of the model and improving the accuracy of emphysema segmentation of the trained emphysema segmentation model.
[0079] Another optional technical solution is that the second processing network includes a fourth residual block, the fourth residual block includes at least a fourth path discarding layer, and the fourth path discarding layer is used to randomly discard the path corresponding to the fourth residual block; based on the second processing network, the first block result is processed to obtain the model output result, including: determining the intermediate result based on the first block result; based on the fourth residual block, processing the intermediate result to obtain the fourth block result; based on the fourth block result, determining the model output result.
[0080] Among them, the fourth residual block is a block in the original segmentation model that can perform residual convolution after the first residual block in the data flow direction; the number of the fourth residual blocks can be one or more, and the fourth residual block can refer to any residual block in the original segmentation model. The fourth path drop layer is a layer for randomly dropping the path corresponding to the fourth residual block. The intermediate result is the result obtained by processing the first block result by the network structure located between the first residual block and the fourth residual block in the original segmentation model. The fourth block result is the result obtained by processing the intermediate result based on the fourth residual block.
[0081] In the embodiment of the present invention, the first block result can be processed by the network structure located between the first residual block and the fourth residual block in the original segmentation model to obtain the intermediate result. In the embodiment of the present invention, the method of determining the intermediate result based on the first block result is not specifically limited.
[0082] In the embodiment of the present invention, one or more residual blocks including a path discarding layer may be included after the first residual block in the data flow direction in the original segmentation model to randomly discard part of the paths in the original segmentation model.
[0083] In the embodiment of the present invention, the manner of processing the intermediate result based on the fourth residual block to obtain the fourth block result may be the same as or different from the manner of processing the first processing result based on the first residual block to obtain the first block result. In the embodiment of the present invention, the manner of processing the intermediate result based on the fourth residual block to obtain the fourth block result is not specifically limited.
[0084] In the embodiment of the present invention, the fourth block result can be processed by the network structure located after the fourth residual block in the data flow direction in the original segmentation model to obtain the model output result. In the embodiment of the present invention, the method for determining the model output result based on the fourth block result is not specifically limited.
[0085] In an embodiment of the present invention, by including a fourth residual block of a fourth path discarding layer, it is possible to achieve random discarding of the path corresponding to the fourth residual block, so as to randomly close the path corresponding to the fourth residual block, so that the original segmentation model randomly discards the paths corresponding to multiple residual blocks through multiple path discarding layers, which can further better adapt to different data distributions, thereby learning more diverse feature representations, and can also prevent the training of the original segmentation model from over-relying on a single path, thereby improving the overall robustness of the model and improving the accuracy of emphysema segmentation of the trained emphysema segmentation model.
[0086] Figure 3 It is a flowchart of another model training method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the original segmentation model also includes a residual convolutional network group, and the second processing network includes a processing sub-network; based on the second processing network, the first block result is processed to obtain a model output result, including: based on the processing sub-network, the first block result is processed to obtain a processing sub-result; based on the residual convolutional network group, the processing sub-result is processed to obtain a network group result; based on the processing sub-result and the network group result, the model output result is determined.
[0087] The explanations of the terms that are the same as or corresponding to the above embodiments are not repeated here.
[0088] See also Figure 3 The method of this embodiment may specifically include the following steps:
[0089] S310, obtaining an original segmentation model, and determining a sample emphysema image containing emphysema, and an emphysema segmentation label of the sample emphysema image for emphysema, wherein the original segmentation model includes at least a first residual block, the first residual block includes at least a first path discarding layer, the first path discarding layer is used to randomly discard the path corresponding to the first residual block, the original segmentation model also includes a first processing network and a second processing network, the original segmentation model also includes a residual convolutional network group, and the second processing network includes a processing sub-network.
[0090] S320: Process the sample emphysema image based on the first processing network to obtain a first processing result.
[0091] S330: Based on the first residual block, process the first processing result to obtain a first block result.
[0092] S340: Based on the processing sub-network, process the first block result to obtain a processing sub-result.
[0093] The processing subnetwork is a network located after the first residual block and before the residual convolution network group in the original segmentation model in the data flow direction. The processing subresult is a result obtained by processing the first block result based on the processing subnetwork.
[0094] In the embodiment of the present invention, the processing subnetwork may include one or more fourth residual blocks, and may also include other network structures. In the embodiment of the present invention, the structure of the processing subnetwork and the manner of processing the first block result based on the processing subnetwork to obtain the processing subresult are not specifically limited.
[0095] S350: Based on the residual convolutional network group, the processing sub-results are processed to obtain a network group result.
[0096] The residual convolution network group is a network group including a residual convolution network and a residual convolution downsampling network. The network group result is a result obtained by processing the processing sub-result based on the residual convolution network group.
[0097] In an embodiment of the present invention, the residual convolution network in the residual convolution network group may include one or more fourth residual blocks, or may not include a fourth residual block. In an embodiment of the present invention, the structure of the residual convolution network group, and the manner in which the processing sub-results are processed based on the residual convolution network group to obtain the network group result are not specifically limited.
[0098] In an embodiment of the present invention, the network structure before the residual convolutional network group may also include at least one group of residual convolutional networks and residual convolutional downsampling networks, and any one of the first residual block, the third residual block and the fourth residual block may be located in any residual convolutional network in at least one group of residual convolutional networks and residual convolutional downsampling networks; however, the difference between the residual convolutional network group and the at least one group of residual convolutional networks and residual convolutional downsampling networks before the residual convolutional network group is that only the output result of the residual convolutional network in the residual convolutional network group can be used as the input of the decoding network, while the output results of the residual convolutional network and the residual convolutional downsampling network in at least one group of residual convolutional networks and residual convolutional downsampling networks can both be used as the input of the decoding network.
[0099] S360: Determine the model output result based on the processing sub-results and the network group results.
[0100] In the embodiment of the present invention, the processing sub-results and the network group results can be processed by the network structure located after the residual convolution network group in the data flow direction in the original segmentation model, that is, the decoding network, to obtain the model output result. In the embodiment of the present invention, the method for determining the model output result based on the processing sub-results and the network group results is not specifically limited.
[0101] S370: Train the original segmentation model according to the model output results and the emphysema segmentation label.
[0102] S380: Determine an emphysema segmentation model according to the obtained training results.
[0103] The technical solution of the embodiment of the present invention is that the original segmentation model also includes a residual convolutional network group, and the second processing network includes a processing sub-network. Based on the processing sub-network, the first block result is processed to obtain a processing sub-result, and based on the residual convolutional network group, the processing sub-result is processed to obtain a network group result, and the model output result is determined based on the processing sub-result and the network group result, so as to increase the network depth of the original segmentation model through the residual convolutional network group, thereby improving the accuracy of emphysema segmentation of the trained emphysema segmentation model.
[0104] An optional technical solution, the second processing network also includes a decoding network, the decoding network includes a second residual block, the second residual block includes at least a second path discarding layer, and the second path discarding layer is used to randomly discard the path corresponding to the second residual block; based on the processing sub-results and the network group results, the model output result is determined, including: based on the decoding network, the processing sub-results and the network group results are processed to obtain the model output result.
[0105] The decoding network can be understood as the decoder in the original segmentation model. The second residual block is a block in the decoding network that can perform residual convolution; the number of the second residual blocks can be one or more, and the second residual block can refer to any residual block in the decoder. The second path discarding layer is a layer for randomly discarding the path corresponding to the second residual block.
[0106] In an embodiment of the present invention, the decoding network may include one or more residual blocks including a path drop layer to randomly drop part of the path in the decoding network. For example, the decoding network may include at least one residual convolution network, and any residual convolution network in the at least one residual convolution network may include a second residual block. In an embodiment of the present invention, the structure of the decoding network is not specifically limited.
[0107] In the embodiment of the present invention, there is no specific limitation on the manner of processing the sub-results and the network group results based on the decoding network to obtain the model output results.
[0108] In an embodiment of the present invention, by including a second residual block of a second path discarding layer, it is possible to achieve random discarding of the path corresponding to the second residual block, so as to randomly close the path corresponding to the second residual block, so that part of the path in the decoding network can be randomly discarded, which can further better adapt to different data distributions, thereby learning more diverse feature representations, and can also prevent the training of the original segmentation model from over-relying on a single path, thereby improving the overall robustness of the model and improving the accuracy of emphysema segmentation of the trained emphysema segmentation model.
[0109] In order to better understand the technical solution of the above embodiment of the present invention, an optional example is provided here. Figure 4 In an embodiment of the present invention, the original segmentation model may include a first convolutional network ( Figure 4 The first processing network is composed of a convolutional network and a portion of at least one network depth group located before the first residual block, and the second processing network is composed of a portion of at least one network depth group located after the first residual block, a residual convolutional network group and a decoding network; the network depth group may include a residual convolution downsampling network and a residual convolutional network; the residual convolutional network group may also include a residual convolution downsampling network and a residual convolutional network; the decoding network may include at least three residual convolutional networks, and the residual convolutional network in the decoding network may be used to splice and upsample and extract features of the encoding features corresponding to the input size in the channel dimension; any residual convolutional network in each residual convolutional network may include at least a residual block, and the residual block at least includes a path discarding layer, and the path discarding layer is used to randomly discard the path corresponding to the residual block. The sample emphysema image x of size h×w×d can be (i) Input into the original segmentation model so that the original segmentation model obtains a prediction result p of size h×w×d through the following steps (i) , and then through the prediction result p (i) And emphysema segmentation labels to train the original segmentation model: Based on the first convolutional network, the sample emphysema image x (i) The convolution result with the size of c×w×d is obtained by processing the first result based on the residual convolution downsampling network in the first network depth group, and the size of The first downsampling result is processed based on the residual convolution network in the first network depth group to obtain a size of The first residual convolution result is obtained by processing the first residual convolution result through the residual convolution downsampling network in the second network depth group to obtain the second downsampling result, and so on, until the L-2 residual convolution result is processed by the residual convolution downsampling network in the L-1th network depth group, that is, the L-2th residual convolution result is processed by the residual convolution downsampling network in the last network depth group to obtain a size of c L-1 × L-1 ×d L-1 The L-1th down-sampling result is processed based on the residual convolution network in the L-1th network depth group to obtain a size of c L-1 × L-1 ×d L-1 The L-1th residual convolution result is processed by the residual convolution downsampling network in the residual convolution network group to obtain a size of c L × L ×d L The L-th down-sampling result is processed based on the residual convolution network in the residual convolution network group to obtain a size of c L × L ×d L The Lth residual convolution result is upsampled, and based on the first residual convolution network in the decoding network, the first upsampling result and the L-1th residual convolution result are processed to obtain a size of c L-1 ×h L-1 × L-1 ×d L-1 The L-1th residual convolution decoding result is obtained; based on the second residual convolution network in the decoding network, the L-1th residual convolution decoding result and the L-1th downsampling result are processed to obtain a size of c L-1 ×h L-1 × L-1 ×d L-1 The L-1th down-sampling decoding result is obtained; based on the third residual convolution network in the decoding network, the L-1th down-sampling decoding result and the L-2th residual convolution result are processed to obtain the L-2th residual convolution decoding result, and so on, until the first down-sampling decoding result and the first residual convolution result are processed based on the third to last residual convolution network in the decoding network to obtain a size of The first residual convolution decoding result is obtained, and based on the penultimate residual convolution network in the decoding network, the first residual convolution decoding result and the first downsampling result are processed to obtain a size of The first down-sampling decoding result is up-sampled, and based on the last residual convolution network in the decoding network, the second up-sampling result and the convolution result are processed to obtain the prediction result p (i) And output.
[0110] It should be noted that the above residual convolution downsampling network may include at least three second convolution networks, for example, the residual convolution downsampling network may include three second convolution networks, and the input data of the residual convolution downsampling network with a size of c1×w×d may be input into the first second convolution network with a step size of 2 to obtain a size of The first intermediate feature is input into the second convolutional network with a step size of 1, and the size is The second intermediate feature is input into the third second convolutional network with a step size of 2, and the size is obtained. The third intermediate feature of Jiang is concatenated with the second intermediate feature in the channel dimension to obtain a size of The final output result of the residual convolution downsampling network. The size parameters mentioned in the data processing of the residual convolution downsampling network do not have the same meaning as the size parameters mentioned in the data processing of the original segmentation model. The size parameters mentioned in the data processing of the residual convolution downsampling network are only used in the data processing of the residual convolution downsampling network.
[0111] It should be noted that see Figure 5 , the residual convolution network may include, for example, at least one residual block, which may include any residual block among the first residual block, the second residual block, the third residual block and the fourth residual block, or other residual blocks, and each residual block may include two third convolution networks ( Figure 5The invention relates to a convolutional network in the present invention, a random dropout layer and a residual connection layer for performing addition operations; the input data x of the residual convolutional network with a size of h×w×d can be input into the first third convolutional network in the first residual block to obtain a residual intermediate result with a size of 4h×w×d, and the residual intermediate result is input into the second third convolutional network to obtain a residual sub-result with a size of h×w×d; based on the first path dropout layer, the residual sub-result is randomly dropped to obtain a random dropout result, and based on the residual connection layer, the image processing result and the random dropout result are residually connected to obtain a residual connection result; the residual connection result is input into the first third convolutional network in the second residual block to obtain a residual intermediate result, and so on, until the residual connection layer of the last residual block is passed to obtain the residual connection result of the last residual connection layer, and the residual connection result of the last residual connection layer is used as the output result of the residual convolutional network. Among them, the size parameters mentioned in the data processing process of the residual convolution network do not have the same meaning as the size parameters mentioned in the data processing process of the above-mentioned original segmentation model. The size parameters mentioned in the data processing process of the residual convolution network are only used in the data processing process of the residual convolution downsampling network.
[0112] Figure 6 This is a structural block diagram of a model training device provided in an embodiment of the present invention, and the device is used to execute the model training method provided in any of the above embodiments. The device and the model training method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the model training device can refer to the embodiment of the above model training method. Figure 6 The device may specifically include: an emphysema segmentation label determination module 410 and an emphysema segmentation model determination module 420.
[0113] Among them, the emphysema segmentation label determination module 410 is used to obtain the original segmentation model and determine the sample emphysema image containing emphysema, and the emphysema segmentation label of the sample emphysema image for emphysema, wherein the original segmentation model includes at least a first residual block, and the first residual block includes at least a first path discarding layer, and the first path discarding layer is used to randomly discard the path corresponding to the first residual block; the emphysema segmentation model determination module 420 is used to train the original segmentation model based on the sample emphysema image and the emphysema segmentation label, and determine the emphysema segmentation model based on the obtained training results.
[0114] Optionally, the first residual block also includes a residual subnetwork and a residual connection layer; the emphysema segmentation model determination module 420 includes: a first image processing result determination submodule, which is used to determine the first image processing result based on the sample emphysema image; a residual subresult acquisition submodule, which is used to process the first image processing result based on the residual subnetwork to obtain a residual subresult; a random discard result acquisition submodule, which is used to randomly discard the residual subresult based on the first path discard layer to obtain a random discard result; a residual connection result acquisition submodule, which is used to perform residual connection processing on the image processing result and the random discard result based on the residual connection layer to obtain a residual connection result; a first original segmentation model training submodule, which is used to determine the model output result based on the residual connection result, and train the original segmentation model according to the model output result and the emphysema segmentation label.
[0115] Optionally, the original segmentation model also includes a first processing network and a second processing network; the emphysema segmentation model determination module 420 includes: a first processing result obtaining submodule, used to process the sample emphysema image based on the first processing network to obtain a first processing result; a first block result obtaining submodule, used to process the first processing result based on the first residual block to obtain a first block result; a model output result obtaining submodule, used to process the first block result based on the second processing network to obtain a model output result; a second original segmentation model training submodule, used to train the original segmentation model according to the model output result and the emphysema segmentation label.
[0116] Optionally, based on the above-mentioned device, the original segmentation model also includes a residual convolutional network group, and the second processing network includes a processing sub-network; the model output result obtaining sub-module includes: a third processing result determination unit, which is used to process the first block result based on the processing sub-network to obtain a processing sub-result; a network group result obtaining unit, which is used to process the processing sub-result based on the residual convolutional network group to obtain a network group result; and a first model output result determination unit, which is used to determine the model output result based on the processing sub-result and the network group result.
[0117] Optionally, based on the above-mentioned device, the second processing network also includes a decoding network, the decoding network includes a second residual block, the second residual block includes at least a second path discarding layer, and the second path discarding layer is used to randomly discard the path corresponding to the second residual block; the first model output result determination unit includes: a model output result obtaining sub-unit, which is used to process the processing sub-results and the network group results based on the decoding network to obtain the model output result.
[0118] Optionally, based on the above-mentioned device, the first processing network also includes a third residual block, the third residual block includes at least a third path discarding layer, and the third path discarding layer is used to randomly discard the path corresponding to the third residual block; the first processing result obtaining submodule includes: a second image processing result determination unit, used to determine the second image processing result according to the sample emphysema image; a third block result obtaining unit, used to process the second image processing result based on the third residual block to obtain a third block result; and a first processing result determination unit, used to determine the first processing result based on the third block result.
[0119] Optionally, based on the above-mentioned device, the second processing network includes a fourth residual block, the fourth residual block includes at least a fourth path discarding layer, and the fourth path discarding layer is used to randomly discard the path corresponding to the fourth residual block; the model output result obtaining submodule includes: an intermediate result determination unit, used to determine the intermediate result according to the first block result; a fourth block result obtaining unit, used to process the intermediate result based on the fourth residual block to obtain a fourth block result; a second model output result determination unit, used to determine the model output result based on the fourth block result.
[0120] Optionally, the emphysema segmentation label determination module 410 includes: an emphysema segmentation label determination submodule, which is used to extract a sample emphysema image from at least one alternative emphysema image containing emphysema, and determine the emphysema segmentation label of the sample emphysema image for emphysema; an emphysema segmentation model determination module 420, which includes: an intermediate segmentation model determination submodule, which is used to update the original segmentation model and determine an intermediate segmentation model based on the obtained training results; a repeated execution submodule, which is used to repeatedly execute the step of extracting a sample emphysema image from at least one alternative emphysema image containing emphysema when at least one alternative emphysema image is not emptied; and an emphysema segmentation model determination submodule, which is used to determine the emphysema segmentation model based on the obtained at least one intermediate segmentation model.
[0121] Optionally, the device may also include: a target emphysema image acquisition module, used to acquire a target emphysema image containing emphysema to be segmented after determining the emphysema segmentation model based on the obtained training results; an emphysema segmentation result determination module, used to determine the emphysema segmentation result of the target emphysema image based on the target emphysema image and the emphysema segmentation model; wherein the model path discarding layer in the emphysema segmentation model does not randomly discard paths.
[0122] The model training device provided by the embodiment of the present invention obtains the original segmentation model through the emphysema segmentation label determination module, and determines the sample emphysema image containing emphysema, and the emphysema segmentation label of the sample emphysema image for emphysema, wherein the original segmentation model includes at least a first residual block, and the first residual block includes at least a first path discarding layer, and the first path discarding layer is used to randomly discard the path corresponding to the first residual block, so that the path corresponding to the first residual block can be randomly discarded when training the original segmentation model; through the emphysema segmentation model determination module, based on the sample emphysema image and the emphysema segmentation label, the original segmentation model is trained, and the emphysema segmentation model is determined according to the obtained training results to obtain an emphysema segmentation model that can segment emphysema. The above device, through the first path discarding layer in the original segmentation model, randomly discards the path corresponding to the first residual block, so that the trained emphysema segmentation model can effectively improve the stability and performance of the model while maintaining the model depth, reduce the problems of gradient disappearance and overfitting, and thus improve the accuracy of emphysema segmentation of the trained emphysema segmentation model.
[0123] The model training device provided in the embodiment of the present invention can execute the model training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0124] It is worth noting that in the embodiment of the above-mentioned model training device, the various units and modules included 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 scope of protection of the present invention.
[0125] Figure 7 A 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.
[0126] like Figure 7As 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.
[0127] 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.
[0128] 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 dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a model training method.
[0129] In some embodiments, the model training 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 model training method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the model training method in any other appropriate manner (e.g., by means of firmware).
[0130] 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.
[0131] 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 as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0132] 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.
[0133] 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).
[0134] 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.
[0135] 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.
[0136] 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.
[0137] 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 model training method, characterized in that: include: Acquire an original segmentation model, and determine a sample emphysema image containing emphysema, and an emphysema segmentation label of the sample emphysema image for the emphysema, wherein the original segmentation model includes at least a first residual block, the first residual block includes at least a first path discarding layer, and the first path discarding layer is used to randomly discard a path corresponding to the first residual block; The original segmentation model is trained based on the sample emphysema image and the emphysema segmentation label, and the emphysema segmentation model is determined according to the obtained training result.
2. The method according to claim 1, characterized in that The first residual block also includes a residual sub-network and a residual connection layer; The training of the original segmentation model based on the sample emphysema image and the emphysema segmentation label comprises: Determining a first image processing result according to the sample emphysema image; Based on the residual sub-network, processing the first image processing result to obtain a residual sub-result; Based on the first path discarding layer, randomly discarding the residual sub-result to obtain a random discarding result; Based on the residual connection layer, performing residual connection processing on the image processing result and the random discarding result to obtain a residual connection result; Based on the residual connection result, a model output result is determined, and according to the model output result and the emphysema segmentation label, the original segmentation model is trained.
3. The method according to claim 1, characterized in that The original segmentation model also includes a first processing network and a second processing network; The training of the original segmentation model based on the sample emphysema image and the emphysema segmentation label comprises: Based on the first processing network, processing the sample emphysema image to obtain a first processing result; Based on the first residual block, processing the first processing result to obtain a first block result; Based on the second processing network, the first block result is processed to obtain a model output result; The original segmentation model is trained according to the model output result and the emphysema segmentation label.
4. The method according to claim 3, characterized in that The original segmentation model also includes a residual convolutional network group, and the second processing network includes a processing subnetwork; The processing of the first block result based on the second processing network to obtain a model output result includes: Based on the processing sub-network, processing the first block result to obtain a processing sub-result; Based on the residual convolutional network group, processing the processing sub-results to obtain a network group result; Based on the processing sub-results and the network group results, a model output result is determined.
5. The method according to claim 4, characterized in that The second processing network further includes a decoding network, the decoding network includes a second residual block, the second residual block includes at least a second path discarding layer, and the second path discarding layer is used to randomly discard the path corresponding to the second residual block; The determining of the model output result based on the processing sub-result and the network group result includes: Based on the decoding network, the processing sub-results and the network group results are processed to obtain a model output result.
6. The method according to claim 3, characterized in that The first processing network further includes a third residual block, the third residual block at least includes a third path discarding layer, and the third path discarding layer is used to randomly discard the path corresponding to the third residual block; The step of processing the sample emphysema image based on the first processing network to obtain a first processing result includes: Determining a second image processing result according to the sample emphysema image; Based on the third residual block, processing the second image processing result to obtain a third block result; Based on the third block of results, the first processing result is determined.
7. The method according to claim 3, characterized in that The second processing network includes a fourth residual block, the fourth residual block includes at least a fourth path discarding layer, and the fourth path discarding layer is used to randomly discard the path corresponding to the fourth residual block; The processing of the first block result based on the second processing network to obtain a model output result includes: Determine an intermediate result according to the first block of results; Based on the fourth residual block, processing the intermediate result to obtain a fourth block result; Based on the fourth block of results, the model output results are determined.
8. The method according to claim 1, characterized in that The determining of a sample emphysema image containing emphysema and an emphysema segmentation label of the sample emphysema image for the emphysema comprises: Taking a sample emphysema image from at least one candidate emphysema image containing emphysema, and determining an emphysema segmentation label of the sample emphysema image for the emphysema; Determining the emphysema segmentation model according to the obtained training results includes: According to the obtained training results, the original segmentation model is updated and an intermediate segmentation model is determined; In the case that the at least one candidate emphysema image is not empty, repeatedly performing the step of extracting a sample emphysema image from the at least one candidate emphysema image containing emphysema; A pulmonary emphysema segmentation model is determined based on the obtained at least one intermediate segmentation model.
9. The method according to claim 1, characterized in that: After determining the emphysema segmentation model according to the obtained training results, the method further includes: Acquire a target emphysema image containing the emphysema to be segmented; Determining an emphysema segmentation result of the target emphysema image based on the target emphysema image and the emphysema segmentation model; Wherein, the model path discarding layer in the emphysema segmentation model does not randomly discard the path.
10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed 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 performs the model training method as described in any one of claims 1-9.