Processing method, device and processing equipment for cerebral hemorrhage sample image generation model
By generating high-quality training samples, the problem of insufficient training samples of the cerebral hemorrhage prediction model in the existing technology is solved, and a cerebral hemorrhage prediction model with higher accuracy and better generalization capabilities is achieved to meet the needs of clinical applications.
Patent Information
- Application Number
- CN202510360904.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-26
AI Technical Summary
The prior art lacks high-quality training samples when training cerebral hemorrhage prediction models, especially for rare cases of cerebral hemorrhage, resulting in insufficient model generalization ability and prediction accuracy.
A method for processing the image generation model of cerebral hemorrhage samples is proposed. By acquiring cerebral hemorrhage samples images, configuring labels, data augmentation and image erasing, high-quality training samples are generated, thereby training a higher-precision cerebral hemorrhage prediction model.
By generating high-quality training samples, the training accuracy and generalization ability of the cerebral hemorrhage prediction model are improved, and the high-quality application needs of clinical medical staff for cerebral hemorrhage prediction are met.
Smart Images

Figure CN119889606A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of medical technology, and in particular to a processing method, device and processing equipment for generating a model for an image of a cerebral hemorrhage sample. Background Art
[0002] With the development of technology, clinical work has begun to try to use artificial intelligence (AI) to assist in the diagnosis of cerebral hemorrhage, based on computed tomography (CT) images and / or magnetic resonance imaging (MRI) images to predict whether there is cerebral hemorrhage and locate the location of cerebral hemorrhage. The application of cerebral hemorrhage prediction models may involve the configuration of training samples.
[0003] For the traditional model training mechanism, sample images of cerebral hemorrhage cases are usually manually configured to meet the model training requirements. However, in actual situations, cerebral hemorrhage cases are usually rare, especially some specific types of cerebral hemorrhage cases are particularly rare, which leads to a problem of lack of samples.
[0004] In this case, obtaining a large number of diverse cerebral hemorrhage samples through AI can obviously effectively expand the training samples, so that the cerebral hemorrhage prediction model can be exposed to more samples during training, and the model has better generalization ability and prediction accuracy for different types of cerebral hemorrhage cases.
[0005] The inventors of this application have discovered that existing related technologies generally focus on improving the prediction accuracy of the prediction model from aspects such as model architecture and loss function, while how to better configure training samples is a habitually overlooked issue. This situation is even more prominent when AI is introduced to generate training samples, and the general training sample configuration scheme cannot be well adapted to the training sample configuration scenario of the cerebral hemorrhage prediction model. Summary of the invention
[0006] The present application provides a processing method, device and processing equipment for a brain hemorrhage sample image generation model, which is used to introduce AI to generate brain hemorrhage images for training models, and proposes a more novel brain hemorrhage sample image generation model configuration scheme that can promote the acquisition of better sample quality, thereby meeting the high-quality training sample configuration requirements of the brain hemorrhage prediction model, and further promoting the training of a higher-precision brain hemorrhage prediction model, thereby meeting the high-quality application requirements of clinical medical staff for the auxiliary function service of brain hemorrhage prediction.
[0007] In a first aspect, the present application provides a method for processing a brain hemorrhage sample image generation model, the method comprising: Acquire a first cerebral hemorrhage sample image, wherein the first cerebral hemorrhage sample image specifically includes at least one of a computer tomography image and a magnetic resonance imaging image; Configuring a corresponding first label for the first cerebral hemorrhage sample image, wherein the first label is used to indicate a cerebral hemorrhage area in the first cerebral hemorrhage sample image; Performing a first data enhancement operation on the first label, and using the second label after the shape change as prior knowledge for generating a lesion image; Performing an image erasing operation on the cerebral hemorrhage region in the first cerebral hemorrhage sample image to obtain a second cerebral hemorrhage sample image; Based on the first cerebral hemorrhage sample image, the second cerebral hemorrhage sample image and the second label, a cerebral hemorrhage sample image generation model is trained, wherein the cerebral hemorrhage sample image generation model is used to generate a corresponding cerebral hemorrhage image according to a normal image and a preset label input into the model.
[0008] In a second aspect, the present application provides a processing device for generating a model for an image of a cerebral hemorrhage sample, the device comprising: An image acquisition unit, configured to acquire a first cerebral hemorrhage sample image, wherein the first cerebral hemorrhage sample image specifically includes at least one of a computer tomography image and a magnetic resonance imaging image; A label configuration unit, configured to configure a corresponding first label for the first cerebral hemorrhage sample image, wherein the first label is used to indicate a cerebral hemorrhage area in the first cerebral hemorrhage sample image; A data enhancement unit, used to perform a first data enhancement operation on the first label, and the second label after the shape change is used as prior knowledge for generating a lesion image; An image erasing unit, used for performing an image erasing operation on the cerebral hemorrhage area in the first cerebral hemorrhage sample image to obtain a second cerebral hemorrhage sample image; The model training unit is used to train a brain hemorrhage sample image generation model based on the first brain hemorrhage sample image, the second brain hemorrhage sample image and the second label, wherein the brain hemorrhage sample image generation model is used to generate a corresponding brain hemorrhage image according to a normal image and a preset label input into the model.
[0009] In a third aspect, the present application provides a processing device, including a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the method provided in the first aspect of the present application or any possible implementation method of the first aspect of the present application is executed.
[0010] In a fourth aspect, the present application provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the method provided by the first aspect of the present application or any possible implementation of the first aspect of the present application.
[0011] From the above content, it can be concluded that the present application has the following beneficial effects: In view of the training sample configuration target of the cerebral hemorrhage prediction model, the present application obtains a first cerebral hemorrhage sample image, configures a corresponding first label for the first cerebral hemorrhage sample image, the first label is used to indicate the cerebral hemorrhage area in the first cerebral hemorrhage sample image, performs a first data enhancement operation on the first label, and uses the second label after the shape change as prior knowledge for generating a lesion image. An image erasing operation is performed on the cerebral hemorrhage area in the first cerebral hemorrhage sample image to obtain a second cerebral hemorrhage sample image. Based on the first cerebral hemorrhage sample image, the second cerebral hemorrhage sample image and the second label, a cerebral hemorrhage sample image generation model is trained, wherein the cerebral hemorrhage sample image generation model is used to generate a corresponding cerebral hemorrhage image according to a normal image and a preset label input by the model. In this way, on the basis of introducing AI to generate cerebral hemorrhage images for the training samples required for the training model, a more novel cerebral hemorrhage sample image generation model configuration scheme that can promote the acquisition of better sample quality is proposed, thereby meeting the high-quality training sample configuration requirements of the cerebral hemorrhage prediction model, and further promoting the training to obtain a higher-precision cerebral hemorrhage prediction model, meeting the high-quality application requirements of clinical medical staff for the auxiliary function service of cerebral hemorrhage prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0013] Figure 1 A flowchart of a method for processing a brain hemorrhage sample image generation model in this application; Figure 2 A structural schematic diagram of a processing device for generating a model for a sample image of cerebral hemorrhage in this application; Figure 3 A schematic diagram of the structure of the processing equipment of this application. DETAILED DESCRIPTION
[0014] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0015] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.
[0016] The division of modules in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in this application. In addition, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.
[0017] Before introducing the processing method of the cerebral hemorrhage sample image generation model provided by the present application, the background content involved in the present application is first introduced.
[0018] The processing method, device and computer-readable storage medium of the cerebral hemorrhage sample image generation model provided in the present application can be applied to processing equipment. On the basis of introducing AI to generate cerebral hemorrhage images for training models, a more novel cerebral hemorrhage sample image generation model configuration scheme is proposed, which can promote the acquisition of better sample quality. The high-quality training sample configuration requirements of the cerebral hemorrhage prediction model can be met, and further, the training can be promoted to obtain a higher-precision cerebral hemorrhage prediction model, thereby meeting the high-quality application requirements of clinical medical staff for the auxiliary function service of cerebral hemorrhage prediction.
[0019] The processing method of the cerebral hemorrhage sample image generation model mentioned in this application, its execution subject can be a processing device of the cerebral hemorrhage sample image generation model, or a server, physical host or user equipment (UE) and other different types of processing devices integrated with the processing device of the cerebral hemorrhage sample image generation model. Among them, the processing device of the cerebral hemorrhage sample image generation model can be implemented in hardware or software, and the UE can be a terminal device such as a smart phone, tablet computer, laptop computer, desktop computer or personal digital assistant (PDA), and the processing device can be set in the form of a device cluster.
[0020] It can be understood that the processing device that executes the processing method of the cerebral hemorrhage sample image generation model of the present application, or the processing device equipped with the application service corresponding to the processing method of the cerebral hemorrhage sample image generation model of the present application, considers that the focus of the present application scheme is on the training of the cerebral hemorrhage sample image generation model, and therefore only needs to have the corresponding data processing capabilities.
[0021] If the processing device still needs to continue to involve the practical application of the cerebral hemorrhage sample image generation model, the cerebral hemorrhage prediction model can be trained through the training samples generated by the cerebral hemorrhage sample image generation model. In this case, the processing device can be split into a first device for training the cerebral hemorrhage sample image generation model and a second device for training the cerebral hemorrhage prediction model.
[0022] If the practical application of the cerebral hemorrhage prediction model is still involved, it needs to be combined with clinical applications. It can be deployed on equipment that is specifically responsible for the diagnosis of cerebral hemorrhage, or on equipment that is responsible for other tasks (such as other clinical diagnoses or even routine office work) in addition to the diagnosis of cerebral hemorrhage.
[0023] At this time, similar to the above situation, the training and application of the cerebral hemorrhage prediction model can be handed over to different equipment parts for execution. For example, the cerebral hemorrhage sample image generation model can be trained by the first server in the background, and then the cerebral hemorrhage prediction model can be trained by the second server, and then the cerebral hemorrhage prediction model can be sent to the front desk (doctor side) through remote service for specific application.
[0024] Next, the processing method of the cerebral hemorrhage sample image generation model provided by this application is introduced.
[0025] First, see Figure 1 , Figure 1 A flowchart of a method for processing a brain hemorrhage sample image generation model provided in the present application is shown. The method for processing a brain hemorrhage sample image generation model provided in the present application may specifically include the following steps S101 to S105: Step S101, obtaining a first cerebral hemorrhage sample image, wherein the first cerebral hemorrhage sample image specifically includes at least one of a computer tomography image and a magnetic resonance imaging image; It can be understood that the acquisition and processing of the first cerebral hemorrhage sample image here is usually the acquisition and processing of the ready-made image, which can be either manually input image, or image received from other equipment, or local image read, all of which are possible.
[0026] Of course, it is not excluded that in actual situations, it is also possible to collect images in real time when applying the present application solution, and it can be adjusted according to the flexible and changeable application needs in actual situations.
[0027] For the first cerebral hemorrhage sample image, it may include only computed tomography images (i.e. CT images), or only magnetic resonance imaging images (i.e. MRI images), or may include both. This can be adjusted according to actual needs. These images can also be referred to as images or slices in actual situations.
[0028] In addition, it should be noted that for the convenience of explanation, the cerebral hemorrhage sample images in different stages are distinguished by prefixes such as first and second, and the subsequent labeling and data enhancement operations are also similar.
[0029] Step S102, configuring a corresponding first label for the first cerebral hemorrhage sample image, wherein the first label is used to indicate a cerebral hemorrhage area in the first cerebral hemorrhage sample image; It can be understood that, corresponding to the model training target, it is necessary to configure a corresponding first label for the basic first cerebral hemorrhage sample image. The first label can also be understood by the annotation result and is used to indicate the cerebral hemorrhage area in the first cerebral hemorrhage sample image.
[0030] Label processing can be done manually or through automatic labeling tools, which can be adjusted according to actual needs. Among them, the automatic labeling tool needs to be pre-configured with corresponding automatic labeling logic / strategy during use.
[0031] As an example, the first brain hemorrhage sample image can be denoted by x (i) .
[0032] Step S103, performing a first data enhancement operation on the first label, and using the second label after the shape change as prior knowledge for generating a lesion image; After completing the label processing of the first cerebral hemorrhage sample image, the first data enhancement operation involved in the present application can be performed on it.
[0033] It can be seen that the purpose here is to change the shape of the first label configured previously, so as to obtain a different second label and form a richer label shape / content, which can be used as prior knowledge for the subsequent cerebral hemorrhage sample image generation model during the training process, and can provide a richer sample volume.
[0034] In addition, it can be seen that the label involved in the present application indicates the lesion in the corresponding image, that is, the cerebral hemorrhage area, in a specific shape at the image level, typically like a mask.
[0035] As an exemplary embodiment here, the first data enhancement operation may specifically include at least two of the following methods: No changes are made to the original label shape; The original label shape is adjusted to the smallest rectangular frame that contains the original label shape; The original label shape is adjusted to include the center point of the original label shape; The original label shape is adjusted to the convex hull of the original label shape.
[0036] For the specific four data enhancement operations of the first data enhancement operation shown here, it can be understood that if the label shape is not transformed, it is to allow the model to generate a consistent lesion area according to the label shape, so that the generated data can be used for subsequent segmentation tasks; if the label shape is a minimum rectangular box, it is to allow the generated data to be used for subsequent detection tasks; if the label shape is a center point, it is to allow the generated data to be used for subsequent lesion positioning tasks; if the label shape is a convex hull, it is to generate lesions of arbitrary shapes within a specified range.
[0037] It can be concluded that, in the exemplary embodiment here, the four specific types of first data enhancement operations can effectively enhance the training effect of the subsequent cerebral hemorrhage sample image generation model in different aspects, and thus can effectively promote the acquisition of a cerebral hemorrhage sample image generation model with better prediction effect.
[0038] As an example, the second label can be y (i) .
[0039] Step S104, performing an image erasing operation on the cerebral hemorrhage area in the first cerebral hemorrhage sample image to obtain a second cerebral hemorrhage sample image; It can be understood that the brain hemorrhage sample image generation model to be trained in the present application can generate brain hemorrhage images corresponding to more abundant brain hemorrhage cases. Corresponding to the training of the model, the present application may involve inputting the first brain hemorrhage sample image with the brain hemorrhage area erased during the model training process, and let the model try to predict the brain hemorrhage area before erasure under the guidance of the position indicated by the label during the training process. In this way, through continuous training, a brain hemorrhage sample image generation model that can be put into practical use is finally obtained.
[0040] In this case, an image erasing operation may be performed on the cerebral hemorrhage region in the first cerebral hemorrhage sample image obtained previously to meet the requirements of model training.
[0041] The erasing of the cerebral hemorrhage area in the image can be performed manually or automatically by the device. In the automatic erasing operation, the image area indicated by the label can be erased to achieve the purpose of erasing the cerebral hemorrhage area.
[0042] For easier understanding, the image erasing operation can also be referred to as cutout.
[0043] As an example, the cerebral hemorrhage area may be filled with all zero values.
[0044] The label relied upon in the automatic erasing operation is usually the second label after the first data enhancement operation is performed. In the above exemplary embodiment, the second label may become the center point. In this case, the automatic erasing operation can be performed according to the first label before the shape change.
[0045] As an example, the second brain hemorrhage sample image with the brain hemorrhage area erased can be recorded as x_ (i) .
[0046] Step S105, training a brain hemorrhage sample image generation model based on the first brain hemorrhage sample image, the second brain hemorrhage sample image and the second label, wherein the brain hemorrhage sample image generation model is used to generate a corresponding brain hemorrhage image according to a normal image and a preset label input into the model.
[0047] After obtaining the original first cerebral hemorrhage sample image, the second cerebral hemorrhage sample image with the cerebral hemorrhage area erased, and the second label with the label shape changed, the specific model training process can be carried out, wherein the original first cerebral hemorrhage sample image serves as the cerebral hemorrhage image that the model theoretically wants to predict / generate, the second cerebral hemorrhage sample image with the cerebral hemorrhage area erased corresponds to the normal image during the actual use of the model (the image does not contain the cerebral hemorrhage area, for the model to add lesions and fill the cerebral hemorrhage area), and the second label serves as an indication of the location of the cerebral hemorrhage area that the model wants to predict.
[0048] In this way, after completing the training of the model, a brain hemorrhage sample image generation model that can be put into practical use can be obtained, and when the brain hemorrhage prediction model needs to be trained in the future, rich training samples involving different brain hemorrhage cases can be generated.
[0049] Among them, for the model architecture adopted by the cerebral hemorrhage sample image generation model, as well as the model training architecture and loss function adopted by the cerebral hemorrhage sample image generation model in the model training process, we can adopt the existing schemes, or make corresponding optimization and improvements on the basis of the existing schemes, or adopt self-developed and novel schemes, which are all feasible in actual situations.
[0050] As an example, the number of second cerebral hemorrhage sample images can be N, which are divided into training set, validation set and test set in a ratio of 8:1:1. In addition, the first cerebral hemorrhage images and the second labels are divided into training set, validation set and test set along with the corresponding second cerebral hemorrhage sample images, wherein the training set is used to train the model, the validation set is used to select the best performing model from the trained models, and the test set is used to evaluate the model performance.
[0051] from Figure 1It can be seen from the illustrated embodiment that, with respect to the training sample configuration target of the cerebral hemorrhage prediction model, the present application obtains a first cerebral hemorrhage sample image, configures a corresponding first label for the first cerebral hemorrhage sample image, the first label is used to indicate the cerebral hemorrhage area in the first cerebral hemorrhage sample image, performs a first data enhancement operation on the first label, and uses the second label after the shape change as prior knowledge for generating the lesion image. An image erasing operation is performed on the cerebral hemorrhage area in the first cerebral hemorrhage sample image to obtain a second cerebral hemorrhage sample image. Based on the first cerebral hemorrhage sample image, the second cerebral hemorrhage sample image and the second label, a cerebral hemorrhage sample image generation model is trained, wherein the cerebral hemorrhage sample image generation model is used to generate a corresponding cerebral hemorrhage image according to a normal image and a preset label input by the model. In this way, on the basis of introducing AI to generate cerebral hemorrhage images for the training samples required by the training model, a more novel cerebral hemorrhage sample image generation model configuration scheme that can promote the acquisition of better sample quality is proposed, thereby meeting the high-quality training sample configuration requirements of the cerebral hemorrhage prediction model, and further promoting the training to obtain a higher-precision cerebral hemorrhage prediction model, meeting the high-quality application requirements of clinical medical staff for the auxiliary function service of cerebral hemorrhage prediction.
[0052] Continue to the above Figure 1 Each step of the illustrated embodiment and possible implementation methods thereof in practical applications are described in detail.
[0053] In order to further improve the quality of training samples and thereby enhance the training effect and prediction accuracy of subsequent cerebral hemorrhage sample image generation models, data enhancement can also be carried out from several aspects.
[0054] As an exemplary embodiment, before performing the first data enhancement operation on the first label, another aspect of data enhancement may be performed on the first label. Specifically, the method of the present application may further include: Perform a second data enhancement operation on the first label, wherein the second data enhancement operation includes at least one of the following methods: Only expand the original label; Only the original label is corroded; The original label is first expanded and then eroded.
[0055] Among them, it can be understood that the operation of only expanding the original label can slightly expand the label range; the operation of only corroding the original label can slightly reduce the label range; the operation of first expanding the original label and then corroding it can make the label edge smoother.
[0056] Therefore, before the first label is changed in shape through the first data enhancement operation, the above three optional second data enhancement operations can be used to make subtle adjustments to the first label, so that the label shape can further meet actual needs.
[0057] Furthermore, focusing on the image data, before performing an image erasing operation on the cerebral hemorrhage region in the first cerebral hemorrhage sample image, the present application may also perform corresponding processing on the first cerebral hemorrhage sample image.
[0058] Specifically, as another exemplary embodiment, the method of the present application may further include: In the continuous first cerebral hemorrhage sample images, based on the randomly selected z-axis position, three consecutive images are used as units to select images, and the first cerebral hemorrhage sample images are updated, corresponding to the processing units of the input images corresponding to the three channels of the subsequent model, and the first label is updated by comparing with the updated first cerebral hemorrhage sample images; Under the selected window width and window position, a normalization operation is performed on the first cerebral hemorrhage sample image so that the pixel value is between 0 and 1.
[0059] It should be noted that the processing here involves the processing of three consecutive images as a processing unit, which corresponds to the input setting of the cerebral hemorrhage sample image generation model of the present application, which can input three images at the same time for processing.
[0060] Correspondingly, as an example, an input of a brain hemorrhage sample image generation model may have a specification of 3×w×d.
[0061] After completing the setting of the processing unit based on three images, it is necessary to refer to the setting and update the corresponding first label for the same processing unit, so as to form data settings for different processing units (each processing unit involves three images and three labels).
[0062] In addition, it can be seen that for the first cerebral hemorrhage sample image, a normalization operation / processing may also be involved, so that the image data is scaled to the interval [0, 1] to facilitate subsequent data processing.
[0063] In addition, on the other hand, before performing the image erasing operation on the cerebral hemorrhage area in the first cerebral hemorrhage sample image, as another exemplary embodiment, the method of the present application may further include: A third data enhancement operation in terms of image transformation is performed on the first cerebral hemorrhage sample image, and a comparison transformation is performed on the first label, wherein the third data enhancement operation includes rotation, translation and elastic deformation.
[0064] It is easy to see that in order to further increase the sample size of the first cerebral hemorrhage sample image, in the embodiment here, the goal can be effectively achieved by performing a third data enhancement operation involving image transformation including rotation, translation and elastic deformation.
[0065] When the first cerebral hemorrhage sample image is transformed, the corresponding first label may be transformed to maintain the matching relationship between the image and the label.
[0066] At the same time, in addition to performing image transformation involving shape change on the first cerebral hemorrhage sample image, the clarity effect of the image itself can also be fine-tuned to promote an increase in sample size.
[0067] In this case, as another exemplary embodiment, after performing the third data enhancement operation in terms of image transformation on the first cerebral hemorrhage sample image, the method of the present application may further include: A fourth data enhancement operation is performed on the first cerebral hemorrhage sample image, wherein the fourth data enhancement operation includes adding noise, sharpening, and smoothing.
[0068] It can be understood that the fourth data enhancement operation including adding noise, sharpening and smoothing is mainly adjusted from the aspect of clarity effect. It can be considered that the cerebral hemorrhage area in the image is unchanged. Therefore, there is no need to make comparative adjustment settings for the corresponding labels. Multiple images obtained after the fourth data enhancement operation of the same image can share the same original label to indicate the cerebral hemorrhage area in the image.
[0069] In addition, as an example, the cerebral hemorrhage sample image generation model configured in the present application can specifically adopt a diffusion model, that is, the model architecture of the existing diffusion model can be directly adopted, or further optimized and improved on the basis of the model architecture of the existing diffusion model.
[0070] For the diffusion model, its model structure involves the application of residual convolutional networks and self-attention mechanisms. Its core ideas are briefly as follows: first, define a process in which the data distribution is gradually transformed into a Gaussian noise distribution (forward diffusion), which can be regarded as a series of steps that gradually add noise; then, the model learns how to perform the inverse operation of this process, that is, starting from pure noise, gradually "denoising" through a series of inverse steps, and finally generating samples close to the original data distribution (reverse diffusion). This inverse process usually involves complex probability distribution estimation, and it is necessary to ensure that the generated samples have high fidelity and diversity.
[0071] This is more compatible with the goal of generating a cerebral hemorrhage area based on a normal image in this application to achieve the goal of generating a cerebral hemorrhage sample image. Through forward diffusion and reverse diffusion, the model can learn how to predict the original image with a cerebral hemorrhage area.
[0072] In this regard, the training process of the cerebral hemorrhage sample image generation model of this application is explained based on the corresponding model application architecture.
[0073] As another exemplary embodiment, the brain hemorrhage sample image generation model of the present application may specifically adopt a diffusion model. Correspondingly, based on the second brain hemorrhage sample image and the second label, training the brain hemorrhage sample image generation model may specifically include: Encoding the second label using a label encoding network to obtain a label shape encoding feature, wherein the label encoding network is a multi-layer convolutional neural network; In the forward process of the diffusion model, actual noise is generated, and the input first cerebral hemorrhage sample image is subjected to T times of noise addition to obtain a corresponding noise-added image data sequence; In the reverse process of the diffusion model, the second cerebral hemorrhage sample image, the label shape coding feature, any time point t and the noise-added image data corresponding to the time point t are input into the cerebral hemorrhage sample image generation model to predict the noise added in the forward process of the diffusion model, wherein the label shape coding feature is input into the bottom network of the cerebral hemorrhage sample image generation model; The loss value between the actual noise and the noise prediction result is calculated based on the mean square error, and the model parameters are updated according to the loss value calculation result.
[0074] As an example, the label shape encoding feature obtained by encoding the second label can be recorded as z (i) , the actual noise generated can be recorded as ε1 (i) , the image data of each time of the noise enhancement contained in the noise enhancement image data sequence can be recorded as x1 (i) , x2 (i) , …, x T (i) , the noise prediction result can be recorded as ε2 (i) .
[0075] In addition, in addition to the training logic of the cerebral hemorrhage sample image generation model, it can also be seen that the loss function used in the training process of this application, specifically the mean square error (MSE), is used. The mean square error itself is a common existing evaluation indicator, so it will not be described in more detail here.
[0076] After completing the training of the cerebral hemorrhage sample image generation model, it can obviously be put into practical use. In this regard, the present application may also involve the application link of the cerebral hemorrhage sample image generation model, which is usually to meet the use requirements of the cerebral hemorrhage prediction model for training samples.
[0077] Correspondingly, as another exemplary embodiment, after training the cerebral hemorrhage sample image generation model based on the second cerebral hemorrhage sample image and the second label, the method of the present application may further include: Obtain normal images that do not include the cerebral hemorrhage area; Get the preset label; Input the normal image and the preset label into the brain hemorrhage sample image generation model; Extract the cerebral hemorrhage sample image to generate the cerebral hemorrhage image output by the model.
[0078] After obtaining the cerebral hemorrhage image (cerebral hemorrhage case prediction result), corresponding to the clinical work needs, it is obvious that further data applications can be involved, such as result display, result preservation, result forwarding, output completion processing prompts, corresponding data analysis and processing, or cerebral hemorrhage prediction model training. The specific data application can be configured according to actual needs, and this application does not make specific limitations.
[0079] As an example, after the final best-performing model is determined as the output from the training process, that is, the brain hemorrhage sample image generation model that can be put into practical use, a normal brain CT image x can be input with an artificial label y to generate a brain CT image z with lesions.
[0080] After obtaining the cerebral hemorrhage image, as another exemplary embodiment, the method of the present application may further include: Based on cerebral hemorrhage images, a cerebral hemorrhage prediction model is trained.
[0081] It can be understood that for the cerebral hemorrhage images used for training the model, it is also necessary to add annotations of the corresponding lesions, i.e., the cerebral hemorrhage areas. After the training is completed, the cerebral hemorrhage prediction model is specifically used to predict the cerebral hemorrhage area in the image based on the image input by the model, and further predict the corresponding cerebral hemorrhage type (corresponding to this prediction goal, the cerebral hemorrhage images used as training samples need to be labeled with the corresponding cerebral hemorrhage types).
[0082] After completing the training of the cerebral hemorrhage prediction model, as another exemplary embodiment, the method of the present application may also include: Get the target image; Inputting the target image into the cerebral hemorrhage prediction model; Extract the cerebral hemorrhage prediction results output by the cerebral hemorrhage prediction model.
[0083] It is understandable that the training and application stages of the cerebral hemorrhage prediction model are not the focus of the present application, and reference can be made to the prior art and the corresponding processing contents of the previous cerebral hemorrhage sample image generation model. Therefore, no further detailed description will be given here.
[0084] The above is an introduction to the processing method of the cerebral hemorrhage sample image generation model provided by the present application. In order to facilitate better implementation of the processing method of the cerebral hemorrhage sample image generation model provided by the present application, the present application also provides a processing device for the cerebral hemorrhage sample image generation model from the perspective of functional modules.
[0085] See also Figure 2 , Figure 2 This is a structural diagram of a processing device for generating a model of a sample image of cerebral hemorrhage in this application. In this application, the processing device 200 for generating a model of a sample image of cerebral hemorrhage may specifically include the following structure: An image acquisition unit 201 is used to acquire a first cerebral hemorrhage sample image, wherein the first cerebral hemorrhage sample image specifically includes at least one of a computer tomography image and a magnetic resonance imaging image; The label configuration unit 202 is used to configure a corresponding first label for the first cerebral hemorrhage sample image, wherein the first label is used to indicate a cerebral hemorrhage area in the first cerebral hemorrhage sample image; A data enhancement unit 203 is used to perform a first data enhancement operation on the first label, and the second label after the shape change is used as prior knowledge for generating a lesion image; An image erasing unit 204 is used to perform an image erasing operation on the cerebral hemorrhage area in the first cerebral hemorrhage sample image to obtain a second cerebral hemorrhage sample image; The model training unit 205 is used to train a brain hemorrhage sample image generation model based on the first brain hemorrhage sample image, the second brain hemorrhage sample image and the second label, wherein the brain hemorrhage sample image generation model is used to generate a corresponding brain hemorrhage image according to a normal image and a preset label input into the model.
[0086] In an exemplary embodiment, the data enhancement unit 203 is further configured to: Perform a second data enhancement operation on the first label, wherein the second data enhancement operation includes at least one of the following methods: Only expand the original label; Only the original label is corroded; The original label is first expanded and then eroded.
[0087] In another exemplary embodiment, the data enhancement unit 203 is further configured to: In the continuous first cerebral hemorrhage sample images, based on the randomly selected z-axis position, three consecutive images are used as units to select images, and the first cerebral hemorrhage sample images are updated, corresponding to the processing units of the input images corresponding to the three channels of the subsequent model, and the first label is updated by comparing with the updated first cerebral hemorrhage sample images; Under the selected window width and window position, a normalization operation is performed on the first cerebral hemorrhage sample image so that the pixel value is between 0 and 1.
[0088] In another exemplary embodiment, the data enhancement unit 203 is further configured to: A third data enhancement operation in terms of image transformation is performed on the first cerebral hemorrhage sample image, and a comparison transformation is performed on the first label, wherein the third data enhancement operation includes rotation, translation and elastic deformation.
[0089] In another exemplary embodiment, the data enhancement unit 203 is further configured to: A fourth data enhancement operation is performed on the first cerebral hemorrhage sample image, wherein the fourth data enhancement operation includes adding noise, sharpening, and smoothing.
[0090] In yet another exemplary embodiment, the first data enhancement operation includes at least two of the following methods: No changes are made to the original label shape; The original label shape is adjusted to the smallest rectangular frame that contains the original label shape; The original label shape is adjusted to include the center point of the original label shape; The original label shape is adjusted to the convex hull of the original label shape.
[0091] In another exemplary embodiment, the cerebral hemorrhage sample image generation model specifically adopts a diffusion model, and the model training unit 205 is specifically used to: Encoding the second label using a label encoding network to obtain a label shape encoding feature, wherein the label encoding network is a multi-layer convolutional neural network; In the forward process of the diffusion model, actual noise is generated, and the input first cerebral hemorrhage sample image is subjected to T times of noise addition to obtain a corresponding noise-added image data sequence; In the reverse process of the diffusion model, the second cerebral hemorrhage sample image, the label shape coding feature, any time point t and the noise-added image data corresponding to the time point t are input into the cerebral hemorrhage sample image generation model to predict the noise added in the forward process of the diffusion model, wherein the label shape coding feature is input into the bottom network of the cerebral hemorrhage sample image generation model; The loss value between the actual noise and the noise prediction result is calculated based on the mean square error, and the model parameters are updated according to the loss value calculation result.
[0092] This application also provides a processing device from the perspective of hardware structure, see Figure 3 , Figure 3 301, a memory 302, and an input / output device 303. The processor 301 is used to execute the computer program stored in the memory 302 to implement the following Figure 1 The steps of the processing method for generating a model for a cerebral hemorrhage sample image in the corresponding embodiment; or, the processor 301 is used to execute the computer program stored in the memory 302 to implement the following Figure 2 Corresponding to the functions of each unit in the embodiment, the memory 302 is used to store the processor 301 executing the above Figure 1 The computer program required for the processing method of the cerebral hemorrhage sample image generation model in the corresponding embodiment.
[0093] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 302, and executed by the processor 301 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.
[0094] The processing device may include, but is not limited to, a processor 301, a memory 302, and an input / output device 303. Those skilled in the art will appreciate that the illustration is merely an example of a processing device and does not constitute a limitation on the processing device, and may include more or fewer components than shown in the illustration, or a combination of certain components, or different components. For example, the processing device may also include a network access device, a bus, etc., and the processor 301, the memory 302, the input / output device 303, etc. are connected via a bus.
[0095] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the processing device, and uses various interfaces and lines to connect various parts of the entire device.
[0096] The memory 302 can be used to store computer programs and / or modules. The processor 301 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 302 and calling the data stored in the memory 302. The memory 302 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the processing device, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0097] When the processor 301 is used to execute the computer program stored in the memory 302, the following functions can be implemented: Acquire a first cerebral hemorrhage sample image, wherein the first cerebral hemorrhage sample image specifically includes at least one of a computer tomography image and a magnetic resonance imaging image; Configuring a corresponding first label for the first cerebral hemorrhage sample image, wherein the first label is used to indicate a cerebral hemorrhage area in the first cerebral hemorrhage sample image; Performing a first data enhancement operation on the first label, and using the second label after the shape change as prior knowledge for generating a lesion image; Performing an image erasing operation on the cerebral hemorrhage region in the first cerebral hemorrhage sample image to obtain a second cerebral hemorrhage sample image; Based on the first cerebral hemorrhage sample image, the second cerebral hemorrhage sample image and the second label, a cerebral hemorrhage sample image generation model is trained, wherein the cerebral hemorrhage sample image generation model is used to generate a corresponding cerebral hemorrhage image according to a normal image and a preset label input into the model.
[0098] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the processing device, processing equipment and corresponding units of the above-described cerebral hemorrhage sample image generation model can refer to the following. Figure 1 The description of the processing method of the cerebral hemorrhage sample image generation model in the corresponding embodiment will not be repeated here.
[0099] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0100] To this end, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the present application as follows: Figure 1 The steps of the processing method of the brain hemorrhage sample image generation model in the corresponding embodiment, the specific operation can refer to the following Figure 1 The description of the processing method of the cerebral hemorrhage sample image generation model in the corresponding embodiment will not be repeated here.
[0101] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0102] Due to the instructions stored in the computer-readable storage medium, the present application can be executed. Figure 1 The steps of the processing method of the cerebral hemorrhage sample image generation model in the corresponding embodiment, therefore, the present application can be implemented as follows Figure 1 The beneficial effects that can be achieved by the processing method of the cerebral hemorrhage sample image generation model in the corresponding embodiment are detailed in the previous description and will not be repeated here.
[0103] The above is a detailed introduction to the processing method, device, processing equipment and computer-readable storage medium of the cerebral hemorrhage sample image generation model provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for processing a brain hemorrhage sample image generation model, characterized in that: The method comprises: Acquire a first cerebral hemorrhage sample image, wherein the first cerebral hemorrhage sample image specifically includes at least one of a computed tomography image and a magnetic resonance imaging image; Configuring a corresponding first label for the first cerebral hemorrhage sample image, wherein the first label is used to indicate a cerebral hemorrhage area in the first cerebral hemorrhage sample image; Performing a first data enhancement operation on the first label, and using the second label after the shape change as prior knowledge for generating a lesion image; Performing an image erasing operation on the cerebral hemorrhage area in the first cerebral hemorrhage sample image to obtain a second cerebral hemorrhage sample image; Based on the first cerebral hemorrhage sample image, the second cerebral hemorrhage sample image and the second label, a cerebral hemorrhage sample image generation model is trained, wherein the cerebral hemorrhage sample image generation model is used to generate a corresponding cerebral hemorrhage image according to a normal image and a preset label input into the model.
2. The method according to claim 1, characterized in that Before performing the first data enhancement operation on the first label, the method further includes: Performing a second data enhancement operation on the first label, wherein the second data enhancement operation includes at least one of the following methods: Only expand the original label; The original label is only corroded; The original label is first expanded and then corroded.
3. The method according to claim 1, characterized in that Before performing the image erasing operation on the cerebral hemorrhage area in the first cerebral hemorrhage sample image, the method further includes: In the continuous first cerebral hemorrhage sample images, based on the randomly selected z-axis position, three consecutive images are used as units to select images, complete the update of the first cerebral hemorrhage sample images, corresponding to the processing units of the input images corresponding to the three channels of the subsequent model, and update the first label in accordance with the updated first cerebral hemorrhage sample images; Under the selected window width and window level, a normalization operation is performed on the first cerebral hemorrhage sample image so that the pixel value is between 0 and 1.
4. The method according to claim 1, characterized in that: Before performing the image erasing operation on the cerebral hemorrhage area in the first cerebral hemorrhage sample image, the method further includes: A third data enhancement operation in terms of image transformation is performed on the first cerebral hemorrhage sample image, and a comparison transformation is performed on the first label, wherein the third data enhancement operation includes rotation, translation and elastic deformation.
5. The method according to claim 4, characterized in that After performing the third data enhancement operation in terms of image transformation on the first cerebral hemorrhage sample image, the method further includes: A fourth data enhancement operation is performed on the first cerebral hemorrhage sample image, wherein the fourth data enhancement operation includes adding noise, sharpening, and smoothing.
6. The method according to claim 1, characterized in that The first data enhancement operation includes at least two of the following methods: No changes are made to the original label shape; The original label shape is adjusted to a minimum rectangular frame that includes the original label shape; The original label shape is adjusted to include the center point of the original label shape; The original label shape is adjusted to the convex hull of the original label shape.
7. The method according to claim 1, characterized in that The cerebral hemorrhage sample image generation model specifically adopts a diffusion model. The training of the cerebral hemorrhage sample image generation model based on the first cerebral hemorrhage sample image, the second cerebral hemorrhage sample image and the second label includes: Encoding the second label using a label encoding network to obtain a label shape encoding feature, wherein the label encoding network is a multi-layer convolutional neural network; In the forward process of the diffusion model, actual noise is generated, and the first cerebral hemorrhage sample image input is subjected to T times of noise addition to obtain a corresponding noise-added image data sequence; In the reverse process of the diffusion model, the second cerebral hemorrhage sample image, the label shape coding feature, an arbitrary time point t and the noise-added image data corresponding to the time point t are input into the cerebral hemorrhage sample image generation model to predict the noise added in the forward process of the diffusion model, wherein the label shape coding feature is input into the bottom layer network of the cerebral hemorrhage sample image generation model; The loss value between the actual noise and the noise prediction result is calculated based on the mean square error, and the model parameters are updated according to the loss value calculation result.
8. A processing device for generating a model for a sample image of cerebral hemorrhage, characterized in that: The device comprises: An image acquisition unit, configured to acquire a first cerebral hemorrhage sample image, wherein the first cerebral hemorrhage sample image specifically comprises at least one of a computed tomography image and a magnetic resonance imaging image; a label configuration unit, configured to configure a corresponding first label for the first cerebral hemorrhage sample image, wherein the first label is used to indicate a cerebral hemorrhage area in the first cerebral hemorrhage sample image; A data enhancement unit, configured to perform a first data enhancement operation on the first label, and use the second label after the shape change as prior knowledge for generating a lesion image; An image erasing unit, configured to perform an image erasing operation on the cerebral hemorrhage region in the first cerebral hemorrhage sample image to obtain a second cerebral hemorrhage sample image; A model training unit is used to train a brain hemorrhage sample image generation model based on the first brain hemorrhage sample image, the second brain hemorrhage sample image and the second label, wherein the brain hemorrhage sample image generation model is used to generate a corresponding brain hemorrhage image according to a normal image and a preset label input by the model.
9. A processing device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and the processor executes the method according to any one of claims 1 to 7 when calling the computer program in the memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Brain tumor segmentation data enhancement method based on generative adversarial network
CN111833359A
Cerebrovascular image-label two-stage generation method and device and storage medium
CN115719335A
Cerebral hemorrhage segmentation prediction model processing method, device and processing equipment
CN119693635A
Vehicle localization device and operating method thereof
KR1020260085536A
Medical image synthesis
US20250045912A1