Image enhancement method and device, electronic equipment and storage medium

By generating synthetic data sets and conducting adversarial training on deep learning models, the problem of poor endoscopic image enhancement effect is solved, efficient removal of honeycomb speckle and resolution improvement is achieved, and the applicable scenarios are more extensive.

CN118887113APending Publication Date: 2024-11-01SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410951774.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-16
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

The existing image enhancement methods have poor effects when processing endoscopic images, making it difficult to effectively remove honeycomb speckle and improve resolution, and the model is poorly generalized and cannot adapt to fiber-imaging images in different scenarios.

Method used

By acquiring the speckle images collected by the medical data set and the fiber endoscopy, a synthetic data set is generated, and the deep learning model is trained adversarially based on the data set to generate an image reconstruction model to reconstruct the endoscopy image. Remove honeycomb speckle and improve resolution.

Benefits of technology

It improves the resolution and generalization of image reconstruction, can effectively remove honeycomb speckle in endoscopic images, and the applicable scenes are more realistic, enhancing the robustness of the model and image enhancement effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118887113A_ABST
    Figure CN118887113A_ABST
Patent Text Reader

Abstract

The invention provides an image enhancement method and device, electronic equipment and a storage medium, and relates to the technical field of image processing. The method comprises the steps that a medical data set is acquired, and speckle images are collected through an optical fiber endoscope; generating a synthetic data set based on the speckle image and a medical image in the medical data set; and performing adversarial training on a deep learning model based on the synthetic data set and the medical data set to generate an image reconstruction model, and performing image reconstruction on an endoscope image based on the image reconstruction model to obtain an image reconstruction result. According to the invention, the problem of poor image enhancement effect of image enhancement in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology. Specifically, the present application relates to an image enhancement method, device, electronic device and storage medium. Background Art

[0002] Endoscopes are widely used in gastrointestinal (GI) diagnosis and minimally invasive surgery. Endoscopes can perform minimally invasive inspections and can also go deep into the human body to inspect internal tissues, and their application value is very high. In the field of flexible endoscopes, optical fiber bundles are used for image transmission, that is, each optical fiber in the optical fiber bundle is used to transmit an image point, and the end face of the entire optical fiber bundle forms the endoscopic image to be transmitted. Due to the structural characteristics of the optical fiber bundle itself, when using the optical fiber bundle to transmit images, a honeycomb speckle pattern will be introduced into the image, and in actual applications, the optical fiber pattern may have various noises and distortions, so it is necessary to enhance the endoscopic image to improve the image quality.

[0003] Existing image enhancement methods include traditional imaging technology, which requires a lot of manual debugging of optical experimental equipment to obtain clear images. The process is extremely complicated and involves a lot of formula derivation, which is time-consuming and labor-intensive.

[0004] In addition, computational imaging methods include deep learning methods, which use a single fiber image as input, directly use a neural network to train the mapping relationship between the fiber image and the CCD image, and remove fiber speckle, or use interpolation to remove the honeycomb pattern, and then apply neural network learning to restore the mapping from the fiber image to the ground truth (GT) image to further improve the resolution. However, this method is usually based on the Minist dataset of handwritten digital images or the ImageNet dataset of natural scenes. The dataset scene is single, and the deep learning method leads to poor model generalization. It often only performs well on extremely small specific datasets and is not suitable for actual imaging images of millimeter-scale optical fibers. Therefore, the actual test effect is poor, the resolution improvement effect is limited, and speckle cannot be effectively removed. It is only for a special scene. The image processing effect is affected by the uneven lighting of the environment and the large image of the physical parameters of the optical fiber. It is difficult to achieve edge feature noise removal and resolution improvement at the same time.

[0005] From the above, it can be seen that the problem of how to improve the image enhancement effect of image enhancement still needs to be solved. Summary of the invention

[0006] The present application provides an image enhancement method, device, electronic device and storage medium, which can solve the problem of poor image enhancement effect in the image enhancement existing in the related art. The technical solution is as follows:

[0007] According to one aspect of the present application, an image enhancement method is characterized by comprising:

[0008] Obtain medical data sets and collect speckle images through fiber endoscopes;

[0009] generating a synthetic data set based on the speckle image and the medical images in the medical data set, wherein the synthetic data set includes synthetic images corresponding to the medical images in the medical data set;

[0010] The deep learning model is adversarially trained based on the synthetic data set and the medical data set to generate an image reconstruction model, so as to reconstruct the endoscopic image based on the image reconstruction model and obtain an image reconstruction result.

[0011] According to one aspect of the present application, an image enhancement device is characterized by comprising:

[0012] An image acquisition module, used to acquire medical data sets and collect speckle images through a fiber optic endoscope;

[0013] a data set generating module, configured to generate a synthetic data set based on the speckle image and the medical images in the medical data set, wherein the synthetic data set includes synthetic images corresponding to the medical images in the medical data set;

[0014] A training module is used to perform adversarial training on a deep learning model based on the synthetic data set and the medical data set to generate an image reconstruction model, so as to reconstruct the endoscopic image based on the image reconstruction model to obtain an image reconstruction result.

[0015] In an exemplary embodiment, the image acquisition module includes:

[0016] A background image acquisition unit, used to acquire a pure white background image;

[0017] The image acquisition unit is used to acquire images by using a fiber optic endoscope with the pure white background image as a target to obtain a speckle image.

[0018] In an exemplary embodiment, the data set generation module includes:

[0019] A preprocessing unit, configured to preprocess the speckle image and the medical image in the medical data set;

[0020] A fusion unit is used to multiply and fuse the speckle image with the medical image to generate a synthetic image and obtain a synthetic data set.

[0021] In an exemplary embodiment, the deep learning model includes a generative network and a discriminative network, wherein the generative network is a convolutional neural network structure including an encoder and a decoder connected via multi-scale jump connections, and the discriminative network is a convolutional neural network structure capable of performing similarity discrimination on at least two input images and generating discrimination results.

[0022] In an exemplary embodiment, the training module includes:

[0023] An image reconstruction unit, configured to input a synthetic image in the synthetic data set into the generation network, and reconstruct the synthetic image based on an encoder and a decoder in the generation network to obtain a reconstructed image;

[0024] A discriminant unit, used for inputting the reconstructed image and the medical image in the medical data set into a discriminant network for similarity discrimination to obtain a discrimination result;

[0025] An updating unit is used to update the parameters of the generating network and the discriminating network based on the discrimination result, complete the training of the generating network and the discriminating network, and obtain a trained image reconstruction model.

[0026] In an exemplary embodiment, the image reconstruction unit comprises:

[0027] A feature extraction subunit, configured to perform multi-level feature extraction on the synthetic image based on the encoder in the generation network to obtain image features;

[0028] The feature fusion subunit is used to perform feature fusion on the image features based on the decoder in the generation network to obtain a reconstructed image.

[0029] In an exemplary embodiment, the updating unit comprises:

[0030] An image determination subunit, configured to determine a medical image corresponding to the synthetic image through a synthetic image source of the reconstructed image;

[0031] A loss value calculation subunit, used for inputting the reconstructed image and the medical image into a loss function, and calculating a loss value corresponding to the reconstructed image;

[0032] A training subunit is used to determine whether the discrimination result is correct based on the correspondence between the reconstructed image and the medical image; if the discrimination result correctly determines the source of the image input to the discrimination network, the network parameters corresponding to the discrimination network are updated based on the loss value; if the discrimination result incorrectly determines the source of the image input to the discrimination network, the network parameters corresponding to the generation network are updated based on the loss value; until the loss function converges, the training is stopped to obtain the image reconstruction model.

[0033] According to one aspect of the present application, an electronic device includes at least one processor and at least one memory, wherein the memory stores computer-readable instructions; the computer-readable instructions are loaded and executed by the processor, so that the electronic device implements the image enhancement method as described above.

[0034] According to one aspect of the present application, a storage medium stores computer-readable instructions thereon, and the computer-readable instructions are loaded and executed by a processor to implement the image enhancement method as described above.

[0035] According to one aspect of the present application, a computer program product includes computer-readable instructions, which are stored in a storage medium. A processor of an electronic device reads the computer-readable instructions from the storage medium, loads and executes the computer-readable instructions, so that the electronic device implements the image enhancement method as described above.

[0036] The beneficial effects of the technical solution provided by this application are:

[0037] In the above technical solution, a synthetic data set is generated by fusing the speckle image and the medical image in the medical data set, and an image reconstruction model that can reconstruct the endoscopic image is generated through training with the synthetic data set, so that the generated image reconstruction model can take into account both the removal of honeycomb speckles in the endoscopic image and the image color white balance during the image reconstruction process, thereby improving the resolution improvement effect of image reconstruction, and the applicable scenarios are more realistic, thereby improving the generalization of the model, thereby effectively solving the problem of poor image enhancement effect of image enhancement existing in related technologies. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0039] Figure 1 It is a schematic diagram of the implementation environment involved in this application;

[0040] Figure 2 is a flow chart of an image enhancement method according to an exemplary embodiment;

[0041] Figure 3 yes Figure 2 A flowchart of step 210 in one embodiment corresponding to the embodiment;

[0042] Figure 4 yes Figure 2 A flowchart of step 230 in one embodiment corresponding to the embodiment;

[0043] Figure 5a yes Figure 2 A flowchart of an embodiment corresponding to step 250 in an embodiment;

[0044] Figure 5b is a schematic diagram of generating a network structure according to an exemplary embodiment;

[0045] Figure 5c is a schematic diagram of a discriminant network structure according to an exemplary embodiment;

[0046] Figure 6 yes Figure 5a A flowchart of an embodiment corresponding to step 251 in an embodiment;

[0047] Figure 7 is a schematic diagram of the structure of an encoder and a decoder according to an exemplary embodiment;

[0048] Figure 8 yes Figure 5a A flowchart of an embodiment corresponding to step 255 in an embodiment;

[0049] Fig. 9 It is a schematic diagram of a specific implementation of an image enhancement method in an application scenario;

[0050] Fig.10 is a structural block diagram of an image enhancement device according to an exemplary embodiment;

[0051] Fig.11 is a hardware structure diagram of a server according to an exemplary embodiment;

[0052] Fig.12 The present invention is a structural block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0053] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present application.

[0054] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "one", "said", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any unit and all combinations of one or more associated listed items.

[0055] As mentioned above, the existing technology is usually based on the Minist dataset of handwritten digital images or the ImageNet dataset of natural scenes. The dataset scene is single, and the deep learning method leads to poor model generalization. It often only performs well on extremely small specific datasets and is not suitable for the actual imaging images of millimeter-scale optical fibers. Therefore, the actual test effect is poor, the resolution improvement effect is limited, and the speckle cannot be effectively removed. It is only targeted at a certain special scene. The image processing effect is affected by the uneven lighting of the environment and the large image of the physical parameters of the optical fiber, so the model generalization is poor. It is difficult to simultaneously achieve edge feature noise removal and resolution improvement, resulting in a decrease in image enhancement effect.

[0056] As can be seen from the above, the related art still has the defect of poor image enhancement effect.

[0057] To this end, the image enhancement method provided in the present application can effectively improve the image enhancement effect of image enhancement. Accordingly, the image enhancement method is suitable for an image enhancement device, which can be deployed in an electronic device. The electronic device can be a computer device configured with a von Neumann architecture, for example, the computer device includes a desktop computer, a laptop computer, a server, etc.

[0058] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0059] Figure 1 It is a schematic diagram of an implementation environment involved in an image feature extraction method. It should be noted that this implementation environment is only an example adapted to the present invention and cannot be considered as providing any limitation on the scope of use of the present invention.

[0060] The implementation environment includes a collection end 110 and a service end 130 .

[0061] Specifically, the acquisition end 110 can also be considered as an image acquisition device, such as a fiber optic endoscope device.

[0062] The server 130 may be an electronic device such as a desktop computer, a laptop computer, a server, etc., or may be a computer cluster composed of multiple servers, or even a cloud computing center composed of multiple servers. The server 130 is used to provide background services, for example, background services include but are not limited to image enhancement services, etc.

[0063] The server 130 and the acquisition terminal 110 establish a network communication connection in advance through wired or wireless means, and data transmission between the server 130 and the acquisition terminal 110 is realized through the network communication connection. The transmitted data includes but is not limited to: endoscope images and the like.

[0064] In an application scenario, through the interaction between the acquisition terminal 110 and the server 130, the acquisition terminal 110 acquires an endoscopic image and uploads the endoscopic image to the server 130 to request the server 130 to provide an image enhancement service.

[0065] For the server 130, after receiving the image to be processed uploaded by the acquisition terminal 110, it calls the image enhancement service to enhance the endoscopic image, obtain the image reconstruction result, and improve the image enhancement effect, so as to solve the problem of poor image enhancement effect existing in related technologies.

[0066] See also Figure 2 The present application embodiment provides an image enhancement method, which is applicable to an electronic device, which may be Figure 1 The server 130 in the illustrated implementation environment may also be a desktop computer, a laptop computer, a server, and the like.

[0067] In the following method embodiments, for ease of description, the execution subject of each step of the method is taken as an electronic device as an example for illustration, but this does not constitute a specific limitation.

[0068] like Figure 2 As shown, the method may include the following steps:

[0069] Step 210 , obtaining a medical data set and collecting a speckle image through a fiber optic endoscope.

[0070] Among them, the medical data set includes high-resolution medical images in the medical field, and the speckle image is an endoscopic image with honeycomb speckles actually collected through a fiber optic endoscope.

[0071] In a possible implementation, the medical dataset is a hyper-kvasir dataset.

[0072] Step 230 : generating a synthetic dataset based on the speckle image and the medical image in the medical dataset.

[0073] The synthetic data set includes synthetic images, which are fused according to the honeycomb speckle in the speckle image and the medical image in the medical data set to generate a low-resolution picture of the optical fiber honeycomb speckle that combines the characteristics of the two.

[0074] Step 250, adversarially training the deep learning model based on the synthetic data set and the medical data set to generate an image reconstruction model, so as to reconstruct the endoscopic image based on the image reconstruction model and obtain an image reconstruction result.

[0075] It can be understood that the endoscopic image is the target image that needs to be reconstructed during the actual application of the endoscope, for example, the human body image collected in gastrointestinal (GI) diagnosis and minimally invasive surgery. The image reconstruction result is the high-quality image generated by the trained image reconstruction model after reconstructing the endoscopic image.

[0076] It should be noted that, in an exemplary embodiment, the deep learning model includes a generative network and a discriminative network, wherein the generative network is a convolutional neural network structure including an encoder and a decoder connected through multi-scale jump connections, and the discriminative network is a convolutional neural network structure having the ability to perform similarity judgment on at least two input images and generate judgment results.

[0077] Specifically, the synthetic image corresponding to the medical image is input into the deep learning network, the generative network is used to eliminate the honeycomb speckle in the synthetic image and reconstruct the image to obtain a high-quality reconstructed image, and the discriminant network is used to judge the difference between the reconstructed image and the original high-resolution medical image, so as to realize the training of the adversarial network. Through continuous iteration, the performance of the generative network and the discriminant network is continuously improved, and finally an image reconstruction model capable of performing high-quality image reconstruction on the synthetic network is output.

[0078] At this time, the endoscopic image generated in the actual application of the endoscope is obtained and input into the image reconstruction model, and the endoscopic image is reconstructed through the generation network in the image reconstruction model to generate an image reconstruction result.

[0079] In one possible implementation, the images in the medical dataset and the synthetic dataset are divided into a training set and a test set in a ratio of 8:2. The deep learning model is adversarially trained with the high-resolution medical images in the training set and the low-resolution synthetic images containing honeycomb patterns to obtain an image reconstruction model. The low-resolution synthetic images in the test set are then input into the deep learning model to obtain the image reconstruction results. The training effect of the image reconstruction model is judged based on the image reconstruction effect of the image reconstruction results.

[0080] Through the above process, a synthetic data set is generated by fusing the speckle image and the medical image in the medical data set, and an image reconstruction model that can reconstruct endoscopic images is generated through training with the synthetic data set. The generated image reconstruction model can better adapt to the image reconstruction of endoscopic images of different scenes in the actual environment, and the model has good generalization, high robustness and good image enhancement effect.

[0081] In an exemplary embodiment, if Figure 3 As shown, step 210 may include the following steps:

[0082] Step 211, obtaining a pure white background image.

[0083] The pure white background image is a white background image without image interference.

[0084] Step 213 , using a fiber optic endoscope to collect images with the pure white background image as a target, to obtain a speckle image.

[0085] It can be understood that by collecting images of a pure white background image through a fiber optic endoscope, the collected speckle image can be free from the color interference of the background image, and can fully reflect the interference such as honeycomb speckle and noise that comes with the fiber optic endoscope during the image collection process.

[0086] In one possible implementation, a fiber optic endoscope image acquisition test bench is built, the endoscope is connected to an industrial camera, and then the industrial camera is connected to a computer via a USB cable, so that the industrial camera can shoot a pure white background image on the test bench through the endoscope, and the obtained speckle image is stored in the computer.

[0087] Through the above process, a speckle image that accurately reflects the characteristics of the endoscope image is obtained, the accuracy of the subsequent image training process is guaranteed, and the image reconstruction effect of the image reconstruction model is improved.

[0088] In an exemplary embodiment, if Figure 4 As shown, step 230 may include the following steps:

[0089] Step 231 : pre-processing the speckle image and the medical image in the medical dataset.

[0090] Among them, the preprocessing is to normalize the speckle image and the medical image into a unified format so that the speckle image and the medical image can be fused. For example, when the image size of the speckle image is 1024*1024, the medical images in the medical dataset are uniformly normalized to 1024*1024 size.

[0091] Step 233: multiply and fuse the speckle image and the medical image to generate a synthetic image, thereby obtaining a synthetic data set.

[0092] By performing pixel-level multiplication of the speckle image and the medical image, the interference features such as honeycomb speckle and noise contained in the speckle image are extracted and fused into the medical image, and the medical image is fused from a high-resolution image to a low-resolution image with optical fiber honeycomb speckle.

[0093] In a possible implementation, the medical dataset is a hyper-kvasir dataset, and a synthetic dataset hyper-kvasir-fbimage is generated by fusing the speckle image with the hyper-kvasir dataset.

[0094] Through the above process, the synthesis effect and efficiency of the speckle image and the medical image are guaranteed by preprocessing, and the synthetic data set is generated by fusing the speckle image and the medical image in the medical data set to ensure the training accuracy in the subsequent model training, thereby improving the image reconstruction effect and generalization of the image reconstruction model.

[0095] In an exemplary embodiment, if Figure 5a As shown, step 250 may include the following steps:

[0096] Step 251, inputting the synthetic image in the synthetic data set into the generation network, reconstructing the synthetic image based on the encoder and decoder in the generation network, and obtaining a reconstructed image.

[0097] Among them, the generative network accepts a low-resolution synthetic image, extracts features from the synthetic image through step-by-step encoding and decoding, and finally reconstructs it into a high-resolution reconstructed image.

[0098] In one possible implementation, Figure 5b As shown in the figure, the generated network is an FBnet network with a unet structure. The generated network includes an encoder connected to the input end, a decoder connected to the encoder through multi-scale jumps, and an output end connected to the decoder. The initial FBnet network is trained and the trained parameters are used as the initial parameters of the generated network. The loss function in the training process adopts the pixel-level MSE loss. The loss function format is as follows:

[0099]

[0100] Among them, I HR For medical images, I SR To reconstruct the image, is the loss value.

[0101] In an exemplary embodiment, if Figure 6 As shown, step 251 may include the following steps:

[0102] Step 2511, performing multi-level feature extraction on the synthesized image based on the encoder in the generative network to obtain image features.

[0103] Step 2513, perform feature fusion on the image features based on the decoder in the generative network to obtain a reconstructed image.

[0104] Specifically, if Figure 7 As shown, the encoder includes multiple down-sampling modules, which are connected through a maximum pooling layer, wherein the down-sampling modules include a circularly arranged convolution layer and an activation function layer. The synthesized image is down-sampled step by step through the multiple down-sampling modules, and the shallow features and generative features of the synthesized image are successively extracted. The decoder includes multiple up-sampling modules, wherein the up-sampling modules include a transposed convolution layer, a planning function layer, and a deep connection layer. The decoder up-samples the shallow features and generative features generated by the encoder layer by layer through the up-sampling module, so that the shallow features and generative features of the synthesized image are gradually integrated to generate a reconstructed image. At the same time, the feature maps of each layer in the encoder are connected with the feature maps of the corresponding layers in the decoder, so that the detailed information of each layer in the decoder and the encoder is transmitted to each other, thereby improving the image reconstruction effect.

[0105] In a possible implementation, the activation function in the generated network is a ReLu function.

[0106] Through the above process, image reconstruction based on local and global information in the image is achieved through the generative network, and through the jump connection between the encoder and the decoder, the generator can capture rich contextual information at different levels and pass the detail information to the decoder, thereby improving the decoder's ability to accurately restore image details. At the same time, the model has a relatively small number of parameters and a simple structure, which makes the training and reasoning speed faster and improves the image reconstruction efficiency.

[0107] Step 253: input the reconstructed image and the medical image in the medical data set into a discrimination network for similarity discrimination to obtain a discrimination result.

[0108] Specifically, if Figure 5c As shown in the figure, the discriminant network is a binary classifier of a convolutional neural structure, wherein the discriminant network includes multiple NO modules, each of which includes a convolutional layer, a batch normalization layer, and an activation function layer. The reconstructed image generated by the generation network and the corresponding medical image are received through multiple NO modules, and the difference between the two images is learned to determine whether they are real or similar, and finally a discriminant result is generated.

[0109] In a possible implementation, the activation function in the discriminant network includes a Leakly ReLu function and a Sigmoid function.

[0110] Step 255, based on the discrimination result, the parameters of the generating network and the discriminating network are updated to complete the training of the generating network and the discriminating network, and a trained image reconstruction model is obtained.

[0111] In an exemplary embodiment, if Figure 8 As shown, step 255 may include the following steps:

[0112] Step 2551, determining the medical image corresponding to the synthetic image through the synthetic image source of the reconstructed image.

[0113] It should be noted that each composite image has a corresponding medical image. After the composite image is reconstructed, a set of image pairs is generated between the reconstructed image and the medical image corresponding to the composite image. The effect of the reconstructed image is evaluated by the difference between the image pairs.

[0114] Step 2553, input the reconstructed image and the medical image into the loss function, and calculate the loss value of the corresponding reconstructed image.

[0115] Among them, the loss function in the training process is used to quantify the difference between the image pairs. Specifically, the perceptual loss function of the generated network includes content loss and adversarial loss. The loss function calculation formula is as follows:

[0116]

[0117] Among them, content loss is content loss, adversarial loss is adversarial loss, I HR For medical images, I SR To reconstruct the image.

[0118] The content loss includes the VGG loss at the feature map level and the color loss in the color space. The VGG loss uses the feature vector of the pre-trained VGG-19 network.

[0119] The result of the network passes through a certain layer of the VGG network to generate feature maps and I HR Use the feature map labels generated by the VGG network as loss

[0120] The adversarial loss function calculation formula during training is as follows:

[0121]

[0122] It should be noted that the inventors realize that since the Euclidean distance in the RGB space of the endoscopic image cannot effectively reflect the color distortion, when reconstructing the image, color loss is introduced into the content loss, and the color distribution of the reconstructed image is constrained by the discrete cosine distance. The color distribution constraint calculation formula is as follows:

[0123]

[0124] In the above process, a perceptual loss function including content loss and adversarial loss is adopted, and the color distribution of the reconstructed image is constrained to make the color distribution of the reconstructed image closer to the color distribution of the original high-resolution image, and the loss value is made to better reflect the perceptual similarity between images, so that the result of the generative network can produce a higher discrimination value, improve the model connection effect, and achieve image white balance while removing honeycomb speckle during image reconstruction, thereby achieving compatibility between fine fiber endoscopy and high-quality image acquisition and improving the endoscopic image enhancement effect.

[0125] Step 2555, based on the correspondence between the reconstructed image and the medical image, determine whether the discrimination result is correct; if the discrimination result correctly determines the source of the image input to the discrimination network, then update the network parameters corresponding to the discrimination network based on the loss value; if the discrimination result incorrectly determines the source of the image input to the discrimination network, then update the network parameters corresponding to the generation network based on the loss value; until the loss function converges, stop training and obtain the image reconstruction model.

[0126] During the training process, in order to make the images generated by the generative network as close to the original medical images as possible, and at the same time enable the discriminative network to accurately distinguish between the reconstructed images and medical images, the generative network and the discriminative network need to be subjected to adversarial attacks. The adversarial attacks on the generative network and the discriminative network can improve the image reconstruction ability of the generative network and the judgment ability of the discriminative network. By continuously updating the model parameters of the generative network and the discriminative network, the results of the generative network are trained in the direction of being closer to the medical images, and the discriminative network is trained in the direction of having stronger discrimination ability.

[0127] Under the effect of the above-mentioned embodiment, the image reconstruction model is trained based on the fourth image generated by the generation network, so that the image reconstruction capability of the image reconstruction model is improved and the training process is stabilized.

[0128] Fig. 9 This is a schematic diagram of a specific implementation of an image enhancement method in an application scenario. In this application scenario, the speckle image is a fiber bundle image collected by a fiber endoscope, and the medical dataset is a hyper-kvasir dataset.

[0129] By preprocessing the medical images in the hyper-kvasir dataset

[0130] Then, by acquiring the fiber bundle image collected by the fiber endoscope, the honeycomb speckle is extracted and multiplied and fused with the medical image to generate a synthetic data set.

[0131] The synthetic images in the synthetic dataset are used to perform adversarial training on the deep learning model FBUGAN, and the medical images in the hyper-kvasir dataset are input into the discriminant network for judgment.

[0132] According to the judgment results of the discriminant network, back-propagation optimization is performed to generate the network and the discriminant network to obtain the trained image reconstruction model.

[0133] The endoscopic image is reconstructed through the generative network in the image reconstruction model to obtain an image reconstruction result.

[0134] In this application scenario, the generated image reconstruction model can take into account the removal of honeycomb speckles and image color white balance in the endoscopic image during the image reconstruction process, thereby improving the resolution of image reconstruction. The applicable scenarios are more realistic and the generalization of the model is improved, thereby effectively solving the problem of poor image enhancement effect in related technologies.

[0135] The following is an embodiment of the device of the present application, which can be used to perform the image enhancement method involved in the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the method embodiment of the image enhancement method involved in the present application.

[0136] See also Fig.10 In an embodiment of the present application, an image enhancement device 1000 is provided, including but not limited to: an image acquisition module 1010, a data set generation module 1030, and a training module 1050.

[0137] The image acquisition module 1010 is used to acquire a medical data set and collect a speckle image through a fiber optic endoscope;

[0138] A data set generating module 1030, configured to generate a synthetic data set based on the speckle image and the medical image in the medical data set;

[0139] The training module 1050 is used to perform adversarial training on the deep learning model based on the synthetic data set and the medical data set, generate an image reconstruction model, and reconstruct the endoscopic image based on the image reconstruction model to obtain an image reconstruction result.

[0140] It should be noted that, when the image enhancement device provided in the above embodiment performs image enhancement, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the image enhancement device will be divided into different functional modules to complete all or part of the functions described above.

[0141] In addition, the image enhancement device and the image enhancement method provided in the above embodiments belong to the same concept, and the specific manner in which each module performs the operation has been described in detail in the method embodiment, which will not be repeated here.

[0142] Fig.11 is a schematic diagram of the structure of a server according to an exemplary embodiment. The server is suitable for Figure 1 A server 130 in an implementation environment is shown.

[0143] It should be noted that the server is only an example adapted to the present application and cannot be considered to provide any limitation on the scope of use of the present application. The server cannot be interpreted as requiring dependence on or having Fig.11 One or more components of exemplary server 2000 are shown.

[0144] The hardware structure of the server 2000 may vary greatly due to different configurations or performances, such as Fig.11 As shown, the server 2000 includes: a power supply 210 , an interface 230 , at least one memory 250 , and at least one central processing unit (CPU) 270 .

[0145] Specifically, the power supply 210 is used to provide operating voltage for each hardware device on the server 2000 .

[0146] The interface 230 includes at least one wired or wireless network interface 231 for interacting with external devices. Figure 1 The interaction between the collection end 110 and the service end 130 in the implementation environment is shown.

[0147] Of course, in other examples adapted by the present application, the interface 230 may further include at least one serial-to-parallel conversion interface 233, at least one input-output interface 235, and at least one USB interface 237, etc. Fig.11 As shown, this is not intended to be a specific limitation.

[0148] The memory 250 is a carrier for storing resources, which may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon include an operating system 251, an application 253 and data 255, etc. The storage method may be temporary storage or permanent storage.

[0149] Among them, the operating system 251 is used to manage and control the hardware devices and application programs 253 on the server 2000 to enable the central processor 270 to calculate and process the massive data 255 in the memory 250. It can be WindowsServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0150] The application program 253 is a computer-readable instruction that performs at least one specific task based on the operating system 251, and may include at least one module ( Fig.11 (not shown), each module may respectively include computer-readable instructions for the server 2000. For example, the image enhancement device may be regarded as an application 253 deployed on the server 2000.

[0151] The data 255 may be photos, pictures, etc. stored in a disk, or may be various training image sets, images to be processed, etc., stored in the memory 250 .

[0152] The central processor 270 may include one or more processors and is configured to communicate with the memory 250 through at least one communication bus to read the computer-readable instructions stored in the memory 250, thereby realizing the operation and processing of the mass data 255 in the memory 250. For example, the image enhancement method is completed by the central processor 270 reading a series of computer-readable instructions stored in the memory 250.

[0153] In addition, the present application can also be implemented through hardware circuits or hardware circuits combined with software. Therefore, the implementation of the present application is not limited to any specific hardware circuits, software, or a combination of the two.

[0154] See also Fig.12 In an embodiment of the present application, an electronic device 4000 is provided, and the electronic device 400 may include: a desktop computer, a laptop computer, a server, etc.

[0155] exist Fig.12 In the embodiment, the electronic device 4000 includes at least one processor 4001 and at least one memory 4003.

[0156] The data interaction between the processor 4001 and the memory 4003 can be realized through at least one communication bus 4002. The communication bus 4002 may include a path for transmitting data between the processor 4001 and the memory 4003. The communication bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus 4002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0157] Optionally, the electronic device 4000 may further include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0158] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0159] The memory 4003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired computer-readable instructions in the form of instructions or data structures and can be accessed by the electronic device 400, but is not limited to this.

[0160] Computer-readable instructions are stored in the memory 4003 , and the processor 4001 can read the computer-readable instructions stored in the memory 4003 through the communication bus 4002 .

[0161] When the computer-readable instructions are executed by the processor 4001, the image enhancement method in the above-mentioned embodiments is implemented.

[0162] In addition, a storage medium is provided in an embodiment of the present application, on which computer-readable instructions are stored. The computer-readable instructions are loaded and executed by a processor to implement the image enhancement method as described above.

[0163] In an embodiment of the present application, a computer program product is provided. The computer program product includes computer-readable instructions. The computer-readable instructions are stored in a storage medium. A processor of an electronic device reads the computer-readable instructions from the storage medium, loads and executes the computer-readable instructions, so that the electronic device implements the above image enhancement method.

[0164] Compared with the related art, the present application generates a synthetic data set by fusing speckle images and medical images in a medical data set, and generates an image reconstruction model that can reconstruct endoscopic images through training of the synthetic data set, so that the generated image reconstruction model can better adapt to the image reconstruction of endoscopic images of different scenes in the actual environment, and the model has good generalization, high robustness, and good image enhancement effect. A speckle image that accurately reflects the characteristics of the endoscopic image is obtained, the accuracy of the subsequent image training process is guaranteed, and the image reconstruction effect of the image reconstruction model is improved. The synthesis effect and efficiency of the speckle image and the medical image are guaranteed by preprocessing, and the synthetic data set is generated by fusing the speckle image and the medical image in the medical data set to ensure the training accuracy during the subsequent model training, and the image reconstruction effect and generalization of the image reconstruction model are improved. The image reconstruction is realized according to the local and global information in the image through the generative network, and the jump connection between the encoder and the decoder enables the generator to capture rich context information at different levels, pass the detail information to the decoder, and improve the decoder to accurately restore the details of the image. At the same time, the number of parameters of the model is relatively small, the structure is simple, and the training and reasoning speed is fast, and the image reconstruction efficiency is improved. A perceptual loss function including content loss and adversarial loss is adopted, and the color distribution of the reconstructed image is constrained to make the color distribution of the reconstructed image closer to the color distribution of the original high-resolution image, and the loss value is made to better reflect the perceptual similarity between pictures. This allows the results of the generative network to produce higher discrimination values, improve the model connection effect, and achieve image white balance while removing honeycomb speckle during image reconstruction, thereby achieving compatibility between fine fiber endoscopy and high-quality image acquisition and improving the endoscopic image enhancement effect.

[0165] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0166] The above are only some implementation methods of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. An image enhancement method, characterized in that: Applications to endoscopic images include: Obtain medical data sets and collect speckle images through fiber endoscopes; generating a synthetic data set based on the speckle image and the medical images in the medical data set, wherein the synthetic data set includes synthetic images corresponding to the medical images in the medical data set; The deep learning model is adversarially trained based on the synthetic data set and the medical data set to generate an image reconstruction model, so as to reconstruct the endoscopic image based on the image reconstruction model and obtain an image reconstruction result.

2. The method according to claim 1, characterized in that The collecting of speckle images by using a fiber optic endoscope comprises: Get a pure white background image; The pure white background image is used as a target for image acquisition through a fiber optic endoscope to obtain a speckle image.

3. The method according to claim 1, characterized in that The generating a synthetic data set based on the speckle image and the medical image in the medical data set comprises: Preprocessing the speckle image and the medical images in the medical dataset; The speckle image and the medical image are multiplied and fused to generate a synthetic image, thereby obtaining a synthetic data set.

4. The method according to claim 1, characterized in that The deep learning model includes a generation network and a discrimination network, wherein the generation network is a convolutional neural network structure including an encoder and a decoder connected through multi-scale jump connections, and the discrimination network is a convolutional neural network structure capable of performing similarity discrimination on at least two input images and generating discrimination results.

5. The method according to claims 1 to 4, characterized in that The method of performing adversarial training on the deep learning model based on the synthetic data set to generate an image reconstruction model includes: Inputting the synthetic image in the synthetic data set into the generative network, and reconstructing the synthetic image based on the encoder and decoder in the generative network to obtain a reconstructed image; Inputting the reconstructed image and the medical image in the medical data set into a discrimination network for similarity discrimination to obtain a discrimination result; Based on the discrimination result, the parameters of the generating network and the discriminating network are updated to complete the training of the generating network and the discriminating network, and a trained image reconstruction model is obtained.

6. The method according to claim 5, characterized in that The step of reconstructing the synthesized image based on the encoder and the decoder in the generation network to obtain a reconstructed image includes: Performing multi-level feature extraction on the synthetic image based on the encoder in the generative network to obtain image features; The image features are subjected to feature fusion based on the decoder in the generative network to obtain a reconstructed image.

7. The method according to claim 5, characterized in that The updating of the parameters of the generating network and the discriminating network based on the discriminant result, completing the training of the generating network and the discriminating network, and obtaining the trained image reconstruction model comprises: Determining a medical image corresponding to the synthetic image through a synthetic image source of the reconstructed image; Inputting the reconstructed image and the medical image into a loss function, and calculating a loss value corresponding to the reconstructed image; Based on the correspondence between the reconstructed image and the medical image, determine whether the discrimination result is correct; if the discrimination result correctly determines the source of the image input to the discrimination network, update the network parameters corresponding to the discrimination network based on the loss value; if the discrimination result incorrectly determines the source of the image input to the discrimination network, update the network parameters corresponding to the generation network based on the loss value; until the loss function converges, stop training and obtain the image reconstruction model.

8. An image enhancement device, characterized in that: include: An image acquisition module, used to acquire medical data sets and collect speckle images through a fiber optic endoscope; a data set generating module, configured to generate a synthetic data set based on the speckle image and the medical images in the medical data set, wherein the synthetic data set includes synthetic images corresponding to the medical images in the medical data set; A training module is used to perform adversarial training on a deep learning model based on the synthetic data set and the medical data set to generate an image reconstruction model, so as to reconstruct the endoscopic image based on the image reconstruction model to obtain an image reconstruction result.

9. An electronic device, characterized in that: include: at least one processor and at least one memory, wherein: The memory has computer-readable instructions stored thereon; The computer-readable instructions are loaded and executed by the processor, so that the electronic device implements the image enhancement method according to any one of claims 1 to 7.

10. A storage medium having computer-readable instructions stored thereon, characterized in that: The computer-readable instructions are loaded and executed by a processor to implement the image enhancement method according to any one of claims 1 to 7.