Medical annotation image generation method and device, equipment and storage medium
By input an abnormal medical image input anomalian area detection model, determine the abnormal area, and use the image to generate a model to generate medical labeling images, solve the problem of lack of labeling data in the medical test model, and significantly improve the training effect of the detection model.
Patent Information
- Application Number
- CN202411395955.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-08
- Publication Date
- 2025-01-24
AI Technical Summary
Due to the lack of a large amount of precisely marked medical image data, it is difficult for medical detection models to achieve ideal training results.
By detecting the abnormal medical image input anomalian area, the target medical image is obtained; the abnormal area is determined based on the abnormal medical image and target medical image; the initial image generation model is generated according to the abnormal area training, and the medical labeling image is generated.
By combining the abnormal area detection model and the image generation model, medical annotated images related to the abnormal area are generated, effectively enhancing the performance of the medical detection model.
Smart Images

Figure CN119360379A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for generating medical annotated images. Background Art
[0002] In medical image analysis, accurately identifying abnormal areas is a key step in achieving effective diagnosis and treatment. However, traditional anomaly detection methods usually rely on a large amount of accurately annotated medical image data, which faces huge challenges in practical applications. Especially for rare diseases or special medical conditions, relevant annotated data is extremely scarce, making it difficult for medical detection models to achieve ideal training results. In addition, the manual annotation process is not only time-consuming and labor-intensive, but may also affect data quality due to differences in the professional ability and experience of the annotators.
[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0004] The main purpose of this application is to provide a method, device, equipment and storage medium for generating medical annotated images, aiming to solve the technical problem that the medical detection model is difficult to achieve ideal training effects due to the lack of a large amount of accurately annotated medical image data.
[0005] To achieve the above objectives, the present application proposes a method for generating a medically annotated image, the method comprising:
[0006] Inputting the abnormal medical image into the abnormal region detection model to obtain the target medical image;
[0007] Determining an abnormal area based on the abnormal medical image and the target medical image;
[0008] Training an initial image generation model according to the abnormal region to obtain an image generation model;
[0009] Performing affine transformation according to the abnormal region to generate a target abnormal region;
[0010] The target abnormal area is input into the image generation model to generate a medically annotated image.
[0011] In one embodiment, before the step of inputting the abnormal medical image into the abnormal region detection model to obtain the target medical image, the step further includes:
[0012] Obtain a normal medical image dataset and a normal medical image verification set;
[0013] Training an initial abnormal region detection model according to the normal medical image data set to obtain an abnormal region detection model;
[0014] Based on the normal medical image verification set, the reconstruction capability of the abnormal region detection model is evaluated to determine the training effect of the abnormal region detection model according to the reconstruction capability.
[0015] In one embodiment, the initial abnormal region detection model includes a variational autoencoder; wherein the step of training the initial abnormal region detection model according to the normal medical image data set to obtain the abnormal region detection model includes:
[0016] Acquire normal medical images in the normal medical image dataset;
[0017] Inputting the normal medical image into an initial abnormal region detection model to obtain latent variables, divergence values, encoder output values, and decoder output values;
[0018] Determine a maximized variational lower bound based on the normal medical image, the latent variable, the divergence value, the encoder output value, and the decoder output value;
[0019] The model parameters of the initial abnormal region detection model are updated based on the maximized variational lower bound to obtain an abnormal region detection model.
[0020] In one embodiment, the step of determining the abnormal area based on the abnormal medical image and the target medical image includes:
[0021] determining a mean square error between the abnormal medical image and the target medical image;
[0022] The region in the abnormal medical image where the mean square error is greater than a preset threshold is determined as an abnormal region.
[0023] In one embodiment, the step of training the initial image generation model according to the abnormal region to obtain the image generation model comprises:
[0024] Based on the abnormal area, combining the original medical image, generating a training data set with abnormal annotations;
[0025] An initial image generation model is trained according to the training data set to obtain an image generation model.
[0026] In one embodiment, the step of training the initial image generation model according to the training data set to obtain the image generation model comprises:
[0027] Inputting the real abnormal images in the training data set into the initial image generation model to obtain the target abnormal images;
[0028] Based on the difference information between the real abnormal image and the target abnormal image, the model parameters of the initial image generation model are updated to obtain the image generation model.
[0029] In one embodiment, the step of performing affine transformation according to the abnormal region to generate a target abnormal region includes:
[0030] Based on the affine transformation matrix and the translation vector in the affine transformation, a target abnormal region of the abnormal region is generated.
[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a device for generating a medically annotated image, the device for generating a medically annotated image comprising:
[0032] An input module, used for inputting abnormal medical images into an abnormal region detection model to obtain a target medical image;
[0033] A determination module, configured to determine an abnormal area based on the abnormal medical image and the target medical image;
[0034] A training module, used for training an initial image generation model according to the abnormal area to obtain an image generation model;
[0035] A generating module, used for performing affine transformation according to the abnormal area to generate a target abnormal area;
[0036] The generation module is also used to input the target abnormal area into the image generation model to generate a medically annotated image.
[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a device for generating medical annotated images, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the method for generating medical annotated images as described above.
[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the method for generating medical annotated images as described above are implemented.
[0039] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the method for generating medical annotated images as described above.
[0040] One or more technical solutions proposed in this application have at least the following technical effects:
[0041] The method, apparatus, device and storage medium for generating medically annotated images proposed in the present application obtain a target medical image by inputting an abnormal medical image into an abnormal region detection model; determining an abnormal region based on the abnormal medical image and the target medical image; training an initial image generation model according to the abnormal region to obtain an image generation model; performing an affine transformation according to the abnormal region to generate a target abnormal region; and inputting the target abnormal region into the image generation model to generate a medically annotated image, which solves the technical problem that the medical detection model is difficult to achieve an ideal training effect due to the lack of a large amount of accurately annotated medical image data. Compared with the prior art, the present application combines an abnormal region detection model and an image generation model, detects abnormal regions by using image reconstruction technology, and then combines the image generation model to generate medically annotated images related to the abnormal regions, thereby generating a large amount of annotated data for the medical detection model in the analysis of medical images, which can effectively enhance the performance of the detection model. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0044] Figure 1 A schematic diagram of a process flow provided for the first embodiment of the method for generating medically annotated images of the present application;
[0045] Figure 2 A flowchart of the training and reasoning phase of the abnormal region detection model and the image generation model is provided for the first embodiment of the method for generating medical annotated images of the present application;
[0046] Figure 3 A schematic diagram of a flow chart provided for Embodiment 2 of the method for generating medically annotated images of the present application;
[0047] Figure 4 This is a schematic diagram of the module structure of a device for generating medically annotated images according to an embodiment of the present application;
[0048] Figure 5 Schematic diagram of the device structure of the hardware operating environment involved in the method for generating medical annotated images in the embodiment of the present application.
[0049] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0051] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0052] The main solution of the embodiment of the present application is: input the abnormal medical image into the abnormal area detection model to obtain the target medical image; determine the abnormal area based on the abnormal medical image and the target medical image; train the initial image generation model according to the abnormal area to obtain the image generation model; perform affine transformation according to the abnormal area to generate the target abnormal area; input the target abnormal area into the image generation model to generate a medically annotated image.
[0053] It can be seen from the above embodiments that the method, device, equipment and storage medium for generating medical annotated images proposed in the present application obtain a target medical image by inputting an abnormal medical image into an abnormal region detection model; determining an abnormal region based on the abnormal medical image and the target medical image; training an initial image generation model according to the abnormal region to obtain an image generation model; performing an affine transformation according to the abnormal region to generate a target abnormal region; inputting the target abnormal region into the image generation model to generate a medically annotated image, which solves the technical problem that the medical detection model is difficult to achieve an ideal training effect due to the lack of a large amount of accurately annotated medical image data. Compared with the prior art, the present application combines an abnormal region detection model and an image generation model, detects abnormal regions by using image reconstruction technology, and then combines the image generation model to generate medically annotated images related to the abnormal regions, thereby generating a large amount of annotated data for the medical detection model in the analysis of medical images, which can effectively enhance the performance of the detection model.
[0054] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a device for generating medically annotated images, etc. The following takes a device for generating medically annotated images as an example to illustrate this embodiment and the following embodiments.
[0055] Based on this, the present application embodiment provides a method for generating a medically annotated image. Figure 1 , Figure 1 This is a flowchart of the first embodiment of the method for generating medically annotated images of the present application.
[0056] In this embodiment, the method for generating a medically annotated image includes steps S10 to S50:
[0057] Step S10, inputting the abnormal medical image into the abnormal region detection model to obtain the target medical image;
[0058] It should be noted that the abnormal region detection model is used to generate a normal medical image (ie, a target medical image) corresponding to the abnormal medical image.
[0059] In a feasible implementation, the step of inputting the abnormal medical image into the abnormal region detection model to obtain the target medical image also includes: obtaining a normal medical image data set and a normal medical image verification set; training an initial abnormal region detection model based on the normal medical image data set to obtain the abnormal region detection model; and evaluating the reconstruction capability of the abnormal region detection model based on the normal medical image verification set to determine the training effect of the abnormal region detection model based on the reconstruction capability.
[0060] It should be noted that the normal medical image dataset can cover various common normal medical images. When the normal medical image dataset is used to train the initial abnormal region detection model, the model can learn the potential distribution of normal images. Finally, the abnormal region detection model can be obtained by optimizing the model parameters of the initial abnormal region detection model by maximizing the variational lower bound.
[0061] It should be noted that during the training process of the model, a normal medical image verification set can be used to evaluate the reconstruction ability of the model to ensure that the trained abnormal region detection model can accurately reconstruct normal images.
[0062] In a feasible implementation, the initial abnormal region detection model includes a variational autoencoder; wherein, the step of training the initial abnormal region detection model according to the normal medical image data set to obtain the abnormal region detection model includes: obtaining normal medical images in the normal medical image data set; inputting the normal medical images into the initial abnormal region detection model to obtain latent variables, divergence values, encoder output values, and decoder output values; determining a maximized variational lower bound based on the normal medical images, the latent variables, the divergence values, the encoder output values, and the decoder output values; and updating the model parameters of the initial abnormal region detection model based on the maximized variational lower bound to obtain the abnormal region detection model.
[0063] It should be noted that the abnormal region detection model is used to reconstruct normal medical images based on abnormal medical images; the abnormal region detection model uses a variational autoencoder (VAE) to reconstruct normal medical images. The variational autoencoder models the normal image data and learns its potential distribution to form a model that can reconstruct normal images. In this process, a large amount of healthy medical image data needs to be prepared, which will be used to train the variational autoencoder so that it can accurately reconstruct healthy images.
[0064] It should be noted that the optimization goal of the abnormal area detection model is to maximize the variational lower bound. The specific calculation formula is as follows:
[0065]
[0066] In the formula, x represents the normal medical image input, z represents the latent variable, and p θ (x|z) represents the decoder output value (generative model, which is the probability distribution of generating input data x based on the latent variable z), q φ (z|x) represents the encoder output value (inference model, which is the probability distribution of the latent variable z inferred based on the input data x), D KL Represents the Kullback-Leibler divergence value, which is used to measure the difference between two distributions (that is, it is used to measure the difference between the latent variable distribution output by the encoder and the prior distribution).
[0067] Step S20, determining an abnormal area based on the abnormal medical image and the target medical image;
[0068] It should be noted that, since the target medical image is a normal medical image of the abnormal medical image, the abnormal area can be identified and located after the target medical image is compared with the abnormal medical image.
[0069] In a feasible implementation, the step of determining the abnormal area based on the abnormal medical image and the target medical image includes: determining the mean square error between the abnormal medical image and the target medical image; and determining an area in the abnormal medical image where the mean square error is greater than a preset threshold as an abnormal area.
[0070] In the specific implementation, the mean square error calculation formula between the abnormal medical image and the target medical image is as follows:
[0071]
[0072] Where N is the number of pixels, x i represents the i-th pixel value of the original image (i.e., abnormal medical image), Represents the i-th pixel value of the reconstructed image (ie, the target medical image).
[0073] Step S30, training an initial image generation model according to the abnormal region to obtain an image generation model;
[0074] In a specific implementation, the abnormal area can be combined with some normal medical images to form a training data set with abnormal annotations, and finally the initial image generation model is trained according to the training data set to obtain the image generation model.
[0075] Step S40, performing affine transformation according to the abnormal area to generate a target abnormal area;
[0076] In a feasible implementation manner, the step of performing an affine transformation on the abnormal region to generate a target abnormal region includes: generating a target abnormal region of the abnormal region based on an affine transformation matrix and a translation vector in the affine transformation.
[0077] It should be noted that affine transformation includes translation, rotation, scaling, etc., and the abnormal regions after affine transformation are diversified abnormal regions.
[0078] In the specific implementation, the formula of affine transformation is as follows:
[0079] x ′ =Ax+b
[0080] In the formula, x represents the original coordinates (i.e., the coordinates of the abnormal area), x ′ represents the coordinates after affine transformation (i.e., the coordinates of the target abnormal area), A represents the affine transformation matrix, and b represents the translation vector.
[0081] Step S50: input the target abnormal area into the image generation model to generate a medically annotated image.
[0082] It should be noted that the image generation model refers to a trained image generation model, and the medical annotated image refers to some medical image data with annotated information that can be used to train a medical detection model.
[0083] It should be noted that after generating the medically annotated image, the medically annotated image can be paired with the target abnormal area to form a labeled training data set; in the inference stage of the image generation model, the abnormal area that has undergone affine transformation can be input into the image generation model as a control condition to generate a medically annotated image that is highly correlated with the abnormal area.
[0084] In the specific implementation, Figure 2As shown, the abnormal region detection model is used to obtain a mask with a lesion region (ie, the abnormal region), and the image generation model is used to generate abnormal data with lesions (ie, a medically annotated image) based on the mask with the lesion region.
[0085] This embodiment obtains a target medical image by inputting an abnormal medical image into an abnormal region detection model; determines the abnormal region based on the abnormal medical image and the target medical image; trains an initial image generation model according to the abnormal region to obtain an image generation model; performs affine transformation according to the abnormal region to generate a target abnormal region; inputs the target abnormal region into the image generation model to generate a medically annotated image, thereby solving the technical problem that the medical detection model is difficult to achieve an ideal training effect due to the lack of a large amount of accurately annotated medical image data. Compared with the prior art, this application combines the abnormal region detection model and the image generation model, detects the abnormal region by using image reconstruction technology, and then combines the image generation model to generate a medically annotated image related to the abnormal region, thereby generating a large amount of annotated data for the medical detection model in the analysis of medical images, which can effectively enhance the performance of the detection model.
[0086] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 , step S30 also includes steps S301-S302:
[0087] Step S301, generating a training data set with abnormal annotations based on the abnormal region and combining it with the original medical image;
[0088] It should be noted that original medical images refer to some normal and healthy medical images.
[0089] Step S302: training an initial image generation model according to the training data set to obtain an image generation model.
[0090] It should be noted that the image generation model is Latent Diffusion Models (LDMs); using the training data set to train the model mainly involves inputting the abnormal regions in the training data set as control conditions into the initial image generation model to learn the correlation between the abnormal regions and the abnormal images.
[0091] In a feasible implementation, the step of training the initial image generation model according to the training data set to obtain the image generation model includes: inputting the real abnormal image in the training data set into the initial image generation model to obtain the target abnormal image; based on the difference information between the real abnormal image and the target abnormal image, updating the model parameters of the initial image generation model to obtain the image generation model.
[0092] It should be noted that the training goal of the image generation model is to minimize the difference between the generated target abnormal image and the real abnormal image. Specifically, the calculation formula of the difference information between the real abnormal image and the target abnormal image is as follows:
[0093]
[0094] Where y represents the real abnormal image, c represents the control condition (abnormal area), G(a, c) represents the target abnormal image generated by the generator, and a represents the latent variable.
[0095] It should be noted that during the training process, a validation dataset can also be used to evaluate the generation capability of the image generation model, thereby ensuring that the image generation model can generate abnormal images with high relevance.
[0096] In this embodiment, a training data set with abnormal annotations is generated by combining the original medical images based on the abnormal region; an initial image generation model is trained according to the training data set to obtain an image generation model. The image generation model can be trained based on the training data set generated by the abnormal region, so that the image generation model finally trained can generate images that are highly correlated with the abnormal region.
[0097] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the method for generating medically annotated images of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0098] This application also provides a device for generating medical annotated images, please refer to Figure 4 , the device for generating medically annotated images comprises:
[0099] An input module 10, used to input the abnormal medical image into the abnormal region detection model to obtain a target medical image;
[0100] A determination module 20, configured to determine an abnormal area based on the abnormal medical image and the target medical image;
[0101] A training module 30, configured to train an initial image generation model according to the abnormal region to obtain an image generation model;
[0102] A generating module 40, configured to perform an affine transformation according to the abnormal region to generate a target abnormal region;
[0103] The generating module 40 is further used to input the target abnormal region into the image generating model to generate a medically annotated image.
[0104] The device for generating medically annotated images provided by the present application adopts the method for generating medically annotated images in the above-mentioned embodiment, which can solve the technical problem that the medical detection model is difficult to achieve the ideal training effect due to the lack of a large amount of accurately annotated medical image data. Compared with the prior art, the beneficial effects of the device for generating medically annotated images provided by the present application are the same as the beneficial effects of the method for generating medically annotated images provided by the above-mentioned embodiment, and the other technical features in the device for generating medically annotated images are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0105] The present application provides a device for generating medically annotated images, the device comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for generating medically annotated images in the first embodiment.
[0106] Reference below Figure 5 , which shows a schematic diagram of the structure of a device for generating medically annotated images suitable for implementing the embodiments of the present application. The device for generating medically annotated images in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The device for generating medically annotated images shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0107] like Figure 5As shown, the device for generating medically annotated images may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the device for generating medically annotated images are also stored in RAM1004. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the device for generating medically annotated images to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a device for generating medically annotated images with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.
[0108] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0109] The device for generating medically annotated images provided by the present application adopts the method for generating medically annotated images in the above-mentioned embodiment, which can solve the technical problem that the medical detection model is difficult to achieve the ideal training effect due to the lack of a large amount of accurately annotated medical image data. Compared with the prior art, the beneficial effects of the device for generating medically annotated images provided by the present application are the same as the beneficial effects of the method for generating medically annotated images provided by the above-mentioned embodiment, and the other technical features in the device for generating medically annotated images are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0110] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0111] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0112] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the method for generating medically annotated images in the above-mentioned embodiment.
[0113] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0114] The computer-readable storage medium may be included in the device for generating medically annotated images; or may exist independently without being incorporated into the device for generating medically annotated images.
[0115] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by a device for generating medically annotated images, the device for generating medically annotated images: inputs the abnormal medical image into an abnormal region detection model to obtain a target medical image; determines the abnormal region based on the abnormal medical image and the target medical image; trains an initial image generation model according to the abnormal region to obtain an image generation model; performs affine transformation according to the abnormal region to generate a target abnormal region; and inputs the target abnormal region into the image generation model to generate a medically annotated image.
[0116] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0117] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0118] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0119] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned method for generating medically annotated images, and can solve the technical problem that the medical detection model is difficult to achieve the ideal training effect due to the lack of a large amount of accurately annotated medical image data. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the method for generating medically annotated images provided in the above-mentioned embodiments, and will not be repeated here.
[0120] The present application also provides a computer program product, including a computer program, which implements the steps of the method for generating medically annotated images as described above when executed by a processor.
[0121] The computer program product provided by the present application can solve the technical problem that the medical detection model is difficult to achieve the desired training effect due to the lack of a large amount of accurately annotated medical image data. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the method for generating medical annotated images provided in the above embodiment, and will not be repeated here.
[0122] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for generating a medically annotated image, characterized in that: The method comprises: Inputting the abnormal medical image into the abnormal region detection model to obtain the target medical image; Determining an abnormal area based on the abnormal medical image and the target medical image; Training an initial image generation model according to the abnormal region to obtain an image generation model; Performing affine transformation according to the abnormal region to generate a target abnormal region; The target abnormal area is input into the image generation model to generate a medically annotated image.
2. The method according to claim 1, characterized in that Before the step of inputting the abnormal medical image into the abnormal region detection model to obtain the target medical image, the step further includes: Obtain a normal medical image dataset and a normal medical image verification set; Training an initial abnormal region detection model according to the normal medical image data set to obtain an abnormal region detection model; Based on the normal medical image verification set, the reconstruction capability of the abnormal region detection model is evaluated to determine the training effect of the abnormal region detection model according to the reconstruction capability.
3. The method according to claim 2, characterized in that The initial abnormal region detection model includes a variational autoencoder; wherein the step of training the initial abnormal region detection model according to the normal medical image data set to obtain the abnormal region detection model includes: Acquire normal medical images in the normal medical image dataset; Inputting the normal medical image into an initial abnormal region detection model to obtain latent variables, divergence values, encoder output values, and decoder output values; Determine a maximized variational lower bound based on the normal medical image, the latent variable, the divergence value, the encoder output value, and the decoder output value; The model parameters of the initial abnormal region detection model are updated based on the maximized variational lower bound to obtain an abnormal region detection model.
4. The method according to claim 1, characterized in that The step of determining the abnormal area based on the abnormal medical image and the target medical image comprises: determining a mean square error between the abnormal medical image and the target medical image; The region in the abnormal medical image where the mean square error is greater than a preset threshold is determined as an abnormal region.
5. The method according to claim 1, characterized in that The step of training the initial image generation model according to the abnormal area to obtain the image generation model comprises: Based on the abnormal area, combining the original medical image, generating a training data set with abnormal annotations; An initial image generation model is trained according to the training data set to obtain an image generation model.
6. The method according to claim 5, characterized in that The step of training the initial image generation model according to the training data set to obtain the image generation model comprises: Inputting the real abnormal images in the training data set into the initial image generation model to obtain the target abnormal images; Based on the difference information between the real abnormal image and the target abnormal image, the model parameters of the initial image generation model are updated to obtain the image generation model.
7. The method according to claim 1, characterized in that The step of performing affine transformation according to the abnormal area to generate a target abnormal area comprises: Based on the affine transformation matrix and the translation vector in the affine transformation, a target abnormal region of the abnormal region is generated.
8. A device for generating medically annotated images, characterized in that: The device comprises: An input module, used for inputting abnormal medical images into an abnormal region detection model to obtain a target medical image; A determination module, configured to determine an abnormal area based on the abnormal medical image and the target medical image; A training module, used for training an initial image generation model according to the abnormal area to obtain an image generation model; A generating module, used for performing affine transformation according to the abnormal area to generate a target abnormal area; The generation module is also used to input the target abnormal area into the image generation model to generate a medically annotated image.
9. A device for generating medically annotated images, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for generating a medically annotated image according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the method for generating a medically annotated image are implemented as described in any one of claims 1 to 7.