Image processing model training method and device, equipment and medium
By training the image processing model, the CT images of different scanning methods are converted, which solves the problems of extended inspection time and cumbersome process caused by multiple scanning methods, and achieves the effect of obtaining multiple images in a single scanning method.
Patent Information
- Application Number
- CN202411470079.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-02-11
AI Technical Summary
In medical CT scans, multiple scanning methods are needed to obtain multiple types of scanning images, resulting in extended examination time and cumbersome process.
By training an image processing model, the original sample data pairs and optimized sample data pairs are used to combine and generate forward and backward training sample pairs, the forward and backward generation models are trained, and the loop generation adversarial model is then built to realize different scanning methods Image conversion.
When only one scanning method is required, images of multiple scanning methods can be generated, inspection efficiency and inspection time can be shortened.
Smart Images

Figure CN119418149A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of medical image processing technology, and in particular to an image processing model training method, device, equipment and medium. Background Art
[0002] In medical CT scanning, sometimes different CT scanning methods need to be used to obtain scanned images corresponding to the scanning methods. However, scanning the same patient using different methods will consume more examination time and make the examination process more cumbersome. Summary of the invention
[0003] The embodiments of the present invention provide an image processing model training method, device, equipment and medium, which can convert images of different scanning modes by training an image processing model, so that images of multiple scanning modes can be obtained when only one scanning mode is required, thereby improving inspection efficiency and shortening inspection time.
[0004] In a first aspect, an embodiment of the present invention provides an image processing model training method, the method comprising:
[0005] Acquire an original sample data pair consisting of a first type CT image and a second type CT image, wherein the first type CT image and the second type CT image in each original sample data pair are images obtained by scanning the same sample object part in different scanning modes;
[0006] Inputting the original sample data pair into the pre-trained blood vessel segmentation model to obtain the blood vessel segmentation output result, and generating the optimized sample data pair corresponding to the original sample data pair according to the blood vessel segmentation output result;
[0007] Combine the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and a backward training sample pair, train a forward generation model according to the forward training sample pair to obtain a target forward generation model, and train a backward generation model according to the backward training sample pair to obtain a target backward generation model;
[0008] Determine the parameters of the forward generation discriminator according to the output results of the target forward generation model training process, and determine the parameters of the backward generation discriminator according to the output results of the target backward generation model training process;
[0009] According to the target forward generation model, the target backward generation model, the forward generation discriminator and the backward generation discriminator, a target cycle generation adversarial model is obtained;
[0010] The forward generation model is used to convert the first type of CT image into the second type of CT image, and the backward generation model is used to convert the second type of CT image into the first type of CT image.
[0011] In a second aspect, an embodiment of the present invention provides an image processing model training device, the device comprising:
[0012] An original sample acquisition module is used to acquire an original sample data pair consisting of a first type CT image and a second type CT image, wherein the first type CT image and the second type CT image in each original sample data pair are images obtained by scanning the same sample object part in different scanning modes;
[0013] An optimized sample generation module is used to input the original sample data pair into the pre-trained blood vessel segmentation model to obtain the blood vessel segmentation output result, and generate an optimized sample data pair corresponding to the original sample data pair according to the blood vessel segmentation output result;
[0014] A model training module is used to combine the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and a backward training sample pair, train a forward generation model according to the forward training sample pair to obtain a target forward generation model, and train a backward generation model according to the backward training sample pair to obtain a target backward generation model;
[0015] A parameter determination module, used to determine the parameters of the forward generation discriminator according to the output results of the target forward generation model training process, and to determine the parameters of the backward generation discriminator according to the output results of the target backward generation model training process;
[0016] A target model determination module, used to obtain a target cyclic generative adversarial model according to a target forward generative model, a target backward generative model, a forward generative discriminator and a backward generative discriminator;
[0017] The forward generation model is used to convert the first type of CT image into the second type of CT image, and the backward generation model is used to convert the second type of CT image into the first type of CT image.
[0018] In a third aspect, an embodiment of the present invention further provides a computer device, the computer device comprising:
[0019] one or more processors;
[0020] A memory for storing one or more programs;
[0021] When the above one or more programs are executed by one or more processors, the above one or more processors implement the image processing model training method provided by any embodiment of the present invention.
[0022] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements an image processing model training method as provided in any embodiment of the present invention.
[0023] In a fifth aspect, an embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements an image processing model training method as provided in any embodiment of the present invention.
[0024] The embodiments of the above invention have the following advantages or beneficial effects:
[0025] In an embodiment of the present invention, an original sample data pair consisting of a first type of CT image and a second type of CT image is obtained, wherein the first type of CT image and the second type of CT image in each original sample data pair are images obtained by scanning the same sample object part by different scanning methods; the original sample data pair is input into a pre-trained vascular segmentation model to obtain a vascular segmentation output result, and an optimized sample data pair corresponding to the original sample data pair is generated according to the vascular segmentation output result; the images in the original sample data pair and the optimized sample data pair are combined to obtain a forward training sample pair and a backward training sample pair, and a forward generation model is trained according to the forward training sample pair. Obtain a target forward generative model, and train the backward generative model according to the backward training samples to obtain the target backward generative model; determine the parameters of the forward generative discriminator according to the output results of the target forward generative model training process, and determine the parameters of the backward generative discriminator according to the output results of the target backward generative model training process; obtain a target cyclic generative adversarial model according to the target forward generative model, the target backward generative model, the forward generative discriminator and the backward generative discriminator; wherein the forward generative model is used to convert the first type of CT image into the second type of CT image, and the backward generative model is used to convert the second type of CT image into the first type of CT image. The technical solution of the embodiment of the present invention solves the problem that multiple scanning methods are currently required to be used in medical examinations to obtain medical images in order to improve the inspection effect. By training an image processing model, images of different scanning methods can be converted, so that images of multiple scanning methods can be obtained when only one scanning method is required, thereby improving the inspection efficiency and shortening the inspection time. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 is a flow chart of an image processing model training method provided by an embodiment of the present invention;
[0027] Figure 2 is a flow chart of an image processing model training method provided by an embodiment of the present invention;
[0028] Figure 3It is a schematic diagram of the principle of optimizing sample data pair generation provided by an embodiment of the present invention;
[0029] Figure 4 is a flow chart of an image processing model training method provided by an embodiment of the present invention;
[0030] Figure 5 It is a schematic diagram of the principle of model training provided by an embodiment of the present invention;
[0031] Figure 6 It is a schematic diagram of the principle of model training provided by an embodiment of the present invention;
[0032] Figure 7 It is a structural schematic diagram of an image processing model training device provided by an embodiment of the present invention;
[0033] Figure 8 It is a structural schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0034] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0035] Figure 1 A flowchart of an image processing model training method provided in an embodiment of the present invention, which can be applied to the scene of image processing model training. The method can be executed by an image processing model training device, which can be implemented by software and / or hardware and integrated into a computer device with application development function.
[0036] like Figure 1 As shown, the image processing model training method of this embodiment includes the following steps:
[0037] S110 , obtaining an original sample data pair consisting of a first type CT image and a second type CT image.
[0038] The first type CT image and the second type CT image in each original sample data pair are images obtained by scanning the same sample object part in different scanning modes. The first type CT image and the second type CT image can be three-dimensional images or two-dimensional images.
[0039] Different scanning methods can include plain scanning and enhanced scanning. Specifically, when performing a CT (computed tomography) examination, it is sometimes necessary to use contrast agents for enhanced CT scanning, i.e., enhanced scanning. Contrast agents can increase the contrast between different tissues, making certain lesions or anatomical structures clearer. For example, tumors, vascular lesions, and areas of inflammation will appear more clearly in enhanced CT images, which helps doctors to make more accurate diagnoses. Enhanced CT can help doctors determine the size, shape, location, and relationship of tumors to surrounding tissues. Contrast agents can make tumors appear more prominent in images, making it easier to distinguish tumors from normal tissues. Enhanced CT is also very important in vascular imaging (such as CT angiography, CTA). After the contrast agent is injected, the morphology and structure of blood vessels can be clearly displayed, helping doctors detect lesions such as vascular stenosis, aneurysms, and thrombi. In some cases, enhanced CT can help identify areas of inflammation and infection, because these areas usually have increased or abnormal blood flow, which will be more obvious after the injection of contrast agents. Enhanced CT can be used to evaluate the function and blood supply of certain organs (such as the liver, kidneys, etc.). By observing the distribution and excretion of contrast agents in these organs, valuable information about organ function can be provided. In general, enhanced CT can significantly improve the quality of images and the accuracy of diagnosis by using contrast agents, helping doctors to more comprehensively evaluate the condition and formulate treatment plans.
[0040] The images obtained by scanning the same sample object parts by different scanning methods have the characteristics of spatial alignment, which is convenient for subsequent model training.
[0041] S120 , inputting the original sample data pair into the pre-trained blood vessel segmentation model to obtain a blood vessel segmentation output result, and generating an optimized sample data pair corresponding to the original sample data pair according to the blood vessel segmentation output result.
[0042] The pre-trained blood vessel segmentation model can be, for example, a neural network model based on an image segmentation algorithm, which can obtain blood vessel area images in the sample data, such as arterial blood vessel area images or venous blood vessel area images, by classifying pixels, and perform image processing on the original sample data according to the pixel features of the blood vessel area images to obtain optimized sample data pairs that simulate the original sample data pairs.
[0043] S130. Combine the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and a backward training sample pair, train a forward generation model according to the forward training sample pair to obtain a target forward generation model, and train a backward generation model according to the backward training sample pair to obtain a target backward generation model.
[0044] The forward generation model is used to convert the first type of CT image into the second type of CT image, and the backward generation model is used to convert the second type of CT image into the first type of CT image.
[0045] It can be understood that the optimized sample data pair can be combined with the image in the original sample data pair by simulating the image in the original sample data pair to obtain training sample data with a higher degree of spatial alignment than the original sample data pair.
[0046] The combination method can be to combine the first type of CT image in the original sample data pair and the second type of optimized image in the corresponding optimized sample data pair into a forward training sample pair, and to combine the second type of CT image in the original sample data pair and the first type of optimized image in the corresponding optimized sample data pair into a backward training sample pair, and to use the images in the optimized sample data pair as labels, and to train a forward generation model according to the forward training sample pair to obtain a target forward generation model, and to train a backward generation model according to the backward training sample pair to obtain a target backward generation model.
[0047] S140, determining parameters of a forward generation discriminator according to output results during the training process of the target forward generation model, and determining parameters of a backward generation discriminator according to output results during the training process of the target backward generation model.
[0048] The adversarial loss of the forward generation discriminator is calculated according to the output results of the target forward generation model training process and the second type of CT image, and the parameters of the forward generation discriminator are determined according to the adversarial loss of the forward generation discriminator. The adversarial loss of the backward generation discriminator is calculated according to the output results of the target backward generation model training process and the first type of CT image, and the parameters of the backward generation discriminator are determined according to the adversarial loss of the backward generation discriminator.
[0049] S150. Obtain a target cyclic generative adversarial model according to the target forward generative model, the target backward generative model, the forward generative discriminator and the backward generative discriminator.
[0050] The cyclic generative adversarial model is a deep learning model for image conversion, including two generators and two discriminators. In this embodiment, the two generators are a target forward generative model and a target backward generative model, and the two discriminators are a forward generative discriminator and a backward generative discriminator. The target cyclic generative adversarial model can convert a first type of CT image and a second type of CT image, convert the first type of CT image to obtain an image of the second type of style, and convert the second type of CT image to obtain an image of the first type of style. For example, a plain scan CT image is converted into an enhanced CT style image, so that the doctor user can detect lesions such as vascular stenosis, aneurysm, and thrombosis through the enhanced CT style image obtained by the conversion, which has higher vascular brightness and clearer contrast with surrounding tissues.
[0051] The technical solution of this embodiment is to obtain an original sample data pair consisting of a first type of CT image and a second type of CT image, wherein the first type of CT image and the second type of CT image in each original sample data pair are images obtained by scanning the same sample object part in different scanning methods; input the original sample data pair into a pre-trained vascular segmentation model to obtain a vascular segmentation output result, and generate an optimized sample data pair corresponding to the original sample data pair according to the vascular segmentation output result; combine the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and a backward training sample pair, and train the forward generation according to the forward training sample pair The target forward generative model is obtained by the model, and the target backward generative model is obtained by training the backward generative model according to the backward training samples; the parameters of the forward generative discriminator are determined according to the output results of the training process of the target forward generative model, and the parameters of the backward generative discriminator are determined according to the output results of the training process of the target backward generative model; the target cyclic generative adversarial model is obtained according to the target forward generative model, the target backward generative model, the forward generative discriminator and the backward generative discriminator; wherein the forward generative model is used to convert the first type of CT image into the second type of CT image, and the backward generative model is used to convert the second type of CT image into the first type of CT image. The technical solution of the embodiment of the present invention solves the problem that multiple scanning methods are currently required to be used in medical examinations to obtain medical images in order to improve the inspection effect. By training an image processing model, images of different scanning methods can be converted, so that images of multiple scanning methods can be obtained when only one scanning method is required, thereby improving the inspection efficiency and shortening the inspection time.
[0052] Figure 2This is a flowchart of an image processing model training method provided by an embodiment of the present invention. This embodiment and the image processing model training method in the above embodiment belong to the same inventive concept, and further describes the process of optimizing the generation of sample data pairs. The method can be executed by an image processing model training device, which can be implemented by software and / or hardware and integrated into a computer device with application development function.
[0053] like Figure 2 As shown, the image processing model training method of this embodiment includes the following steps:
[0054] S210 , obtaining an original sample data pair consisting of a first type CT image and a second type CT image.
[0055] The first type CT image and the second type CT image in each original sample data pair are images obtained by scanning the same sample object part in different scanning modes.
[0056] For example, all the raw sample data pairs collected by scanning can be divided into a training set, a validation set and a test set according to a preset ratio, such as 8:1:1. 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.
[0057] For example, the first type of CT image can be represented as The first type of CT image can be a plain scan CT image, and the second type of CT image can be represented as The second type of CT image may be an enhanced CT image.
[0058] S220. Input the original sample data pair into a pre-trained vascular segmentation model to obtain a vascular segmentation output result, and determine the pixel difference between the vascular segmentation areas of the first type CT image and the second type CT image based on the pixel features of the vascular segmentation areas of the first type CT image and the second type CT image.
[0059] The pixel feature may be a brightness value of a pixel, and the pixel difference may be a difference in the brightness value of a pixel. Generally, the brightness value of each pixel in the enhanced CT image of the same object part is greater than the brightness value in the plain scan CT image. The pixel difference of the blood vessel segmentation area may be characterized according to statistical features, such as the mean value, the median, etc.
[0060] For example, the training process of the pre-trained blood vessel segmentation model can be to input the plain scan CT image of the training set sample i and enhanced CT images and its corresponding vessel label, i.e. and in, is the vascular label of the plain scan CT image, To enhance the blood vessel label of CT images. and Perform image preprocessing, such as rotation, translation, elastic deformation and pixel value transformation, noise addition, contrast change, etc. and Do the same spatial transformation. and Resize them separately so that their sizes are consistent with h×w×d. Input into the vessel segmentation model to and For the corresponding blood vessel labels, supervised training is performed. A model with the best segmentation performance is selected from the trained blood vessel segmentation models using the validation set as the pre-trained blood vessel segmentation model. For example, the best performing blood vessel segmentation model among the various blood vessel segmentation models can be determined using preset evaluation indicators. The evaluation indicators may include accuracy, precision, and recall. The comprehensive scores of the various evaluation indicators are calculated, and the model with the highest comprehensive score is used as the pre-trained blood vessel segmentation model.
[0061] like Figure 3 As shown, the first type of CT image is segmented by the pre-trained vascular segmentation model and the second type of CT images Perform rough segmentation of blood vessels to obtain the blood vessel segmentation output results, namely, the blood vessel segmentation areas of the first type CT image and the second type CT image, respectively. and
[0062] S230 . Adjust the first type CT image and the second type CT image according to the pixel difference to obtain an optimized sample data pair corresponding to the original sample data pair.
[0063] like Figure 3 As shown, according to the pixel difference, the first type of CT image The blood vessel segmentation area Perform pixel adjustment to make the pixel features of the adjusted image close to the second type CT image The pixel features of the second type of CT image are obtained by And segment the blood vessels of the second type of CT image Pixel adjustment is performed to make the pixel features of the adjusted image close to the pixel features of the first type CT image, thereby obtaining a first type optimized image that imitates the first type CT image According to the first type optimized image and the second type optimized image, an optimized sample data pair is obtained.
[0064] In an optional embodiment, the pixel feature includes a pixel median, and the pixel difference between the blood vessel segmentation regions of the first type CT image and the second type CT image is determined based on the pixel features of the blood vessel segmentation regions of the first type CT image and the second type CT image. This may be to calculate the difference between a first median of pixels exceeding a preset pixel threshold in the blood vessel segmentation region of the first type CT image and a second median of pixels exceeding the preset pixel threshold in the blood vessel segmentation region of the second type CT image. Accordingly, the first type CT image and the second type CT image are adjusted based on the pixel difference to obtain an optimized sample data pair corresponding to the original sample data pair. This may be to add the pixel value of the blood vessel segmentation region of the first type CT image to the difference to obtain the second type optimized image in the corresponding optimized sample data pair. This may be to subtract the difference from the pixel value of the blood vessel segmentation region of the second type CT image to obtain the first type optimized image in the corresponding optimized sample data pair. Wherein, the pixel average value of the blood vessel segmentation region of the first type CT image is smaller than the pixel average value of the blood vessel segmentation region of the second type CT image.
[0065] The preset pixel threshold may be 0 or other values, which is not limited in this embodiment. and In-vessel labeling and Count the pixel values in the area where the pixel value is greater than 0 and get the first median of the pixel value and the second median according to and Get the difference d of the pixel median (i)
[0066] Will Vessel labeling Add d to the area where the inner pixel value is greater than 0 (i) , and obtain the second type of optimized image, namely the pseudo-enhanced CT image Will Vessel labeling Subtract d from the area where the pixel value is greater than 0 (i) , and obtain the second type of optimized image, namely the pseudo plain scan CT image
[0067] It can be understood that the pixel average value of the blood vessel segmentation area of the first type CT image is smaller than the pixel average value of the blood vessel segmentation area of the second type CT image. Therefore, after the difference is added to the pixel value of the first type CT image, the pixel value of each pixel becomes larger, thereby approaching the pixel value of the originally acquired second type CT image. After the difference is subtracted from the pixel value of the second type CT image, the pixel value of each pixel becomes smaller, thereby approaching the pixel value of the originally acquired first type CT image.
[0068] S240. Combine the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and a backward training sample pair, train a forward generation model according to the forward training sample pair to obtain a target forward generation model, and train a backward generation model according to the backward training sample pair to obtain a target backward generation model.
[0069] The forward generation model is used to convert the first type of CT image into the second type of CT image, and the backward generation model is used to convert the second type of CT image into the first type of CT image.
[0070] S250, determining parameters of a forward generation discriminator according to output results during the training process of the target forward generation model, and determining parameters of a backward generation discriminator according to output results during the training process of the target backward generation model.
[0071] S260. Obtain a target cyclic generative adversarial model according to the target forward generative model, the target backward generative model, the forward generative discriminator and the backward generative discriminator.
[0072] The technical solution of this embodiment is to obtain an original sample data pair consisting of a first type of CT image and a second type of CT image, wherein the first type of CT image and the second type of CT image in each original sample data pair are images obtained by scanning the same sample object part in different scanning methods; determine the pixel difference of the blood vessel segmentation area of the first type of CT image and the second type of CT image according to the pixel features of the blood vessel segmentation area of the first type of CT image and the second type of CT image; adjust the first type of CT image and the second type of CT image according to the pixel difference to obtain an optimized sample data pair corresponding to the original sample data pair; combine the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and A backward training sample pair, training a forward generation model according to the forward training sample pair to obtain a target forward generation model, and training a backward generation model according to the backward training sample pair to obtain a target backward generation model; determining parameters of a forward generation discriminator according to output results during the training of the target forward generation model, and determining parameters of a backward generation discriminator according to output results during the training of the target backward generation model; obtaining a target cyclic generative adversarial model according to the target forward generation model, the target backward generation model, the forward generation discriminator and the backward generation discriminator; wherein the forward generation model is used to convert a first type of CT image into a second type of CT image, and the backward generation model is used to convert a second type of CT image into a first type of CT image. The technical solution of the embodiment of the present invention solves the problem that medical images need to be acquired by scanning in multiple ways in order to improve the inspection effect during medical examinations. An image processing model can be trained to convert images of different scanning methods, so that images of multiple scanning methods can be obtained without scanning in one scanning method, thereby improving inspection efficiency and shortening inspection time. By adding optimized sample data obtained by processing and analyzing the vascular segmentation model to model training, the applicability of model-converted images in vascular analysis is improved, making it easier for doctor users to perform vascular-related disease analysis based on the converted images.
[0073] Figure 4 A flowchart of an image processing model training method provided in an embodiment of the present invention, this embodiment and the image processing model training method in the above embodiment belong to the same inventive concept, and further describes the process of training the target forward generation model and the target backward generation model. The method can be executed by an image processing model training device, which can be implemented by software and / or hardware and integrated into a computer device with application development function.
[0074] like Figure 4 As shown, the image processing model training method of this embodiment includes the following steps:
[0075] S310 , obtaining an original sample data pair consisting of a first type CT image and a second type CT image.
[0076] The first type CT image and the second type CT image in each original sample data pair are images obtained by scanning the same sample object part in different scanning modes.
[0077] S320 , inputting the original sample data pair into the pre-trained blood vessel segmentation model to obtain a blood vessel segmentation output result, and generating an optimized sample data pair corresponding to the original sample data pair according to the blood vessel segmentation output result.
[0078] S330, using the first type of CT image in the original sample data pair as a model input, and using the second type of optimized image in the optimized sample data pair as a model label, training the forward generation model to obtain an initially trained forward generation model.
[0079] like Figure 5 As shown, the first type of CT image Input into the forward generation model, i.e. the forward scanning enhancement model F, and output The second type of optimized image, namely the pseudo-enhanced CT image, is centered by optimizing the sample data For supervision, the model is pre-trained and the mean square error loss function is used to calculate and The loss is calculated and the parameters of the model F are updated to obtain the initial trained forward generation model.
[0080] S340, using the second type of CT image in the original sample data pair as a model input, using the first type of optimized image in the optimized sample data pair as a model label, training the backward generation model to obtain an initially trained backward generation model.
[0081] like Figure 5 As shown, the second type of CT image Input into the backward generation model, namely the enhanced-to-plain scanning model B, and output The first type of optimized image is the pseudo plain scan CT image For supervision, the initial training of the model is performed, and the mean square error loss function is used to calculate and The loss of is calculated and the parameters of model B are updated to obtain the initially trained backward generation model.
[0082] There can be multiple backward generation models and multiple forward generation models. In the case where there are multiple backward generation models and multiple forward generation models, the validation set can be used to select the best model from the trained forward scan-to-enhancement model F, denoted as F opt , use the validation set to select the best model from the trained backward scanning enhancement model G, denoted as B opt , where F optis the forward generation model for initial training, B opt is the backward generative model for initial training. The selection method can be the same as the selection method of the above-mentioned blood vessel segmentation model.
[0083] S350, taking all types of images in the original sample data as model input, training the initially trained forward generative model and the initially trained backward generative model based on an unsupervised learning method, and obtaining a pre-trained forward generative model and a pre-trained backward generative model.
[0084] All types of images in the original sample data pairs are respectively input into the initially trained forward generative model and the initially trained backward generative model, and the initially trained forward generative model and the initially trained backward generative model are trained based on an unsupervised learning method.
[0085] In an optional embodiment, all types of images in the original sample data pair are used as model inputs, and the initially trained forward generation model and the initially trained backward generation model are trained based on an unsupervised learning method to obtain the pre-trained forward generation model and the pre-trained backward generation model. The first type of CT image in the original sample data pair can be input into the initially trained forward generation model and the initially trained backward generation model to obtain the forward output result and the backward output result of the first type of CT image in the pre-training stage; the second type of CT image in the original sample data pair is input into the initially trained forward generation model and the initially trained backward generation model to obtain the forward output result and the backward output result of the second type of CT image in the pre-training stage; the forward output result of the first type of CT image in the original sample data pair in the pre-training stage is input into the initially trained backward generation model to obtain the output result of the first type of CT image in the pre-training stage after two conversions; the backward output result of the second type of CT image in the original sample data pair in the pre-training stage is input into the initially trained backward generation model to obtain the output result of the first type of CT image in the pre-training stage after two conversions; The output result is input into the forward generation model of the initial training to obtain the output result of the second type CT image after two conversions in the pre-training stage; the loss value between the forward output result of the first type CT image in the pre-training stage and the second type optimized image, the loss value between the backward output result of the first type CT image in the pre-training stage and the first type CT image, the loss value between the backward output result of the second type CT image in the pre-training stage and the first type optimized image, the loss value between the forward output result of the second type CT image in the pre-training stage and the second type CT image, the loss value between the output result of the first type CT image after two conversions in the pre-training stage and the first type CT image, and the loss value between the output result of the second type CT image after two conversions in the pre-training stage and the second type CT image are calculated; the parameters of the initial training forward generation model and the initial training backward generation model are updated according to the loss value of the pre-training stage to obtain the pre-trained forward generation model and the pre-trained backward generation model.
[0086] In the pre-training phase, Input to the initially trained forward generative model F opt In, output Will Input to the initially trained forward generative model F opt In, output
[0087] Will Input to the initially trained backward generation model B opt In, output Will Input to the initially trained backward generation model B opt In, output
[0088] Will Input to the initially trained forward generative model F opt In, output The output result after two conversions Will Input to the initially trained backward generation model B opt In, output The output result after two conversions
[0089] Based on the mean square error loss, the loss value of the pre-training phase is calculated as and The loss between and The loss between and The loss between and The loss between and The loss between and The loss between the two is calculated, and the loss value of the pre-training stage is accumulated and averaged. According to the accumulated average result of the loss value, the forward generation model F of the initial training is updated at the same time. opt and the initially trained backward generative model B opt .
[0090] Use the validation set to generate the forward model F from the trained initial training opt The best performing one is selected as the pre-trained forward generative model, and the backward generative model B is trained from the trained initial training. opt The best performing one is selected as the pre-trained backward generative model. The selection method can be the same as the selection method of the above-mentioned blood vessel segmentation model.
[0091] S360. Train a pre-trained forward generation model and a pre-trained backward generation model according to the original sample data pair and the optimized sample data pair to obtain a target forward generation model and a target backward generation model.
[0092] In this embodiment, in order to improve the conversion effect of the model, the pre-trained forward generation model and the pre-trained backward generation model are continuously trained by using the original sample data pairs and the optimized sample data pairs.
[0093] In an optional implementation, training a pre-trained forward generative model and a pre-trained backward generative model according to the original sample data pair and the optimized sample data pair to obtain a target forward generative model and a target backward generative model may include the following steps A1-A6:
[0094] Step A1: input the first type of CT image in the original sample data into a pre-trained forward generation model and a pre-trained backward generation model to obtain a forward output result and a backward output result of the first type of CT image in a target training stage.
[0095] Will Input to the pre-trained forward generative model F, generate The forward output result in the target training phase, that is, the output with the second type of CT image style Will Input into the pre-trained backward generative model B to generate output with the style of the first type of CT image
[0096] Step A2: input the second type CT image in the original sample data into the pre-trained forward generation model and the pre-trained backward generation model to obtain the forward output result and the backward output result of the second type CT image in the target training stage.
[0097] Will The pre-trained forward generative model F is input to the recurrent generative network to generate The forward output result in the target training phase is the output with the second type of CT image style. Will Input into the pre-trained backward generation model B of the cycle generation network to generate The backward output result in the target training phase has the output of the first type of CT image style
[0098] Step A3: input the forward output result of the first type CT image in the original sample data pair in the pre-training stage into the pre-trained backward generation model to obtain the output result of the first type CT image after two conversions in the target training stage.
[0099] Will Input into the pre-trained backward generation model to generate the first type of CT image Output of two transformations during the target training phase The output result has a first type of CT image style.
[0100] Step A4: input the backward output result of the second type CT image in the original sample data in the pre-training stage into the pre-trained forward generation model to obtain the output result of the second type CT image after two conversions in the target training stage.
[0101] Will The pre-trained forward generative model is input into the recurrent generative network to generate the second type of CT image. Output of two transformations during the target training phase The output result has the second type of CT image style.
[0102] Step A5, calculate the loss value between the backward output result of the first type of CT image in the target training stage and the first type of CT image, the loss value between the forward output result of the second type of CT image in the target training stage and the second type of CT image, the loss value between the output result of the first type of CT image after two conversions in the target training stage and the first type of CT image, and the loss value between the output result of the second type of CT image after two conversions in the target training stage and the second type of CT image.
[0103] calculate and The L1 loss and mean square error loss between are calculated and The L1 loss and mean square error loss between are calculated and The L1 loss and mean square error loss between are calculated and The L1 loss and mean squared error loss between .
[0104] Step A6: Update the parameters of the pre-trained forward generation model and the pre-trained backward generation model according to the loss value of the target training stage to obtain the target forward generation model and the target backward generation model.
[0105] The losses of step A5 are accumulated and averaged, and the parameters of the pre-trained forward generation model and the pre-trained backward generation model are simultaneously updated according to the accumulated and averaged losses to obtain the target forward generation model and the target backward generation model.
[0106] After updating the parameters of the pre-trained forward generative model and the pre-trained backward generative model through the above loss, in this embodiment, you can also input To the discriminator D ce In the calculation For the second type of CT image style, i.e., the enhanced style loss, input To the discriminator D nc In the calculation is the loss of the first type of CT image style, namely the plain scan style. According to these two losses, the parameters of the forward plain scan to enhancement model and the backward enhancement to plain scan model are simultaneously updated to obtain the target forward generation model and the target backward generation model.
[0107] S370, determining the parameters of the forward generation discriminator according to the output results of the target forward generation model training process, and determining the parameters of the backward generation discriminator according to the output results of the target backward generation model training process.
[0108] In an optional embodiment, the parameters of the forward generation discriminator are determined according to the output results of the target forward generation model training process, and the parameters of the backward generation discriminator are determined according to the output results of the target backward generation model training process. The second type of CT image in the original sample data pair and the forward output result of the first type of CT image in the target training stage are input into the forward generation discriminator to obtain the forward generation discriminator loss value, and the parameters of the forward generation discriminator are determined according to the forward generation discriminator loss value; the first type of CT image in the original sample data pair and the backward output result of the second type of CT image in the target training stage are input into the backward generation discriminator to obtain the backward generation discriminator loss value, and the parameters of the backward generation discriminator are determined according to the backward generation discriminator loss value.
[0109] For example, Figure 6 As shown, input To the discriminator D nc In the calculation is the loss of the flat sweep style; input To the discriminator D ce In the calculation To enhance the style loss; input To the discriminator D ce In the calculation is the loss of the flat sweep style; input To the discriminator D nc In the calculation To enhance the style loss; based on these losses, the discriminator D is updated simultaneously nc and the discriminator D ce Parameters.
[0110] S380. Obtain a target cyclic generative adversarial model according to the target forward generative model, the target backward generative model, the forward generative discriminator and the backward generative discriminator.
[0111] The technical solution of this embodiment is to obtain an original sample data pair consisting of a first type of CT image and a second type of CT image, wherein the first type of CT image and the second type of CT image in each original sample data pair are images obtained by scanning the same sample object part in different scanning methods; input the original sample data pair into a pre-trained vascular segmentation model to obtain a vascular segmentation output result, and generate an optimized sample data pair corresponding to the original sample data pair according to the vascular segmentation output result; use the first type of CT image in the original sample data pair as a model input and the second type of optimized image in the optimized sample data pair as a model label, train the forward generation model to obtain the initial The method comprises the following steps: taking the second type of CT images in the original sample data pair as model input and the first type of optimized images in the optimized sample data pair as model labels, training the backward generation model to obtain the initially trained backward generation model; taking all types of images in the original sample data pair as model input, training the initially trained forward generation model and the initially trained backward generation model based on an unsupervised learning method to obtain the pre-trained forward generation model and the pre-trained backward generation model; training the pre-trained forward generation model and the pre-trained backward generation model according to the original sample data pair and the optimized sample data pair to obtain the target forward generation model and the target backward generation model. The parameters of the forward generation discriminator are determined according to the output results of the target forward generation model training process, and the parameters of the backward generation discriminator are determined according to the output results of the target backward generation model training process; the target cyclic generative adversarial model is obtained according to the target forward generation model, the target backward generation model, the forward generation discriminator and the backward generation discriminator; wherein the forward generation model is used to convert the first type of CT image into the second type of CT image, and the backward generation model is used to convert the second type of CT image into the first type of CT image. The technical solution of the embodiment of the present invention solves the problem that medical examinations currently need to use multiple scanning methods to obtain medical images to improve the inspection effect. By training an image processing model, images of different scanning methods can be converted, so that images of multiple scanning methods can be obtained when only one scanning method is required, thereby improving the inspection efficiency and shortening the inspection time. The model is trained for multiple iterations through rich sample data including original samples and optimized samples to improve the generalization ability of the model and the accuracy of conversion.
[0112] Figure 7The present invention provides a schematic diagram of the structure of an image processing model training device, which can be applied to the scene of image processing model training. The image processing model training device can be implemented by software and / or hardware and integrated into a computer terminal device with application development function.
[0113] like Figure 7 As shown, the image processing model training device includes: an original sample acquisition module 410, an optimized sample generation module 420, a model training module 430, a parameter determination module 440 and a target model determination module 450.
[0114] The original sample acquisition module 410 is used to acquire an original sample data pair consisting of a first type of CT image and a second type of CT image, wherein the first type of CT image and the second type of CT image in each original sample data pair are images obtained by scanning the same sample object part in different scanning methods; the optimized sample generation module 420 is used to input the original sample data pair into a pre-trained vascular segmentation model to obtain a vascular segmentation output result, and generate an optimized sample data pair corresponding to the original sample data pair according to the vascular segmentation output result; the model training module 430 is used to combine the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and a backward training sample pair, and train the forward training sample pair according to the forward training sample pair. The target forward generative model is obtained by the generative model, and the target backward generative model is obtained by training the backward generative model according to the backward training samples; the parameter determination module 440 is used to determine the parameters of the forward generative discriminator according to the output results of the target forward generative model training process, and determine the parameters of the backward generative discriminator according to the output results of the target backward generative model training process; the target model determination module 450 is used to obtain the target cyclic generative adversarial model according to the target forward generative model, the target backward generative model, the forward generative discriminator and the backward generative discriminator; wherein the forward generative model is used to convert the first type of CT image into the second type of CT image, and the backward generative model is used to convert the second type of CT image into the first type of CT image.
[0115] The technical solution of this embodiment is to obtain an original sample data pair consisting of a first type of CT image and a second type of CT image, wherein the first type of CT image and the second type of CT image in each original sample data pair are images obtained by scanning the same sample object part in different scanning methods; input the original sample data pair into a pre-trained vascular segmentation model to obtain a vascular segmentation output result, and generate an optimized sample data pair corresponding to the original sample data pair according to the vascular segmentation output result; combine the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and a backward training sample pair, and train the forward generation according to the forward training sample pair The target forward generative model is obtained by the model, and the target backward generative model is obtained by training the backward generative model according to the backward training samples; the parameters of the forward generative discriminator are determined according to the output results of the training process of the target forward generative model, and the parameters of the backward generative discriminator are determined according to the output results of the training process of the target backward generative model; the target cyclic generative adversarial model is obtained according to the target forward generative model, the target backward generative model, the forward generative discriminator and the backward generative discriminator; wherein the forward generative model is used to convert the first type of CT image into the second type of CT image, and the backward generative model is used to convert the second type of CT image into the first type of CT image. The technical solution of the embodiment of the present invention solves the problem that multiple scanning methods are currently required to be used in medical examinations to obtain medical images in order to improve the inspection effect. By training an image processing model, images of different scanning methods can be converted, so that images of multiple scanning methods can be obtained when only one scanning method is required, thereby improving the inspection efficiency and shortening the inspection time.
[0116] In an optional implementation, the optimized sample generation module 420 is specifically used for:
[0117] According to the pixel features of the blood vessel segmentation areas of the first type CT image and the second type CT image, the pixel difference between the blood vessel segmentation areas of the first type CT image and the second type CT image is determined; according to the pixel difference, the first type CT image and the second type CT image are adjusted to obtain an optimized sample data pair corresponding to the original sample data pair.
[0118] In an optional implementation, the pixel feature includes a pixel median, and the optimized sample generation module 420 is further configured to:
[0119] Calculate a difference between a first median of pixels exceeding a preset pixel threshold in the blood vessel segmentation region of the first type CT image and a second median of pixels exceeding the preset pixel threshold in the blood vessel segmentation region of the second type CT image;
[0120] The pixel values of the blood vessel segmentation area of the first type CT image and the difference value are added to obtain the second type optimized image in the corresponding optimized sample data pair; the difference value is subtracted from the pixel values of the blood vessel segmentation area of the second type CT image to obtain the first type optimized image in the corresponding optimized sample data pair; wherein the pixel average value of the blood vessel segmentation area of the first type CT image is less than the pixel average value of the blood vessel segmentation area of the second type CT image.
[0121] In an optional implementation, the model training module 430 is specifically used to:
[0122] Taking the first type of CT images in the original sample data pair as model input and the second type of optimized images in the optimized sample data pair as model labels, the forward generation model is trained to obtain an initially trained forward generation model; taking the second type of CT images in the original sample data pair as model input and the first type of optimized images in the optimized sample data pair as model labels, the backward generation model is trained to obtain an initially trained backward generation model; taking all types of images in the original sample data pair as model input, the initially trained forward generation model and the initially trained backward generation model are trained based on an unsupervised learning method to obtain a pre-trained forward generation model and a pre-trained backward generation model; training the pre-trained forward generation model and the pre-trained backward generation model according to the original sample data pair and the optimized sample data pair to obtain a target forward generation model and a target backward generation model.
[0123] In an optional implementation, the model training module 430 is further used to:
[0124] Input the first type of CT image in the original sample data pair into the initially trained forward generation model and the initially trained backward generation model to obtain the forward output result and the backward output result of the first type of CT image in the pre-training stage; input the second type of CT image in the original sample data pair into the initially trained forward generation model and the initially trained backward generation model to obtain the forward output result and the backward output result of the second type of CT image in the pre-training stage; input the forward output result of the first type of CT image in the original sample data pair in the pre-training stage into the initially trained backward generation model to obtain the output result of the first type of CT image in the pre-training stage after two conversions; input the backward output result of the second type of CT image in the original sample data pair in the pre-training stage into the initially trained forward generation model to obtain the output result of the second type of CT image in the pre-training stage after two conversions; calculate Calculate the loss value between the forward output result of the first type CT image in the pre-training stage and the second type optimized image, the loss value between the backward output result of the first type CT image in the pre-training stage and the first type CT image, the loss value between the backward output result of the second type CT image in the pre-training stage and the first type optimized image, the loss value between the forward output result of the second type CT image in the pre-training stage and the second type CT image, the loss value between the output result of the first type CT image after two conversions in the pre-training stage and the first type CT image, and the loss value between the output result of the second type CT image after two conversions in the pre-training stage and the second type CT image; update the parameters of the initially trained forward generation model and the initially trained backward generation model according to the loss values in the pre-training stage to obtain the pre-trained forward generation model and the pre-trained backward generation model.
[0125] In an optional implementation, the model training module 430 is further used to:
[0126] The first type of CT image in the original sample data pair is input into the pre-trained forward generation model and the pre-trained backward generation model to obtain the forward output result and the backward output result of the first type of CT image in the target training stage; the second type of CT image in the original sample data pair is input into the pre-trained forward generation model and the pre-trained backward generation model to obtain the forward output result and the backward output result of the second type of CT image in the target training stage; the forward output result of the first type of CT image in the original sample data pair in the pre-training stage is input into the pre-trained backward generation model to obtain the output result of the first type of CT image in the target training stage after two conversions; the backward output result of the second type of CT image in the original sample data pair in the pre-training stage is input into the pre-trained forward generation model A pre-trained forward generation model is used to obtain the output result of the second type CT image after two conversions in the target training stage; the loss value between the backward output result of the first type CT image in the target training stage and the first type CT image, the loss value between the forward output result of the second type CT image in the target training stage and the second type CT image, the loss value between the output result of the first type CT image after two conversions in the target training stage and the first type CT image, and the loss value between the output result of the second type CT image after two conversions in the target training stage and the second type CT image; the parameters of the pre-trained forward generation model and the pre-trained backward generation model are updated according to the loss value of the target training stage to obtain the target forward generation model and the target backward generation model.
[0127] In an optional implementation, the parameter determination module 440 is specifically configured to:
[0128] The second type of CT image in the original sample data pair and the forward output result of the first type of CT image in the target training stage are input into the forward generation discriminator to obtain the forward generation discriminator loss value, and the parameters of the forward generation discriminator are determined according to the forward generation discriminator loss value; the first type of CT image in the original sample data pair and the backward output result of the second type of CT image in the target training stage are input into the backward generation discriminator to obtain the backward generation discriminator loss value, and the parameters of the backward generation discriminator are determined according to the backward generation discriminator loss value. The image processing model training device provided in the embodiment of the present invention can execute the image processing model training method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0129] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Figure 8 A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 8The computer device 12 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention. The computer device 12 can be any terminal device with computing capabilities, such as an intelligent controller and server, a mobile phone and other terminal devices.
[0130] like Figure 8 As shown, the computer device 12 is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that connects various system components (including the system memory 28 and the processing unit 16).
[0131] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. By way of example, these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
[0132] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0133] The system memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. The computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 8 not shown, usually called a "hard drive"). Although Figure 8 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 18 via one or more data medium interfaces. The system memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0134] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0135] The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with the other modules of the computer device 12 via the bus 18. It should be understood that although Figure 8 Not shown, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RFID systems, tape drives, and data backup storage systems.
[0136] The processing unit 16 executes various functional applications and data processing by running the program stored in the system memory 28, for example, implementing the image processing model training method provided in the embodiment of the present invention, the method comprising:
[0137] Acquire an original sample data pair consisting of a first type CT image and a second type CT image, wherein the first type CT image and the second type CT image in each original sample data pair are images obtained by scanning the same sample object part in different scanning modes;
[0138] Inputting the original sample data pair into the pre-trained blood vessel segmentation model to obtain the blood vessel segmentation output result, and generating the optimized sample data pair corresponding to the original sample data pair according to the blood vessel segmentation output result;
[0139] Combine the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and a backward training sample pair, train a forward generation model according to the forward training sample pair to obtain a target forward generation model, and train a backward generation model according to the backward training sample pair to obtain a target backward generation model;
[0140] Determine the parameters of the forward generation discriminator according to the output results of the target forward generation model training process, and determine the parameters of the backward generation discriminator according to the output results of the target backward generation model training process;
[0141] According to the target forward generation model, the target backward generation model, the forward generation discriminator and the backward generation discriminator, a target cycle generation adversarial model is obtained;
[0142] The forward generation model is used to convert the first type of CT image into the second type of CT image, and the backward generation model is used to convert the second type of CT image into the first type of CT image.
[0143] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the image processing model training method provided by any embodiment of the present invention is implemented. The method includes:
[0144] Acquire an original sample data pair consisting of a first type CT image and a second type CT image, wherein the first type CT image and the second type CT image in each original sample data pair are images obtained by scanning the same sample object part in different scanning modes;
[0145] Inputting the original sample data pair into the pre-trained blood vessel segmentation model to obtain the blood vessel segmentation output result, and generating the optimized sample data pair corresponding to the original sample data pair according to the blood vessel segmentation output result;
[0146] Combine the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and a backward training sample pair, train a forward generation model according to the forward training sample pair to obtain a target forward generation model, and train a backward generation model according to the backward training sample pair to obtain a target backward generation model;
[0147] Determine the parameters of the forward generation discriminator according to the output results of the target forward generation model training process, and determine the parameters of the backward generation discriminator according to the output results of the target backward generation model training process;
[0148] According to the target forward generation model, the target backward generation model, the forward generation discriminator and the backward generation discriminator, a target cycle generation adversarial model is obtained;
[0149] The forward generation model is used to convert the first type of CT image into the second type of CT image, and the backward generation model is used to convert the second type of CT image into the first type of CT image.
[0150] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: 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 document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0151] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0152] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0153] Computer program code for performing the operation of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, Python, 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).
[0154] An embodiment of the present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the image processing model training method provided in any embodiment of the present application.
[0155] In the process of implementation, the computer program product can be written in one or more programming languages or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, Python, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can 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 can 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 can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).
[0156] It should be understood by those skilled in the art that the modules or steps of the present invention described above can be implemented by a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, optionally, they can be implemented by a program code executable by a computer device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0157] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for training an image processing model, characterized in that: include: Acquire an original sample data pair consisting of a first type CT image and a second type CT image, wherein the first type CT image and the second type CT image in each of the original sample data pairs are images obtained by scanning the same sample object part in different scanning modes; Inputting the original sample data pair into a pre-trained blood vessel segmentation model to obtain a blood vessel segmentation output result, and generating an optimized sample data pair corresponding to the original sample data pair according to the blood vessel segmentation output result; Combining the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and a backward training sample pair, training a forward generative model according to the forward training sample pair to obtain a target forward generative model, and training a backward generative model according to the backward training sample pair to obtain a target backward generative model; Determine the parameters of the forward generation discriminator according to the output results of the target forward generation model training process, and determine the parameters of the backward generation discriminator according to the output results of the target backward generation model training process; According to the target forward generation model, the target backward generation model, the forward generation discriminator and the backward generation discriminator, a target cycle generation adversarial model is obtained; The forward generation model is used to convert the first type of CT image into the second type of CT image, and the backward generation model is used to convert the second type of CT image into the first type of CT image.
2. The method according to claim 1, characterized in that The step of generating an optimized sample data pair corresponding to the original sample data pair according to the blood vessel segmentation output result includes: determining a pixel difference between the segmented blood vessel regions of the first type CT image and the second type CT image according to pixel features of the segmented blood vessel regions of the first type CT image and the second type CT image; According to the pixel difference, the first type CT image and the second type CT image are adjusted to obtain an optimized sample data pair corresponding to the original sample data pair.
3. The method according to claim 2, characterized in that The pixel feature includes a pixel median, and determining the pixel difference between the blood vessel segmentation region of the first type CT image and the second type CT image according to the pixel features of the blood vessel segmentation region of the first type CT image and the second type CT image includes: Calculate a difference between a first median of pixels exceeding a preset pixel threshold in the blood vessel segmentation region of the first type CT image and a second median of pixels exceeding the preset pixel threshold in the blood vessel segmentation region of the second type CT image; Accordingly, adjusting the first type CT image and the second type CT image according to the pixel difference to obtain an optimized sample data pair corresponding to the original sample data pair includes: Adding the pixel value of the blood vessel segmentation area of the first type CT image to the difference value to obtain a second type optimized image in the corresponding optimized sample data pair; Subtract the difference from the pixel value of the blood vessel segmentation area of the second type CT image to obtain the first type optimized image in the corresponding optimized sample data pair; The average pixel value of the blood vessel segmentation region of the first type CT image is smaller than the average pixel value of the blood vessel segmentation region of the second type CT image.
4. The method according to claim 1, characterized in that: The combining the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and a backward training sample pair, training a forward generation model according to the forward training sample pair to obtain a target forward generation model, and training a backward generation model according to the backward training sample pair to obtain a target backward generation model, comprises: Taking the first type of CT image in the original sample data pair as a model input and the second type of optimized image in the optimized sample data pair as a model label, training a forward generation model to obtain an initially trained forward generation model; Taking the second type of CT images in the original sample data pair as model input and the first type of optimized images in the optimized sample data pair as model labels, training a backward generation model to obtain an initially trained backward generation model; Taking all types of images in the original sample data pair as model input, training the initially trained forward generative model and the initially trained backward generative model based on an unsupervised learning method to obtain a pre-trained forward generative model and a pre-trained backward generative model; A pre-trained forward generation model and a pre-trained backward generation model are trained according to the original sample data pair and the optimized sample data pair to obtain a target forward generation model and a target backward generation model.
5. The method according to claim 4, characterized in that Taking all types of images in the original sample data pair as model input, training the initially trained forward generative model and the initially trained backward generative model based on an unsupervised learning method to obtain a pre-trained forward generative model and a pre-trained backward generative model, including: Inputting the first type of CT image in the original sample data pair into the initially trained forward generation model and the initially trained backward generation model to obtain a forward output result and a backward output result of the first type of CT image in a pre-training stage; Inputting the second type CT image in the original sample data pair into the initially trained forward generation model and the initially trained backward generation model to obtain a forward output result and a backward output result of the second type CT image in a pre-training stage; Inputting the forward output result of the first type of CT image in the original sample data pair in the pre-training stage into the initially trained backward generation model to obtain the output result of the first type of CT image in the pre-training stage after two conversions; Inputting the backward output result of the second type CT image in the original sample data pair in the pre-training stage into the forward generation model of the initial training to obtain the output result of the second type CT image in the pre-training stage after two conversions; Calculate the loss value between the forward output result of the first type CT image in the pre-training stage and the second type optimized image, the loss value between the backward output result of the first type CT image in the pre-training stage and the first type CT image, the loss value between the backward output result of the second type CT image in the pre-training stage and the first type optimized image, the loss value between the forward output result of the second type CT image in the pre-training stage and the second type CT image, the loss value between the output result of the first type CT image after two conversions in the pre-training stage and the first type CT image, and the loss value between the output result of the second type CT image after two conversions in the pre-training stage and the second type CT image; The parameters of the initially trained forward generation model and the initially trained backward generation model are updated according to the loss value of the pre-training stage to obtain the pre-trained forward generation model and the pre-trained backward generation model.
6. The method according to claim 4, characterized in that The method of training a pre-trained forward generation model and a pre-trained backward generation model according to the original sample data pair and the optimized sample data pair to obtain a target forward generation model and a target backward generation model includes: Inputting the first type of CT image in the original sample data pair into the pre-trained forward generation model and the pre-trained backward generation model to obtain a forward output result and a backward output result of the first type of CT image in a target training phase; Inputting the second type CT image in the original sample data pair into the pre-trained forward generation model and the pre-trained backward generation model to obtain a forward output result and a backward output result of the second type CT image in a target training phase; Inputting the forward output result of the first type of CT image in the original sample data pair in the pre-training stage into the pre-trained backward generation model to obtain the output result of the first type of CT image in the target training stage after two conversions; Inputting the backward output result of the second type CT image in the original sample data pair in the pre-training stage into the pre-trained forward generation model to obtain the output result of the second type CT image in the target training stage after two conversions; Calculate the loss value between the backward output result of the first type CT image in the target training stage and the first type CT image, the loss value between the forward output result of the second type CT image in the target training stage and the second type CT image, the loss value between the output result of the first type CT image after two conversions in the target training stage and the first type CT image, and the loss value between the output result of the second type CT image after two conversions in the target training stage and the second type CT image; The parameters of the pre-trained forward generation model and the pre-trained backward generation model are updated according to the loss value of the target training stage to obtain the target forward generation model and the target backward generation model.
7. The method according to claim 1, characterized in that The step of determining the parameters of the forward generation discriminator according to the output results of the target forward generation model training process, and determining the parameters of the backward generation discriminator according to the output results of the target backward generation model training process, includes: Inputting the second type of CT image in the original sample data pair and the forward output result of the first type of CT image in the target training phase into a forward generation discriminator to obtain a forward generation discriminator loss value, and determining the parameters of the forward generation discriminator according to the forward generation discriminator loss value; The first type of CT image in the original sample data pair and the backward output results of the second type of CT image in the target training stage are input into the backward generation discriminator to obtain the backward generation discriminator loss value, and the parameters of the backward generation discriminator are determined according to the backward generation discriminator loss value.
8. An image processing model training device, characterized in that: include: An original sample acquisition module is used to acquire an original sample data pair consisting of a first type of CT image and a second type of CT image, wherein the first type of CT image and the second type of CT image in each of the original sample data pairs are images obtained by scanning the same sample object part in different scanning methods; An optimized sample generation module, used for inputting the original sample data pair into a pre-trained blood vessel segmentation model to obtain a blood vessel segmentation output result, and generating an optimized sample data pair corresponding to the original sample data pair according to the blood vessel segmentation output result; A model training module, used for combining the images in the original sample data pair and the optimized sample data pair to obtain a forward training sample pair and a backward training sample pair, training a forward generation model according to the forward training sample pair to obtain a target forward generation model, and training a backward generation model according to the backward training sample pair to obtain a target backward generation model; A parameter determination module, used to determine the parameters of the forward generation discriminator according to the output results of the target forward generation model training process, and to determine the parameters of the backward generation discriminator according to the output results of the target backward generation model training process; A target model determination module, used to obtain a target cyclic generative adversarial model according to a target forward generative model, a target backward generative model, a forward generative discriminator and a backward generative discriminator; The forward generation model is used to convert the first type of CT image into the second type of CT image, and the backward generation model is used to convert the second type of CT image into the first type of CT image.
9. A computer device, characterized in that: The computer device comprises: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing model training method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the image processing model training method as described in any one of claims 1-7 is implemented.