Image segmentation model training method and electronic device

By calculating the loss values ​​of the concatenated and differential areas of multiple annotation results, the image segmentation model is trained, which solves the problem of inconsistency in medical image segmentation, and improves the segmentation accuracy of the model and the ability to identify non-target areas.

CN118941575APending Publication Date: 2024-11-12ACER INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310767975.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-05-11
Filing Date
2023-06-27
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In the field of medical image segmentation, the uncertainty of image cutting caused by inconsistent annotation results of different physicians. Existing annotation integration methods such as concatenation, intersection and weighted average are difficult to effectively improve the image segmentation accuracy of deep learning models.

Method used

By acquiring the concatenation areas and the difference areas of the multiple labeled images, a predicted segmented image is generated using the image segmentation model, and the first and second losses are calculated based on the degree of overlap between the predicted segmented image and the difference area and the labeled target area. Value, used to train the image segmentation model and improve the segmentation accuracy of the model.

Benefits of technology

It effectively improves the segmentation accuracy of the image segmentation model, reduces the negative impact of uncertainty on model training, and can more accurately identify target and non-target areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118941575A_ABST
    Figure CN118941575A_ABST
Patent Text Reader

Abstract

The invention provides an image segmentation model training method and an electronic device. The method includes the following steps. A plurality of tagged images of a training image are obtained, wherein each tagged image includes a tagged target area and a background area. The method comprises the following steps: acquiring a union set region of annotated target regions of a plurality of annotated images, and acquiring a difference set region of the union set region; a predicted segmented image of the training image is generated using the image segmentation model. A first loss value is generated according to the predicted segmented image and the difference set region. Generating a second loss value according to the prediction segmentation image and a labeling target area of at least one of the plurality of labeled images; and training an image segmentation model according to the first loss value and the second loss value. Therefore, the segmentation accuracy of the image segmentation model can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a deep learning model training method, and in particular to an image segmentation model training method and an electronic device. Background Art

[0002] Image segmentation is a commonly used image processing technology that can be used to independently cut out specific objects in an image for further analysis and processing. For example, in medical image applications, image segmentation can be used to find key target areas in medical images, such as organs, tissues, or tumors. With the advancement of technology, deep learning models have been widely used in image segmentation tasks. In scenarios where deep learning models are used to implement image segmentation, a large amount of image data is required to train the deep learning model.

[0003] In the process of training deep learning models, loss functions are used to evaluate the prediction accuracy of deep learning models in order to further optimize the model parameters of deep learning models. Specifically, a loss function is a function used to measure the difference between the prediction results of a deep learning model and the actual data. For training deep learning models for image segmentation, the most common loss function is the Dice loss function. The Dice loss function is defined based on the Dice coefficient. The Dice coefficient is an indicator commonly used to measure the similarity between the prediction results of an image segmentation model and the actual segmentation results.

[0004] However, in the field of medical image segmentation, there are situations where doctors need to mark the target area in the medical image based on medical knowledge and experience. However, different doctors may have different opinions and produce inconsistent marking results, which can be called the uncertainty problem of image segmentation (segmentation uncertainty). For example, in some public image data sets, a medical image used for model training may be marked by multiple doctors and have multiple marking results. That is, the marked areas marked by different doctors are not consistent. When there are multiple marking results for a training image, the multiple marking results are generally integrated into one marked image, and then the model training is performed based on this marked image.

[0005] At present, the commonly used annotation integration methods include generating a union, intersection or weighted average of multiple annotation results, so as to train the model according to the difference between the union, intersection or weighted average of these annotation results and the model prediction results. The weighted average of these annotation results is to add up each annotation area by multiplying a weight, and produce an annotation image with a gradient feeling. However, whether the union, intersection or weighted average of these annotation results is used, the model training results may not be as expected. For example, the intersection of these annotation results will inevitably be smaller than the annotation results recognized by all annotators. The regional boundaries of the intersection of these annotation results are not necessarily reasonable. The union of these annotation results will inevitably be larger than the annotation results recognized by all annotators, and the union of these annotation results has a large annotation error. In addition, although the weighted average of these annotation results can weaken the influence of uncertain boundaries on the model, it still has the above-mentioned defects. Summary of the invention

[0006] The present invention relates to an image segmentation model training method and an electronic device, which can solve the above technical problems.

[0007] An embodiment of the present invention provides an image segmentation model training method suitable for an electronic device, comprising the following steps. Obtain multiple annotated images of a training image, wherein each annotated image includes a labeled target area and a background area. Obtain a union area of ​​the labeled target areas of the multiple annotated images, and obtain a difference area of ​​the union area. Generate a predicted segmented image of the training image using an image segmentation model. Generate a first loss value based on the predicted segmented image and the difference area. Generate a second loss value based on the predicted segmented image and the labeled target area of ​​at least one of the multiple annotated images. Train the image segmentation model based on the first loss value and the second loss value.

[0008] An embodiment of the present invention provides an electronic device, which includes a storage device and a processor. The storage device stores program code. The processor is coupled to the storage device and accesses the program code to perform the following operations. Obtain multiple annotated images of a training image, wherein each annotated image includes a labeled target area and a background area. Obtain a union area of ​​the labeled target areas of the multiple annotated images, and obtain a difference area of ​​the union area. Generate a predicted segmented image of the training image using an image segmentation model. Generate a first loss value based on the predicted segmented image and the difference area. Generate a second loss value based on the predicted segmented image and the labeled target area of ​​at least one of the multiple annotated images. Train the image segmentation model based on the first loss value and the second loss value.

[0009] Based on the above, in an embodiment of the present invention, a difference region can be generated based on a union region of annotated target regions of a plurality of annotated images, and the difference region can be used to generate a first loss value. In addition, a second loss value can be generated based on annotated target region of at least one of the plurality of annotated images. Thus, by using the first loss value and the second loss value to train the image segmentation model, the segmentation accuracy of the image segmentation model can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 is a schematic diagram of an electronic device according to an embodiment of the present invention;

[0011] Figure 2 is a flow chart of an image segmentation model training method according to an embodiment of the present invention;

[0012] Figure 3 is a schematic diagram showing an ophthalmoscopic image and an annotated image according to an embodiment of the present invention;

[0013] Figure 4 is a schematic diagram showing generation of a first loss value according to an embodiment of the present invention;

[0014] Figure 5 is a flow chart of an image segmentation model training method according to an embodiment of the present invention;

[0015] Figure 6 It is a schematic diagram of an image segmentation model training method according to an embodiment of the present invention.

[0016] Description of Reference Numerals

[0017] 100: electronic device;

[0018] 102: storage device;

[0019] 104: processor;

[0020] 106: transceiver;

[0021] ImgL: annotated image;

[0022] 33: optic disc;

[0023] 31: mark the target area;

[0024] 32: background area;

[0025] ImgL_1~ImgL_N: annotated images;

[0026] LT_1~LT_N: mark the target area;

[0027] 41-45: operation;

[0028] U1: Union area;

[0029] ImgU1: union image;

[0030] D1: difference set area;

[0031] ImgD1: difference image;

[0032] ImgD2: difference image;

[0033] ImgP1: predict segmentation image;

[0034] PT_2, PB_1: predicted background area;

[0035] PT_1: predicted target area;

[0036] I1: intersection area;

[0037] ImgI1: intersection image;

[0038] L1: first loss value;

[0039] L2: second loss value;

[0040] M1: image segmentation model;

[0041] S210~S260, S510~S560, S551~S552: steps. DETAILED DESCRIPTION

[0042] Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings. Whenever possible, the same reference numerals are used in the drawings and the description to refer to the same or like parts.

[0043] Please refer to Figure 1 , which is a schematic diagram of an electronic device according to an embodiment of the present invention. In different embodiments, the electronic device 100 is, for example, various computer devices, intelligent devices, server devices or combinations thereof, but is not limited thereto. Figure 1 As shown, the electronic device 100 may include a transceiver 106 , a storage device 102 , and a processor 104 .

[0044] The storage device 102 is, for example, any type of fixed or removable random access memory (RAM), read-only memory (ROM), flash memory, hard disk or other similar device or a combination of these devices, and can be used to record multiple program codes or software modules.

[0045] The transceiver 106 transmits and receives signals in a wireless or wired manner. The transceiver 130 may also perform operations such as low noise amplification, impedance matching, mixing, up or down frequency conversion, filtering, amplification, and the like.

[0046] The processor 104 is coupled to the storage device 102 and the transceiver 106, and can be a general-purpose processor, a special-purpose processor, a conventional processor, a digital signal processor, a plurality of microprocessors, one or more microprocessors combined with a digital signal processor core, a controller, a microcontroller, an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), any other type of integrated circuit, a state machine, an Advanced RISC Machine (ARM)-based processor, and the like.

[0047] In an embodiment of the present invention, the processor 104 may access the software modules, program codes or instructions recorded in the storage device 102 to implement the image segmentation model training method proposed in the present invention, the details of which are described as follows.

[0048] Please refer to Figure 2 , which is a flow chart of an image segmentation model training method according to an embodiment of the present invention. The method of this embodiment can be Figure 1 The electronic device 100 is executed as follows: Figure 1 Description of components shown Figure 2 Details of each step.

[0049] First, in step S210, the processor 104 may obtain multiple annotated images of training images. Specifically, the processor 104 needs multiple annotated training images to train an image segmentation model. By annotating the target area in each training image, each training image can correspond to multiple annotated images, and each annotated image includes a annotated target area and a background area. Generally speaking, annotating training images can be done manually by one or more annotators. In this way, the processor 104 can train the image segmentation model to have the ability to identify the target area based on these annotated images. It should be noted that the annotated target areas in multiple annotated images of the same training image will not be exactly the same.

[0050] In some embodiments, the training image may be a medical image, such as an X-ray image, a CT image, or an ophthalmoscopic image, etc., generated by a medical device. The image segmentation model can be used to perform image segmentation on the medical image to obtain the target area in the medical image. The target area in the medical image may be, for example, a human organ, various human tissues, diseased tissues, or a tumor, etc. The medical images used for training the model are generally labeled by multiple physicians with professional knowledge. However, based on the different views of different physicians, the labeled target areas labeled by different physicians for the same training image may be different. That is, the region boundaries of the multiple labeled target areas corresponding to these labeled images are inconsistent.

[0051] For example, the training image may be an ophthalmoscopic image. Figure 3 , which is a schematic diagram of an ophthalmoscopic image and an annotated image according to an embodiment of the present invention. By annotating the optic disc 33 in the ophthalmoscopic image ImgT1 used for model training, an annotated image ImgL can be generated. The annotated image ImgL includes an annotated target area 31 and a background area 32 corresponding to the optic disc 33. In other words, the annotated target area 31 is a position annotation of the optic disc 33 in the ophthalmoscopic image ImgT1. When different annotators annotate the optic disc 33 in the ophthalmoscopic image ImgT1 and generate multiple annotated images, the annotated target areas in these annotated images are not exactly the same.

[0052] In some embodiments, each labeled image is a binary image, where pixels located in the labeled target area correspond to a value of "1", and pixels located in the background area correspond to a value of "0".

[0053] In step S220, the processor 104 may obtain a union region of the annotated target regions of the plurality of annotated images, and obtain a difference region of the union region. Specifically, by taking a union of the plurality of annotated target regions of the annotated images, the processor 104 may obtain a union image including the union region. The union region includes pixels in all the annotated images that have been annotated as the annotated target region. In some embodiments, the union image is also a binary image. Pixels located within the union region in the union image correspond to a value of "1", and other pixels located in the union image correspond to a value of "0".

[0054] In step S230, the processor 104 may use the image segmentation model to generate a predicted segmented image of the training image. During the model training process, the processor 104 may input the training image into the image segmentation model so that the image segmentation model outputs a predicted segmented image after image segmentation. Afterwards, the model parameters of the image segmentation model may be updated and optimized based on the error information of the predicted segmented image. The image segmentation model is used to divide the input image into multiple sub-regions. After the image segmentation model performs image segmentation processing on the training image, the predicted segmented image generated by the image segmentation model may include a predicted target region and a predicted background region. In some embodiments, the predicted segmented image is a binary image. Pixels located within the predicted target region correspond to the value "1", and pixels located within the predicted background region correspond to the value "0".

[0055] In some embodiments, the image segmentation model is a deep learning model. For example, the image segmentation model may be a semantic segmentation model. The semantic segmentation model may perform classification operations on each pixel of the input image to obtain the classification results of each pixel in the input image, and determine the predicted target area and the predicted background area in the predicted segmented image according to the classification results of each pixel. The image segmentation model is, for example, a U-Net model, a Fully Convolutional Networks (FCN) model, a SegNet model, a Mask R-CNN model, a Generative Adversarial Network (GAN) model or a Transformer model, etc., and the present invention is not limited to this.

[0056] In step S240, the processor 104 may generate a first loss value according to the predicted segmented image and the difference region. In some embodiments, the processor 104 may generate the first loss value according to the overlap between the predicted background region of the predicted segmented image and the difference region. Figure 4 For further explanation.

[0057] Please refer to Figure 4, which is a schematic diagram of generating a first loss value according to an embodiment of the present invention. The processor 104 may obtain N annotated images ImgL_1~ImgL_N of the same training image ImgT2. N may be an integer greater than 1. After image annotation, these annotated images ImgL_1~ImgL_N respectively have annotated target areas LT_1~LT_N. The processor 104 may perform a union operation 41 on the annotated target areas LT_1~LT_N of the annotated images ImgL_1~ImgL_N to obtain a union image ImgU1 including a union area U1. Thereafter, the processor 104 may perform a difference operation 42 on the union area U1 to obtain a difference image ImgD1 including a difference area D1.

[0058] In some embodiments, all pixels in the union region U1 (marked with a white background) of the union image ImgU1 correspond to a value of “1”, and all pixels in other regions (marked with a gray background) of the union image ImgU1 correspond to a value of “0”. Furthermore, pixels in the difference region D1 (marked with a white background) of the difference image ImgD1 correspond to a value of “1”, and all pixels in other regions (marked with a gray background) of the difference image ImgD1 correspond to a value of “0”.

[0059] On the other hand, the processor 104 may input the training image ImgT2 into the image segmentation model to perform a model prediction operation 43. The image segmentation model may output a predicted segmented image ImgP1. After image segmentation by the image segmentation model, the predicted segmented image ImgP1 may include a predicted target area PT_1. Then, the processor 104 may perform a difference operation 44 on the predicted target area PT_1 to obtain a difference image ImgD2 including a predicted background area PB_1. In some embodiments, all pixels within the predicted target area PT_1 (marked with a white background) of the predicted segmented image ImgP1 correspond to a value of "1", and all pixels within the predicted background area (marked with a gray background) of the predicted segmented image ImgP1 correspond to a value of "0". In addition, pixels within the predicted background area PB_1 (marked with a white background) of the difference image ImgD2 correspond to a value of "1", and all pixels within other areas of the difference image ImgD2 (marked with a gray background) correspond to a value of "0".

[0060] Therefore, the processor 104 may perform a loss calculation operation 45 according to the overlap degree between the predicted background region of the predicted segmented image ImgP1 (ie, the predicted background region PB_1 of the difference image ImgD2 ) and the difference region D1 of the difference image ImgD1 to generate a first loss value.

[0061] Back to Figure 2In step S250, the processor 104 may generate a second loss value based on the predicted segmented image and the annotated target area of ​​at least one of the multiple annotated images. In some embodiments, the processor 104 may generate a second loss value based on the degree of overlap between the predicted target area in the predicted segmented image and the annotated target area of ​​at least one of the annotated images. In some embodiments, the processor 104 may generate a second loss value based on the degree of overlap between the predicted target area in the predicted segmented image and the intersection area of ​​the annotated target areas of the annotated images. In some embodiments, the processor 104 may perform weighted averaging on the annotated target areas of the annotated images to obtain a weighted average area, and then generate a second loss value based on the degree of overlap between the weighted average area and the predicted target area in the predicted segmented image.

[0062] In step S260, the processor 104 may train the image segmentation model according to the first loss value and the second loss value. Specifically, the processor 104 may perform backpropagation on the image segmentation model according to the first loss value and the second loss value, thereby adjusting the model parameters of the image segmentation model according to the gradient descent algorithm.

[0063] By repeating steps S210 to S260, the processor 104 can gradually optimize the model parameters of the image segmentation model in an iterative manner, so that the image segmentation model gradually learns a better image segmentation result. Thus, the first loss value and the second loss value will gradually decrease. When the processor 104 determines that the first loss value and the second loss value meet the convergence condition, the processor 104 can determine that the image segmentation model has completed training, and the trained image segmentation model can be used to execute subsequent applications.

[0064] Therefore, in addition to generating loss values ​​based on the annotated target areas identified by the annotators, embodiments of the present invention can also generate loss values ​​based on information that all annotators identify as non-target areas (i.e., the difference area of ​​the union area of ​​multiple annotated target areas). That is, by training the model based on information that all annotators identify as non-target areas, the image segmentation model trained by embodiments of the present invention can not only learn how to accurately identify target areas, but also learn how to accurately identify non-target areas. Therefore, the accuracy of the image segmentation model can be improved.

[0065] Please refer to Figure 5 , which is a flow chart of an image segmentation model training method according to an embodiment of the present invention. The method of this embodiment can be Figure 1 The electronic device 100 is executed as follows: Figure 1 Description of components shown Figure 5To make the concept of the present invention easier to understand, the following will be supplemented with Figure 6 For further explanation.

[0066] In step S510 , the processor 104 may obtain a plurality of annotated images ImgL_1 ˜ImgL_N of the training image ImgT2 . After being annotated by an annotator, the annotated images ImgL_1 ˜ImgL_N may include annotated target regions LT_1 ˜LT_N and background regions LB_1 ˜LB_N, respectively.

[0067] In step S520, the processor 104 may obtain the union region U1 of the labeled target regions LT_1 to LT_N of the plurality of labeled images ImgL_1 to ImgL_N, and obtain the difference region D1 of the union region U1. Specifically, the processor 104 may perform union on the labeled target regions LT_1 to LT_N of the plurality of labeled images ImgL_1 to ImgL_N to obtain a union image ImgU1 including the union region U1. Next, the processor 104 may perform difference on the union image ImgU1 including the union region U1 to obtain a difference image ImgD1 including the difference region D1. That is, the processor 104 may obtain the union region U1 and the difference region D1 according to the following formulas (1) and (2), respectively.

[0068]

[0069]

[0070] Among them, I U Represents the union image ImgU1; Represents the difference image ImgD1; I i Represents the labeled images ImgL_1~ImgL_N.

[0071] In step S530, the processor 104 may generate a predicted segmented image ImgP1 of the training image ImgT2 using the image segmentation model M1. In other words, the predicted segmented image ImgP1 is a predicted result of the image segmentation model M1 on the training image ImgT2. The predicted segmented image ImgP1 may include a predicted target region PT_1 and a predicted background region PT_2.

[0072] In step S540, the processor 104 may generate a first loss value according to the predicted segmented image ImgP1 and the difference set region D1. Specifically, the processor 104 may generate a first loss value L1 according to the degree of overlap between the predicted background region PT_2 of the predicted segmented image ImgP1 and the difference set region D1. In some embodiments, the processor 104 may generate a first coefficient according to the degree of overlap between the predicted background region PT_2 of the predicted segmented image ImgP1 and the difference set region D1. Next, the processor 104 may generate a first loss value L1 according to the difference between the first coefficient and a preset value.

[0073] Please refer to Figure 6 , the processor 104 may perform a difference set on the predicted segmented image ImgP1 to obtain a difference set image ImgD2 including the predicted background area PB_1. Then, the processor 104 may calculate the first loss value L1 according to the difference set area D1 in the difference set image ImgD1 and the predicted background area PB_1 in the difference set image ImgD2. Here, the processor 104 may generate a first coefficient according to the degree of overlap between the predicted background area PB_1 in the difference set image ImgD2 and the difference set area D1. Then, the processor 104 may generate the first loss value L1 according to the difference between the first coefficient and the preset value.

[0074] In some embodiments, the first coefficient is a Dice coefficient, and the above-mentioned preset value may be 1. That is, the processor 104 may obtain and generate the first coefficient and the first loss value L1 according to the following formula (3) and formula (4).

[0075]

[0076] Loss U =1-Dice U Formula (4)

[0077] Among them, Dice U represents the first coefficient; represents the difference image ImgD1; I′ represents the predicted segmentation image ImgP1; Loss U represents the first loss value L1. The value range of the first coefficient, which is the Dice coefficient, is between 0 and 1. The higher the first coefficient is, the smaller the first loss value L1 is.

[0078] Next, in step S550, the processor 104 may generate a second loss value according to the predicted segmented image and the labeled target region of at least one of the plurality of labeled images. Here, step S550 may be implemented as steps S551 to S552.

[0079] In step S551, the processor 104 may obtain the intersection area I1 of the labeled target areas LT_1 to LT_N of the multiple labeled images ImgL_1 to ImgL_N. Specifically, the processor 104 may intersect the labeled target areas LT_1 to LT_N of the multiple labeled images ImgL_1 to ImgL_N to obtain an intersection image ImgI1 including the intersection area I1. That is, the processor 104 may obtain the intersection area I1 according to the following formula (5).

[0080]

[0081] Among them, I ∩ Represents the intersection image ImgI1; I i Represents the labeled images ImgL_1~ImgL_N.

[0082] In step S552, the processor 104 generates a second loss value L2 according to the predicted segmented image ImgP1 and the intersection area I1. In detail, the processor 104 may generate the second loss value L2 according to the degree of overlap between the predicted target area PT_1 of the predicted segmented image ImgP1 and the intersection area I1. In some embodiments, the processor 104 may generate a second coefficient according to the degree of overlap between the predicted background area PT_1 of the predicted segmented image ImgP1 and the intersection area I1. Then, the processor 104 may generate the second loss value L2 according to the difference between the second coefficient and the preset value.

[0083] In some embodiments, the second coefficient is a Dice coefficient, and the above-mentioned preset value may be 1. That is, the processor 104 may obtain and generate the second coefficient and the second loss value L2 according to the following formula (6) and formula (7).

[0084]

[0085] Loss ∩ =1-Dice ∩ Formula (7)

[0086] Among them, Dice ∩ Represents the second coefficient; I ∩ represents the intersection image ImgI1; I′ represents the predicted segmentation image ImgP1; Loss ∩ represents the second loss value L2. The value range of the second coefficient, which is the Dice coefficient, is between 0 and 1. The higher the second coefficient is, the smaller the second loss value L2 is.

[0087] In step S560, the processor 104 may train the image segmentation model M1 according to the first loss value L1 and the second loss value L2. In some embodiments, the processor 104 may sum the first loss value L1 and the second loss value L2 to obtain a target loss value. Then, the processor 104 may train the image segmentation model M1 according to the target loss value. That is, the processor 104 may obtain the target loss value according to the following formula (8) to update the model parameters of the image segmentation model M1 according to the target loss value.

[0088] Loss=Loss ∩ +Loss ∪ =(1-Dice ∩ )+(1-Dice ∪ ) Formula (8)

[0089] Alternatively, in other embodiments, the processor 104 may perform weighted sum processing on the first loss value L1 and the second loss value L2 to obtain the target loss value. That is, the processor 104 may multiply the first loss value L1 and the second loss value L2 by the corresponding weight values ​​and then add them together to generate the target loss value.

[0090] Afterwards, the processor 104 may perform a back propagation on the image segmentation model according to the target loss value to calculate the gradient information, thereby adjusting the model parameters of the image segmentation model according to the gradient descent algorithm. When the processor 104 determines that the target loss value meets the convergence condition, the processor 104 may determine that the image segmentation model has completed training, and the trained image segmentation model can be used to execute subsequent applications.

[0091] In summary, in an embodiment of the present invention, the difference area of ​​the union area of ​​the annotated target areas of these annotated images can be used to generate a first loss value, and the intersection area of ​​the annotated target areas of these annotated images can be used to generate a second loss value. That is to say, according to the loss value generation method of the embodiment of the present invention, the embodiment of the present invention can formulate the learning goal of the model as accurately identifying the target area recognized by all annotators and accurately identifying the non-target area recognized by all annotators. In this way, the uncertain annotated area will not affect the calculation of the loss value, and therefore will not have an adverse effect on the training of the image segmentation model. Therefore, compared with the existing annotated image integration method, the embodiment of the present invention can effectively improve the accuracy of the image segmentation model for the uncertainty problem of image cutting.

[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An image segmentation model training method, suitable for electronic devices, characterized in that: include: Obtaining a plurality of annotated images of training images, wherein each of the plurality of annotated images includes an annotated target region and a background region; Acquire a union region of the annotated target regions of the plurality of annotated images, and acquire a difference region of the union region; Generating a predicted segmented image of the training image using an image segmentation model; Generating a first loss value according to the predicted segmented image and the difference region; generating a second loss value according to the predicted segmented image and the annotated target region of at least one of the plurality of annotated images; as well as The image segmentation model is trained according to the first loss value and the second loss value.

2. The image segmentation model training method according to claim 1, characterized in that: The predicted segmented image includes a predicted target area and a predicted background area, and the step of generating the first loss value according to the predicted segmented image and the difference area includes: The first loss value is generated according to the overlap degree between the predicted background area and the difference area of ​​the predicted segmented image.

3. The image segmentation model training method according to claim 2, characterized in that: The step of generating the first loss value according to the overlap degree between the predicted background area and the difference area of ​​the predicted segmented image comprises: generating a first coefficient according to the degree of overlap between the predicted background region and the difference region of the predicted segmented image; and The first loss value is generated according to a difference between the first coefficient and a preset value.

4. The image segmentation model training method according to claim 3, characterized in that: The first coefficient is the Dice coefficient.

5. The image segmentation model training method according to claim 1, characterized in that: The step of generating the second loss value according to the predicted segmented image and the annotated target area of ​​at least one of the plurality of annotated images comprises: Acquire an intersection area of ​​the annotated target areas of the plurality of annotated images; and The second loss value is generated according to the predicted segmented image and the intersection area.

6. The image segmentation model training method according to claim 5, characterized in that: The predicted segmented image includes a predicted target area and a predicted background area, and the step of generating the second loss value according to the predicted segmented image and the intersection area includes: The second loss value is generated according to the degree of overlap between the prediction target area and the intersection area of ​​the prediction segmentation image.

7. The image segmentation model training method according to claim 6, characterized in that: The step of generating the second loss value according to the overlap degree between the predicted target area and the intersection area of ​​the predicted segmented image comprises: generating a second coefficient according to the overlap degree between the predicted background region of the predicted segmented image and the intersection region; and The second loss value is generated according to a difference between the second coefficient and a preset value.

8. The image segmentation model training method according to claim 7, characterized in that: The second coefficient is the Dice coefficient.

9. The image segmentation model training method according to claim 5, characterized in that: The step of training the image segmentation model according to the first loss value and the second loss value comprises: Adding the first loss value and the second loss value to obtain a target loss value; and The image segmentation model is trained according to the target loss value.

10. The image segmentation model training method according to claim 1, characterized in that: The training images are medical images, and the image segmentation model is a deep learning model.

11. An electronic device, characterized in that: include: A storage device storing program codes; as well as A processor is coupled to the storage device and is configured to access the program code to execute: Obtaining a plurality of annotated images of training images, wherein each of the plurality of annotated images includes an annotated target region and a background region; Acquire a union region of the annotated target regions of the plurality of annotated images, and acquire a difference region of the union region; Generating a predicted segmented image of the training image using an image segmentation model; Generating a first loss value according to the predicted segmented image and the difference region; generating a second loss value according to the predicted segmented image and the annotated target region of at least one of the plurality of annotated images; as well as The image segmentation model is trained according to the first loss value.

12. The electronic device according to claim 11, characterized in that: The predicted segmented image includes a predicted target area and a predicted background area, and the processor executes: The first loss value is generated according to the overlap degree between the predicted background area and the difference area of ​​the predicted segmented image.

13. The electronic device according to claim 12, characterized in that: The processor performs: generating a first coefficient according to the degree of overlap between the predicted background region and the difference region of the predicted segmented image; and The first loss value is generated according to a difference between the first coefficient and a preset value.

14. The electronic device according to claim 13, characterized in that: The first coefficient is the Dice coefficient.

15. The electronic device according to claim 11, characterized in that: The processor performs: Acquire an intersection area of ​​the annotated target areas of the plurality of annotated images; The second loss value is generated according to the predicted segmented image and the intersection area.

16. The electronic device according to claim 15, characterized in that: The predicted segmented image includes a predicted target area and a predicted background area, and the processor executes: The second loss value is generated according to the degree of overlap between the prediction target area and the intersection area of ​​the prediction segmentation image.

17. The electronic device according to claim 16, characterized in that: The processor performs: generating a second coefficient according to the overlap degree between the predicted background region of the predicted segmented image and the intersection region; and The second loss value is generated according to a difference between the second coefficient and a preset value.

18. The electronic device according to claim 17, characterized in that: The second coefficient is the Dice coefficient.

19. The electronic device according to claim 15, characterized in that: The processor performs: Adding the first loss value and the second loss value to obtain a target loss value; and The image segmentation model is trained according to the target loss value.

20. The electronic device according to claim 11, characterized in that The training images are medical images, and the image segmentation model is a deep learning model.

Citation Information

Patent Citations

  • Method for training fundus image segmentation model and arteriovenous segmentation method

    CN113920077A

  • Segmentation method and device, electronic equipment and storage medium

    CN115731240A

  • Multi-expert adversarial regularization for robust and data-efficient deep supervised learning

    US20220301296A1