Image annotation method, annotation model training method and device
The image annotation method and model training improve medical image labeling accuracy by using a preset model trained on pre-annotated and extended data, addressing the labor-intensive and costly challenges of medical image annotation.
Patent Information
- Application Number
- CN202111371006.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-18
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2041-11-18
AI Technical Summary
Medical image annotation is labor-intensive, time-consuming, and costly due to the need for rigorous labeling by professionals, and the results are often inaccurate.
An image annotation method and model training approach that utilizes a preset annotation model trained on a data set comprising first annotated image data, which is pre-labeled, and second annotated image data derived from adjacent unlabeled data, improving accuracy through iterative training and annotation of medical images.
Enhances the accuracy of medical image annotation by leveraging pre-annotated data and extended data, resulting in more precise labeling results.
Smart Images

Figure CN114067179B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an image annotation method, an annotation model training method and a device. Background Art
[0002] Machine learning training models require a large amount of labeled data for the model to learn, but labeling data is a huge workload. Especially in the field of medical technology, the labeling task of medical images is particularly difficult. Since medical images are mainly three-dimensional images, and the labeling of medical images is relatively rigorous, professional training of labelers is required, which is time-consuming, labor-intensive, and costly. The labeling results of medical images are also inaccurate. Summary of the invention
[0003] Based on this, it is necessary to provide an image annotation method, an annotation model training method and a device that can improve the accuracy of medical image annotation in order to address the above technical problems.
[0004] In a first aspect, an image annotation method is provided, the method comprising:
[0005] Obtain medical imaging data to be annotated;
[0006] The medical image data to be labeled is input into a preset labeling model to obtain the labeling results of the medical image data; the preset labeling model is a model trained according to a preset data set; the preset data set includes first labeled image data and second labeled image data, the first labeled image data is pre-labeled image data, and the second labeled image data is obtained by labeling adjacent unlabeled image data according to the first labeled image data.
[0007] In one optional embodiment, the training method of the preset annotation model includes:
[0008] Determine first annotated image data and second annotated image data according to the original medical image data to obtain a preset data set;
[0009] The initial annotation model is trained according to the preset data set to obtain the preset annotation model.
[0010] In one optional embodiment, determining the first annotated image data and the second annotated image data according to the original medical image data includes:
[0011] Annotate the first original medical image data according to the user annotation instruction to obtain first annotated image data; the first original medical image data is image data in the original medical image data whose image clarity is greater than or equal to a first clarity threshold;
[0012] The second original medical image data is annotated according to the first annotated image data to obtain the second annotated image data; the second original medical image data is the image data in which the image clarity is less than or equal to the second clarity threshold in the original medical image data and is not annotated; the adjacent upper and lower layers of the second original medical image data both belong to the first annotated image data; the first clarity threshold is greater than the second clarity threshold.
[0013] In one optional embodiment, annotating the second original medical image data according to the first annotated image data to obtain the second annotated image data includes:
[0014] Determining, from the first annotated image data, upper first annotated image data and lower first annotated image data of the second original medical image data;
[0015] Determine a pixel union of the annotation contours according to the first annotation contour of the upper layer first annotation image data and the second annotation contour of the lower layer first annotation image data;
[0016] Determine the intersection of foreground pixels and the intersection of background pixels according to the pixels in the upper first annotated image data and the pixels in the lower first annotated image data;
[0017] The second original medical image data is annotated according to the annotated contour pixel union, the foreground pixel intersection and the background pixel intersection to obtain second annotated image data.
[0018] In one of the optional embodiments, the second original medical image data is annotated according to the annotated contour pixel union, the foreground pixel intersection and the background pixel intersection to obtain the second annotated image data, including:
[0019] The pixels in the second original medical image data that do not belong to the union of the labeled pixels but belong to the intersection of the foreground pixels are labeled as foreground pixels;
[0020] The pixels in the second original medical image data that do not belong to the union of the labeled pixels but belong to the intersection of the background pixels are labeled as background pixels.
[0021] In one of the optional embodiments, the initial annotation model is trained according to a preset data set to obtain a preset annotation model, including:
[0022] Input the preset data set into the initial annotation model to obtain the annotation result of the preset data set;
[0023] The preset data set is updated according to the annotation results, and the updated preset data set is input into the initial annotation model for iterative training until the initial annotation model meets the convergence condition, thereby obtaining the preset annotation model.
[0024] In one of the optional embodiments, the preset data set is input into the initial annotation model to obtain the annotation result of the preset data set, including:
[0025] Input the preset data set into the initial annotation model to obtain the foreground prediction probability of each pixel in the preset data set;
[0026] Pixels whose foreground prediction probability is greater than or equal to the first probability threshold are marked as foreground pixels, and pixels whose foreground prediction probability is less than or equal to the second probability threshold are marked as background pixels.
[0027] In one of the optional embodiments, the above convergence condition includes:
[0028] The difference between the number of foreground pixels in the annotation result of the current iteration and the number of foreground pixels in the annotation result of the previous iteration is less than the difference threshold; and / or the number of iterations satisfies the number threshold.
[0029] In a second aspect, a method for training a labeling model is provided, the method comprising:
[0030] Determining first annotated image data and unannotated image data according to the original medical image data; the first annotated image data is pre-annotated image data;
[0031] Annotate adjacent unannotated image data according to the first annotated image data to obtain second annotated image data;
[0032] Determine a preset data set according to the first annotated image data and the second annotated image data;
[0033] The preset data set is input into the initial annotation model for training to obtain a preset annotation model; the preset annotation model is used to determine the annotation results of the medical image data to be annotated.
[0034] In a third aspect, an image annotation device is provided, the device comprising:
[0035] An acquisition module, used to acquire medical image data to be annotated;
[0036] The labeling module is used to input the medical image data to be labeled into a preset labeling model to obtain the labeling results of the medical image data; the preset labeling model is a model trained according to a preset data set; the preset data set includes first labeled image data and second labeled image data, the first labeled image data is pre-calibrated image data, and the second labeled image data is obtained by labeling adjacent unlabeled image data according to the first labeled image data.
[0037] In a fourth aspect, a training device for a labeling model is provided, the device comprising:
[0038] A first determination module is used to determine first annotated image data and unannotated image data according to the original medical image data; the first annotated image data is pre-annotated image data;
[0039] A preprocessing module, used for labeling adjacent unlabeled image data according to the first labeled image data to obtain second labeled image data;
[0040] A second determining module, configured to determine a preset data set according to the first annotated image data and the second annotated image data;
[0041] The training module is used to input a preset data set into an initial annotation model for training to obtain a preset annotation model; the preset annotation model is used to determine the annotation results of the medical image data to be annotated.
[0042] In a fifth aspect, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements any of the methods described in the first and second aspects when executing the computer program.
[0043] In a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any one of the first and second aspects above is implemented.
[0044] In a fifth aspect, the present application further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in any one of the first aspect and the second aspect is implemented.
[0045] In a sixth aspect, the present application further provides a computer-readable storage medium, wherein a computer program is stored thereon, and when the computer program is executed by a processor, the method described in any one of the first aspect and the second aspect is implemented.
[0046] In a seventh aspect, the present application further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the method described in any one of the first aspect and the second aspect is implemented.
[0047] In the above-mentioned image annotation method, annotation model training method and device, a computer device obtains medical image data to be annotated, inputs the medical image data to be annotated into a preset annotation model, and obtains the annotation result of the medical image data. Wherein, the preset annotation model is a model trained according to a preset data set; the preset data set includes first annotated image data and second annotated image data, the first annotated image data is pre-annotated image data, and the second annotated image data is obtained by annotating adjacent unannotated image data according to the first annotated image data. In this scheme, since the preset annotation model is trained according to the first annotated image data and the second annotated image data, wherein the first annotated image data is pre-annotated data, which has a certain accuracy, and the second annotated image data is obtained by annotating adjacent unannotated image data according to the first annotated image data, that is, the second annotated image data is the extended data of the annotation data, and also has a certain accuracy, the annotation model is obtained by training according to the extended data and the first annotated image data, and its annotation result for the medical image data is also relatively accurate, that is, the annotation of the medical image data based on the preset annotation model improves the accuracy of the annotation result. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 A diagram of an application environment of an image annotation method in an embodiment;
[0049] Figure 2 is a schematic diagram of a flow chart of an image annotation method in one embodiment;
[0050] Figure 3 is a schematic diagram of a flow chart of an image annotation method in one embodiment;
[0051] Figure 4 is a schematic diagram of a flow chart of an image annotation method in one embodiment;
[0052] Figure 5 is a schematic diagram of a flow chart of an image annotation method in one embodiment;
[0053] Figure 6 is a schematic diagram of a flow chart of an image annotation method in one embodiment;
[0054] Figure 7 is a schematic diagram of a flow chart of an image annotation method in one embodiment;
[0055] Figure 8 A schematic diagram of a flow chart of a training method for a labeling model in another embodiment;
[0056] Fig. 9 A flowchart of a method for training and applying a labeling model in one embodiment;
[0057] Fig.10 is a structural block diagram of an image annotation device in one embodiment;
[0058] Fig.11 is a structural block diagram of an image annotation device in one embodiment;
[0059] Fig.12 The figure is a structural block diagram of a training device for a labeling model in an embodiment. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0061] The image annotation method provided in this application can be applied to Figure 1 In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 1 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, an image annotation method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad set on the computer device housing, or an external keyboard, touch pad or mouse, etc.
[0062] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0063] The following will explain in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems through embodiments and in combination with the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that the present application Figure 2-Figure 7 The image annotation method provided in the embodiment is executed by a computer device or an image annotation apparatus, which can be part or all of the computer device through software, hardware, or a combination of software and hardware. In the following method embodiments, the execution subject is a computer device as an example for description.
[0064] In one embodiment, Figure 2 As shown, an image annotation method is provided, comprising the following steps:
[0065] S201: Obtain medical image data to be labeled.
[0066] Among them, the medical imaging data can be imaging data of any form, for example, it can be electronic computed tomography (CT) imaging data of various parts, or it can be magnetic resonance (MR) imaging data of various parts. This embodiment does not limit the type of medical imaging data.
[0067] In this embodiment, the computer device may obtain the medical image data that needs to be annotated from the database, or may accept the medical image data that needs to be annotated imported by other terminals or users based on the interactive interface.
[0068] S202: Input the medical image data to be annotated into a preset annotation model to obtain the annotation result of the medical image data.
[0069] Among them, the preset annotation model is a model trained according to a preset data set; the preset data set includes first annotated image data and second annotated image data, the first annotated image data is pre-annotated image data, and the second annotated image data is obtained by annotating adjacent unlabeled image data according to the first annotated image data.
[0070] The first annotated image data and the second annotated image data are derived from multi-layer image data of the same original image data. The pre-annotated image data (first annotated image data) may be image data obtained by manually annotating the original image data, or may be image data obtained by screening and annotating the original image data based on certain parameters of the image data. Here, the parameters of the image data may be parameters such as clarity and resolution. For example, the original image data whose clarity is greater than or equal to the first clarity threshold is annotated to obtain the first annotated image data, wherein the first clarity threshold may be 80%, that is, when the clarity of the original image data is greater than or equal to 80%, the original image data is annotated to obtain the first annotated image data; or, the original image data whose resolution is greater than or equal to the first resolution threshold may be annotated to obtain the first annotated image data, wherein the first resolution threshold may be 100 PPI, and when the resolution of the original image data is greater than or equal to 100 PPI, the original image data is annotated to obtain the first annotated image data. In this embodiment, the values of the first clarity threshold and the first resolution threshold are not limited, and can be determined according to actual conditions. After obtaining the first labeled image data, in addition to the first labeled image data, there are remaining unlabeled image data in the original image data. The computer device can screen the remaining unlabeled image data to determine that the image data of the adjacent upper and lower layers are all candidate unlabeled image data of the first labeled image data, and label the candidate unlabeled image data according to the first labeled image data, thereby obtaining the second labeled image data. Since the first labeled image data is manually labeled, the result is relatively accurate, and the second labeled image data is obtained based on the first labeled image data, so the second labeled image data is also relatively accurate.
[0071] In this embodiment, the computer device trains a preset annotation model based on the first annotated image data and the second annotated image data with a higher accuracy, and the annotation results of the annotation model are relatively accurate. The acquired medical image data to be annotated is input into the preset annotation model to obtain its corresponding annotation results. Optionally, the preset annotation model can be applied to the classification model, so that the input data is annotated based on the preset annotation model to obtain the annotation results, and the classification is performed based on the annotation results, so that the obtained classification results are more accurate; or, the preset annotation model can also be applied to the segmentation model, and the input data is annotated based on the preset annotation model to obtain the annotation results, so as to perform image segmentation based on the annotation results, and further improve the efficiency and accuracy of image segmentation.
[0072] In the above-mentioned image annotation method, a computer device obtains medical image data to be annotated, inputs the medical image data to be annotated into a preset annotation model, and obtains the annotation result of the medical image data. Wherein, the preset annotation model is a model trained according to a preset data set; the preset data set includes first annotated image data and second annotated image data, the first annotated image data is pre-annotated image data, and the second annotated image data is obtained by annotating adjacent unannotated image data according to the first annotated image data. In this scheme, since the preset annotation model is trained according to the first annotated image data and the second annotated image data, wherein the first annotated image data is pre-annotated data, which has a certain accuracy, and the second annotated image data is obtained by annotating adjacent unannotated image data according to the first annotated image data, that is, the second annotated image data, as the extended data of the annotation data, also has a certain accuracy, the annotation model is obtained by training according to the extended data and the first annotated image data, and its annotation result for the medical image data is also relatively accurate, that is, the annotation of the medical image data based on the preset annotation model improves the accuracy of the annotation result.
[0073] The above-mentioned image annotation method is based on a preset annotation model. In one of the optional embodiments, Figure 3 As shown, the training method of the preset annotation model includes:
[0074] S301. Determine first annotated image data and second annotated image data according to original medical image data to obtain a preset data set.
[0075] The original medical image data is multi-layer image data, and the first annotated image data and the second annotated image data are derived from the multi-layer image data in the same original image data.
[0076] In this embodiment, the computer device determines the first annotated image data and the second annotated image data from the original medical image data. Optionally, the first annotated image data can be image data obtained by manually annotating the original image data, for example, the first annotated image data imported by the user through the interactive interface is obtained. For example, if the image quality of the original medical image data is high, that is, all or multiple continuous slice images of the original medical image data are relatively clear, the user can annotate the original medical image data through the interactive interface in a full-image annotation manner to obtain the first annotated image data; if only some continuous slice images in the original medical image data are relatively clear, the user can annotate the original medical image data through the interactive interface in a continuous slice annotation manner to obtain the first annotated image data; if only individual slice images in the original medical image data are relatively clear, the user can annotate the original medical image data through the interactive interface in an independent slice annotation manner to obtain the first annotated image data. Here, further, in the process of the user's annotation, the user can add his or her own subjective judgment on the confidence of the original medical image data to further improve the accuracy of the annotation. In addition, the first annotated image data can also be the data obtained by annotating the image data that meets the image quality requirements after the computer device screens the original medical image data for image quality. The second annotated image data is the data obtained by supplementing the unannotated image data in the original medical image data according to the first annotated image data.
[0077] Optionally, in one of the optional embodiments, as Figure 4 As shown, determining the first annotated image data and the second annotated image data according to the original medical image data includes:
[0078] S401 . Annotate first original medical image data according to a user annotation instruction to obtain first annotated image data.
[0079] Among them, the first original medical image data is image data in the original medical image data whose image clarity is greater than or equal to the first clarity threshold, the first original medical image data includes image data of multiple slices, and the first annotated image data includes image data of at least two slices.
[0080] In this embodiment, the computer device can perform data screening according to the image clarity of each data in the original medical image data, and determine the image data whose image clarity is greater than or equal to the first clarity threshold value as the first original medical image data. For example, the influencing data whose image clarity is greater than or equal to 80% in the original medical image data is used as the first original medical image data. Optionally, the computer device can output the first original medical image data through a user interaction interface so that the user can annotate the first original medical image data. Since the image clarity of the first original medical image data is high, the accuracy of the user's annotation is also high. Accordingly, the computer device receives the first annotated image data annotated by the user based on the user interaction interface. Optionally, the computer device can also annotate the first original medical image data through the annotation model after the original medical image data is screened for clarity, thereby obtaining the first annotated image data.
[0081] S402: annotate the second original medical image data according to the first annotated image data to obtain second annotated image data.
[0082] Among them, the second original medical image data is the image data in which the image clarity is less than or equal to the second clarity threshold and is not labeled; the adjacent upper and lower layers of the second original medical image data both belong to the first labeled image data; and the first clarity threshold is greater than the second clarity threshold.
[0083] In this embodiment, the first original medical image data and the second original medical image data are derived from multiple slice image data of the same original medical image data. In actual situations, the multiple slice image data of the same original medical image data include first annotated image data of some slices that are annotated, and original medical image data of some slices that are not annotated. In actual situations, the annotated first annotated image data and the unannotated original medical image data may be image data of adjacent slices, that is, the image data of the previous slice or the image data of the next slice of the original medical image data may be unannotated image data, or may be annotated first annotated image data. Based on this actual situation, in this embodiment, the unannotated image data in the original medical image data can be screened based on the second clarity threshold to obtain candidate medical image data with a clarity greater than or equal to the second clarity threshold, and then determine that the candidate medical image data with the corresponding image data of the previous slice and the image data of the next slice are both the first annotated image data as the second original image data. Similarly, the second original medical image data may also include medical image data of at least one slice that meets the description of the above embodiment.
[0084] After the computer device selects the second original medical image data from the original medical image data according to the above conditions, it annotates the second annotated image data according to the first annotated image data to obtain the second annotated image data.
[0085] In this embodiment, the computer device can determine the second original medical image data from the original medical image data according to the second clarity threshold and the preset second original medical image data screening method, so as to perform further annotation processing on the second original medical image data. Different annotation processing is performed on the original medical image data of different clarity, which can be more adapted to the clarity of the medical image data and the obtained annotation results are more accurate.
[0086] Optionally, in one of the optional embodiments, as Figure 5 As shown, the second original medical image data is annotated according to the first annotated image data to obtain the second annotated image data, including:
[0087] S501 : Determine upper first annotated image data and lower first annotated image data of second original medical image data from first annotated image data.
[0088] In this embodiment, after the computer device determines the second original medical image data, if the second original medical image data includes one slice image data, the upper first annotated image data and the lower first annotated image data adjacent to the current second original medical image data are determined from the first annotated image data according to the slice identifier of the current second original medical image data, where the slice identifier may be a slice number. If the second original medical image data includes multiple slice image data, the upper first annotated image data and the lower first annotated image data adjacent to each second original medical image data are determined from the first annotated image data according to the slice identifier of each second original medical image data.
[0089] S502 : Determine a union of labeled contour pixels according to a first labeled contour of the upper-layer first labeled image data and a second labeled contour of the lower-layer first labeled image data.
[0090] In this embodiment, after determining the adjacent upper-layer first annotated image data and lower-layer first annotated image data of the second original medical image data, the computer device obtains the first annotated contour annotated in the upper-layer first annotated image data, obtains the second annotated contour annotated in the lower-layer first annotated image data, and determines the contour pixel union according to the first annotated contour and the second annotated contour. Optionally, the computer device may also perform expansion processing on the first annotated contour and the second annotated contour, for example, taking kernel as 5, and performing expansion processing on the first annotated contour and the second annotated contour to obtain the annotated contour pixel union C ∪ , this embodiment does not limit this.
[0091] S503 : Determine a foreground pixel intersection and a background pixel intersection according to pixels in the upper layer first annotated image data and pixels in the lower layer first annotated image data.
[0092] In this embodiment, the computer device obtains each pixel in the upper first annotated image data, and determines the annotated upper foreground pixels and the unannotated upper background pixels from each pixel; obtains each pixel in the lower first annotated image data, and determines the annotated lower foreground pixels and the unannotated lower background pixels from each pixel; and then determines the foreground pixel intersection F according to the upper foreground pixels and the lower foreground pixels. ∩ ; Determine the background pixel intersection B based on the upper background pixels and the lower background pixels ∩ .
[0093] S504 , annotating the second original medical image data according to the annotated contour pixel union, the foreground pixel intersection and the background pixel intersection to obtain second annotated image data.
[0094] In this embodiment, the computer device determines the annotated contour pixel set C ∪ , foreground pixel intersection F ∩ , background pixel intersection B ∩ Afterwards, each pixel in the second original medical image data is labeled according to a preset pixel division condition to obtain second labeled image data.
[0095] Optionally, in the process of determining the second annotated image data by the computer device, in one of the optional embodiments, the second original medical image data is annotated according to the annotated contour pixel union, the foreground pixel intersection and the background pixel intersection to obtain the second annotated image data, including the following two cases:
[0096] First, the pixels in the second original medical image data that do not belong to the union of the labeled pixels but belong to the intersection of the foreground pixels are labeled as foreground pixels;
[0097] Second, the pixels in the second original medical image data that do not belong to the union of the labeled pixels but belong to the intersection of the background pixels are labeled as background pixels.
[0098] In this embodiment, the computer device generates a pixel set C according to the pixel set C of the annotated contour. ∪ , foreground pixel intersection F ∩ , background pixel intersection B ∩ To determine the type of each pixel in the second original medical image data, that is, to label the second original medical image data. If the pixel does not belong to the annotated contour pixel union C ∪ , belongs to the foreground pixel intersection F ∩, then the pixel is determined to be a foreground annotation. Optionally, the pixel value of the pixel can be set to a first value, where the first value can be 0. If the pixel does not belong to the annotated contour pixel union C ∪ , belongs to the background pixel intersection B ∩ , then the pixel is determined to be a background annotation. Optionally, the pixel value of the pixel can be set to a second value, where the second value can be 1. In addition, there is another case where, in the second original medical image data, there are pixels belonging to the annotated pixel union set. That is, if it is determined that the pixel in the second original medical image data belongs to the annotated contour pixel union set C ∪ , then the pixel value of the pixel is set to the third value, where the third value can be -1. It should be noted that if the pixel value of the pixel point is the third value, it means that there is uncertainty about the pixel, that is, it is uncertain whether the pixel belongs to the foreground pixel or the background pixel. Therefore, the pixel is blurred and is not used as a training pixel in the next iteration of training. Specifically, the pixel The formula for determining the type is as follows:
[0099]
[0100] In this embodiment, when the clarity of the second original image data is less than the first clarity threshold, the labeling method corresponding to the first labeled image data is not used for processing, thereby avoiding the problem of inaccurate labeling caused by the clarity of the second original medical image data not satisfying the first clarity threshold. The second original medical image data with a clarity greater than or equal to the second clarity threshold is further labeled to fit the clarity of the second original medical image data. The labeling result obtained by the above-mentioned labeling method is more accurate.
[0101] S302: Train the initial annotation model according to the preset data set to obtain a preset annotation model.
[0102] The initial annotation model can be a machine learning model or a neural network model.
[0103] In this embodiment, a computer device determines first annotated image data and second annotated image data from original medical image data according to the method provided in the above embodiment, thereby obtaining a preset data set based on the first annotated image data and the second annotated image data, and inputs the preset data set into an initial annotation model to train the model, thereby obtaining a preset annotation model that meets convergence conditions or meets training conditions.
[0104] In this embodiment, the first labeled image and the second labeled image are obtained according to the method in the above embodiment. Both the first labeled image and the second labeled image are obtained by using a labeling method suitable for their clarity, and their labeling accuracy is higher. The initial labeling model is trained using training data with higher accuracy, and the prediction accuracy of the trained model is also relatively high.
[0105] Optionally, in one of the optional embodiments, as Figure 6 As shown, the initial annotation model is trained according to the preset data set to obtain the preset annotation model, including:
[0106] S601: Input a preset data set into an initial annotation model to obtain an annotation result of the preset data set.
[0107] In this embodiment, the computer device inputs the preset data set into the initial annotation model, performs annotation prediction on the image data of the unannotated part of the preset data set, and obtains the annotation result of the current preset data set.
[0108] Alternatively, if Figure 7 As shown, the preset data set is input into the initial annotation model to obtain the annotation results of the preset data set, including:
[0109] S701: Input a preset data set into an initial annotation model to obtain a foreground prediction probability of each pixel in the preset data set.
[0110] In this embodiment, the computer device inputs the preset data set into the initial annotation model to obtain the predicted probability of each pixel in the preset data set as a foreground annotation, including the predicted probability of each pixel in the image data of the annotated part of the preset data set and the predicted probability of each pixel in the image data of the unannotated part. The predicted probability of each pixel in the image data of the unannotated part can be obtained from the previous annotation result in the iterative process.
[0111] S702: Mark pixels whose foreground prediction probability is greater than or equal to a first probability threshold as foreground pixels, and mark pixels whose foreground prediction probability is less than or equal to a second probability threshold as background pixels.
[0112] In this embodiment, the computer device further processes the predicted probability of each pixel in the preset data set as a foreground annotation through the annotation model. For example, the first probability threshold is T1, and the second probability threshold is T2. The computer device can use the annotation model to mark the pixels in the preset data set whose foreground prediction probability is greater than or equal to the first probability threshold T1 as foreground pixels; and mark the pixels in the preset data set whose foreground prediction probability is less than or equal to the second probability threshold T2 as background pixels. If the foreground prediction probability of the pixel is less than T1 and greater than T2, the pixel is blurred. Similarly, the pixel value of the pixel is set to a third value, and is not used as a training pixel in the next iteration of training, thereby achieving annotation prediction of the labeled and unlabeled parts of the image data in the preset data set. Optionally, T1 can be 0.9 and T2 can be 0.1. Among them, according to the pixel The formula for judging whether a pixel is a foreground pixel or a background pixel is as follows:
[0113]
[0114] In this embodiment, during the process of training the initial annotation model, annotation prediction is performed on the unlabeled image data in the preset data set. According to the annotation prediction results, only pixels determined as foreground pixels and background pixels are retained as training pixels, and blurred pixels are eliminated, thereby improving the accuracy of the training data set.
[0115] S602: Update a preset data set according to the annotation result, and input the updated preset data set into the initial annotation model for iterative training until the initial annotation model meets the convergence condition, thereby obtaining a preset annotation model.
[0116] Optionally, the convergence condition includes: the difference between the number of foreground pixels in the annotation result of the current iteration and the number of foreground pixels in the annotation result of the previous iteration is less than a difference threshold; and / or the number of iterations satisfies a number threshold.
[0117] In this embodiment, after the computer device determines the annotation type of each pixel according to the foreground prediction probability of each pixel, the pixel determined as the foreground pixel is added to the training set as the foreground data, the pixel determined as the background pixel is added to the training set as the background data, and the pixel whose pixel value is the third value is blurred and not used as the training data in the training set, so as to update the training data set for each annotation prediction, and input the updated training data set into the annotation model, and continue to perform annotation iterations until the number of iterations meets the preset number requirements, or until the difference between the number of foreground pixels in the current annotation result and the number of foreground data in the previous annotation result is less than the difference threshold, it is determined that the annotation model has reached convergence, the iteration is terminated, and the preset annotation model is obtained. It should be noted here that the difference between the number of foreground pixels in the current annotation result and the number of foreground data in the previous annotation result is less than the difference threshold, which means that the increment of the foreground data has been small enough to be stable, that is, there is almost no unlabeled data that can be labeled in the training data set. In this case, it is determined that the annotation model iteration has reached convergence.
[0118] In this embodiment, the computer device determines the first annotated image data according to the image clarity, and the first annotated image data has a high accuracy, and then determines the second annotated image data according to the first annotated image data, so as to achieve the purpose of expanding the annotated image data, so that the amount of data in the preset data set used to train the initial annotation model is relatively rich, so that the training of the initial annotation model is relatively accurate. In addition, in the process of training the initial annotation model, the image data of the unannotated part in the preset data set is predicted by annotation, and according to the annotation prediction results, only the pixels determined as foreground pixels and background pixels are retained as training pixels, and the blurred pixels are eliminated, thereby improving the accuracy of the training data set, and the training data set is updated according to the results of each annotation output, so that the data in the training data set becomes clearer and more accurate, further improving the annotation accuracy of the annotation model obtained by training.
[0119] The following will explain in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems through embodiments and in combination with the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. It should be noted that the present application Figure 8 The training method of the annotation model provided in the embodiment is executed by a computer device or a training device for the annotation model. The training device for the annotation model can be part or all of the computer device through software, hardware, or a combination of software and hardware. In the following method embodiments, the execution subject is a computer device as an example for explanation.
[0120] In one embodiment, Figure 8As shown, a training method for a labeling model is provided, the method comprising:
[0121] S801. Determine first annotated image data and unannotated image data according to original medical image data; the first annotated image data is pre-annotated image data.
[0122] The original medical image data refers to the multi-layer image data of a picture, and the first annotated image data is the same as the above Figure 4 The first annotated image data in the embodiment is similar, and is determined by annotating the slice image data whose image clarity is greater than or equal to the first clarity threshold, wherein the first clarity threshold may be 80%. Then, the unannotated image data is the data in the original medical image data that is not annotated and whose clarity is less than the first threshold. Here, illustratively, the first threshold may be 80%. The method for determining clarity is also similar to that in the above embodiment, and may be determined by the grayscale value of the slice image data, etc.
[0123] S802: Label adjacent unlabeled image data according to the first labeled image data to obtain second labeled image data.
[0124] In this embodiment, Figure 4 and Figure 5 Similar to the embodiment provided, in order to expand the data in the data set used for the training model, the computer device here can label the unlabeled image data according to the first labeled image data. For example, the computer device can determine the target unlabeled image data from the unlabeled image data, and the target unlabeled image data refers to the image data of the upper layer and the image data of the lower layer adjacent to the target unlabeled image data both belong to the first labeled image data. In this case, similar to the above Figure 4 and Figure 5 Similar to the method provided in the embodiment, the computer device can label the target unlabeled image data according to the labeled image data of the previous layer and the labeled image data of the next layer, thereby achieving the purpose of expanding the labeled image data set.
[0125] S803: Determine a preset data set according to the first annotated image data and the second annotated image data.
[0126] In this embodiment, the computer device determines the first annotated image data obtained in the above step 801 and the second annotated image data obtained in the above step 802 as preset data sets for training the annotation model.
[0127] S804: Input a preset data set into an initial annotation model for training to obtain a preset annotation model; the preset annotation model is used to determine the annotation result of the medical image data to be annotated.
[0128] In this embodiment, the computer device inputs the preset data set into the initial annotation model for training, and uses the output result of each time as a new input data set to repeatedly train the annotation model until the annotation model reaches convergence, or the number of training times meets the training requirements, thereby obtaining the preset landmark model. Similarly, the specific training process of the annotation model can refer to the above Figure 6 and Figure 7 The embodiments provided are not described in detail in this embodiment.
[0129] In the training method of the above-mentioned annotation model, the computer device determines the first annotated image data and the unlabeled image data according to the original medical image data, annotates the adjacent unlabeled image data according to the first annotated image data to obtain the second annotated image data, determines the preset data set according to the first annotated image data and the second annotated image data, inputs the preset data set into the initial annotation model for training, and obtains the preset annotation model. In this scheme, the first annotated image data is pre-annotated data, which has a certain accuracy, and the second annotated image data is obtained by annotating the adjacent unlabeled image data according to the first annotated image data, that is, the second annotated image data is the extended data of the annotation data, and also has a certain accuracy. The annotation model is obtained by training the extended data and the first annotated image data, and its annotation result for medical image data is also relatively accurate.
[0130] The training method of the annotation model provided in this embodiment is similar to the above Figure 3 The training method of the provided preset model is similar and will not be described in detail in this embodiment.
[0131] In order to better illustrate the above method, Fig. 9 As shown, this embodiment provides a training and application method of a labeling model, which specifically includes:
[0132] S101, annotating first original medical image data according to a user annotation instruction to obtain first annotated image data;
[0133] S102, determining upper first annotated image data and lower first annotated image data of second original medical image data from the first annotated image data;
[0134] S103, determining a union of labeled contour pixels according to a first labeled contour of the upper-layer first labeled image data and a second labeled contour of the lower-layer first labeled image data;
[0135] S104, determining a foreground pixel intersection and a background pixel intersection according to pixels in the upper layer first annotated image data and pixels in the lower layer first annotated image data;
[0136] S105, annotating the second original medical image data according to the annotated contour pixel union, the foreground pixel intersection, and the background pixel intersection to obtain second annotated image data;
[0137] S106, inputting the first annotated image data and the second annotated image data into an initial annotation model to obtain an annotation result of a preset data set;
[0138] S107, updating a preset data set according to the annotation result, and inputting the updated preset data set into the initial annotation model for iterative training until the initial annotation model meets the convergence condition, thereby obtaining a preset annotation model;
[0139] S108, obtaining medical image data to be annotated;
[0140] S109: input the medical image data to be annotated into a preset annotation model to obtain the annotation result of the medical image data.
[0141] In this embodiment, since the preset annotation model is obtained by training based on the first annotated image data and the second annotated image data, wherein the first annotated image data is pre-annotated data and has a certain accuracy, and the second annotated image data is obtained by annotating adjacent unannotated image data based on the first annotated image data, that is, the second annotated image data, as extended data of the annotation data, also has a certain accuracy, the annotation model is obtained by training based on the extended data and the first annotated image data, and its annotation results for medical image data are also relatively accurate, that is, the annotation of medical image data based on the preset annotation model improves the accuracy of the annotation results.
[0142] The training and application methods of the annotation models provided in the above embodiments have similar implementation principles and technical effects to those of the above method embodiments, and will not be described in detail here.
[0143] It should be understood that although Figure 2-9 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-9 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0144] In one embodiment, Fig.10As shown, an image annotation device is provided, comprising:
[0145] Acquisition module 01, used to acquire medical image data to be annotated;
[0146] The labeling module 02 is used to input the medical image data to be labeled into a preset labeling model to obtain the labeling results of the medical image data; the preset labeling model is a model trained according to a preset data set; the preset data set includes first labeled image data and second labeled image data, the first labeled image data is pre-calibrated image data, and the second labeled image data is obtained by labeling adjacent unlabeled image data according to the first labeled image data.
[0147] In one of the optional embodiments, Fig.11 As shown, the image annotation device also includes a training module 03;
[0148] The training module 03 is used to determine the first annotated image data and the second annotated image data according to the original medical image data to obtain a preset data set; and train the initial annotation model according to the preset data set to obtain a preset annotation model.
[0149] In one of the optional embodiments, the training module 03 is used to annotate the first original medical image data according to the user's annotation instruction to obtain the first annotated image data; the first original medical image data is the image data in the original medical image data whose image clarity is greater than or equal to the first clarity threshold; the second original medical image data is annotated according to the first annotated image data to obtain the second annotated image data; the second original medical image data is the image data in the original medical image data whose image clarity is less than or equal to the second clarity threshold and is not annotated; the adjacent upper and lower layers of the second original medical image data both belong to the first annotated image data; the first clarity threshold is greater than the second clarity threshold.
[0150] In one of the optional embodiments, the training module 03 is used to determine the upper first annotated image data and the lower first annotated image data of the second original medical image data from the first annotated image data; determine the annotated contour pixel union according to the first annotated contour of the upper first annotated image data and the second annotated contour of the lower first annotated image data; determine the foreground pixel intersection and the background pixel intersection according to the pixels in the upper first annotated image data and the pixels in the lower first annotated image data; annotate the second original medical image data according to the annotated contour pixel union, the foreground pixel intersection and the background pixel intersection to obtain the second annotated image data.
[0151] In one of the optional embodiments, the training module 03 is used to mark the pixels in the second original medical image data that do not belong to the union of annotated pixels but belong to the intersection of foreground pixels as foreground pixels; and to mark the pixels in the second original medical image data that do not belong to the union of annotated pixels but belong to the intersection of background pixels as background pixels.
[0152] In one of the optional embodiments, the training module 03 is used to input a preset data set into the initial annotation model to obtain an annotation result of the preset data set; update the preset data set according to the annotation result, and input the updated preset data set into the initial annotation model for iterative training until the initial annotation model meets the convergence condition to obtain the preset annotation model.
[0153] In one of the optional embodiments, the training module 03 is used to input the preset data set into the initial annotation model to obtain the foreground prediction probability of each pixel in the preset data set; the pixels whose foreground prediction probability is greater than or equal to the first probability threshold are labeled as foreground pixels, and the pixels whose foreground prediction probability is less than or equal to the second probability threshold are labeled as background pixels.
[0154] In one of the optional embodiments, the above convergence condition includes: the difference between the number of foreground pixels in the annotation result of the current iteration and the number of foreground pixels in the annotation result of the previous iteration is less than a difference threshold; and / or the number of iterations meets the number threshold.
[0155] For the specific definition of the image annotation device, please refer to the definition of the image annotation method above, which will not be repeated here. Each module in the above-mentioned image annotation device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0156] In one embodiment, Fig.12 As shown, a training device for a labeling model is provided, comprising:
[0157] A first determining module 11 is used to determine first annotated image data and unannotated image data according to the original medical image data; the first annotated image data is pre-annotated image data;
[0158] A preprocessing module 12 is used to label adjacent unlabeled image data according to the first labeled image data to obtain second labeled image data;
[0159] A second determining module 13, configured to determine a preset data set according to the first annotated image data and the second annotated image data;
[0160] The training module 14 is used to input the preset data set into the initial annotation model for training to obtain a preset annotation model; the preset annotation model is used to determine the annotation results of the medical image data to be annotated.
[0161] For the specific definition of the training device for the annotation model, please refer to the definition of the training method for the annotation model above, which will not be repeated here. Each module in the above-mentioned training device for the annotation model can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0162] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0163] Obtain medical imaging data to be annotated;
[0164] The medical image data to be labeled is input into a preset labeling model to obtain the labeling results of the medical image data; the preset labeling model is a model trained according to a preset data set; the preset data set includes first labeled image data and second labeled image data, the first labeled image data is pre-labeled image data, and the second labeled image data is obtained by labeling adjacent unlabeled image data according to the first labeled image data.
[0165] The implementation principle and technical effect of the computer device provided in the above embodiment are similar to those of the above method embodiment, and will not be repeated here.
[0166] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0167] Obtain medical imaging data to be annotated;
[0168] The medical image data to be labeled is input into a preset labeling model to obtain the labeling results of the medical image data; the preset labeling model is a model trained according to a preset data set; the preset data set includes first labeled image data and second labeled image data, the first labeled image data is pre-labeled image data, and the second labeled image data is obtained by labeling adjacent unlabeled image data according to the first labeled image data.
[0169] The computer-readable storage medium provided in the above embodiment has similar implementation principles and technical effects as those of the above method embodiment, and will not be described in detail here.
[0170] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0171] Obtain medical imaging data to be annotated;
[0172] The medical image data to be labeled is input into a preset labeling model to obtain the labeling results of the medical image data; the preset labeling model is a model trained according to a preset data set; the preset data set includes first labeled image data and second labeled image data, the first labeled image data is pre-labeled image data, and the second labeled image data is obtained by labeling adjacent unlabeled image data according to the first labeled image data.
[0173] The implementation principle and technical effect of the computer program product provided in the above embodiment are similar to those of the above method embodiment, and will not be repeated here.
[0174] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0175] Determine first labeled image data and unlabeled image data according to the original medical image data;
[0176] Annotate adjacent unannotated image data according to the first annotated image data to obtain second annotated image data;
[0177] Determine a preset data set according to the first annotated image data and the second annotated image data;
[0178] The preset data set is input into the initial annotation model for training to obtain the preset annotation model.
[0179] The implementation principle and technical effect of the computer device provided in the above embodiment are similar to those of the above method embodiment, and will not be repeated here.
[0180] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0181] Determine first labeled image data and unlabeled image data according to the original medical image data;
[0182] Annotate adjacent unannotated image data according to the first annotated image data to obtain second annotated image data;
[0183] Determine a preset data set according to the first annotated image data and the second annotated image data;
[0184] The preset data set is input into the initial annotation model for training to obtain the preset annotation model.
[0185] The computer-readable storage medium provided in the above embodiment has similar implementation principles and technical effects as those of the above method embodiment, and will not be described in detail here.
[0186] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0187] Determine first labeled image data and unlabeled image data according to the original medical image data;
[0188] Annotate adjacent unannotated image data according to the first annotated image data to obtain second annotated image data;
[0189] Determine a preset data set according to the first annotated image data and the second annotated image data;
[0190] The preset data set pairs are input into the initial annotation model for training to obtain the preset annotation model.
[0191] The implementation principle and technical effect of the computer program product provided in the above embodiment are similar to those of the above method embodiment, and will not be repeated here.
[0192] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0193] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0194] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0195] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. An image annotation method, characterized in that: The method comprises: Obtain medical imaging data to be annotated; Input the medical image data to be annotated into a preset annotation model to obtain an annotation result of the medical image data; the preset annotation model is a model trained according to a preset data set; the preset data set includes first annotated image data and second annotated image data, the first annotated image data is image data pre-annotated for first original medical image data in the original medical image data, and the second annotated image data is obtained by annotating second original medical image data in the original medical image data according to the first annotated image data; the adjacent upper and lower layers of the second original medical image data both belong to the first annotated image data; The labeling process of the second labeled image data includes: Determining, from the first annotated image data, upper first annotated image data and lower first annotated image data of the second original medical image data; Determine a union of labeled contour pixels according to the first labeled contour of the upper layer first labeled image data and the second labeled contour of the lower layer first labeled image data; Determine a foreground pixel intersection and a background pixel intersection according to pixels in the upper layer first annotated image data and pixels in the lower layer first annotated image data; The second original medical image data is annotated according to the annotated contour pixel union, the foreground pixel intersection and the background pixel intersection to obtain the second annotated image data.
2. The method according to claim 1, characterized in that: The training method of the preset annotation model includes: Determining the first annotated image data and the second annotated image data according to the original medical image data to obtain the preset data set; The initial annotation model is trained according to the preset data set to obtain the preset annotation model.
3. The method according to claim 2, characterized in that Determining the first annotated image data according to the original medical image data includes: The first original medical image data is annotated according to the user's annotation instruction to obtain the first annotated image data; the first original medical image data is the image data in the original medical image data whose image clarity is greater than or equal to a first clarity threshold; the second original medical image data is the image data in the original medical image data whose image clarity is less than or equal to a second clarity threshold and is not annotated; the first clarity threshold is greater than the second clarity threshold.
4. The method according to claim 2, characterized in that: The step of training the initial annotation model according to the preset data set to obtain the preset annotation model includes: Inputting the preset data set into the initial annotation model to obtain an annotation result of the preset data set; The preset data set is updated according to the annotation result, and the updated preset data set is input into the initial annotation model for iterative training until the initial annotation model meets the convergence condition, thereby obtaining the preset annotation model.
5. The method according to claim 4, characterized in that The step of inputting the preset data set into the initial annotation model to obtain an annotation result of the preset data set includes: Inputting the preset data set into the initial annotation model to obtain the foreground prediction probability of each pixel in the preset data set; Pixels whose foreground prediction probability is greater than or equal to a first probability threshold are marked as foreground pixels, and pixels whose foreground prediction probability is less than or equal to a second probability threshold are marked as background pixels.
6. The method according to claim 1, characterized in that The step of labeling the second original medical image data according to the labeled contour pixel union, the foreground pixel intersection, and the background pixel intersection to obtain the second labeled image data includes: Marking pixels in the second original medical image data that do not belong to the union of the labeled contour pixels and belong to the intersection of the foreground pixels as foreground pixels; Pixels in the second original medical image data that do not belong to the union of the annotated contour pixels and belong to the intersection of the background pixels are marked as background pixels.
7. A method for training a labeling model, characterized in that: The method comprises: Pre-labeling first original medical image data in the original medical image data to obtain first labeled image data; and using unlabeled image data in the original medical image data as second original medical image data; the adjacent upper and lower layers of the second original medical image data both belong to the first labeled image data; Determining, from the first annotated image data, upper first annotated image data and lower first annotated image data of the second original medical image data; Determine a union of labeled contour pixels according to the first labeled contour of the upper layer first labeled image data and the second labeled contour of the lower layer first labeled image data; Determine a foreground pixel intersection and a background pixel intersection according to pixels in the upper layer first annotated image data and pixels in the lower layer first annotated image data; Annotating the second original medical image data according to the annotated contour pixel union, the foreground pixel intersection, and the background pixel intersection to obtain second annotated image data; Determining a preset data set according to the first annotated image data and the second annotated image data; The preset data set is input into the initial annotation model for training to obtain a preset annotation model; the preset annotation model is used to determine the annotation result of the medical image data to be annotated.
8. An image annotation device, characterized in that: The device comprises: An acquisition module, used to acquire medical image data to be annotated; A labeling module, used for inputting the medical image data to be labeled into a preset labeling model to obtain the labeling result of the medical image data; the preset labeling model is a model trained according to a preset data set; the preset data set includes first labeled image data and second labeled image data, the first labeled image data is image data pre-calibrated for first original medical image data in the original medical image data, and the second labeled image data is obtained by labeling second original medical image data in the original medical image data according to the first labeled image data; the adjacent upper and lower layers of the second original medical image data both belong to the first labeled image data; A training module is used to determine the upper first annotated image data and the lower first annotated image data of the second original medical image data from the first annotated image data; determine the annotated contour pixel union according to the first annotated contour of the upper first annotated image data and the second annotated contour of the lower first annotated image data; determine the foreground pixel intersection and the background pixel intersection according to the pixels in the upper first annotated image data and the pixels in the lower first annotated image data; annotate the second original medical image data according to the annotated contour pixel union, the foreground pixel intersection and the background pixel intersection to obtain the second annotated image data.
9. A training device for a labeling model, characterized in that: The device comprises: A first determination module is used to pre-label first original medical image data in the original medical image data to obtain first labeled image data; and to use unlabeled image data in the original medical image data as second original medical image data; the adjacent upper and lower layers of the second original medical image data both belong to the first labeled image data; A preprocessing module, used to determine the upper first annotated image data and the lower first annotated image data of the second original medical image data from the first annotated image data; determine the annotated contour pixel union according to the first annotated contour of the upper first annotated image data and the second annotated contour of the lower first annotated image data; determine the foreground pixel intersection and the background pixel intersection according to the pixels in the upper first annotated image data and the pixels in the lower first annotated image data; annotate the second original medical image data according to the annotated contour pixel union, the foreground pixel intersection and the background pixel intersection to obtain the second annotated image data; A second determining module, configured to determine a preset data set according to the first annotated image data and the second annotated image data; The training module is used to input the preset data set into the initial annotation model for training to obtain a preset annotation model; the preset annotation model is used to determine the annotation results of the medical image data to be annotated.
