Image enhancement method and device, electronic equipment and storage medium
Patent Information
- Application Number
- CN202611136838.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-29
- Publication Date
- 2026-10-27
AI Technical Summary
[0003]本发明提供了一种图像增强方法、装置、电子设备及存储介质,以解决对X射线图像处理灵敏度低的问题
[0008]本发明实施例的技术方案,通过第一模型对第一图像进行特征提取及空间解耦,得到第一向量;通过第二模型对第一向量进行特征修正,得到第二向量;对第二向量进行特征增强,得到第二图像。该方法通过对第一图像进行特征提取及空间解耦,构建了高精度、可解释、非均匀噪声的新型隐向量表征体系,通过第二模型对第一向量进行修正,能够加强非噪声区域及去除噪声区域的噪声,在对去噪后的第二向量进行特征增强,强化细节特征,从而使得获取的第二图像能够精准的表征X射线图像中目标设备的复杂特征,以满足X射线图像的处理需求。
Smart Images

Figure CN122989446A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more particularly to image enhancement methods, apparatus, electronic devices, and storage media. Background Technology
[0002] Industrial X-ray inspection technology, as a key means of modern non-destructive testing, is widely used in high-end manufacturing fields such as new energy batteries, electronic semiconductors, automobile manufacturing, and aerospace. However, in practical industrial applications, due to factors such as X-ray source power limitations, detector sensitivity constraints, differences in the material of the inspected object, and complex geometric structures, the acquired X-ray images generally face the following core challenges: Computational efficiency: Original pixel space operations are extremely complex at high resolutions; Compressed latent space operations significantly reduce computational load. Task generalization: Single-task design, multiple tasks require maintaining multiple independent models; Unified multi-task conditional embedding, single-model multi-task cross-model alignment: Simple concatenation of VAE and diffusion models leads to feature misalignment; LatentBridge bidirectional attention alignment. X-ray specificity: General image enhancement, unmodeled X-ray physical noise; XNAP physical noise modeling, SNR adaptive calibration. High-frequency detail fidelity: MSE loss leads to oversmoothing and loss of texture details; Perceptual loss + frequency domain regularization + frequency domain enhancement branch fine-tuning stability: Full fine-tuning easily leads to catastrophic forgetting; Residual gating progressive fine-tuning strategy. Summary of the Invention
[0003] This invention provides an image enhancement method, apparatus, electronic device, and storage medium to solve the problem of low sensitivity in X-ray image processing.
[0004] According to one aspect of the present invention, an image enhancement method is provided, comprising: A first vector is obtained by extracting features and spatially decoupling the first image using a first model. The first model is configured with a denoising module, a dual-path encoder, a deconstruction model, and a perceptual fidelity decoder. The denoising module is used to perform affine correction and scattering correction on the first image. The dual-path encoder is used to obtain image features from two dimensions: global structure and local texture. The deconstruction model is used to deconstruct the image features obtained by the dual-path encoder into a preset number of subspaces. The perceptual fidelity decoder is configured with cross-layer skip connections and multi-scale perceptual loss. The first image is an X-ray image obtained after normalization. The first vector is modified using a second model to obtain a second vector; the second model is configured with a first mechanism; the first mechanism includes: forward alignment and backward alignment; the forward alignment is to encode the first vector and preset features into key values and perform feature extraction; the backward alignment is to use the second vector as a key value to feed back the features contained in the first vector; The second vector is then augmented to obtain the second image.
[0005] According to another aspect of the present invention, an image enhancement apparatus is provided, comprising: A first vector determination module is used to extract features and spatially decouple a first image using a first model to obtain a first vector. The first model is configured with a denoising module, a dual-path encoder, a deconstruction model, and a perceptual fidelity decoder. The denoising module is used to perform affine correction and scattering correction on the first image. The dual-path encoder is used to obtain image features from two dimensions: global structure and local texture. The deconstruction model is used to deconstruct the image features obtained by the dual-path encoder into a preset number of subspaces. The perceptual fidelity decoder is configured with cross-layer skip connections and multi-scale perceptual loss. The first image is an X-ray image obtained after normalization. The second vector determination module is used to perform feature correction on the first vector through a second model to obtain a second vector; the second model is configured with a first mechanism; the first mechanism includes: forward alignment and backward alignment; the forward alignment is to encode the first vector and preset features into key values and perform feature extraction; the backward alignment is to use the second vector as a key value to feed back the features contained in the first vector; The second image determination module is used to perform feature enhancement on the second vector to obtain the second image.
[0006] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and 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 enable the at least one processor to perform the image enhancement method according to any embodiment of the present invention.
[0007] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the image enhancement method according to any embodiment of the present invention.
[0008] The technical solution of this invention involves extracting features and spatially decoupling a first image using a first model to obtain a first vector; modifying the first vector using a second model to obtain a second vector; and enhancing the features of the second vector to obtain a second image. This method constructs a novel latent vector representation system with high precision, interpretability, and non-uniform noise by extracting features and spatially decoupling the first image. Modifying the first vector using the second model strengthens noise in non-noise areas and removes noise from noise areas. Enhancement of the denoised second vector enhances detailed features, thereby enabling the acquired second image to accurately represent the complex features of the target device in the X-ray image, meeting the processing requirements of X-ray images.
[0009] It should be understood that the description in this section is not intended to identify key or essential 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
[0010] 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.
[0011] Figure 1 A flowchart of an image enhancement method provided in an embodiment of the present invention; Figure 2 A flowchart illustrating the processing logic of a first model provided in an embodiment of the present invention; Figure 3 A flowchart illustrating the processing logic of a second model provided in an embodiment of the present invention; Figure 4 A flowchart illustrating the processing logic of a third model provided in an embodiment of the present invention; Figure 5 The image shows the processing result of a low-light enhancement task provided in an embodiment of the present invention. Figure 6 The image shows the processing result of a super-resolution denoising task provided in an embodiment of the present invention. Figure 7 The image shows the processing result of a high dynamic range mapping task provided in an embodiment of the present invention. Figure 8 This is a schematic diagram of the structure of an image enhancement device provided in an embodiment of the present invention; Figure 9 A schematic diagram of the structure of an electronic device for implementing the image enhancement method of this embodiment of the invention. Detailed Implementation
[0012] 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.
[0013] 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 the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a 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.
[0014] In one embodiment, Figure 1 This is a flowchart of an image enhancement method provided by an embodiment of the present invention. This embodiment is applicable to the processing of X-ray images. The method can be executed by an image enhancement device, which can be implemented in hardware and / or software. The image enhancement device can be configured in any electronic device with network communication capabilities. Figure 1 As shown, the method includes: S110. The first image is subjected to feature extraction and spatial decoupling by the first model to obtain the first vector; the first model is configured with a denoising module, a dual-path encoder, a deconstruction model and a perceptual fidelity decoder; the denoising module is used to perform affine correction and scattering correction on the first image; the dual-path encoder is used to obtain image features from two dimensions: global structure and local texture; the deconstruction model is used to deconstruct the image features obtained by the dual-path encoder into a preset number of subspaces; the perceptual fidelity decoder is configured with cross-layer skip connections and multi-scale perceptual loss; the first image is an X-ray image obtained after normalization.
[0015] The first model architecture can be: an improved VAE.
[0016] The deconstruction model employs a cosine scheduling strategy with dynamic β; the perceptual fidelity decoder is configured with cross-layer skip connections and multi-scale VGG perceptual loss.
[0017] Specifically, the original X-ray image is acquired and normalized to obtain the first image. The first image is then denoised, and a dual-path encoder is used to extract global structural information and local texture information to obtain the first feature. The first feature is spatially deconstructed using a deconstruction model to obtain a structure subspace vector, a texture subspace vector, and a noise subspace vector. These vectors are then combined, and a perceptual fidelity decoder is used to perform hierarchical feature fusion to obtain the first vector.
[0018] Further, the specific steps of the denoising process are as follows: The first image is convolved channel-by-channel using a corrected convolution kernel to eliminate the fixed deviations in the detector's column and row directions, resulting in an intermediate image. Low-frequency scattering components are extracted from the intermediate image using a scattering convolution kernel to obtain a scattering component map, which is then subtracted from the intermediate image.
[0019] The original X-ray image is an image obtained by taking a picture of the target object using an X-ray source.
[0020] The target products are industrial parts for high-end manufacturing sectors such as new energy batteries, electronic semiconductors, automobile manufacturing, and aerospace.
[0021] Furthermore, after obtaining the first vector, the process also includes: reconstructing the first image to obtain the fifth image.
[0022] The perceptual fidelity decoder is equipped with cross-layer skip connections and multi-scale VGG perceptual loss.
[0023] The multi-scale VGG perception loss is configured with a preset loss function. Further, the preset loss function is expressed as: .
[0024] in, For frequency domain regularization; For multi-scale VGG sensing loss; Basic pixel reconstruction loss; This is to decouple the latent space regularization term.
[0025] in, This is used to constrain the reconstruction accuracy of high-frequency details by comparing the DCT spectrum differences between the first and second images, and to prevent oversmoothing caused by low-frequency bias.
[0026] in, This is used to constrain the overall grayscale, brightness, and large-area low-frequency base alignment of the first and fifth vectors, ensuring that the features have no global brightness shift or large-area color block distortion.
[0027] For example, such as Figure 2 As shown, the first model processing step involves denoising the first image, i.e., the original X-ray image in the figure. After denoising, dual-path feature extraction is performed: a global structure encoding path to obtain global structure information and a local texture encoding path to extract local texture information. The obtained global structure information and local texture information are then fused. Adaptive latent space regularization is then applied to deconstruct the features. Finally, the deconstructed features are fused hierarchically using a perceptual fidelity encoder to obtain the first vector. Image reconstruction is then performed on the first vector to obtain the fifth image.
[0028] Furthermore, the specific steps of hierarchical feature fusion in the perceptual fidelity encoder are as follows: the acquired subspace vector is directly fed to the corresponding resolution level of the decoder, and fused with the decoder upsampled features channel by channel, that is, the structural subspace vector is fused... Provides large-scale structural jump features to ensure that the object outline and overall composition are not distorted; for texture subspace vectors Provides fine-grained, high-frequency jump features to supplement edge, texture, and minute material details; for noise subspace vectors It does not participate in skip connections, but is only embedded in the middle layer of the decoder as a global condition to regulate the noise texture of the reconstructed graph.
[0029] S120. The second vector is obtained by modifying the features of the first vector through the second model; the second model is configured with a first mechanism; the first mechanism includes: forward alignment and backward alignment; forward alignment is to encode the first vector and preset features into key values and perform feature extraction; backward alignment is to use the second vector as the key value to feed back the features contained in the first vector.
[0030] Specifically, the first vector is mapped to the Transformer's model dimension according to the mapping formula to obtain the third vector. The third vector is then divided into regions to obtain feature blocks. A noise weight mask is generated based on the feature information within the feature blocks. Noise removal is performed based on the obtained noise weight mask and a preset noise mask to obtain the fourth vector. The fourth vector is then semantically aligned using the first mechanism, followed by feature fine-tuning to obtain the second vector.
[0031] The mapping formula is expressed as: Where z is the first vector; This is the third vector; scale and shift are embedded by the task. The spatial transformation parameters are dynamically generated using a lightweight MLP, and different tasks correspond to different parameters.
[0032] The above steps are implemented through a second model, and the architecture of the second model can be LatentBridge.
[0033] Furthermore, the second model includes: a task-aware latent space mapping layer, a signal-to-noise ratio adaptive noise calibration layer (SNR adaptive noise calibration layer), a cross-stage bidirectional feature alignment attention, and a learnable residual gating fine-tuning mechanism. Specifically, the task-aware latent space mapping layer maps the first vector to the Transformer's model dimensions; the SNR adaptive noise calibration layer generates a preset noise mask based on the fourth image and uses this mask as an additional condition to denoise the third vector; the cross-stage bidirectional feature alignment attention performs semantic alignment on the fourth vector using the first mechanism; and the learnable residual gating fine-tuning mechanism performs feature fine-tuning on the aligned fourth vector.
[0034] For example, such as Figure 3 As shown, the third model obtains the first vector generated by the first model and acquires the first task. Based on the first task, the task-aware latent space mapping layer maps the first vector to the model dimension of the Transformer, obtaining the third vector. The SNR adaptive noise calibration layer generates a noise weight mask based on the third vector and combines it with a preset noise mask generated from the fourth image to denoise, obtaining the fourth vector. Cross-stage bidirectional feature alignment attention is used to semantically align the fourth vector through the first mechanism; the learnable residual gating fine-tuning mechanism is used to fine-tune the features of the aligned fourth vector, obtaining the second vector, i.e., the modulation latent vector in the figure.
[0035] S130. Perform feature enhancement on the second vector to obtain the second image.
[0036] Specifically, features are extracted from the second vector using the first window to obtain the fifth vector. A 2D DCT transform is applied to the fifth vector for feature separation, yielding the first and second sub-vectors. The first and second sub-vectors are then nonlinearly mapped using an MLP and transformed in the frequency domain using an inverse 2D DCT to obtain at least one seventh vector. The at least one seventh vector is weighted with the fifth vector to obtain the sixth vector. Based on the first task vector and noise level embedding, the latent features of the sixth vector are jointly modulated using cross-attention, and feature reconstruction is performed to obtain the second image.
[0037] Furthermore, the process of obtaining the first window is as follows: the gradient changes between each element of the first vector are obtained to determine the gradient magnitude within the preset window, and the preset window is expanded or shrunk according to the obtained gradient magnitude to obtain the first window.
[0038] Furthermore, the above steps are implemented through a third model.
[0039] The third model can be an improved Diffusion Transformer network.
[0040] Furthermore, such as Figure 4 As shown, the third model includes: an adaptive denoising time step scheduler, which dynamically generates different iteration time steps based on different noise regions of the second vector; and a feature enhancement unit, which performs feature enhancement and cross-validation on the second vector based on the time step.
[0041] Furthermore, the feature enhancement unit includes: a sparse local self-attention subunit, a frequency domain enhancement parallel branch, a task-conditional adjustment feedforward network, and a task × noise cross-attention subunit. Specifically, the sparse local self-attention subunit determines the first window based on the second vector and performs denoising based on the first window to obtain the fifth vector; the frequency domain enhancement parallel branch enhances the features of the second vector to obtain the seventh vector. The task-conditional adjustment feedforward network normalizes and performs residual connections on the fifth and seventh vectors. The task × noise cross-attention subunit generates the second image based on the sixth vector and the first task vector through cross-attention joint processing.
[0042] Furthermore, the improved VAE, the improved Diffusion Transformer network, and LatentBridge employ a progressively unfreezing training strategy. This involves three steps: Step 1: Improve VAE by pre-training it separately on millions of industrial X-ray data to minimize perception fidelity loss and ensure mature and stable high-fidelity reconstruction capability of latent space.
[0043] Step 2: Freeze the improved VAE, connect it to the LatentBridge and improved Diffusion Transformer networks, and perform conditional training of the diffusion model on multi-task labeled data. The loss function is: Step 3: Unfreeze the entire network for end-to-end joint fine-tuning, and implement learnable gating of LatentBridge. Fully activated at this stage, through joint losses The parameters of the three modules are optimized in a coordinated manner to achieve the optimal balance of the overall system in industrial X-ray multi-task enhancement.
[0044] Furthermore, to better meet the real-time or near-real-time application requirements of industrial applications in acquiring the second image, several acceleration strategies are employed during the inference process. First, a step-size skip sampling strategy is used to reduce the total inference steps T from 1000 to 50 or 100, achieving rapid sampling through DDIM (Denoising Diffusion Implicit Models) or similar methods while maintaining generation quality. Second, computationally intensive modules are migrated to high-performance parallel computing hardware (such as GPUs), using mixed-precision computation (a combination of FP16 and FP32) to reduce the computational burden. Third, network weights are quantized and pruned to reduce model size and computational load while maintaining accuracy.
[0045] The above steps reduce the processing latency of 768*768 resolution industrial X-ray images on consumer-grade GPUs (such as RTX 4070 Super) to within 100ms, meeting the latency requirements of industrial inspection pipelines.
[0046] Furthermore, the proposed solution was evaluated on three types of industrial X-ray low-level vision tasks: low-light enhancement (LL), super-resolution denoising (SRDN, 2× super-resolution), and high dynamic range mapping (HDR). The test set images came from three industrial scenarios: new energy batteries, automotive castings, and electronic components. The evaluation results are shown in Table 1.
[0047] Table 1 Quantitative Assessment Results Furthermore, such as Figure 5 The image shows a comparison of X-ray image enhancement effects for a nine-layer wound pouch lithium battery in low-light conditions. It can be seen from the image that edge features have been enhanced. Figure 6 The image shows the processing results of the super-resolution denoising task. As can be seen from the image, some detailed information has become lighter in color; for example... Figure 7 As shown in the figure, the processing results of the high dynamic range mapping task are enhanced. As can be seen from the figure, the edge and texture details are enhanced.
[0048] Optionally, feature extraction and spatial decoupling are performed on the first image using the first model to obtain the first vector, including steps A1-A4: Step A1: Denoise the first image to obtain the third image.
[0049] The first image contains three main types of noise: quantum Poisson noise, which is inversely proportional to the photon count and is particularly noticeable in low-dose dark areas; fixed pattern noise, which comes from the non-uniformity of the detector pixel response; and scattering artifacts, which are low-frequency diffuse noise generated by multiple scattering of X-rays inside the object.
[0050] Specifically, the first image is convolved channel by channel using a corrected convolution kernel to eliminate fixed deviations in the column and row directions of the detector, resulting in an intermediate image. Low-frequency scattering components are extracted from the intermediate image using a scattering convolution kernel to obtain a scattering component map. This scattering component map is then subtracted from the intermediate image to obtain the third image.
[0051] Furthermore, the denoising process for the first image also includes: estimating the Poisson noise intensity parameter of each pixel in the first image using a first convolution kernel to obtain a first parameter; and generating a noise intensity map based on the first parameter to obtain a fourth image.
[0052] Furthermore, the fourth image is passed as a conditional signal to the SNR calibration layer of the LatentBridge and the time-step scheduler of the diffusion Transformer.
[0053] Furthermore, the above steps are implemented by the XNAP module. The XNAP module consists of three learnable sub-networks: a quantum noise estimation sub-network, a detector response correction sub-network, and a scattering and diffusion separation sub-network.
[0054] Among them, the quantum noise estimation subnetwork is used to model the first image and estimate the photon shot noise (quantum noise), distinguish between quantum noise, detector readout noise and speckle signal formed by scattering, generate the fourth image, and provide accurate noise priors for subsequent noise reduction.
[0055] Among them, the detector response correction subnetwork is used to compensate for the systematic distortion introduced by the photodetector hardware in the first image and eliminate the contamination of the first pattern by the non-ideal response of the device; Among them, the scattering and diffuse separation sub-network is used to separate the ballistic light (target effective signal) and diffuse scattered light (stray background) in the light field of the intermediate image, solve the inverse scattering problem, reconstruct the original first image, and obtain the third image.
[0056] Step A2: Perform dual-path feature extraction on the third image to obtain the first feature.
[0057] Specifically, the third image is processed by a dual-path encoder to extract global structural information and local texture information, and then feature fusion is performed to obtain the first feature.
[0058] Among them, the global structural information represents the attenuation gradient distribution and overall contrast level of different material regions of the target object in the third image.
[0059] Among them, local texture information represents the microcrack edges, bubble outlines, and weld details of the target object in the third image.
[0060] Furthermore, the dual-path encoder is split into two independent streams: a global structure path and a local texture path. The global structure path employs multi-scale dilated convolutions (dilation rates = 1, 2, 4, 8) to capture the attenuation gradients and overall contrast distribution of materials with different thicknesses using a large receptive field. The local texture path uses dense residual convolutions combined with directional Sobel high-frequency enhancement filtering to focus on extracting sub-pixel-level details such as microcracks and bubble edges. The two feature streams are then adaptively fused using channel attention gating (a variant of SENet). The gating weights are dynamically allocated based on the local signal-to-noise ratio (SNR) to ensure that low SNR regions are dominated by structural features and high SNR regions are dominated by texture features.
[0061] Step A3: Perform spatial deconstruction and feature fusion on the first feature to obtain the first vector; the first vector consists of a structure subspace vector, a texture subspace vector, and a noise subspace vector.
[0062] Specifically, the first feature is spatially deconstructed and feature fused by the deconstruction model to obtain the structure subspace vector, texture subspace vector and noise subspace vector. The structure subspace vector, texture subspace vector and noise subspace vector are then fused by a perceptual fidelity encoder to obtain the first vector.
[0063] The deconstruction model is a cosine scheduling strategy for dynamic β.
[0064] Furthermore, the training process of the deconstruction model is as follows: First, set the target value and initial value of β. The deconstruction model learns the global structural features and local texture features of the first historical feature. As the number of training steps increases, β is increased steadily. While ensuring the global structural features and local texture features learned in the previous step, the deconstruction model begins to gradually adjust the structural subspace vector. Texture subspace vector and noise subspace vector The distribution of β approximates the standard normal prior; when the number of training steps approaches the preset training rounds, β approaches the target value and remains constant, and the deconstructed model forces the structure of the subspace vector. Texture subspace vector The posterior distribution approximates the standard normal distribution, constraining the noise subspace vector. Eliminate the extreme discrete distribution in the noise subspace vector while preserving the complete statistical characteristics of the noise.
[0065] Optionally, the first image is denoised to obtain the third image, including steps B1-B2: Step B1: Determine the first parameter for the first image using the first convolution kernel, and generate the fourth image based on the first parameter; the first parameter is the noise intensity parameter corresponding to the pixel in the first image; the fourth image is used to characterize the noise intensity of the first image, and is used as a conditional signal when the second model corrects the first vector.
[0066] The first convolution kernel is a 3×3 convolution kernel. The reason for choosing it is that Poisson noise only fluctuates in a very small neighborhood of a single pixel, and the 3×3 receptive field just covers the local gray-scale distribution around the central pixel, which is sufficient to count photon fluctuations.
[0067] The fourth image is denoted as N_map, and has 1 output channel.
[0068] Specifically, the Poisson noise intensity parameter of each pixel in the first image is estimated using the first convolution kernel to obtain the first parameter. A noise intensity map is then generated based on the first parameter to obtain the fourth image.
[0069] Specifically, the first parameter is obtained as follows: Pixel boundaries are padded on the normalized first image to ensure that each pixel can completely capture a neighborhood of the size of the first convolution kernel. Mean convolution is performed on the padded image according to the first convolution kernel to obtain the first feature; Laplacian convolution is performed on the padded image according to the first convolution kernel to obtain the second feature. The unbiased variance of the degrees of freedom is calculated for each 3×3 neighborhood. Pixel intensity is estimated based on the first feature, the second feature, and the unbiased variance of the degrees of freedom to obtain the first parameter.
[0070] The first parameter can be expressed as: .in, The degree of freedom is unbiased variance; G is the second characteristic, representing the neighborhood structure strength; The first feature is used to characterize the initial estimate of the local average light intensity.
[0071] Furthermore, the above steps are implemented through a quantum noise estimation sub-network. This sub-network is used to predict the first parameter pixel-by-pixel and generate the fourth image. The quantum noise estimation sub-network uses a 3×3 convolutional kernel and consists of three layers: First layer: 3×3 Conv+BN+ReLU, extracting local gray-level fluctuation features, i.e., the first feature; Middle layer: repeating 1-2 layers of 3×3 lightweight convolutions to compress features and learn the mapping relationship between noise and gray level, i.e., the second feature; Output layer: 3×3 Conv+Sigmoid / Softplus activation, outputting the fourth image.
[0072] Step B2: Perform affine correction and scattering correction on the first image to obtain the third image.
[0073] The second convolution kernel includes a correction convolution kernel and a scattering convolution kernel.
[0074] Specifically, the first image is convolved channel by channel using a corrected convolution kernel to eliminate fixed deviations in the column and row directions of the detector, resulting in an intermediate image. Low-frequency scattering components are extracted from the intermediate image using a scattering convolution kernel to obtain a scattering component map. This scattering component map is then subtracted from the intermediate image to obtain the third image.
[0075] Among them, the fixed deviation in the row direction is: the uniform shift of the readout circuit, circuit gain, and dark current generated by the imaging detector in the same row of pixels in the first image, resulting in horizontal bright and dark stripes appearing in the entire first image.
[0076] The column direction fixed deviation is caused by the inconsistent background response of each column of photosensitive units due to the manufacturing process of the imaging detector pixel array, which results in vertical fixed dark lines and column offset in the first image.
[0077] The correction kernel is a 1×1 kernel.
[0078] The size of the scattering convolution kernel can be chosen from 11×11 to 17×17. The reason for this choice is that only when the receptive field covers a large area can the scattering substrate that changes slowly with respect to the first image be fitted.
[0079] Furthermore, the acquisition of intermediate images is processed through a detector response correction sub-network. This network employs multiple stacked 1×1 convolutional layers to decompose errors generated by the imaging detector. Specifically: the first 1×1 convolutional layer: after coarse correction and normalization, the global column direction of the first image is fixedly offset, learning the basic dark bias of each column of photosensitive units; the intermediate 1×1 convolutional layer: after fine correction and normalization, the gain difference of the row pixel readout circuits in the first image is corrected, compensating for the brightness difference caused by horizontal stripes; each convolutional layer is followed by a normalization layer to constrain the pixel value range, avoiding grayscale overflow, overexposure, or underexposure after correction.
[0080] Furthermore, the acquisition of the third image is processed through a scattering and diffuse separation sub-network. The scattering and diffuse separation sub-network includes: a first layer: a scattering convolution kernel, used to initially capture the contour of a large-area diffuse fog layer; a middle layer: a scattering convolution kernel of the same size, used to further filter out object edges, textures, and local noise, and purify the pure low-frequency scattering substrate; and an output layer: an activation constraint, used to ensure that the gray level of the scattering substrate is non-negative, and a non-negative activation function is applied to obtain a scattering component map of the same size and channel as the original image.
[0081] Optionally, the first vector can be modified using a second model to obtain a second vector, including steps C1-C3: Step C1: Perform feature mapping on the first vector to obtain the third vector.
[0082] Specifically, the first vector is mapped to the model dimension of the Transformer according to the mapping formula to obtain the third vector.
[0083] The mapping formula is expressed as: .
[0084] Furthermore, before performing feature mapping on the first vector to obtain the third vector, the process includes: generating a first task based on the processing requirements of industrial X-ray images. The first task includes: low-light enhancement, super-resolution denoising, and high dynamic range mapping. Step C2: Denoise the third vector using a preset noise mask to obtain the fourth vector.
[0085] The preset noise mask is obtained from the fourth image.
[0086] Specifically, the third vector is divided into regions to obtain feature blocks. A noise weight mask is generated based on the feature information within the feature blocks. Noise is removed based on the obtained noise weight mask and a preset noise mask to obtain the fourth vector.
[0087] Furthermore, the specific steps for obtaining the feature blocks are as follows: the third vector is divided into non-overlapping blocks to obtain local feature blocks; the mean and standard deviation of each local feature block are calculated; and the local feature blocks are then classified according to their noise state based on industrial imaging characteristics to obtain the feature blocks.
[0088] Among them, the industrial imaging characteristics are: high SNR blocks correspond to low-noise areas with clear textures and transparent thin workpieces, while low SNR blocks correspond to areas with severe attenuation and dense noise in thick workpieces.
[0089] Among them, the block mean represents the effective structure and texture signal amplitude of the local region, and the block standard deviation represents the degree of random noise fluctuation and residual distortion in the region.
[0090] Furthermore, the noise weight mask acquisition process involves using a lightweight mapping network and bilinear interpolation to restore the discrete block-level SNR mean and standard deviation to a spatially continuous single-channel noise weight mask that is completely consistent with the latent vector resolution.
[0091] Furthermore, the specific denoising steps are as follows: high SNR blocks are forced to conform to the standard normal prior by using high mask values, ensuring the continuity and sampleability of the latent space; low SNR blocks are noise-removed by using low mask values, while retaining weak defect details and effective texture signals. Furthermore, a preset noise mask is used as an additional reference during the processing.
[0092] Step C3: Perform semantic alignment and image reconstruction on the fourth vector to obtain the second vector.
[0093] Specifically, the fourth vector is semantically aligned using the first mechanism, then its features are fine-tuned, and the fine-tuned feature vector is used for image reconstruction to obtain the second vector.
[0094] Furthermore, the first mechanism can be a bidirectional cross-attention alignment mechanism. This mechanism includes: forward alignment: using the fourth vector as the query and the initial position encoding features of the Diffusion Transformer as the key / value pair. The core purpose is to allow the features in the fourth vector to actively match the input representation paradigm of the diffusion model, reconstructing VAE features according to the Transformer's feature extraction rules, eliminating feature distribution differences from the source, and ensuring that the fourth vector features conform to the iterative computation logic of the diffusion model; and backward alignment: using the features of the Diffusion intermediate layer as the query and the fourth vector as the key / value pair, continuously extracting structural and texture detail information from the fourth vector throughout the entire feature update process of the diffusion model, and injecting it back into the diffusion feature stream to compensate for the fine imaging details that are easily lost during the diffusion model iteration process, thus constraining the structural accuracy of the generated results.
[0095] The above steps demonstrate that the bidirectional cross-attention alignment mechanism significantly reduces the feature misalignment problem between two independent pre-trained models, and is key to the convergence of joint fine-tuning.
[0096] Among them, feature fine-tuning adopts a learnable residual gating fine-tuning mechanism.
[0097] Furthermore, the training steps of the learnable residual gating fine-tuning mechanism are as follows: a learnable residual gating coefficient α is introduced into LatentBridge, initialized to 0. In the early stage of training, the residual transformation weights of LatentBridge are completely masked, and the bridging module is equivalent to the identity connection freezing all backbone parameters of the improved VAE and the improved Diffusion Transformer network. Only the LatentBridge module parameters are unfrozen and optimized. As the training steps iterate, the learnable coefficient α is gradually updated from 0 to a non-zero value, and the residual transformation capability of LatentBridge is slowly activated, gradually intervening in feature bridging, alignment, and calibration tasks. After domain adaptation is completed and the basic performance of the model is stable, all backbone parameters of the improved VAE and the improved Diffusion Transformer network are improved to achieve end-to-end joint fine-tuning of the entire model.
[0098] Optionally, feature enhancement is performed on the second vector to obtain the second image, including steps D1-D3: Step D1: Determine the first window based on the second vector, and perform feature perception on the second vector based on the first window to obtain the fifth vector.
[0099] The first window can automatically expand or shrink based on the local magnitude of the second vector.
[0100] Specifically, the gradient changes between the elements of the second vector are obtained to determine the gradient magnitude within a preset window. The preset window is then expanded or shrunk based on the obtained gradient magnitude to obtain a first window. Features are extracted from the second vector based on the first window to obtain a fifth vector.
[0101] The preset window is set in advance based on experience.
[0102] Furthermore, the first window is obtained as follows: if the gradient magnitude change within the obtained preset window is greater than the preset magnitude, the window area is considered to be a high-frequency area such as a defect edge, and the preset window is shrunk; if the gradient magnitude change within the obtained preset window is less than or equal to the preset magnitude, the window area is considered to be a smooth background area, and the preset window is expanded.
[0103] The above steps can maintain The linear complexity also endows the model with the ability to perceive the anisotropy of industrial textures.
[0104] Furthermore, before determining the first window based on the second vector and performing feature perception on the second vector based on the first window to obtain the fifth vector, the process includes: converting the first task into a first task vector. We employ a learnable task identifier embedding and image quality-aware features (extracted through a lightweight quality assessment network) concatenated and injected into the AdaLN-Zero normalization of each layer of the improved DiffusionTransformer network. This enables a single network parameter set to serve multiple tasks, avoiding the need to maintain an independent model for each task.
[0105] Furthermore, before determining the first window based on the second vector and performing feature perception on the second vector based on the first window to obtain the fifth vector, the method further includes: acquiring noise time steps, specifically: calculating the local variance map of the first vector, allocating a first preset number of first noise time steps in regions with large variance (high noise), and allocating a second preset number of second noise time steps in smooth regions, significantly improving the recovery quality of high noise regions under the constraint of a constant total number of inference steps. The first preset number and the second preset number are dynamically adjusted according to the magnitude of the variance.
[0106] Step D2: Perform frequency domain transformation and nonlinear enhancement on the second vector, and weight it with the fifth vector to obtain the sixth vector.
[0107] Specifically, a 2D DCT transform is applied to the second vector for feature separation, and the fifth vector is converted to the frequency domain to obtain the first and second sub-vectors. The first and second sub-vectors are then nonlinearly mapped using MLP and converted to the frequency domain using inverse 2D DCT to obtain at least one seventh vector. The at least one seventh vector is weighted with the fifth vector to obtain the sixth vector.
[0108] Step D3: Generate the second image based on the sixth vector and the first task vector; the first task vector is the condition vector obtained after encoding the first task.
[0109] Specifically, the latent features of the sixth vector are jointly modulated by cross-attention based on the first task vector and noise level embedding, and the obtained latent vector is used for image reconstruction to obtain the second image.
[0110] Wherein, the noise level is embedded in e t The noise time steps are obtained by embedding and encoding. The first noise time step corresponds to the high noise state, i.e., the image structure is incomplete and the noise is dense; the second noise time step corresponds to the low noise state, i.e. the image substrate is complete and only minor adjustments are needed.
[0111] Furthermore, the specific method for modulating the latent features of the sixth vector is as follows: The latent features of the sixth vector are modulated according to the latent feature modulation method. Specifically, if the current noise time step is high noise, the cross-attention weights will adaptively focus on activating the global structure, contour, and lighting base repair features within the sixth vector, suppressing unnecessary fine-tuning of details, prioritizing the completion of the missing global composition information, overall brightness distribution, and large-scale structural information in the low sixth vector, and ignoring minor texture deviations; if the current noise time step is low noise, the cross-attention weights will dynamically transfer the sixth vector to fine features such as brightness equalization, texture refinement, color calibration, and local light and shadow transitions, without modifying the global structure, focusing on the latent features representing low-light areas in the sixth vector to perform brightness fine-tuning, light and dark transition optimization, and detail brightening.
[0112] Furthermore, the process of obtaining the latent feature modulation method is as follows: embedding the noise level into e through linear projection. t and task-aware embedding task Mapped to the same latent feature dimension space. For the mapped e t and c task Element-wise fusion and feature activation are performed to generate task-noise joint query features. An attention similarity matrix is constructed between the task-noise joint query features and the latent features of the sixth vector. The response weights of different spatial locations to the "task + stage" condition are quantified. The latent features are weighted and aggregated according to the similarity weights, and the adaptive latent features after dual-condition joint modulation are output.
[0113] Optionally, the second vector is subjected to frequency domain transformation and nonlinear enhancement, and then weighted with the fifth vector to obtain the sixth vector, including steps E1-E3: Step E1: Separate the features of the fifth vector to obtain the first sub-vector and the second sub-vector; the first sub-vector is the feature information representing the overall contrast within the fifth vector; the second sub-vector represents the feature information representing the texture details within the fifth vector.
[0114] Specifically, a 2D DCT transformation is applied to the fifth vector to perform feature separation, resulting in the first sub-vector and the second sub-vector.
[0115] Furthermore, the first subvector and the second subvector are represented as follows: in, The first subvector represents the first subvector; the second subvector includes: , These represent the vertical structural components, horizontal structural components, and diagonal structural components, respectively.
[0116] Step E2: Perform nonlinear mapping on the first sub-vector and the second sub-vector respectively, and perform inverse frequency domain transformation to obtain at least one seventh vector.
[0117] Specifically, the first and second sub-vectors are nonlinearly mapped using MLP and then frequency-domain transformed using 2D DCT inverse transform to obtain at least one seventh vector.
[0118] MLPs include low-frequency MLPs and high-frequency MLPs.
[0119] Furthermore, the low-frequency MLP processes the first sub-vector in the following ways: the low-frequency MLP mines the hidden layer correlation of the global grayscale shift and illumination deviation of the first sub-vector through dimensionality increase transformation based on the first task vector, and then optimizes the low-frequency amplitude distribution through dimensionality reduction reconstruction.
[0120] Furthermore, the high-frequency MLP processes the second sub-vector in the following ways: Based on the first task vector, the high-frequency MLP accurately distinguishes between "effective texture / defect high-frequency signals" and "invalid noise high-frequency disturbances" through nonlinear fitting: it enhances the amplitude and sharpens the features of the high-frequency coefficients corresponding to real industrial textures and defect edges to repair the fine details that are naturally missing in the Transformer's self-attention; and it moderately suppresses the irregular high-frequency noise coefficients to avoid the pseudo-textures and noise introduced by frequency domain enhancement.
[0121] Step E3: Weight at least one seventh vector and weight it together with the fifth vector to obtain the sixth vector.
[0122] Specifically, at least one seventh vector is matched with a corresponding weight value, and then normalized and residually connected with the fifth vector to obtain the sixth vector.
[0123] The technical solution of this embodiment involves extracting features and spatially decoupling the first image using a first model to obtain a first vector; modifying the first vector using a second model to obtain a second vector; and enhancing the features of the second vector to obtain a second image. This method constructs a novel latent vector representation system with high precision, interpretability, and non-uniform noise by extracting features and spatially decoupling the first image. Modifying the first vector using the second model strengthens noise in non-noise areas and removes noise from noise areas. Enhancing the features of the denoised second vector strengthens detailed features, thereby enabling the acquired second image to accurately represent the complex features of the target device in the X-ray image, meeting the processing requirements of X-ray images.
[0124] Figure 8 This is a schematic diagram of an image enhancement device provided in an embodiment of the present invention. This embodiment is applicable to the processing of X-ray images. The image enhancement device can be implemented in hardware and / or software, and can be configured in any electronic device with network communication capabilities. Figure 8 As shown, the device includes: a first vector determination module 210, a second vector determination module 220, and a second image determination module 230, wherein: First vector determination module 210: used to extract features and spatially decouple the first image through a first model to obtain a first vector; the first model is configured with a denoising module, a dual-path encoder, a deconstruction model and a perceptual fidelity decoder; the denoising module is used to perform affine correction and scattering correction on the first image; the dual-path encoder is used to obtain image features from two dimensions: global structure and local texture; the deconstruction model is used to deconstruct the image features obtained by the dual-path encoder into a preset number of subspaces; the perceptual fidelity decoder is configured with cross-layer skip connections and multi-scale perceptual loss; the first image is an X-ray image obtained after normalization; Second vector determination module 220: used to perform feature correction on the first vector through the second model to obtain the second vector; the second model is configured with a first mechanism; the first mechanism includes: forward alignment and backward alignment; forward alignment is to encode the first vector and preset features into key values and perform feature extraction; backward alignment is to use the second vector as the key value to feed back the features contained in the first vector; Second image determination module 230: used to perform feature enhancement on the second vector to obtain the second image.
[0125] Optionally, the first vector determination module 210 includes: Third image determination unit: used to perform noise reduction processing on the first image to obtain a third image; First feature determination unit: used to perform dual-path feature extraction on the third image to obtain the first feature; First vector determination unit: used to perform spatial deconstruction and feature fusion on the first feature to obtain the first vector; the first vector is composed of structure subspace vector, texture subspace vector and noise subspace vector.
[0126] Optionally, the third image determination unit includes: The first parameter determination subunit is used to determine the first parameter of the first image through the first convolution kernel and generate the fourth image based on the first parameter; the first parameter is the noise intensity parameter corresponding to the pixel in the first image; the fourth image is used to characterize the noise intensity of the first image and is used as a conditional signal when the second model corrects the first vector. The third image determination subunit is used to perform affine correction and scattering correction on the first image to obtain the third image.
[0127] Optionally, the second vector determination module 220 includes: The third vector determination unit is used to perform feature mapping on the first vector to obtain the third vector. The fourth vector determination unit is used to denoise the third vector according to a preset noise mask to obtain the fourth vector. The second vector determination unit is used to perform semantic alignment and image reconstruction on the fourth vector to obtain the second vector.
[0128] Optionally, the second image determination module 230 includes: Fifth vector determination unit: used to determine the first window based on the second vector, and to perform feature perception on the second vector based on the first window to obtain the fifth vector; The sixth vector determination unit is used to perform frequency domain transformation and nonlinear enhancement on the second vector, and to weight it with the fifth vector to obtain the sixth vector; Determining unit: used to generate a second image based on the sixth vector and the first task vector; the first task vector is the condition vector obtained after encoding the first task.
[0129] Optionally, the sixth vector determining unit includes: Sub-vectors determine sub-units: used to separate the features of the fifth vector to obtain the first sub-vector and the second sub-vector; the first sub-vector is the feature information representing the overall contrast within the fifth vector; the second sub-vector represents the feature information representing the texture details within the fifth vector. The seventh vector determines the sub-unit: it is used to perform nonlinear mapping on the first sub-vector and the second sub-vector respectively, and to perform inverse frequency domain transformation to obtain at least one seventh vector; The sixth vector determines the sub-unit: it is used to weight at least one seventh vector and then weight it with the fifth vector to obtain the sixth vector.
[0130] The image enhancement apparatus provided in the embodiments of the present invention can execute the image enhancement method provided in any of the embodiments of the present invention, and has the corresponding functions and beneficial effects of executing the image enhancement method. For details, please refer to the relevant operations of the image enhancement method in the foregoing embodiments.
[0131] In one embodiment, Figure 9 This is a structural block diagram of an electronic device provided in an embodiment of the present invention, such as... Figure 9 The diagram illustrates a schematic representation of an electronic device 10 that can be used to implement embodiments of the present invention. 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.
[0132] like Figure 9 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor 11, and the computer program is executed by the at least one processor 11 to enable the at least one processor 11 to perform the method provided by the present invention.
[0133] The processor 11 can perform various appropriate actions and processes based on a computer program stored in the read-only memory (ROM) 12 or a computer program loaded from the storage unit 18 into the random access memory (RAM) 13. The RAM 13 can 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.
[0134] 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.
[0135] 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, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the methods provided in this invention.
[0136] In some embodiments, the methods provided herein 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 installed 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 methods described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the methods by any other suitable means (e.g., by means of firmware).
[0137] 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 parts (ASSPs), systems-on-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.
[0138] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may 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 performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0139] In the context of this invention, a computer-readable storage medium stores computer instructions that are used to cause a processor to execute and implement the method provided by this invention.
[0140] The present invention also provides a computer program product comprising a computer program that, when executed by a processor, implements the method provided according to embodiments of the present invention. A computer-readable storage medium may 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. The 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, the 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.
[0141] 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).
[0142] 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.
[0143] 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.
[0144] This invention also provides a computer program product, including a computer program that, when executed by a processor, can implement the methods provided in any embodiment of this application.
[0145] In the implementation of the computer program product, computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0146] 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.
[0147] 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 enhancement method, characterized in that, include: The first vector is obtained by extracting features and spatially decoupling the first image using the first model; The first model is configured with a denoising module, a dual-path encoder, a deconstruction model, and a perceptual fidelity decoder; the denoising module is used to perform affine correction and scattering correction on the first image; the dual-path encoder is used to obtain image features from two dimensions: global structure and local texture; the deconstruction model is used to deconstruct the image features obtained by the dual-path encoder into a preset number of subspaces; the perceptual fidelity decoder is configured with cross-layer skip connections and multi-scale perceptual loss; the first image is an X-ray image obtained after normalization. The second vector is obtained by modifying the features of the first vector using the second model; The second model is configured with a first mechanism; The first mechanism includes: forward alignment and backward alignment; the forward alignment involves encoding a first vector and preset features into key values for feature extraction; the backward alignment involves using a second vector as a key value to feed back the features contained in the first vector. The second vector is then augmented to obtain the second image.
2. The method according to claim 1, characterized in that, The step of extracting features and spatially decoupling the first image using the first model to obtain the first vector includes: The first image is denoised to obtain the third image; Dual-path feature extraction is performed on the third image to obtain the first feature; The first feature is spatially deconstructed and feature fused to obtain a first vector; the first vector is composed of a structure subspace vector, a texture subspace vector and a noise subspace vector.
3. The method according to claim 2, characterized in that, The step of denoising the first image to obtain the third image includes: The first image is processed by a first convolution kernel to determine a first parameter, and a fourth image is generated based on the first parameter; the first parameter is the noise intensity parameter corresponding to the pixel in the first image; the fourth image is used to characterize the noise intensity of the first image and is used as a conditional signal when the second model corrects the first vector; Affine correction and scattering correction are performed on the first image to obtain the third image.
4. The method according to claim 1, characterized in that, The step of modifying the first vector using a second model to obtain a second vector includes: Perform feature mapping on the first vector to obtain the third vector; The third vector is denoised using a preset noise mask to obtain the fourth vector; The fourth vector is semantically aligned and the image is reconstructed to obtain the second vector.
5. The method according to claim 1, characterized in that, The step of performing feature enhancement on the second vector to obtain the second image includes: The first window is determined based on the second vector, and the second vector is subjected to feature perception based on the first window to obtain the fifth vector; The second vector is subjected to frequency domain transformation and nonlinear enhancement, and then weighted with the fifth vector to obtain the sixth vector; The second image is generated based on the sixth vector and the first task vector; the first task vector is the condition vector obtained after encoding the first task.
6. The method according to claim 5, characterized in that, The step of performing frequency domain transformation and nonlinear enhancement on the second vector, and then weighting it with the fifth vector to obtain the sixth vector, includes: The fifth vector is feature-separated to obtain a first sub-vector and a second sub-vector; the first sub-vector is feature information representing the overall contrast within the fifth vector; the second sub-vector is feature information representing the texture details within the fifth vector. The first sub-vector and the second sub-vector are subjected to nonlinear mapping and inverse frequency domain transformation respectively to obtain at least one seventh vector; The at least one seventh vector is weighted and then weighted with the fifth vector to obtain the sixth vector.
7. An image enhancement device, characterized in that, include: The first vector determination module is used to extract features and spatially decouple the first image using a first model to obtain a first vector. The first model is configured with a denoising module, a dual-path encoder, a deconstruction model, and a perceptual fidelity decoder; the denoising module is used to perform affine correction and scattering correction on the first image; the dual-path encoder is used to obtain image features from two dimensions: global structure and local texture; the deconstruction model is used to deconstruct the image features obtained by the dual-path encoder into a preset number of subspaces; the perceptual fidelity decoder is configured with cross-layer skip connections and multi-scale perceptual loss; the first image is an X-ray image obtained after normalization. The second vector determination module is used to perform feature correction on the first vector using a second model to obtain a second vector. The second model is configured with a first mechanism; The first mechanism includes: forward alignment and backward alignment; the forward alignment involves encoding a first vector and preset features into key values for feature extraction; the backward alignment involves using a second vector as a key value to feed back the features contained in the first vector. The second image determination module is used to perform feature enhancement on the second vector to obtain the second image.
8. The apparatus according to claim 7, characterized in that, The first vector determination module includes: Third image determination unit: used to perform noise reduction processing on the first image to obtain a third image; First feature determination unit: used to perform dual-path feature extraction on the third image to obtain the first feature; First vector determination unit: used to perform spatial deconstruction and feature fusion on the first feature to obtain a first vector; the first vector is composed of a structure subspace vector, a texture subspace vector and a noise subspace vector.
9. An electronic device, characterized in that, The electronic device includes: At least one processor; and 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 to enable the at least one processor to perform the image enhancement method according to any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the image enhancement method according to any one of claims 1-6.