Image restoration method and electronic equipment
By using an image restoration model and a lightweight U-Net architecture, the problem of restoring tissue details in holmium laser-exposed areas was solved, enabling automatic restoration and real-time processing of tissue details in endoscopic images.
Patent Information
- Application Number
- CN202511796939.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-02-06
AI Technical Summary
Existing technologies struggle to restore tissue details in holmium laser-exposed areas, especially in endoscopic images, leading to difficulties in postoperative review and surgical instruction.
An image restoration model is employed, which combines training sample images and restored images, optimizes the model using a hybrid loss function, and combines it with a lightweight U-Net architecture to restore tissue details in holmium laser-exposed areas.
It enables automatic recovery of tissue details in holmium laser-exposed areas, improving the accuracy and speed of image recovery, and is suitable for real-time endoscopic image processing.
Smart Images

Figure CN121481872A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image restoration method and electronic device. Background Technology
[0002] Holmium laser surgery utilizes the high energy density and short pulse characteristics of holmium lasers for tissue cutting and vaporization. However, this also easily leads to localized overexposure in the imaging system. This phenomenon causes areas of holmium laser exposure in endoscopic images and other imaging systems to obscure tissue details. Restoring these obscured tissue details is crucial for postoperative review and evaluation, as well as surgical teaching.
[0003] However, it is currently difficult to recover the tissue details in the holmium laser-exposed areas of the image, and this problem urgently needs to be solved. Summary of the Invention
[0004] This invention provides an image restoration method and electronic device to restore tissue details in holmium laser-exposed areas of an image.
[0005] According to one aspect of the present invention, an image restoration method is provided, which may include:
[0006] Acquire the target image and the trained image restoration model, wherein the target image includes the first holmium laser exposure area for restoring tissue details;
[0007] The target image is input into the image restoration model, and the target restoration image including the target restoration region is obtained based on the output of the image restoration model. The target restoration region is the first holmium laser exposure area where the tissue details have been restored.
[0008] According to another aspect of the present invention, an electronic device is provided, which may include:
[0009] At least one processor; and
[0010] A memory that is communicatively connected to at least one processor; wherein,
[0011] The memory stores a computer program that can be executed by at least one processor, such that when the at least one processor executes the program, it implements the image restoration method provided in any embodiment of the present invention.
[0012] The technical solution of this invention involves acquiring a target image and a trained image restoration model. The target image includes a first holmium laser exposure area containing tissue details to be restored. The target image is input into the image restoration model, and based on the output of the image restoration model, a target restored image including the target restoration area is obtained. The target restoration area is the first holmium laser exposure area where tissue details have been restored. This technical solution allows the image restoration model to process the target image containing the first holmium laser exposure area containing tissue details to obtain a target restored image containing the restored tissue details, thereby restoring the tissue details of the holmium laser exposure area in the image.
[0013] It should be understood that the description in this section is not intended to identify key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart of an image restoration method provided according to an embodiment of the present invention;
[0016] Figure 2 This is a flowchart of another image restoration method provided according to an embodiment of the present invention;
[0017] Figure 3 This is a flowchart of yet another image restoration method provided according to an embodiment of the present invention;
[0018] Figure 4 This is a schematic diagram of an optional example of another image restoration method provided according to an embodiment of the present invention;
[0019] Figure 5 This is a structural block diagram of an image restoration device according to an embodiment of the present invention;
[0020] Figure 6 This is a schematic diagram of the structure of an electronic device that implements the image restoration method of this invention. Detailed Implementation
[0021] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0022] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The same applies to "target," "original," etc., and will not be repeated here. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0023] Before introducing the embodiments of the present invention, the implementation process of the current solutions for image restoration and the reasons why they have difficulty in restoring the tissue details of the holmium laser-exposed area in the image will be explained by way of example, so as to better understand why the solution proposed in the embodiments of the present invention can restore the tissue details of the holmium laser-exposed area in the image.
[0024] For example, current image restoration methods first use traditional methods, target detection, or image segmentation algorithms to locate the exposure position of the holmium laser exposure area. Then, based on the exposure position, the holmium laser exposure area is corrected through methods such as logarithmic transformation and histogram equalization to restore the image. However, this method can only roughly restore the tissue in the holmium laser exposure area and cannot restore the tissue details in the holmium laser exposure area.
[0025] To address this, embodiments of the present invention can use an image restoration model to process a target image of a first holmium laser-exposed area containing the tissue details to be restored, thereby obtaining a target restoration image of a target restoration area containing the restored tissue details, thus restoring the tissue details of the holmium laser-exposed area in the image. This will be explained in detail below.
[0026] Figure 1This is a flowchart of an image restoration method provided in an embodiment of the present invention. This embodiment is applicable to image restoration of a first holmium laser exposure area including details of the tissue to be restored, and is particularly applicable to endoscopic image restoration of a first holmium laser exposure area including details of the tissue to be restored. This method can be executed by the image restoration device provided in this embodiment of the present invention, which can be implemented by software and / or hardware, and can be integrated into an electronic device, which can be various user terminals or servers.
[0027] See Figure 1 The method of this invention specifically includes the following steps:
[0028] S110. Acquire the target image and the trained image restoration model, wherein the target image includes the first holmium laser exposure area for the tissue details to be restored.
[0029] The target image can be understood as an image in which tissue details need to be restored in the first holmium laser exposure area; the target image can be a medical image, such as an endoscopic image, specifically an endoscopic image in an endoscopic video stream, that is, the solution of the present invention can be used in conjunction with an endoscope or can be directly applied to an endoscope; the number of target images can be one or more.
[0030] An image restoration model can be understood as a model used to restore tissue details in the first holmium laser exposure area of a target image; an image restoration model can be deployed across platforms on surgical devices or other devices.
[0031] The first holmium laser exposure area can be understood as the area corresponding to the local exposure phenomenon in the target image caused by the holmium laser. It should be noted that before inputting the target image into the image restoration model, the position of the first holmium laser exposure area in the target image may or may not be known (the image restoration model may have the function of determining and restoring the position of the first holmium laser exposure area).
[0032] In this embodiment of the invention, the target image of the first holmium laser exposure area for restoring tissue details and the image restoration model may be included.
[0033] S120. Input the target image into the image restoration model, and obtain the target restoration image including the target restoration area based on the output of the image restoration model. The target restoration area is the first holmium laser exposure area where the tissue details have been restored.
[0034] The output result can be understood as the image restoration result output by the image restoration model after the target image is input into it.
[0035] The target recovery area can be understood as the first holmium laser exposure area in the target recovery image where the tissue details have been restored.
[0036] The target restored image can be understood as a target image in which the tissue details in the first holmium laser exposure area have been restored.
[0037] It is important to note that the target image and the target image are essentially the same image. The difference between the two is that the tissue details in the first holmium laser exposure area in the target image are not restored, while the tissue details in the first holmium laser exposure area in the target image are restored (the first holmium laser exposure area with restored tissue details can be called the target restoration area).
[0038] In this embodiment of the invention, the target image can be input into the image restoration model, and the target restored image can be obtained based on the output result.
[0039] It should be noted that the above image restoration process is essentially a process of removing the first holmium laser exposure area from the target image.
[0040] It is understood that the technical solution implemented by the present invention can automatically remove the laser exposure in the first holmium laser exposure area, thereby restoring the tissue details affected by the laser in the target image; and the technical solution implemented by the present invention can achieve end-to-end image restoration through the image restoration model, without the need to spend extra time locating the exposure position and then restoring the image. Therefore, it can achieve real-time image restoration in application scenarios that require target images in endoscopic video streams.
[0041] The technical solution of this invention involves acquiring a target image and a trained image restoration model. The target image includes a first holmium laser exposure area containing tissue details to be restored. The target image is input into the image restoration model, and based on the output of the image restoration model, a target restored image including the target restoration area is obtained. The target restoration area is the first holmium laser exposure area where tissue details have been restored. This technical solution allows the image restoration model to process the target image containing the first holmium laser exposure area containing tissue details to obtain a target restored image containing the restored tissue details, thereby restoring the tissue details of the holmium laser exposure area in the image.
[0042] Figure 2This is a flowchart of another image restoration method provided in this embodiment of the invention. This embodiment is based on the above-mentioned technical solutions and optimized. In this embodiment, optionally, the image restoration model is pre-trained through the following steps: acquiring a pre-built original restoration model, a sample image including the second holmium laser exposure area, and a sample restoration image including the sample restoration area corresponding to the sample image, and using the sample image and the sample restoration image as a set of training samples, wherein the sample restoration area is the second holmium laser exposure area with restored tissue details; training the original restoration model based on multiple sets of training samples to obtain the image restoration model.
[0043] The explanations of terms that are the same as or corresponding to those in the above embodiments will not be repeated here.
[0044] See Figure 2 The method in this embodiment may specifically include the following steps:
[0045] S210. Obtain the pre-built original restoration model, sample images including the second holmium laser exposure area, and sample restoration images including the sample restoration area corresponding to the sample images, and use the sample images and sample restoration images as a set of training samples, wherein the sample restoration area is the second holmium laser exposure area with restored tissue details.
[0046] The original restoration model can be understood as an untrained image restoration model.
[0047] The second holmium laser exposure area can be understood as the area corresponding to the localized exposure phenomenon in the sample image caused by the holmium laser.
[0048] The sample image can be understood as an image used as a sample for restoring tissue details in the area exposed by the second holmium laser.
[0049] The sample restoration region can be understood as the area of the second holmium laser exposure in the sample restoration image where the tissue details have been restored; considering that the sample restoration image itself may be an image in which no local exposure phenomenon has occurred, the sample restoration region can also be understood as the area in the sample restoration image that corresponds to the second holmium laser exposure area (the position, shape and size of the sample restoration region in the sample restoration image correspond to the position, shape and size of the second holmium laser exposure area in the sample image).
[0050] The template restoration image can be understood as a target image in which the tissue details in the second holmium laser exposure area have been restored; considering that the sample restoration image itself may be an image in which no local exposure phenomenon has occurred, the template restoration image can also be understood as an image in which no local exposure phenomenon has occurred, corresponding to the sample image (an image obtained by shooting the same tissue with the same shooting angle and other parameters as the sample image).
[0051] Training samples can be understood as samples used to train the original recovery model.
[0052] In this embodiment of the invention, a pre-built original restoration model, sample images, and sample restored images can be obtained, and the sample images and sample restored images can be used as a set of training samples.
[0053] S220. The original restoration model is trained based on multiple sets of training samples to obtain the image restoration model.
[0054] In this embodiment of the invention, the original restoration model can be trained based on multiple sets of training samples to obtain an image restoration model. For example, a hybrid loss function can be used to train the original restoration model based on multiple sets of training samples to obtain an image restoration model. It is important to note that the hybrid loss function combines the optimization objectives of pixel-level accuracy and perceptual quality. It can include the Mean Squared Error Loss (MSE Loss) function and the Perceptual Loss (PL) function. That is, the total loss of the hybrid loss function = (1-α)×MSE function loss + α×perceptual loss function, where α is the weight coefficient of the perceptual loss function, which can be 0.7, that is, the perceptual loss function accounts for 70% of the weight and the MSE loss function accounts for 30% of the weight. This weight configuration has been experimentally verified to achieve the best balance between pixel accuracy and visual quality (too small an α value will result in a high peak signal-to-noise ratio (PSNR) but poor visual effect, while too large an α value will result in an image that looks natural but lacks detail). Using this hybrid loss function to train the original restoration model can ensure the stability and recoverability of the original restoration model training.
[0055] In this embodiment of the invention, during the training of the original restoration model based on multiple sets of training samples, the encoder of the original restoration model can implicitly learn the exposure position and shape of the holmium laser exposure area, which can help the trained image restoration model to perform end-to-end image restoration, and make the restored target restoration area transition naturally with the surrounding normal area.
[0056] In this embodiment of the invention, the original restoration model can be trained based on a portion of the training samples from multiple sets of training samples to obtain an image restoration model. The remaining training samples from the multiple sets of training samples can be divided into a validation set and a test set for verifying and testing the image restoration model.
[0057] S230. Acquire the target image and the trained image restoration model, wherein the target image includes the first holmium laser exposure area for the tissue details to be restored.
[0058] S240. Input the target image into the image restoration model, and obtain the target restoration image including the target restoration area based on the output of the image restoration model. The target restoration area is the first holmium laser exposure area where the tissue details have been restored.
[0059] The technical solution of this invention involves acquiring a pre-built original restoration model, a sample image including the second holmium laser exposure area, and a sample restored image corresponding to the sample image, including the sample restoration area. The sample image and the sample restored image are used as a set of training samples, wherein the sample restoration area is the second holmium laser exposure area where tissue details have been restored. The original restoration model is trained based on multiple sets of training samples to obtain an image restoration model. This technical solution, by using the sample image and the sample restored image as a set of training samples and training the original restoration model based on multiple sets of training samples, can improve the accuracy of image restoration using the trained image restoration model.
[0060] An optional technical solution is to pre-build the original recovery model through the following steps: obtain the pre-built initial recovery model and reduce the number of basic channels of the initial recovery model to obtain the original recovery model.
[0061] The initial recovery model can be understood as the original recovery model without retrieving the basic channel count.
[0062] The base channel count can be understood as the number of base channels in the initial recovery model.
[0063] In this embodiment of the invention, a pre-built initial recovery model can be obtained, and the number of basic channels can be reduced to obtain the original recovery model.
[0064] In this embodiment of the invention, in addition to reducing the number of basic channels in the initial recovery model, the number of other channels in the initial recovery model can also be adjusted to obtain the original recovery model.
[0065] For example, the resulting original recovery model can adopt a lightweight U-Net architecture, that is, the model is lightweighted by reducing the number of basic channels, while maintaining sufficient expressive power.Specifically, the original reconstruction model is configured for single-pass forward propagation image processing. It accepts 3-channel Red-Green-Blue (RGB) images as input and outputs a 3-channel RGB image. Both input and output dimensions are set to 400×400 pixels to match the resolution of the input and output images. The encoder of the original reconstruction model contains four downsampling layers, each consisting of a convolutional layer, a batch normalization layer, a ReLU activation function, and a max-pooling layer. The base number of channels in the encoder is reduced to 48 to ensure the lightweight nature of the original reconstruction model. The first downsampling layer expands the 3 input channels to 48 channels, the second to 96, the third to 192, and the fourth to 384. Furthermore, the encoder halves the feature map size and doubles the number of channels each time it performs downsampling, conforming to classic design principles. The bottleneck layer of the original restoration model is located at the deepest part of the original restoration model. It can receive the 384-channel feature map output from the fourth downsampling layer of the encoder and expand it to 768 channels through convolution. The size of the expanded 768-channel feature map is 25×25 pixels, which is 1 / 16 of the size of the input image of the original restoration model. The bottleneck layer has the largest receptive field and can capture global information of the image. The decoder of the original restoration model contains four upsampling layers, which adopt a symmetrical structure with the four downsampling layers. The core mechanism of the decoder is that each upsampling layer first performs upsampling through transposed convolution, expanding the feature map size by 2 times, and then concatenates it with the feature map of the corresponding downsampling layer in the encoder (the first upsampling layer corresponds to the first downsampling layer, the second upsampling layer corresponds to the second downsampling layer, and so on). The concatenation layer uses a convolutional layer to reduce the number of channels after the concatenation. The fourth upsampling layer reduces the input 768 channels (bottleneck layer 768 + encoder's fourth downsampling layer 384) to 384 channels. The third upsampling layer reduces the input 576 channels (previous upsampling layer 384 + encoder's third downsampling layer 192) to 192 channels. The second upsampling layer reduces the input 288 channels to 96 channels. The first upsampling layer reduces the input 144 channels to 48 channels. The output layer of the original restoration model maps the 48-channel feature map into a 3-channel RGB image using a 1×1 convolution. Then, the pixel values are normalized to between 0 and 1 using the Sigmoid activation function to obtain the output of the original restoration model.The architecture of the original restoration model described above can ensure that while optimizing the pixel accuracy, visual quality, and accuracy of image restoration, it can also accelerate the speed of image restoration.
[0066] The technical solution of this invention obtains a pre-built initial recovery model and reduces the number of basic channels in the initial recovery model to obtain the original recovery model, so as to perform image recovery on the basis of a lightweight network architecture, thereby improving the speed of image recovery, especially helping to meet the requirements of real-time image recovery.
[0067] Figure 3 This is a flowchart of another image restoration method provided in this embodiment of the invention. This embodiment is based on and optimized from the above-mentioned technical solutions. In this embodiment, optionally, the sample image is obtained through the following steps: determining the parameter value range, and determining the region parameters of the second holmium laser exposure area according to the parameter value range; generating an exposure overlay layer, and applying the exposure overlay layer to the sample restoration image according to the region parameters to obtain the sample image, wherein the second holmium laser exposure area is the area in the sample image covered by the exposure overlay layer. The explanations of terms that are the same as or corresponding to those in the above embodiments are not repeated here.
[0068] See Figure 3 The method in this embodiment may specifically include the following steps:
[0069] S310. Determine the parameter value range, and based on the parameter value range, determine the region parameters of the second holmium laser exposure area.
[0070] The parameter value range can be understood as the range of values that the region parameter can take. For example, the parameter value range may include at least one of the following: the transparency gradient value range (from which the transparency gradient parameter can take a value), the feathering degree value range (from which the feathering degree parameter can take a value), the bright edge effect value range (from which the bright edge effect parameter can take a value), the color model selection range (from which the color mode can take a value), the region number selection range (from which the region number can take a value), the region position selection range (from which the region position can take a value), the region length value range (from which the region length can take a value), and the region height value range (from which the region height can take a value), etc.
[0071] For example, the number of regions can be greater than or equal to 1 and less than or equal to 2 to reflect the typical exposure pattern produced by holmium laser fiber irradiation. With a region number of 1 (single strip), a stable holmium laser irradiation scenario is simulated; with a region number of 2 (double strip), a moving or multiple irradiation scenario of the holmium laser fiber is simulated. The region height value range can be a range of region height proportions, corresponding to 5% to 20% of the height of the recovered sample image, to simulate the variation of the holmium laser irradiation range with laser power and fiber distance. Smaller region height values correspond to low power or long-distance irradiation, while larger region height values correspond to high power or short-distance irradiation. The transparency gradient value range can include a range of 0.2 to 0.5 for the initial transparency on the left side of the second holmium laser exposure region and a range of 0.0 to 0.15 for the final transparency on the right side, to form a second holmium laser exposure region with a horizontal gradient of transparency decreasing from left to right, simulating the distribution characteristics of laser energy on the tissue surface. The exposure intensity is high in the region on the left side near the fiber end, and the exposure intensity gradually decreases in the region on the right side away from the fiber. The feathering level can range from 5% to 50% of the vertical feathering ratio, simulating the diffusion effect of laser energy in the vertical direction. Smaller feathering values produce well-defined exposed areas, while larger values produce blurred exposed areas. The bright edge effect can range from 0.1% to 1.5% of the height of the recovered image (line height), 20% to 60% of the area length (line length), and a brightness enhancement factor of 1.0 to 1.9 times. The color model can be selected from the range corresponding to white and cool tones. White simulates the strong exposure effect of high-power laser irradiation, while cool tones simulate the slight exposure effect of low-power laser irradiation.
[0072] The region parameters can be understood as the parameters of the second holmium laser exposure area; the region parameters may include at least one of the following: transparency gradient parameters, feathering degree parameters, bright edge effect parameters, color mode, number of regions, region position, region length, and region height.
[0073] It is understandable that training the original restoration model requires a large number of training samples to ensure the accuracy of the image restoration model in restoring the target image and to avoid introducing incorrect tissue information into the target restored image. However, it is difficult to obtain sample images and sample restored images at the same location. Currently, the second holmium laser exposure area is often manually labeled in the sample restored image to obtain the sample image. However, this method is time-consuming, labor-intensive, and has low labeling accuracy. To address this, the present invention proposes a solution that automatically determines the region parameters based on the parameter value range. Based on the region parameters and the sample restored image, the sample image is automatically determined to solve the above problems. That is, it can restore the tissue details of the holmium laser exposure area in the image without introducing incorrect tissue information into the target restored image, while also ensuring the speed of model training.
[0074] In this embodiment of the invention, the parameter value range can be determined. For example, the physical characteristics of the holmium laser surgery scene can be obtained and / or the holmium laser exposure characteristics can be determined from historical images (e.g., images from historically obtained holmium laser surgery videos). Based on the IoT characteristics and / or the holmium laser exposure characteristics, the parameter value range is determined. The parameter value range determined in this way allows subsequent sample images obtained based on the parameter value range to simulate the real exposure effect produced by the interaction between the holmium laser and tissue, thereby improving the realism of the sample images.
[0075] In this embodiment of the invention, region parameters can be determined based on the range of parameter values. For example, random sampling can be performed within the parameter value range to obtain region parameters, thereby ensuring the diversity and randomness of the sample images obtained through region parameters (e.g., corresponding to random and diverse holmium laser power). In particular, it can cover different surgical scenarios, and the trained image restoration model can automatically adapt without needing to readjust parameters for different objects (the objects targeted during target image acquisition).
[0076] S320. Generate an exposure overlay layer and, based on the region parameters, overlay the exposure overlay layer onto the sample recovery image to obtain a sample image. The second holmium laser exposure region is the region in the sample image covered by the exposure overlay layer.
[0077] The exposure overlay layer can be understood as a layer used to cover the sample recovery image to simulate the holmium laser exposure effect and obtain the second holmium laser exposure area.
[0078] In this embodiment of the invention, an exposure overlay layer can be generated. For example, an exposure overlay layer can be generated based on region parameters.
[0079] In this embodiment of the invention, an exposure overlay layer can be applied to the sample recovery image based on region parameters to obtain a sample image. For example, if the region parameters include a region location (characterizing the position of the second holmium laser exposure area in the sample image), the exposure overlay layer is applied to the position in the sample recovery image corresponding to the region location to obtain the sample image.
[0080] In this embodiment of the invention, the acquisition of the sample restoration image can be performed before the exposure overlay layer is applied to the sample restoration image according to the region parameters to obtain the sample image. For example, an unexposed image can be acquired and loaded as the sample restoration image.
[0081] In this embodiment of the invention, after the exposure overlay layer is applied to the sample recovery image according to the region parameters to obtain the sample image, Gaussian noise (the intensity of the Gaussian noise is Gaussian noise with a standard deviation of 2.0, and the Gaussian noise can be preset or obtained from the noise value range in the parameter value range) can be injected into the sample image. The sample image is then updated according to the injection result to simulate the real noise characteristics of the image. Specifically, it simulates the electronic noise of the image sensor and the image interference during laser irradiation. The Gaussian noise can be added to the RGB three channels of each pixel in the sample image to enhance the realism of the generated sample image.
[0082] In this embodiment of the invention, after the exposure overlay layer is applied to the sample recovery image according to the region parameters to obtain the sample image, the sample image and the sample recovery image can be saved to a specified directory so that when training samples are needed, the sample image and the sample recovery image can be obtained from the directory.
[0083] S330. Obtain the pre-built original restoration model, sample images including the second holmium laser exposure area, and sample restoration images including the sample restoration area corresponding to the sample images, and use the sample images and sample restoration images as a set of training samples, wherein the sample restoration area is the second holmium laser exposure area with restored tissue details.
[0084] S340. The original restoration model is trained based on multiple sets of training samples to obtain the image restoration model.
[0085] S350: Acquire the target image and the trained image restoration model, wherein the target image includes the first holmium laser exposure area for restoring tissue details.
[0086] S360. Input the target image into the image restoration model, and obtain the target restoration image including the target restoration area based on the output of the image restoration model. The target restoration area is the first holmium laser exposure area where the tissue details have been restored.
[0087] The technical solution of this invention determines the parameter value range, and based on the parameter value range, determines the regional parameters of the second holmium laser exposure area, then generates an exposure overlay layer, and applies the exposure overlay layer onto the sample reconstruction image according to the regional parameters to obtain a sample image. The second holmium laser exposure area is the area in the sample image covered by the exposure overlay layer. This technical solution can automatically obtain a sample image based on an existing sample reconstruction image. Therefore, even when there is no corresponding sample image for the reconstruction image, it can still obtain high-quality training samples including both the original sample image and the reconstructed sample image. This facilitates the automatic batch generation of a large number of training samples without annotation, and the image reconstruction model can be trained based on the obtained training samples, ensuring the accuracy of the trained image reconstruction model in reconstructing the target image.
[0088] An optional technical solution includes a region parameter comprising a transparency gradient parameter; and applying an exposure overlay layer onto the sample recovery image based on the region parameter to obtain a sample image, comprising: calculating a linear gradient parameter of transparency in the horizontal direction of the second holmium laser exposure region based on the transparency gradient parameter; and applying an exposure overlay layer onto the sample recovery image based on the linear gradient parameter of transparency to obtain a sample image.
[0089] The transparency gradient parameter can be understood as a transparency-related parameter of the second holmium laser exposure area; the transparency gradient parameter may include, for example, the left-side starting transparency and the right-side ending transparency of the second holmium laser exposure area.
[0090] The transparency linear gradient parameter can be understood as the gradient parameter of the transparency of the second holmium laser exposure area in the horizontal direction; the transparency linear gradient parameter can include the transparency corresponding to each pixel in the second holmium laser exposure area, and the transparency corresponding to each pixel gradually transitions from high transparency on the left side of the second holmium laser exposure area to low transparency on the right side.
[0091] In this embodiment of the invention, the linear gradient parameter of the transparency of the second holmium laser exposure area in the horizontal direction can be calculated based on the transparency gradient parameter. For example, the transparency corresponding to each pixel in the second holmium laser exposure area can be calculated based on the starting transparency on the left and the ending transparency on the right. The transparency corresponding to each pixel can make the transparency of the left side (the leftmost column of pixels) of the second holmium laser exposure area gradually change from the starting transparency on the left to the ending transparency on the right side (the rightmost column of pixels), and the transparency corresponding to each pixel is used as the linear gradient parameter of transparency.
[0092] In this embodiment of the invention, an exposure overlay can be applied to the sample recovery image based on a linear gradient parameter of transparency to obtain a sample image.
[0093] The technical solution of this invention calculates the linear gradient parameter of the transparency of the second holmium laser exposure area in the horizontal direction based on the transparency gradient parameter, and then applies the exposure overlay layer to the sample recovery image based on the transparency linear gradient parameter to obtain the sample image. This allows the obtained sample image to simulate the real exposure effect in the transparency dimension, thereby improving the realism of the sample image.
[0094] Based on the above scheme, another optional technical solution includes a feathering degree parameter for the region parameters; according to the transparency linear gradient parameter, an exposure overlay layer is applied to the sample recovery image to obtain a sample image, including: calculating the feathering effect parameter of the second holmium laser exposure area in the vertical direction according to the feathering degree parameter; determining the two-dimensional transparency field according to the transparency linear gradient parameter and the feathering effect parameter, and applying the exposure overlay layer to the sample recovery image according to the two-dimensional transparency field to obtain a sample image.
[0095] The feathering degree parameter can be understood as a parameter related to the feathering degree of the second holmium laser exposure area; the feathering degree parameter may include, for example, the vertical feathering ratio of the second holmium laser exposure area.
[0096] The feathering effect parameter can be understood as the vertical transparency of the second holmium laser exposure area, which reflects the feathering effect parameter; the feathering effect parameter can include the feathering effect corresponding to each pixel in the second holmium laser exposure area.
[0097] In this embodiment of the invention, feathering effect parameters can be calculated based on feathering degree parameters. For example, feathering effect parameters can be calculated using a cosine function based on feathering degree parameters, ensuring that the calculated feathering effect parameters guarantee a smooth transition at the boundary of the second holmium laser exposure area, thereby ensuring a natural edge transition effect when the exposure overlay is applied to the sample recovery image.
[0098] The two-dimensional transparency field can be understood as reflecting the transparency field of the second holmium laser exposure area in two dimensions; the two-dimensional transparency field can include the two-dimensional transparency corresponding to each pixel in the second holmium laser exposure area.
[0099] In this embodiment of the invention, a two-dimensional transparency field can be determined based on the transparency linear gradient parameter and the feathering effect parameter. For example, the transparency linear gradient parameter includes the first transparency corresponding to each pixel in the second holmium laser exposure area, and the feathering effect parameter includes the feathering effect corresponding to each pixel in the second holmium laser exposure area (which can also be represented by transparency and can be called the second transparency). For each pixel, the first transparency and the feathering effect corresponding to the pixel are multiplied to obtain the two-dimensional transparency. The transparency field formed by the two-dimensional transparency corresponding to each pixel is used as the two-dimensional transparency field.
[0100] In this embodiment of the invention, an exposure overlay layer can be applied to the sample restoration image based on a two-dimensional transparency field to obtain a sample image. For example, the exposure overlay layer and the sample restoration image can be alpha-blended according to the two-dimensional transparency field to apply the exposure overlay layer to the sample restoration image, resulting in a sample image with a holmium laser exposure effect. The formula used for this alpha blending can be: pixel in sample image = corresponding pixel in sample restoration image × (1 – corresponding two-dimensional transparency) + color of corresponding pixel in exposure overlay layer × corresponding two-dimensional transparency.
[0101] The technical solution of this invention calculates the feathering effect parameters of the second holmium laser exposure area in the vertical direction based on the feathering degree parameters, then determines the two-dimensional transparency field based on the transparency linear gradient parameters and the feathering effect parameters, and applies the exposure overlay layer to the sample recovery image based on the two-dimensional transparency field to obtain the sample image. This allows the obtained sample image to simulate the real exposure effect in terms of transparency and feathering dimensions, thereby improving the realism of the sample image.
[0102] Another optional technical solution involves, after applying the exposure overlay layer onto the sample restored image based on the region parameters to obtain the sample image, the image restoration method further includes: determining the bright edge effect parameters based on the parameter value range, after determining the addition of the bright edge effect according to the preset bright edge probability; drawing bright lines on the second holmium laser exposure area according to the bright edge effect parameters; and updating the sample image based on the obtained drawing results.
[0103] The preset bright edge probability can be understood as the probability of adding a bright edge effect to the second holmium laser exposure area; the preset bright edge probability can be, for example, 40%.
[0104] The bright edge effect parameter can be understood as a parameter corresponding to the bright edge effect of the second holmium laser exposure area; the bright edge effect parameter may include at least one of the following: the brightness enhancement coefficient of the bright line, the line position, the line length, and the line brightness.
[0105] In this embodiment of the invention, when the addition of a bright edge effect is determined according to a preset bright edge probability, the bright edge effect parameter can be determined based on the parameter value range. For example, when the addition of a bright edge effect is determined according to a preset bright edge probability, the bright edge effect parameter can be randomly selected from the bright edge effect value range within the parameter value range.
[0106] In this embodiment of the invention, when the region parameters include the bright edge effect parameter, the bright edge effect parameter can be directly used to draw bright lines on the second holmium laser exposure area, without having to determine the bright edge effect parameter based on the parameter value range.
[0107] Highlighted lines can be understood as lines that are highlighted.
[0108] In this embodiment of the invention, bright lines are drawn on the second holmium laser exposure area according to the bright edge effect parameters. For example, bright lines can be drawn at specific locations on the second holmium laser exposure area (e.g., the edge of the second holmium laser exposure area) according to the bright edge effect parameters to simulate the strong light edge generated by holmium laser scattering, that is, to simulate the scattering and reflection phenomena generated by the interaction between the laser and the tissue.
[0109] The drawing result can be understood as the result of drawing bright lines on the second holmium laser exposure area.
[0110] In this embodiment of the invention, the sample image can be updated based on the obtained drawing results.
[0111] The technical solution of this invention, under the condition of determining the addition of bright edge effect according to the preset bright edge probability, determines the bright edge effect parameter according to the parameter value range, and then draws bright lines on the second holmium laser exposure area according to the bright edge effect parameter, and updates the sample image according to the drawing result. It can realistically simulate the strong light edge generated by holmium laser scattering in the sample image, thereby improving the realism of the sample image.
[0112] Another alternative technical solution, the image restoration method, further includes: determining at least one of the region height and color mode of the second holmium laser exposure area according to the parameter value range; generating an exposure overlay layer, including: generating an exposure overlay layer according to at least one of the region height and color mode.
[0113] The area height can be understood as the height of the second holmium laser exposure area, or it can be understood as the width of the second holmium laser exposure area.
[0114] The color mode can be understood as the color mode used in the second holmium laser exposure area; the color mode can be, for example, white or cool-toned colors, that is, the color model selection range can be white or cool-toned colors.
[0115] In this embodiment of the invention, at least one of the region height and color mode can be determined based on the parameter value range.
[0116] In this embodiment of the invention, when the area parameters include at least one of area height and color mode, at least one of area height and color mode can be directly used in the process of generating the exposure overlay layer, without having to determine at least one of area height and color mode based on the parameter value range.
[0117] In this embodiment of the invention, an exposure overlay layer can be generated based on at least one of the region height and the color mode. For example, an exposure overlay layer can be generated with the color mode being the color and the height being the region height.
[0118] The technical solution of this invention determines at least one of the region height and color mode of the second holmium laser exposure area according to the parameter value range, and then generates an exposure overlay layer according to at least one of the region height and color mode. This can simulate the color of the real exposure effect in the sample image, thereby improving the realism of the sample image.
[0119] Another optional technical solution further includes: determining the number of regions of the second holmium laser exposure region according to the parameter value range; and determining the region parameters of the second holmium laser exposure region according to the parameter value range, including: for each of the number of regions of the second holmium laser exposure region, determining the region parameters of the second holmium laser exposure region according to the parameter value range.
[0120] The number of regions can be understood as the number of second holmium laser exposure areas in the sample image, or the number of holmium laser stripes in the sample image.
[0121] In this embodiment of the invention, the number of regions can be determined according to the parameter value range, and for each of the number of second holmium laser exposure regions, the region parameters can be determined according to the parameter value range.
[0122] In this embodiment of the invention, an exposure overlay layer can be generated for each second holmium laser exposure area, and the corresponding exposure overlay layer can be applied to the sample recovery image according to the area parameters corresponding to each second holmium laser exposure area to obtain the sample image.
[0123] It should be noted that the location of the region can also be determined by the number of regions. For example, when there is only one region, the horizontal region location can be randomly selected from the region location selection range. When there are at least two regions, the horizontal region location corresponding to each second holmium laser exposure region can be randomly selected from the region location selection range, provided that the interval between each second holmium laser exposure region is greater than a preset interval, so as to avoid the overlap of each second holmium laser exposure region.
[0124] The technical solution of this invention determines the number of regions of the second holmium laser exposure area according to the parameter value range, and then determines the region parameters of the second holmium laser exposure area for each of the number of regions of the second holmium laser exposure area according to the parameter value range. This enables the trained image restoration model to support image restoration when there are one or more first holmium laser exposure areas.
[0125] To better understand the technical solutions of the above embodiments of the present invention, an optional example is provided here. Exemplarily, the image restoration process of the embodiments of the present invention can be implemented by an image restoration system, which may include a training sample generation subsystem and an image restoration subsystem. The training sample generation subsystem can be used to simulate the holmium laser exposure effect to obtain sample images, and can also be used to generate training samples. The image restoration subsystem can be used to improve and obtain a lightweight U-Net network, and can also be used to train the image restoration model, and can also be used for image restoration. The above two subsystems can be seamlessly connected to form a complete architecture from training sample generation to image restoration application. Specifically, the training sample generation subsystem can simulate an exposure overlay layer with a layered exposure structure. When applying the overlay layer to the restored sample image, it performs edge feathering and applies enhanced illumination to the edges, thereby automatically simulating the exposure effect produced by laser-tissue interaction on the unexposed restored sample image to obtain sample images. This process is repeated in batches to obtain multiple sets of training samples. The image restoration subsystem can improve the initial restoration model to obtain a lightweight U-Net network with fewer than 25MB of parameters to meet the requirements of real-time image restoration and embedded deployment. The image restoration subsystem can also use a hybrid loss function to train the original restoration model, ensuring the accuracy of the trained image restoration model for image restoration. See also Figure 4The image restoration process using the image restoration system can be specifically divided into three stages: The first stage is the training dataset generation stage, which involves acquiring a dataset of unexposed sample restoration images. A holmium laser weak exposure effect is generated on the sample restoration images in the dataset using a training sample generation subsystem, resulting in corresponding sample images. Based on these corresponding sample images and the sample restoration images, a weak exposure training dataset is generated. The second stage is the model training stage, which involves training an original restoration model using a weak exposure region removal algorithm using the image restoration subsystem based on the weak exposure training dataset. This results in a trained image restoration model capable of removing the weak exposure region (the first holmium laser exposure region). The third stage is the application stage, which involves loading the image restoration model into the image restoration subsystem and using the model to perform real-time image restoration of the target image in the holmium laser surgery video stream, obtaining the target restored image for the restored surgical field of view.
[0126] Figure 5 This is a structural block diagram of an image restoration apparatus provided in an embodiment of the present invention. This apparatus is used to execute the image restoration method provided in any of the above embodiments. This apparatus and the image restoration methods of the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the image restoration apparatus can be found in the embodiments of the above image restoration methods. See also... Figure 5 The device may specifically include: an image restoration model acquisition module 410 and a target restoration image acquisition module 420.
[0127] The image restoration model acquisition module 410 is used to acquire the target image and the trained image restoration model. The target image includes the first holmium laser exposure area for the tissue details to be restored.
[0128] The target image acquisition module 420 is used to input the target image into the image restoration model and obtain the target restoration image including the target restoration region based on the output of the image restoration model. The target restoration region is the first holmium laser exposure area where the tissue details have been restored.
[0129] Optionally, the device may also include modules that pre-train an image restoration model:
[0130] The training samples are used as modules to acquire the pre-built original restoration model, sample images including the second holmium laser exposure area, and sample restoration images including the sample restoration area corresponding to the sample images. The sample images and sample restoration images are used as a set of training samples, wherein the sample restoration area is the second holmium laser exposure area where the tissue details have been restored.
[0131] The image restoration model acquisition module is used to train the original restoration model based on multiple sets of training samples to obtain the image restoration model.
[0132] Optionally, based on the above-described apparatus, the apparatus may further include the following module for obtaining sample images:
[0133] The region parameter determination module is used to determine the range of parameter values and, based on the range of parameter values, determine the region parameters of the second holmium laser exposure area.
[0134] The sample image acquisition module is used to generate an exposure overlay layer and, based on the region parameters, overlay the exposure overlay layer onto the sample recovery image to obtain the sample image. The second holmium laser exposure region is the region in the sample image covered by the exposure overlay layer.
[0135] Optionally, based on the above-described device, the region parameters include transparency gradient parameters;
[0136] The sample image acquisition module may include:
[0137] The transparency linear gradient parameter calculation submodule is used to calculate the transparency linear gradient parameter of the second holmium laser exposure area in the horizontal direction based on the transparency gradient parameter.
[0138] The sample image acquisition submodule is used to overlay an exposure overlay layer onto the sample recovery image based on the transparency linear gradient parameter, thereby obtaining the sample image.
[0139] Optionally, based on the above-mentioned device, the regional parameters also include feathering degree parameters;
[0140] The sample image acquisition submodule may include:
[0141] The feathering effect parameter calculation unit is used to calculate the feathering effect parameters of the second holmium laser exposure area in the vertical direction based on the feathering degree parameter.
[0142] The sample image is obtained by using a unit to determine a two-dimensional transparency field based on the transparency linear gradient parameter and the feathering effect parameter, and then applying an exposure overlay layer onto the sample restored image based on the two-dimensional transparency field to obtain the sample image.
[0143] Optionally, based on the above-described apparatus, the apparatus may further include:
[0144] The bright edge effect parameter determination module is used to determine the bright edge effect parameters based on the parameter value range after the exposure overlay layer is applied to the sample recovery image according to the region parameters and the sample image is obtained.
[0145] The sample image update module is used to draw bright lines on the second holmium laser exposure area according to the bright edge effect parameters, and update the sample image based on the drawing results.
[0146] Optionally, based on the above-described apparatus, the apparatus may further include:
[0147] The color mode determination module is used to determine at least one of the region height and color mode of the second holmium laser exposure area based on the parameter value range.
[0148] Generate an exposure overlay layer, including:
[0149] The exposure overlay generation submodule is used to generate an exposure overlay based on at least one of the region height and color mode.
[0150] Optionally, based on the above-described apparatus, the apparatus may further include:
[0151] The region number determination module is used to determine the number of regions in the second holmium laser exposure area based on the parameter value range;
[0152] The area parameter determination module may include:
[0153] The region parameter determination submodule is used to determine the region parameters of each of the number of second holmium laser exposure regions based on the parameter value range.
[0154] Optionally, based on the above-mentioned device, the device may further include the following modules to pre-build the original restoration model:
[0155] The original recovery model acquisition module is used to obtain the pre-built initial recovery model and reduce the number of basic channels of the initial recovery model to obtain the original recovery model.
[0156] The image restoration apparatus provided in this embodiment of the invention acquires a target image and a trained image restoration model through an image restoration model acquisition module. The target image includes a first holmium laser exposure area containing tissue details to be restored. A target restoration image acquisition module inputs the target image into the image restoration model and, based on the output of the image restoration model, obtains a target restoration image including the target restoration area, which is the first holmium laser exposure area where tissue details have been restored. This apparatus can process the target image containing the first holmium laser exposure area containing tissue details to be restored using the image restoration model to obtain a target restoration image including the target restoration area containing the restored tissue details, thereby restoring the tissue details of the holmium laser exposure area in the image.
[0157] The image restoration apparatus provided in this embodiment of the invention can execute the image restoration method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0158] It is worth noting that in the above-described embodiments of the image restoration device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.
[0159] Figure 6 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0160] like Figure 6 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer programs stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0161] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0162] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as image restoration methods.
[0163] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication unit 19, or installed from storage unit 18, or installed from ROM 12. When the computer program is executed by processor 11, it performs the functions defined in the methods of the embodiments of the present invention.
[0164] In some embodiments, the image restoration method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the image restoration method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the image restoration method by any other suitable means (e.g., by means of firmware).
[0165] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0166] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0167] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0168] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0169] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0170] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0171] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0172] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. An image restoration method, characterized in that, include: Acquire a target image and a trained image restoration model, wherein the target image includes a first holmium laser exposure area for restoring tissue details; The target image is input into the image restoration model, and a target restoration image including the target restoration region is obtained based on the output of the image restoration model. The target restoration region is the first holmium laser exposure area where tissue details have been restored.
2. The method according to claim 1, characterized in that, The image restoration model is pre-trained through the following steps: Acquire a pre-built original restoration model, a sample image including the second holmium laser exposure area, and a sample restoration image including the sample restoration area corresponding to the sample image. Use the sample image and the sample restoration image as a set of training samples, wherein the sample restoration area is the second holmium laser exposure area with restored tissue details. The original restoration model is trained based on multiple sets of training samples to obtain the image restoration model.
3. The method according to claim 2, characterized in that, The sample image is obtained through the following steps: Determine the parameter value range, and based on the parameter value range, determine the region parameters of the second holmium laser exposure area; An exposure overlay layer is generated, and the exposure overlay layer is applied to the sample recovery image according to the region parameters to obtain the sample image, wherein the second holmium laser exposure region is the region in the sample image covered by the exposure overlay layer.
4. The method according to claim 3, characterized in that, The region parameters include transparency gradient parameters; The step of applying the exposure overlay layer onto the sample recovery image according to the region parameters to obtain the sample image includes: Based on the transparency gradient parameters, calculate the linear gradient parameters of the transparency in the horizontal direction of the second holmium laser exposure area; Based on the stated transparency linear gradient parameters, the exposure overlay is applied over the sample recovery image to obtain the sample image.
5. The method according to claim 4, characterized in that, The region parameters also include feathering degree parameters; The step of applying the exposure overlay layer onto the sample restored image according to the transparency linear gradient parameter to obtain the sample image includes: Based on the feathering degree parameter, calculate the feathering effect parameter of the second holmium laser exposure area in the vertical direction; Based on the linear gradient parameters of transparency and the feathering effect parameters, a two-dimensional transparency field is determined, and based on the two-dimensional transparency field, the exposure overlay layer is applied to the sample recovery image to obtain the sample image.
6. The method according to claim 3, characterized in that, After applying the exposure overlay layer onto the sample restored image according to the region parameters to obtain the sample image, the method further includes: When adding a bright edge effect according to a preset bright edge probability, the bright edge effect parameter is determined based on the range of the parameter values. According to the bright edge effect parameters, bright lines are drawn on the second holmium laser exposure area, and the sample image is updated based on the drawing results.
7. The method according to claim 3, characterized in that, Also includes: Based on the range of parameter values, at least one of the region height and color mode of the second holmium laser exposure area is determined; The generation of the exposure overlay layer includes: An exposure overlay is generated based on at least one of the region height and the color mode.
8. The method according to claim 3, characterized in that, Also includes: The number of regions in the second holmium laser exposure area is determined based on the range of parameter values. Determining the region parameters of the second holmium laser exposure area based on the parameter value range includes: For each of the second holmium laser exposure regions, based on the range of parameter values, the region parameters of the second holmium laser exposure region are determined.
9. The method according to claim 2, characterized in that, The original recovery model was pre-built through the following steps: Obtain the pre-built initial recovery model and reduce the base number of the initial recovery model to obtain the original recovery model.
10. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to cause the at least one processor to perform the image restoration method as described in any one of claims 1-9.