A model training method, an image segmentation method and related devices
Through the training method of two processing models generating label information for interactive supervision, the problem of insufficient model overfitting and generalization capabilities in medical image segmentation is solved, and accurate segmentation under partial labeling data is achieved.
Patent Information
- Application Number
- CN202210613278.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-31
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-05-31
AI Technical Summary
In medical image segmentation, the labels are difficult to obtain, resulting in the possibility of overfitting during model training and the model generalization ability is insufficient.
Two processing models are used to generate label information for each other, train them through interactive supervision, use labelless data for model training, and generate pseudo label information through gradient isolation and distance regression to adjust model parameters.
It reduces the possibility of overfitting, improves the generalization ability of the model, and can train an accurate segmentation model under partial annotation data.
Smart Images

Figure CN115035133B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technologies, and in particular, to a model training method, an image segmentation method, and related devices. Background Art
[0002] Medical image segmentation is a complex and crucial step in the process of medical image processing and analysis. Its purpose is to segment out parts with certain special meanings in medical images, provide a reliable basis for clinical diagnosis and treatment and pathological research, and assist doctors in giving more accurate diagnoses.
[0003] Medical images have high complexity and lack simple linear features. In addition, the accuracy of the segmentation results is also affected by factors such as partial volume effect, gray-scale inhomogeneity, artifacts, the proximity of gray-scales between different soft tissues, individual differences among different patients, and different manifestations of the same disease. In recent years, medical image segmentation algorithms based on deep learning have gradually developed. However, since it is difficult to obtain labels for medical images, there is often a situation where only some data has labels during model training, which has a great impact on model training. Summary of the Invention
[0004] This application provides at least a model training method, an image segmentation method, and related devices.
[0005] This application provides a training method for a segmentation model. The method includes: processing a sample image using a first processing model to obtain a first segmentation result, and processing the sample image using a second processing model to obtain a second segmentation result; generating first annotation information based on the first segmentation result, and generating second annotation information based on the second segmentation result; adjusting the parameters of the first processing model based on the first segmentation result and first reference information, and adjusting the parameters of the second processing model based on the second segmentation result and second reference information, where the first reference information includes the second annotation information, and the second reference information includes the first annotation information.
[0006] Therefore, by having two processing models generate annotation information for each other, enabling the two models to interact and supervise each other during training, it is possible to make full use of unlabeled data to train the models, and compared with training a single model, it can reduce the possibility of overfitting and improve the generalization ability of the models.
[0007] Among them, processing the sample image using the first processing model to obtain a first segmentation result includes: performing object segmentation on the sample image using the first processing model to obtain a first segmentation result regarding the target object; and, processing the sample image using the second processing model to obtain a second segmentation result, including: performing object segmentation on the sample image using the second processing model to obtain a second segmentation result regarding the target object; or, performing distance regression on the sample image using the second processing model to obtain a predicted distance result, where the predicted distance result represents the distance between each pixel point in the sample image and the predicted boundary, and the predicted boundary is the boundary of the predicted region corresponding to the target object in the sample image; based on the predicted distance result, obtaining a second segmentation result regarding the target object.
[0008] Therefore, the first processing model and the second processing model can adopt the same processing method for the image, or different processing methods can also be adopted between the two models. If different processing methods are adopted, different perspectives of information about the image can be learned between the two models for complementarity, thereby improving the generalization ability of the models.
[0009] Among them, the predicted distance result is a predicted distance map, and the value of each pixel point in the predicted distance map is used to represent the distance between the corresponding pixel point in the sample image and the predicted boundary; based on the predicted distance result, obtaining a second segmentation result regarding the target object includes: using a preset binarization method to perform binarization processing on the predicted distance map to obtain a second segmentation result regarding the target object.
[0010] Therefore, by performing binarization processing on the predicted distance map obtained through distance regression, the region corresponding to the target object and other regions can be roughly distinguished from the predicted distance map, so a second segmentation result can be obtained for subsequent adjustment of model parameters.
[0011] Among them, both the first segmentation result and the second segmentation result have gradient attributes; generating first annotation information based on the first segmentation result includes: obtaining a copy of the first segmentation result and isolating the gradient of the copy of the first segmentation result to obtain first annotation information without gradient attributes; generating second annotation information based on the second segmentation result includes: obtaining a copy of the second segmentation result and isolating the gradient of the copy of the second segmentation result to obtain second annotation information without gradient attributes.
[0012] Therefore, the first annotation information is generated through the first segmentation result, and the second annotation information is generated through the second segmentation result. Thus, interactive supervision between the two models is achieved, enabling the two models to complement each other, enabling the two models to learn from each other's advantages, improving the generalization ability of the models, and through the gradient isolation operation, annotation information can be generated using segmentation information for subsequent realization of interactive supervision.
[0013] Among them, the first reference information and the second reference information further include the true annotation information of the sample image; adjusting the parameters of the first processing model based on the first segmentation result and the first reference information includes: adjusting the parameters of the first processing model based on the difference between the first segmentation result and the second annotation information and the difference between the first segmentation result and the true annotation information; adjusting the parameters of the second processing model based on the second segmentation result and the second reference information includes: adjusting the parameters of the second processing model based on the difference between the second segmentation result and the first annotation information and the difference between the second segmentation result and the true annotation information.
[0014] Therefore, by adjusting the parameters of the processing model according to the differences between the segmentation result, the annotation information, and the true annotation information, the model can learn the information in the true annotation information and the annotation information generated based on the segmentation result, so as to perform segmentation more accurately.
[0015] Among them, before adjusting the parameters of the second processing model based on the difference between the second segmentation result and the first annotation information and the difference between the second segmentation result and the true annotation information, the method further includes: when the second processing model processes the sample image and outputs a predicted distance result, performing a distance transformation based on the true annotation information to obtain true distance information; wherein, the predicted distance result is used to obtain the second segmentation result and represents the distance between each pixel point in the sample image and the predicted boundary, the predicted boundary is the boundary of the predicted region corresponding to the target object in the sample image, the true distance information represents the distance between each pixel point in the sample image and the true boundary, and the true boundary is the boundary of the true region corresponding to the target object in the sample image; adjusting the parameters of the second processing model based on the difference between the second segmentation result and the first annotation information, the difference between the second segmentation result and the true annotation information, and the difference between the predicted distance result and the true distance information includes: adjusting the parameters of the second processing model based on the difference between the second segmentation result and the first annotation information, the difference between the second segmentation result and the true annotation information, and the difference between the predicted distance result and the true distance information.
[0016] Therefore, by converting the true annotation information into true distance information for comparison with the predicted distance result and adjusting the parameters of the second processing model according to the difference between the two, the second processing model can learn from the true distance information and make the predicted distance result closer to the true distance information.
[0017] Among them, the true distance information is a true distance map, and the values of the pixels in the true distance map are used to represent the distance between the corresponding pixels in the sample image and the true boundary; performing distance transformation based on the true annotation information to obtain the true distance information, including: based on the true annotation information, determining the true region in the sample image as the foreground and the remaining regions as the background; respectively performing distance transformation and normalization processing on the foreground and background in the sample image to obtain a foreground distance map and a background distance map; using the foreground distance map and the background distance map to perform subtraction processing to obtain the true distance map.
[0018] Therefore, by performing distance transformation and normalization processing on the foreground and background, and then subtracting the two, the true distance map can be obtained as the true distance information for subsequent parameter adjustment of the second processing model to improve the generalization ability of the second processing model.
[0019] This application also provides an image segmentation method, which includes: obtaining a target image; using a processing model to process the target image to obtain a segmentation result of the target object; among them, the processing model is a first processing model or a second processing model trained by using any of the above model training methods.
[0020] Therefore, using the first processing model or the second processing model trained by using the above model training method to process the target image can accurately segment the target object.
[0021] Among them, the processing model is a second processing model, and the second processing model is used to perform distance regression on the target image; using the processing model to process the target image to obtain a segmentation result of the target object, including: using the processing model to perform distance regression on the target image to obtain a predicted distance result, where the predicted distance result represents the distance between each pixel in the target image and the predicted boundary, and the predicted boundary is the boundary of the predicted region corresponding to the target object in the target image; based on the predicted distance result, obtaining a segmentation result of the target object.
[0022] Therefore, the second processing model can accurately segment the target object by obtaining an accurate segmentation result of the target object based on distance regression.
[0023] The present application also provides a model training device, which includes a processing module, an annotation module, and an adjustment module. The processing module is configured to process a sample image using a first processing model to obtain a first segmentation result, and process the sample image using a second processing model to obtain a second segmentation result. The annotation module is configured to generate first annotation information based on the first segmentation result and generate second annotation information based on the second segmentation result. The adjustment module is configured to adjust the parameters of the first processing model based on the first segmentation result and first reference information, and adjust the parameters of the second processing model based on the second segmentation result and second reference information, where the first reference information includes the second annotation information, and the second reference information includes the first annotation information.
[0024] The present application also provides an image segmentation device, which includes an acquisition module and a processing module. The acquisition module is configured to acquire a target image. The processing module is configured to process the target image using a processing model to obtain a segmentation result of a target object, where the processing model is the first processing model or the second processing model trained by using any of the above model training methods.
[0025] The present application also provides an electronic device, which includes a memory and a processor coupled to each other. The processor is configured to execute program instructions stored in the memory to implement any of the above model training methods or any of the above image segmentation methods.
[0026] The present application also provides a computer-readable storage medium, on which program instructions are stored. When the program instructions are executed by a processor, any of the above model training methods or any of the above image segmentation methods are implemented.
[0027] In the above solution, by using two processing models to generate annotation information for each other, the two models are interactively supervised during training, which can make full use of unannotated data to train the models. And compared with training a single model, it can reduce the possibility of overfitting and improve the generalization ability of the models.
[0028] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification. These drawings show embodiments consistent with the present application and are used together with the specification to explain the technical solutions of the present application.
[0030] Figure 1 is a flowchart of an embodiment of the model training method of the present application;
[0031] Figure 2 is a flowchart of another embodiment of the model training method of the present application;
[0032] Figure 3 It is a schematic flowchart of another embodiment of the model training method of the present application;
[0033] Figure 4 It is a schematic flowchart of another embodiment of step S330 of the present application;
[0034] Figure 5 It is a schematic diagram of the conversion process between real annotation information and real distance map;
[0035] Figure 6 It is a schematic diagram of an embodiment of the segmentation model training method of the present application;
[0036] Figure 7 It is a schematic flowchart of an embodiment of the image segmentation method of the present application;
[0037] Figure 8 It is a schematic framework diagram of an embodiment of the model training device of the present application;
[0038] Figure 9 It is a schematic framework diagram of an embodiment of the image segmentation device of the present application;
[0039] Figure 10 It is a schematic framework diagram of an embodiment of the electronic device of the present application;
[0040] Figure 11 It is a schematic framework diagram of an embodiment of the computer-readable storage medium of the present application. Detailed implementation manners
[0041] The solutions of the embodiments of the present application will be described in detail below with reference to the accompanying drawings of the specification.
[0042] In the following description, specific details such as specific system architectures, interfaces, and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the present application.
[0043] The term "and / or" in this article is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the preceding and following associated objects. In addition, "multiple" in this article means two or more than two. In addition, the term "at least one" in this article represents any one of multiple or any combination of at least two of multiple. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set composed of A, B, and C.
[0044] The model training method and image segmentation method in this application can be executed by an electronic device, or separately by two electronic devices. The above-mentioned electronic device can be any device with processing capabilities, such as a tablet computer, a mobile phone, a computer, etc.
[0045] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an embodiment of the model training method of this application.
[0046] Specifically, the model training method may include the following steps:
[0047] Step S110: Process the sample image using the first processing model to obtain a first segmentation result.
[0048] In this embodiment, the first processing model and the second processing model are trained. The trained first processing model or the second processing model can be used for image segmentation, and both can be used to segment the same object in the image. The first processing model and the second processing model can be independent of each other, or there may be some components that are the same.
[0049] It can be understood that step S120 needs to be executed after step S110, and step S140 needs to be executed after step S130. In addition, the execution order of steps S110 - S140 is not restricted. For example, steps S110 - S120 and steps S130 - S140 can be executed synchronously, or steps S110, step S130, step S120, and step S140 can be executed in sequence, or steps S130, step S140, step S110, and step S120 can be executed in sequence, etc.
[0050] Both the first processing model and the second processing model are used to obtain the segmentation result of the target object in the image. Therefore, the first segmentation result is the segmentation result of the target object in the sample image obtained using the first processing model, and the second segmentation result is the segmentation result of the target object in the sample image obtained using the second processing model. The segmentation result is used to represent the segmentation prediction area corresponding to the target object in the sample image.
[0051] Step S120: Generate first annotation information based on the first segmentation result.
[0052] Step S130: Process the sample image using the second processing model to obtain a second segmentation result.
[0053] Step S140: Generate second annotation information based on the second segmentation result.
[0054] Based on the first segmentation result and the second segmentation result of the target object in the sample image, the first annotation information and the second annotation information of the sample image regarding the target object can be generated. Both the first annotation information and the second annotation information can represent the reference region corresponding to the target object in the sample image. Both the first annotation information and the second annotation information are generated using the segmentation results, rather than being manually annotated. Generally speaking, the first annotation information and the second annotation information can be pseudo-annotations.
[0055] It can be understood that the reference information is the segmentation reference result of the sample image regarding the target object. During the model training process, the reference information can be used to compare with the result output by the model. Based on the difference between the reference information and the result output by the model, the parameters of the model can be adjusted, so that the model output is more in line with the requirements.
[0056] For the second processing model, the first annotation information can be used as the second reference information to compare with the second segmentation result output by the second processing model, thereby adjusting the parameters of the second processing model. Similarly, for the first processing model, the second annotation information can be used as the first reference information to compare with the first segmentation result output by the first processing model, thereby adjusting the parameters of the first processing model.
[0057] It should be noted that the first segmentation result is obtained using the first processing model and is the segmentation prediction result of the first processing model for the sample image regarding the target object. The same applies to the second segmentation result. Then, the first annotation information and the second annotation information generated using the first segmentation result and the second segmentation result are actually different from the true annotation information of the sample image regarding the target object. The true annotation information represents the true region of the target object in the sample image, while the first annotation information and the second annotation information can be pseudo-annotations, which represent the reference region corresponding to the target object. The pseudo-annotations can be simply regarded as the true annotation information containing noise.
[0058] Step S150: Adjust the parameters of the first processing model based on the first segmentation result and the first reference information, and adjust the parameters of the second processing model based on the second segmentation result and the second reference information.
[0059] Among them, the first reference information includes the second annotation information, and the second reference information includes the first annotation information. Specifically, step S150 can include using the difference between the first segmentation result and the second annotation information to adjust the parameters of the first processing model, and using the difference between the second segmentation result and the first annotation information to adjust the parameters of the second processing model.
[0060] It can be understood that the above steps S110 - S150 are the relevant steps for one training. By selecting different sample images and executing the above steps multiple times, the first processing model and the second processing model can be trained multiple times, so that the first processing model and the second processing model meet the preset requirements, thereby completing the training of the model.
[0061] In the above solution, by having two processing models generate annotation information for each other, the two models can interactively supervise each other during training, making full use of unlabeled data to train the models. Moreover, compared with training a single model, it can reduce the possibility of overfitting and improve the generalization ability of the models. Through the above method, even when there is only partial labeled data, a model that can accurately perform segmentation can still be trained, improving the effectiveness of data training.
[0062] Furthermore, the above pseudo - annotations can be considered as real annotation information with noise. By using pseudo - annotations for training, training can be carried out in the case where the annotations are noisy, enabling the model to have a stronger tolerance for noise and accurately perform segmentation in the presence of noise.
[0063] In some embodiments, the first reference information and the second reference information also respectively include the real annotation information of the sample image, and the real annotation information can represent the real region of the target object in the sample image. Therefore, when adjusting the parameters of the first processing model, the differences between the first segmentation result and the second annotation information, as well as the differences between the first segmentation result and the real annotation information, can be used to adjust the first processing model. When adjusting the parameters of the second processing model, the differences between the second segmentation result and the first annotation information, as well as the differences between the second segmentation result and the real annotation information, can be used to adjust the second processing model.
[0064] Please refer to Figure 2 , Figure 2 which is a schematic flowchart of another embodiment of the model training method of the present application. Specifically, the model training method may include the following steps:
[0065] Step S210: Use the first processing model to perform target segmentation on the sample image to obtain a first segmentation result regarding the target object.
[0066] Step S110 can be implemented through step S210. Specifically, the first processing model can perform an image segmentation task, directly perform target segmentation on the sample image, and segment out the target object from it, thereby obtaining the first segmentation result.
[0067] Step S220: Generate first annotation information based on the first segmentation result.
[0068] Specifically, generating the first annotation information by using the first segmentation result may mean that the device uses the first segmentation result as the first annotation information. It can be understood that the first segmentation result has a gradient attribute, while the first annotation information does not have a gradient attribute. In some embodiments, the first segmentation result may not be directly used as the first annotation information. For example, the first segmentation result may also be combined with the ground truth annotation information, or after performing a preset process on the first segmentation result, the first annotation information is generated.
[0069] Step S230: Perform object segmentation on the sample image by using the second processing model to obtain a second segmentation result of the target object.
[0070] Step S130 can be implemented through Step S230. Specifically, the second processing model may perform an image segmentation task, directly perform object segmentation on the sample image, and segment out the target object from it, thereby obtaining the first segmentation result.
[0071] Step S240: Generate second annotation information based on the second segmentation result.
[0072] Specifically, generating the second annotation information by using the second segmentation result may mean using the second segmentation result as the second annotation information. It can be understood that the first segmentation result has a gradient attribute, while the first annotation information does not have a gradient attribute. In some embodiments, the second segmentation result may not be directly used as the second annotation information. For example, the second segmentation result may also be combined with the ground truth annotation information, or after performing a preset process on the second segmentation result, the second annotation information is generated.
[0073] Step S250: Adjust the parameters of the first processing model based on the first segmentation result and the first reference information, and adjust the parameters of the second processing model based on the second segmentation result and the second reference information.
[0074] For the relevant content of Step S250, reference may be made to the relevant description of Step S150 above, and details will not be elaborated here.
[0075] In the above embodiments, by using two processing models to generate annotation information for each other, the two models can interactively supervise each other during training, can make full use of unlabeled data to train the models, can reduce the possibility of overfitting generated by single-model training, and the two models can learn from each other's advantages to improve the generalization ability of the models.
[0076] Please refer to Figure 3 , Figure 3 which is a schematic flowchart of another embodiment of the model training method of the present application. Specifically, the model training method may include the following steps:
[0077] Step S310: Use the first processing model to perform target segmentation on the sample image to obtain a first segmentation result regarding the target object.
[0078] Step S320: Generate first annotation information based on the first segmentation result.
[0079] Steps S310 and S320 can refer to the relevant descriptions of steps S210 and S220 mentioned above.
[0080] Among them, the first segmentation result has a gradient attribute, which can be used to calculate the loss and perform backpropagation to update the parameters of the first processing model. Specifically, step S320 can include obtaining a copy of the first segmentation result and isolating the gradient of the copy of the first segmentation result to obtain first annotation information without a gradient attribute.
[0081] It can be understood that isolating the gradient does not change the specific values of the first segmentation result. Therefore, the first annotation information has the same values as the first segmentation result, and the main difference between the two lies in whether they have a gradient attribute. Thus, through step S320, information that is numerically consistent with the first segmentation result but is not used to calculate the loss and perform backpropagation to update the parameters of the first processing model, that is, the first annotation information, is generated, and this information can be used as the second reference information.
[0082] Step S330: Use the second processing model to process the sample image to obtain a second segmentation result.
[0083] Please refer to Figure 4 , Figure 4 which is a schematic flowchart of another embodiment of step S330 of this application. Specifically, step S330 can include:
[0084] Step S431: Use the second processing model to perform distance regression on the sample image to obtain a predicted distance result.
[0085] In this embodiment, the first processing model is used to perform a segmentation task and directly perform target segmentation on the sample image to obtain a first segmentation result, while the second processing model is used to perform a distance regression task and obtain a second segmentation result based on the predicted distance result obtained from the distance regression.
[0086] Among them, the distance regression task is used to predict the distance between each pixel point in the image and the predicted boundary, and the above-mentioned predicted boundary can be the boundary of the predicted region corresponding to the target object in the sample image. Therefore, the predicted distance result obtained by the second processing model performing distance regression on the sample image can represent the distance between each pixel point in the sample image and the predicted boundary.
[0087] It should be noted that the boundary of the prediction region can be a closed figure. Then, the above distance can also be used to reflect the positional relationship between the pixel point and the prediction boundary (prediction region). Specifically, the above distance can reflect whether the pixel point is on the prediction boundary and whether it is within the region enclosed by the prediction boundary. For example, if the distance between the pixel point and the prediction boundary is zero, then the pixel point is located on the prediction boundary. Additionally, the direction of the distance can be used to reflect whether the pixel point is within the region enclosed by the prediction boundary. For example, if the predicted distance corresponding to the pixel point is positive, then it can be considered that the pixel point is within the region enclosed by the prediction boundary; if the predicted distance corresponding to the pixel point is negative, then it can be considered that the pixel point is within the region enclosed by the prediction boundary.
[0088] Step S432: Based on the prediction distance result, obtain a second segmentation result for the target object.
[0089] After obtaining the distance relationship between each pixel point in the sample image and the boundary of the prediction region corresponding to the target object, the prediction region corresponding to the target object can be determined according to this distance relationship. Then, the prediction region corresponding to the target object is separated from other regions in the sample image, and a second segmentation result is obtained.
[0090] It can be understood that this second segmentation result may not be obtained by direct segmentation, but is obtained based on distance regression. This second segmentation result essentially distinguishes the region corresponding to the target object from other regions, and thus can be considered as segmenting the target object.
[0091] In some embodiments, the above prediction distance result can be in the form of a prediction distance map, and the value of each pixel point in the prediction distance map is used to represent the distance between the corresponding pixel point in the sample image and the prediction boundary. Then, step S432 can be to perform a binarization process on the prediction distance map using a preset binarization method to obtain a second segmentation result for the target object, where the preset binarization method can be a soft binarization operation, and the result obtained through the soft binarization operation does not only contain two values, but continuous values distributed within a preset range.
[0092] It can be understood that during the training process, when performing backpropagation, derivatives need to be calculated for the second segmentation result. The predicted distance result is not directly binarized to obtain a second segmentation result containing two values. Instead, a soft binarization operation is performed so that the second segmentation result contains continuous values within a preset range to facilitate the backpropagation of gradients. Similarly, during training, the first segmentation result does not only contain two values to distinguish the foreground and background but also contains continuous values to facilitate the backpropagation of gradients. Of course, when the model is actually applied, if the second processing model is used for image segmentation, the predicted distance result can be directly binarized, and the obtained segmentation result can only contain two values to distinguish the foreground and background; if the first processing model is used for image segmentation, the directly obtained first segmentation result can only contain two values to distinguish the foreground and background.
[0093] In a specific application scenario, the predicted distance result is a predicted distance map. The values of each pixel point on the predicted distance map can be obtained by normalizing the predicted distance between the corresponding pixel point in the sample image and the predicted boundary. Therefore, the values of each pixel point on the predicted distance map are distributed between [-1, 1]. The values of the pixel points on the predicted boundary are zero, and the values can represent the distance between the corresponding pixel point in the sample image and the predicted boundary. The pixel points with larger absolute values of the values are farther from the predicted boundary; and the values can also reflect the positional relationship between the pixel point and the predicted area. The values of the pixel points within the area enclosed by the predicted boundary are all positive, and the values of the pixel points outside the area enclosed by the predicted boundary are all negative. On this basis, the preset binarization method can specifically be to calculate the second segmentation result by using the following binarization function for the predicted distance map: y = Sigmoid(1000 * x). The result of the second segmentation result is continuous values distributed between [0, 1], approaching 0 or 1 at most positions and showing a continuous change from 0 to 1 near the predicted boundary.
[0094] Step S340: Generate second annotation information based on the second segmentation result.
[0095] Among them, the second segmentation result has a gradient attribute and can be used to calculate the loss and perform backpropagation to update the parameters of the second processing model. Step S320 can specifically include obtaining a copy of the second segmentation result and isolating the gradient of the copy of the second segmentation result to obtain second annotation information without a gradient attribute.
[0096] It can be understood that performing gradient isolation does not change the specific value of the second segmentation result. Therefore, the second annotation information has the same value as the second segmentation result. The main difference between the two lies in whether they have the gradient attribute. Thus, through step S340, information that is consistent with the value of the second segmentation result but is not used to calculate the loss and perform backpropagation to update the parameters of the second processing model is generated, that is, the first annotation information, and this information can be used as the second reference information.
[0097] Step S350: Adjust the parameters of the first processing model based on the first segmentation result and the first reference information, and adjust the parameters of the second processing model based on the second segmentation result and the second reference information.
[0098] Specifically, the first reference information may include the second annotation information, the second reference information may include the first annotation information, and step S350 may include adjusting the parameters of the first processing model by using the difference between the first segmentation result and the second annotation information, and adjusting the parameters of the second processing model by using the difference between the second segmentation result and the first annotation information.
[0099] In some embodiments, the first reference information and the second reference information may further include the ground truth annotation information. Then step S350 may include adjusting the first processing model by using the difference between the first segmentation result and the second annotation information, and the difference between the first segmentation result and the ground truth annotation information; and adjusting the second processing model by using the difference between the second segmentation result and the first annotation information, and the difference between the second segmentation result and the ground truth annotation information.
[0100] Further, in the case where the second processing model outputs a predicted distance result for the sample image processing, before step S350, the method may further include: performing distance transformation based on the ground truth annotation information to obtain the ground truth distance information. Then, in addition to the first annotation information and the ground truth annotation information, the second reference information may further include the ground truth distance information, where the first annotation information and the ground truth annotation information are segmentation reference information for comparison with the second segmentation result, and the ground truth distance information is distance reference information for comparison with the predicted distance result. Then step S350 may include adjusting the parameters of the second processing module based on the difference between the second segmentation result and the first annotation information, the difference between the second segmentation result and the ground truth annotation information, and the difference between the predicted distance result and the ground truth distance information.
[0101] More specifically, the true annotation information can represent the true region corresponding to the target object in the sample image. The true region can be determined as the foreground, and the remaining regions are determined as the background. Performing distance transformation based on the true annotation information to obtain the true distance information may include: performing distance transformation and normalization on the foreground in the sample image to obtain a foreground distance map, which can be used to characterize the distance from a foreground point to the nearest background point. Performing distance transformation and normalization on the background in the sample image to obtain a background distance map, which can be used to characterize the distance from a background point to the nearest foreground point. The execution order of the above processing steps for the foreground and background is not restricted. Then, by subtracting the foreground distance map from the background distance map, a true distance map can be obtained as the true distance information. The value of each pixel point in the true distance map is used to characterize the distance between the corresponding pixel point in the sample image and the true boundary of the target object, and the true boundary is the boundary of the true region corresponding to the target object in the sample image.
[0102] In the above embodiments, by having two processing models generate annotation information for each other, the two models can interactively supervise each other during training, enabling the model to be fully trained using unannotated data. And compared with training a single model, it can reduce the possibility of overfitting and improve the generalization ability of the model. Further, different processing methods can also be adopted between the two models, and the two models can learn information from different angles of the image, complement each other, improve the effect of interactive supervision, and improve the generalization ability of the model.
[0103] Furthermore, the method of obtaining the segmentation result based on distance regression can better antagonize the anatomical structure abnormalities caused by noise compared with direct segmentation. The edges obtained by direct segmentation may have noise, burrs, etc., while the method of distance regression can more accurately judge the edges, reduce false positives or false negatives of abnormalities, and improve the generalization ability of the model.
[0104] Please refer to Figure 5 , Figure 5It is a schematic diagram of the conversion process between real annotation information and real distance map. In a specific application scenario, the real annotation information (segmentation annotation) represents the real region corresponding to the target object in the sample image as the foreground, and other regions as the background. Euclidean distance transformation and normalization are performed on the foreground to obtain the foreground distance map (normalized foreground distance); the foreground is inverted to obtain the background, and on this basis, Euclidean distance transformation and normalization are performed to obtain the background distance map (normalized background distance); subtracting the background distance map from the foreground distance map gives the real distance map (normalized distance spectrum). The value of the pixel points in the real distance map is used to characterize the distance between the corresponding pixel points in the sample image and the real boundary. Among them, its value is distributed between [-1,1], and the contour line with a value of 0 coincides with the segmentation contour line of the real region in the real annotation information. The values in the real distance map corresponding to the foreground region are all greater than zero, and the values in the real distance map corresponding to the background region are all less than zero. The larger the absolute value of the value, the farther the pixel point is from the segmentation contour line. The real distance map obtained through the above operations can be compared with the predicted distance map, and the difference between the two can be used to adjust the parameters of the second processing model.
[0105] Please refer to Figure 6 , Figure 6 It is a schematic diagram of an embodiment of the segmentation model training method of the present application.
[0106] Among them, model 1 (the first processing model) is used to perform image segmentation tasks to obtain segmentation prediction 1 (the first segmentation result), and gradient isolation is performed on its copy to obtain pseudo annotation 1 (the first annotation information); model 2 (the second processing model) is used to perform distance regression tasks to obtain the predicted distance result, and after performing a soft binary operation on the predicted distance result, segmentation prediction 2 (the second segmentation result) is obtained, and gradient isolation is performed on its copy to obtain pseudo annotation 2 (the second annotation information). For model 1, the parameters of model 1 are adjusted by the difference between segmentation prediction 1 and pseudo annotation 2, and the difference between segmentation prediction 1 and segmentation annotation. For model 2, the parameters of model 2 are adjusted by the difference between segmentation prediction 2 and pseudo annotation 1, the difference between segmentation prediction 2 and segmentation annotation, and the difference between the predicted distance result and the normalized distance spectrum (real distance information) obtained based on the segmentation annotation.
[0107] If there is no segmentation annotation, then for model 1, the parameters of model 1 are adjusted by the difference between segmentation prediction 1 and pseudo annotation 2, and for model 2, the parameters of model 2 are adjusted by the difference between segmentation prediction 2 and pseudo annotation 1.
[0108] Specifically, adjusting the parameters of model 2 by the difference between segmentation prediction 2 and segmentation annotation can be achieved through the following loss function:
[0109] Loss = Dice(Segmentation prediction, segmentation annotation).
[0110] Adjusting the parameters of Model 2 by the difference between the predicted distance result and the normalized distance map can be achieved through the following loss function:
[0111] Lose = MSE(Predicted distance result, normalized distance map).
[0112] Please refer to Figure 7 , Figure 7 which is a schematic flowchart of an embodiment of the image segmentation method of this application.
[0113] Specifically, the image segmentation method may include the following steps:
[0114] Step S710: Obtain a target image.
[0115] It can be understood that the target image may be a medical image containing an image of a target object, and the types of medical images include but are not limited to: three-dimensional CT (Computed Tomography), MRI (Magnetic Resonance Imaging), etc.
[0116] Step S720: Process the target image using a processing model to obtain a segmentation result of the target object.
[0117] Among them, the processing model is the first processing model or the second processing model trained based on any of the above model training methods. After completing the training of the first processing model and the second processing model, there may be a certain difference in the segmentation accuracy of the two models. Select the better one of the two for application in the image segmentation method. The first processing model is used to segment the target image, and the second processing model is used to segment the target image or perform distance regression on the target image. The target object may be a preset tissue, organ, lesion, etc. Using the segmentation model, the target object can be accurately segmented from the medical image, and the segmentation result can be used for assisting medical treatment later.
[0118] If the second processing model is used to perform distance regression on the target image, then the processing model processes the target image to obtain the segmentation result of the target object, including: performing distance regression on the target image using the processing model to obtain the predicted distance result, and obtaining the segmentation result of the target object based on the predicted distance result. Among them, the predicted distance result represents the distance between each pixel point in the target image and the predicted boundary, and the predicted boundary is the boundary of the predicted region corresponding to the target object in the target image. Specifically, obtaining the segmentation result of the target object based on the predicted distance result can be achieved by performing binary processing on the predicted distance result to obtain the segmentation result. For example, the binary function can be such that when x satisfies a preset condition, y = 1, otherwise y = 0. The processing descriptions of related steps can refer to the relevant content in the aforementioned model training method and will not be elaborated here.
[0119] In the above embodiment, the first processing model or the second processing model is trained using the above model training method and processes the target image, enabling accurate segmentation of the target object.
[0120] Please refer to Figure 8 , Figure 8 which is a schematic framework diagram of an embodiment of the model training device of the present application.
[0121] In this embodiment, the model training device 80 includes a processing module 81, an annotation module 82, and an adjustment module 83. Among them, the processing module 81 can be used to process the sample image using the first processing model to obtain the first segmentation result, and process the sample image using the second processing model to obtain the second segmentation result. The annotation module 82 can be used to generate the first annotation information based on the first segmentation result and generate the second annotation information based on the second segmentation result. The adjustment module 83 can be used to adjust the parameters of the first processing model based on the first segmentation result and the first reference information, and adjust the parameters of the second processing model based on the second segmentation result and the second reference information. Among them, the first reference information includes the second annotation information, and the second reference information includes the first annotation information.
[0122] In the above solution, by having two processing models generate annotation information for each other, enabling the two models to interact and supervise during training, it can make full use of unannotated data to train the model, and compared with training a single model, it can reduce the possibility of overfitting and improve the generalization ability of the model.
[0123] Among them, the processing module 81 can be used to process the sample image using the first processing model to obtain a first segmentation result, specifically including: performing object segmentation on the sample image using the first processing model to obtain a first segmentation result of the target object. The processing module 81 can be used to process the sample image using the second processing model to obtain a second segmentation result, specifically including: performing object segmentation on the sample image using the second processing model to obtain a second segmentation result of the target object; or, performing distance regression on the sample image using the second processing model to obtain a predicted distance result, where the predicted distance result represents the distance between each pixel point in the sample image and the predicted boundary, and the predicted boundary is the boundary of the predicted region corresponding to the target object in the sample image; based on the predicted distance result, obtaining a second segmentation result of the target object.
[0124] In the above solution, the first processing model and the second processing model adopt the same processing method for the image, or different processing methods can also be adopted between the two models. If different processing methods are adopted, different perspectives of information about the image can be learned between the two models for complementarity, thereby improving the generalization ability of the model.
[0125] Among them, the predicted distance result is a predicted distance map, and the value of each pixel point in the predicted distance map is used to characterize the distance between the corresponding pixel point in the sample image and the predicted boundary; the processing module 81 can be used to obtain a second segmentation result of the target object based on the predicted distance result, specifically including: performing binarization processing on the predicted distance map using a preset binarization method to obtain a second segmentation result of the target object.
[0126] In the above solution, by performing binarization processing on the predicted distance map obtained by distance regression, the region corresponding to the target object and other regions can be roughly distinguished from the predicted distance map, so a second segmentation result can be obtained for subsequent adjustment of the model parameters.
[0127] Among them, both the first segmentation result and the second segmentation result have gradient attributes; the annotation module 82 can be used to generate first annotation information based on the first segmentation result, specifically including: obtaining a copy of the first segmentation result and isolating the gradient of the copy of the first segmentation result to obtain first annotation information without gradient attributes. The annotation module 82 can be used to generate second annotation information based on the second segmentation result, specifically including: obtaining a copy of the second segmentation result and isolating the gradient of the copy of the second segmentation result to obtain second annotation information without gradient attributes.
[0128] In the above solution, the first annotation information is generated from the first segmentation result, and the second annotation information is generated from the second segmentation result. Therefore, interactive supervision between the two models is achieved, enabling the two models to complement each other, draw on the advantages of each other, and improve the generalization ability of the models. Through gradient isolation operations, annotation information can be generated using segmentation information for subsequent implementation of interactive supervision.
[0129] Among them, the first reference information and the second reference information also include the true annotation information of the sample image. The adjustment module 83 can be used to adjust the parameters of the first processing model based on the first segmentation result and the first reference information, specifically including: adjusting the parameters of the first processing model based on the difference between the first segmentation result and the second annotation information and the difference between the first segmentation result and the true annotation information. The adjustment module 83 can be used to adjust the parameters of the second processing model based on the second segmentation result and the second reference information, specifically including: adjusting the parameters of the second processing model based on the difference between the second segmentation result and the first annotation information and the difference between the second segmentation result and the true annotation information.
[0130] In the above solution, by adjusting the parameters of the processing model based on the differences between the segmentation result, the annotation information, and the true annotation information, the model can learn the information in the true annotation information and the annotation information generated based on the segmentation result, thereby performing segmentation more accurately.
[0131] Among them, the model training device may further include a transformation module, which is used to perform distance transformation based on the true annotation information to obtain true distance information when the second processing model outputs a predicted distance result for the sample image before adjusting the parameters of the second processing model based on the difference between the second segmentation result and the first annotation information and the difference between the second segmentation result and the true annotation information. The predicted distance result is used to obtain the second segmentation result and represents the distance between each pixel point in the sample image and the predicted boundary. The predicted boundary is the boundary of the predicted region corresponding to the target object in the sample image. The true distance information represents the distance between each pixel point in the sample image and the true boundary. The true boundary is the boundary of the true region corresponding to the target object in the sample image. The adjustment module 83 can be used to adjust the parameters of the second processing model based on the difference between the second segmentation result and the first annotation information, the difference between the second segmentation result and the true annotation information, and the difference between the predicted distance result and the true distance information, specifically including: adjusting the parameters of the second processing model based on the difference between the second segmentation result and the first annotation information, the difference between the second segmentation result and the true annotation information, and the difference between the predicted distance result and the true distance information.
[0132] In the above solution, by converting the real annotation information into real distance information for comparison with the predicted distance result, and adjusting the parameters of the second processing model based on the difference between the two, the second processing model can learn from the real distance information, making the predicted distance result closer to the real distance information.
[0133] Among them, the real distance information is a real distance map, and the value of each pixel point in the real distance map is used to represent the distance between the corresponding pixel point in the sample image and the real boundary; the transformation module can be used to perform distance transformation based on the real annotation information to obtain the real distance information, specifically including: based on the real annotation information, determining the real area in the sample image as the foreground and the remaining areas as the background; respectively performing distance transformation and normalization processing on the foreground and background in the sample image to obtain a foreground distance map and a background distance map; using the foreground distance map and the background distance map for subtraction processing to obtain the real distance map.
[0134] In the above solution, by performing distance transformation and normalization processing on the foreground and background, and then subtracting the two, the real distance map can be obtained as the real distance information for subsequent parameter adjustment of the second processing model, improving the generalization ability of the second processing model.
[0135] Please refer to Figure 9 , Figure 9 which is a schematic framework diagram of an embodiment of the image segmentation device of the present application.
[0136] In this embodiment, the image segmentation device 90 includes an acquisition module 91 and a processing module 92, where the acquisition module 91 is used to acquire a target image; the processing module 92 is used to process the target image using a processing model to obtain a segmentation result of the target object; among them, the processing model is the first processing model or the second processing model trained using any of the above model training methods.
[0137] In the above solution, using the first processing model or the second processing model trained using the above model training method to process the target image can accurately segment the target object.
[0138] Among them, the processing model is the second processing model, and the second processing model is used to perform distance regression on the target image; the processing module 92 can be used to process the target image using the processing model to obtain a segmentation result of the target object, specifically including: performing distance regression on the target image using the processing model to obtain a predicted distance result, where the predicted distance result represents the distance between each pixel point in the target image and the predicted boundary, and the predicted boundary is the boundary of the predicted region corresponding to the target object in the target image; based on the predicted distance result, obtaining a segmentation result of the target object.
[0139] In the above solution, the second processing model can obtain an accurate segmentation result of the target object based on distance regression and accurately segment the target object.
[0140] Please refer to Figure 10 , Figure 10 which is a schematic framework diagram of an embodiment of the electronic device of the present application.
[0141] In this embodiment, the electronic device 100 includes a mutually coupled memory 101 and a processor 102. The processor 102 is configured to execute program instructions stored in the memory 101 to implement the steps of any of the above-mentioned model training method embodiments or the steps of any of the image segmentation method embodiments. In a specific implementation scenario, the electronic device 100 may include, but is not limited to: a microcomputer, a server. In addition, the electronic device 100 may also include mobile devices such as a laptop computer, a tablet computer, etc., which are not limited herein.
[0142] Specifically, the processor 102 is configured to control itself and the memory 101 to implement the steps of any of the above-mentioned model training method embodiments or the steps of any of the image segmentation method embodiments. The processor 102 may also be referred to as a CPU (Central Processing Unit). The processor 102 may be an integrated circuit chip with signal processing capabilities. The processor 102 may also be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Additionally, the processor 102 may be implemented jointly by integrated circuit chips.
[0143] Please refer to Figure 11 , Figure 11 which is a schematic framework diagram of an embodiment of the computer-readable storage medium of the present application.
[0144] In this embodiment, the computer-readable storage medium 110 stores program instructions 111 that can be run by the processor. The program instructions 111 are used to implement the steps of any of the above-mentioned model training method embodiments or the steps of any of the image segmentation method embodiments.
[0145] The computer-readable storage medium 110 may specifically be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disc, or other media that can store program data. Alternatively, it may also be a server storing the program data, which can send the stored program data to other devices for running, or can also run the stored program data itself.
[0146] In some embodiments, the computer-readable storage medium 110 may also be a memory as shown in Figure 10 the figure.
[0147] In some embodiments, the functions or modules included in the apparatus provided by the embodiments of the present disclosure may be used to execute the methods described in the above method embodiments. The specific implementation may refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0148] The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments. Their similarities or similarities can be referred to each other. For the sake of brevity, they will not be repeated here.
[0149] In several embodiments provided by the present application, it should be understood that the disclosed methods and apparatuses may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other may be through some interfaces. The indirect coupling or communication connection of the apparatus or unit may be in an electrical, mechanical or other form.
[0150] In addition, each functional unit in the various embodiments of the present application may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit. The above integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0151] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0152] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
Claims
1. A model training method, characterized in that, Including: Processing a sample image using a first processing model to obtain a first segmentation result, and performing distance regression on the sample image using a second processing model to obtain a predicted distance result, where the predicted distance result represents the distance between each pixel point in the sample image and a predicted boundary, and the predicted boundary is the boundary of a predicted region corresponding to an object of interest in the sample image; obtaining a second segmentation result of the object of interest based on the predicted distance result; Generating first annotation information based on the first segmentation result and generating second annotation information based on the second segmentation result; Adjusting parameters of the first processing model based on the first segmentation result and first reference information, and adjusting parameters of the second processing model based on the second segmentation result and second reference information, where the first reference information includes the second annotation information and the second reference information includes the first annotation information.
2. The method according to claim 1, wherein The processing the sample image using the first processing model to obtain a first segmentation result includes: Performing object segmentation on the sample image using the first processing model to obtain a first segmentation result of the object of interest.
3. The method according to claim 2, wherein The predicted distance result is a predicted distance map, and the value of each pixel point in the predicted distance map is used to characterize the distance between the corresponding pixel point in the sample image and the predicted boundary; The obtaining a second segmentation result of the object of interest based on the predicted distance result includes: Performing binarization processing on the predicted distance map using a preset binarization method to obtain a second segmentation result of the object of interest.
4. The method according to any one of claims 1 to 3, characterized in that, Both the first segmentation result and the second segmentation result have gradient attributes; The generating first annotation information based on the first segmentation result includes: Obtaining a copy of the first segmentation result and isolating the gradient of the copy of the first segmentation result to obtain the first annotation information without gradient attributes; The generating second annotation information based on the second segmentation result includes: Obtaining a copy of the second segmentation result and isolating the gradient of the copy of the second segmentation result to obtain the second annotation information without gradient attributes.
5. The method according to any one of claims 1 to 3, characterized in that The first reference information and the second reference information further include the true annotation information of the sample image respectively; The adjusting parameters of the first processing model based on the first segmentation result and first reference information includes: Adjusting parameters of the first processing model based on the difference between the first segmentation result and the second annotation information and the difference between the first segmentation result and the true annotation information; The adjusting parameters of the second processing model based on the second segmentation result and second reference information includes: Adjusting parameters of the second processing model based on the difference between the second segmentation result and the first annotation information and the difference between the second segmentation result and the true annotation information.
6. The method according to claim 5, characterized in that, Before the adjusting parameters of the second processing model based on the difference between the second segmentation result and the first annotation information and the difference between the second segmentation result and the true annotation information, the method further includes: Perform distance transformation based on the true annotation information to obtain true distance information; wherein, the true distance information represents the distance between each pixel point in the sample image and the true boundary, and the true boundary is the boundary of the true region corresponding to the target object in the sample image; Adjusting the parameters of the second processing model based on the differences between the second segmentation result and the first annotation information, and between the second segmentation result and the true annotation information, includes: Adjusting the parameters of the second processing model based on the differences between the second segmentation result and the first annotation information, between the second segmentation result and the true annotation information, and between the predicted distance result and the true distance information.
7. The method according to claim 6, wherein The true distance information is a true distance map, and the value of each pixel point in the true distance map is used to represent the distance between the corresponding pixel point in the sample image and the true boundary; The performing distance transformation based on the true annotation information to obtain true distance information includes: Based on the true annotation information, determine the true region in the sample image as the foreground and the remaining regions as the background; Perform distance transformation and normalization processing on the foreground and background in the sample image respectively to obtain a foreground distance map and a background distance map; Use the foreground distance map and the background distance map to perform subtraction processing to obtain the true distance map.
8. An image segmentation method, characterized in that, The method includes: Obtain a target image; Process the target image using a processing model to obtain a segmentation result of the target object; wherein, the processing model is the first processing model or the second processing model trained using the method according to any one of claims 1-7.
9. The method according to claim 8, wherein The processing model is the second processing model; The processing the target image using the processing model to obtain a segmentation result of the target object includes: Perform distance regression on the target image using the processing model to obtain a predicted distance result, wherein the predicted distance result represents the distance between each pixel point in the target image and the predicted boundary, and the predicted boundary is the boundary of the predicted region corresponding to the target object in the target image; Obtain a segmentation result of the target object based on the predicted distance result.
10. A model training device, characterized in that, Includes: A processing module, configured to process a sample image using a first processing model to obtain a first segmentation result, perform distance regression on the sample image using a second processing model to obtain a predicted distance result, wherein the predicted distance result represents the distance between each pixel point in the sample image and the predicted boundary, and the predicted boundary is the boundary of the predicted region corresponding to the target object in the sample image; obtain a second segmentation result of the target object based on the predicted distance result; An annotation module, configured to generate first annotation information based on the first segmentation result, and generate second annotation information based on the second segmentation result; An adjustment module, configured to adjust parameters of the first processing model based on the first segmentation result and first reference information, and adjust parameters of the second processing model based on the second segmentation result and second reference information, where the first reference information includes the second annotation information, and the second reference information includes the first annotation information.
11. An image segmentation device, characterized in that, Comprising: An acquisition module, configured to acquire a target image; A processing module, configured to process the target image by using a processing model to obtain a segmentation result of a target object; wherein the processing model is a first processing model or a second processing model trained by using the method according to any one of claims 1-7.
12. An electronic device, characterized in that, Comprising a memory and a processor coupled to each other, the processor is configured to execute program instructions stored in the memory to implement the method according to any one of claims 1 to 7 or any one of claims 8-9.
13. A computer-readable storage medium having program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, the method according to any one of claims 1 to 7 or any one of claims 8-9 is implemented.
Citation Information
Patent Citations
Depth model training method and device, electronic equipment and storage medium
CN109740668A