A visual image enhancement method based on learnable priors and its computer device

By combining deep unfolded networks and masked autoencoders, the illumination, reflectivity, and noise components of underground coal mine images are decomposed and optimized, solving the problems of brightness enhancement and noise suppression in low-light underground environments, and improving clarity and logical traceability.

CN122089588APending Publication Date: 2026-05-26CCTEG COAL MINING RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CCTEG COAL MINING RES INST
Filing Date
2025-12-29
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing image enhancement methods struggle to simultaneously improve brightness, equalize illumination, remove suspended dust noise, and maintain clear image edge textures in the low-light environment of underground coal mines, and also suffer from artifacts and noise amplification issues.

Method used

A deep unfolded network architecture is adopted, combined with the prior knowledge of masked autoencoder (MAE), to decompose the image into illumination, reflectivity and noise components. The image is enhanced through an iterative optimization process, and a gradient regularization mechanism is introduced to ensure that the enhancement result conforms to the physical laws of the downhole environment.

Benefits of technology

It effectively improved image brightness and contrast, suppressed dust noise, sharpened equipment edge details, and enhanced image clarity and usability, meeting the logical traceability requirements of coal mine safety monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122089588A_ABST
    Figure CN122089588A_ABST
Patent Text Reader

Abstract

This invention relates to the field of computer vision and image processing technology, and discloses a visual image enhancement method and computer device based on learnable priors. The method includes: constructing a prior model based on a mask autoencoder to acquire the illumination manifold structure and gradient texture features of the environment through unsupervised learning; constructing a deep unfolding decomposition network based on Retinex theory, introducing illumination priors in iterative updates to guide the decoupling of the image's physical components; using the enhancement network to independently optimize and fuse the decomposed illumination and reflectivity components for reconstruction; and introducing a gradient feature-based regularization loss to globally constrain the reconstructed image. This invention combines a physical imaging model with deep prior knowledge, effectively solving the problems of low illumination and dust noise in complex environments such as underground coal mines, improving image brightness while maintaining the structural consistency of edge textures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer vision and image processing technology, specifically to a visual image enhancement method and computer device based on learnable priors. Background Technology

[0002] The underground environment of coal mines, as a typical unstructured and complex scenario, is often subject to extremely poor lighting conditions due to explosion-proof and safety regulations. Common problems include extremely low illuminance, uneven light distribution, and high dust concentration interference. High-quality visual images are fundamental for remote monitoring, equipment fault diagnosis, and unmanned operation in underground fully mechanized mining faces. However, images acquired by existing monitoring equipment typically have a narrow dynamic range, low contrast, and are accompanied by a large amount of suspended particle noise, severely hindering downstream computer vision algorithms from accurately identifying and monitoring the status of critical equipment such as hydraulic supports and coal mining machines.

[0003] Early techniques for enhancing low-light images often employed histogram equalization or traditional Retinex theory. These methods rely heavily on manually designed prior assumptions and parameter adjustments. While they can improve image brightness to some extent, they struggle to adapt to the complex and variable lighting conditions underground. Furthermore, they often fail to distinguish between detailed textures and noise during the enhancement process, easily leading to color distortion or noise amplification due to over-enhancement.

[0004] With the development of deep learning technology, end-to-end image enhancement methods based on convolutional neural networks or generative adversarial networks have gradually become mainstream. While these data-driven methods have achieved significant improvements in visual effects, they typically treat the image enhancement process as a black-box process of direct mapping from low-quality to high-quality images, lacking explicit physical model guidance. This black-box characteristic leads to opaque decision-making mechanisms within the model, and the generated images may contain artifacts that do not conform to physical laws, making it difficult to meet the stringent requirements of traceability and reliability for algorithm logic in coal mine safety monitoring.

[0005] More importantly, existing deep augmentation models are mostly trained on publicly available general datasets, lacking targeted learning for the specific environmental characteristics of underground coal mines. Underground scenes have unique illumination manifold structures and gradient texture distributions. General models often exhibit insufficient generalization ability when processing images with such significant inter-domain differences, struggling to effectively recover lost structural information from images with extremely low signal-to-noise ratios. Furthermore, traditional deep learning methods often face the dilemma of enhancement that amplifies noise when dealing with scenes coupled with low illumination and strong noise. They struggle to effectively suppress suspended dust noise and preserve the sharpness of equipment edges while increasing brightness, failing to fundamentally solve the problem of enhancing visual perception in underground mines. Summary of the Invention

[0006] To address the shortcomings of existing technologies, this invention provides a visual image enhancement method and its computer device based on learnable priors. This solves the problem that existing image enhancement methods struggle to effectively remove suspended dust noise interference and maintain clear image edge texture structure without artifacts in complex low-light environments such as underground coal mines, while simultaneously improving brightness and balancing illumination.

[0007] To achieve the above objectives, the present invention provides the following technical solution: The first aspect of this invention provides a visual image enhancement method based on learnable priors.

[0008] This method employs a deep unfolded network architecture, which unfolds the traditional Retinex physical model optimization process into iterative steps of a neural network, and integrates customized prior knowledge based on masked autoencoders (MAE) to achieve transparent decomposition and high-quality enhancement of complex downhole degraded images.

[0009] Specifically, the technical solution of this method mainly includes the following key processing mechanisms: At the level of acquiring prior knowledge This method constructs a prior model of MAE (Magnetic Energy Accuracy) tailored to the environmental characteristics of underground coal mines, pre-capturing the physical properties of normal lighting environments through unsupervised learning. The model comprises two independent training units: a lighting prior training unit and a noise prior training unit.

[0010] The illumination prior training unit trains a first encoder by randomly masking and reconstructing a normal illumination image. This encoder has the ability to recover the global illumination structure from local information, thus addressing the problem of uneven light source distribution in downhole environments. The noise prior training unit trains a second encoder by reconstructing the histogram of oriented gradients (HOG) features of a normal illumination image. This encoder can keenly capture the texture gradient distribution patterns of the image, used to distinguish between coal and rock textures and dust noise in subsequent enhancement.

[0011] At the image decomposition level, This method constructs a Retinex image decomposition network based on depth unfolding. Unlike traditional end-to-end black-box networks, this network maps the solution process for illumination, reflectivity, and noise into multiple iterative optimization steps. During the iteration process, the network explicitly calls the pre-trained first encoder to extract prior illumination features and directly applies these features to the update formula of the illumination components through nonlinear transformation (generating multiplicative and additive feature maps). This design embeds data-driven prior knowledge as a regularization constraint into the solution path of the physical model, ensuring that the decomposed illumination components conform to the physical laws of the actual downhole environment, while using proximal operators to iteratively separate reflectivity and noise components.

[0012] At the level of image enhancement and fusion This method performs independent optimization on the decomposed physical components. An illumination adjustment network is used to extract and fuse multi-scale features from the decomposed illumination components to enhance dark area brightness and compress highlights. Simultaneously, a reflectance restoration network is used to jointly process illumination, reflectance, and noise components to correct color deviations in reflectance and restore occluded details. Finally, the enhanced illumination and restored reflectance are fused through element-wise multiplication to generate a preliminary enhanced image. This component-independent processing mechanism avoids the common problems of simultaneous amplification of noise or color distortion when directly enhancing images.

[0013] At the global optimization level This method introduces a gradient regularization mechanism to impose a final constraint on the enhancement results. By inputting the initial enhanced image and the reference normal light image into a pre-trained second encoder, the difference in their gradient representations (regularization loss) is calculated in the feature space. This step forces the enhancement network to strictly follow the gradient texture distribution of the normal downhole environment when reconstructing the image, thereby effectively suppressing unstructured residual noise and sharpening device edge details.

[0014] In a preferred embodiment, the illumination prior training unit performs contrast-limited adaptive histogram equalization on the acquired baseline illumination map during the data preprocessing stage, and uses the image after bilateral filtering as the reconstruction target. This processing method can eliminate high-frequency noise interference in the training data, forcing the encoder to focus on learning the low-frequency global illumination structure.

[0015] In a preferred embodiment, the noise prior training unit uses directional gradient histogram features as the reconstruction target. Compared to directly reconstructing pixels, reconstructing gradient statistical features makes the second encoder invariant to illumination changes, while being highly sensitive to geometry and texture structure, thus providing more robust structural constraints for regularization.

[0016] As a preferred implementation, the illumination component is updated using a combination of multiplicative and additive feature maps during the iterative updates of the deep unfolded network. The multiplicative feature map is used to adjust the illumination gain distribution, while the additive feature map is used to supplement local illumination bias. The two work together to achieve accurate fitting of complex downhole lighting fields.

[0017] A second aspect of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.

[0018] This invention provides a visual image enhancement method and computer device based on learnable priors. It has the following beneficial effects: 1. This invention constructs a deep unfolded network based on Retinex theory, decomposing the image enhancement task into an iterative optimization process of illumination estimation, reflectivity restoration, and noise separation. This gives the deep neural network a clear physical meaning, so that the output features of each stage correspond to specific physical components. This overcomes the defect of opaque decision-making mechanism in traditional end-to-end black box models, and ensures the logical traceability of the enhancement algorithm in coal mine safety monitoring applications.

[0019] 2. This invention utilizes the illumination prior and gradient prior obtained from pre-training a masked autoencoder (MAE) to embed the inherent structural features and texture distribution patterns of the underground coal mine environment as constraints into the network. This enables the model to no longer rely solely on pixel-level mapping when processing extremely degraded images such as low-light and high-dust environments. Instead, it can perform feature completion based on the learned environmental distribution patterns, effectively solving the problem of poor generalization and feature loss caused by inter-domain differences in specific underground scenes.

[0020] 3. This invention adopts a strategy that combines component-independent enhancement with gradient regularization. First, the decomposed illumination and reflectivity components are optimized separately. Then, gradient consistency loss is used to globally constrain the final image. While improving the overall brightness and contrast of the image, it avoids the synchronous amplification of local noise signals during the enhancement process. Thus, while suppressing dust particle noise, it sharpens key edge details such as coal wall cracks and equipment outlines, improving the clarity and usability of the image. Attached Figure Description

[0021] Figure 1 This is a schematic diagram of the computer device and system module architecture of the present invention; Figure 2 This is a flowchart of the visual image enhancement method based on learnable priors according to the present invention. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.

[0023] See attached document Figure 1 and attached Figure 2This invention provides a computer device that can be applied to underground coal mine monitoring centers, edge computing nodes, or high-performance servers. The computer device includes a processor, memory, a communication interface, and a bus. The processor, memory, and communication interface communicate with each other via the bus. The communication interface is used to receive raw video or image data acquired by underground coal mine cameras. The processor can be a central processing unit, a graphics processing unit, an application-specific integrated circuit (ASIC), or a field-programmable gate array (FPGA), used to execute computer programs stored in the memory.

[0024] The memory can be high-speed random access memory or unstable memory, such as disk storage. The memory stores the computer program, which, when executed by the processor, implements the steps of a visual image enhancement method based on learnable priors. Logically, the computer program includes: a MAE prior model training module, a Retinex depth unwrapping decomposition module, an image component enhancement module, and a gradient regularization optimization module.

[0025] The MAE prior model training module is used to acquire prior knowledge of the coal mine environment based on an unsupervised learning strategy. This MAE prior model training module further includes an illumination prior training unit and a noise prior training unit. The illumination prior training unit is configured to receive a normal light illumination image, perform a masking operation on it, and reconstruct a bilaterally filtered target illumination image using an asymmetric encoder and decoder network. After training, it outputs a first encoder. The noise prior training unit is configured to receive a normal light image, perform a masking operation on it, and reconstruct the directional gradient histogram features using an asymmetric encoder and decoder network. After training, it outputs a second encoder.

[0026] The Retinex deep unwinding decomposition module decomposes the low-light image to be enhanced into physical components. This module is configured with a deep unwinding network architecture containing a predetermined number of iterations. In each iteration, the Retinex deep unwinding decomposition module calls the first encoder to extract illumination features and updates each component using proximal operators. When updating the illumination components, the Retinex deep unwinding decomposition module performs nonlinear transformation operations based on convolution and activation functions, and its operational logic satisfies the following relationship: ; in, Indicates the first The lighting composition after the next iteration update Indicates the first The illumination composition of the next iteration This represents the Sigmoid activation function. This represents the convolution operation. This represents the prior lighting features extracted by the first encoder. This represents the convolution operation.

[0027] The image component enhancement module is used to independently optimize the decomposed components. This module includes an illumination adjustment unit and a reflectance restoration unit. The illumination adjustment unit, based on the U-Net architecture, adjusts the brightness of the decomposed illumination components to obtain enhanced illumination components. The reflectance restoration unit, also based on the U-Net architecture, jointly processes illumination, reflectance, and noise components to obtain restored reflectance components. The image component enhancement module also performs a fusion operation, generating a preliminary enhanced image through element-wise multiplication. Its operational logic satisfies the following relationship: ; in, This indicates the initial image enhancement. This indicates the enhanced light composition. ☐ represents the reduced reflectance component, and · represents element-wise dot product.

[0028] The gradient regularization optimization module is used to apply global constraints to the image to suppress residual noise. This module calls the second encoder to extract gradient representations from the preliminary enhanced image and the reference normal light image, respectively, and calculates the difference between them. The logic for calculating the regularization loss in the gradient regularization optimization module satisfies the following relationship: ; in, This represents the noise regularization loss. This indicates the feature extraction operation of the second encoder. This indicates the initial image enhancement. This refers to a reference normal light image. This represents the L1 norm. The gradient regularization optimization module combines the decomposition loss, enhancement loss, and noise regularization loss to construct the total loss function, and adjusts the network parameters in the Retinex depth unrolling decomposition module and the image component enhancement module through backpropagation.

[0029] See attached document Figure 1 and attached Figure 2 This invention provides a visual image enhancement method based on learnable priors. This method combines a deep learning network with a physical imaging model, utilizing pre-trained prior knowledge to guide the restoration process of low-light downhole images. The method mainly includes a pre-training stage and an online enhancement stage, and the specific execution flow is as follows.

[0030] In step S1, a MAE prior model is constructed and trained. This step aims to establish a feature distribution benchmark under normal lighting conditions by training two independent masked autoencoders through unsupervised learning. Specifically, the system constructs a lighting prior training unit and a noise prior training unit respectively. In the lighting prior training unit, images under normal lighting conditions are selected as the base data. A random masking strategy is used to mask parts of the image, forcing the network to infer the missing lighting structure information from the unmasked visible blocks, thereby training the first encoder. This first encoder can extract the global lighting features of the image, which is used to subsequently address the problem of uneven distribution of underground light sources. In the noise prior training unit, the directional gradient histogram features of the normal lighting image are calculated, and image blocks are masked, forcing the network to reconstruct the gradient statistical features of the masked regions, thereby training the second encoder. This second encoder is sensitive to texture and edge information and is used for gradient constraints and noise suppression in the subsequent enhancement process.

[0031] In step S2, Retinex image decomposition based on depth unrolling is performed. This step unfolds the variational optimization solution process in Retinex theory into cascaded neural network layers. First, the initial states of the illumination component, reflectivity component, and noise component are initialized, and the total number of iterations is set.

[0032] In each iteration, the network alternately updates the three physical components. For the update of the illumination component, the illumination estimate of the current iteration is input into the first encoder trained in step S1 to extract the implicit illumination prior features.

[0033] The prior features, after being nonlinearly mapped by convolutional layers and activation functions, serve as a regularization term to adjust the update direction of the illumination components, ensuring that the decomposed illumination components conform to the physical illumination distribution patterns of the downhole environment. For the updates of reflectivity and noise components, an optimization objective including a fidelity term is constructed, and a proximal operator composed of convolutional layers and ReLU activation functions replaces the traditional mathematical solution operator, achieving the separation of reflectivity details and additive noise from the residual information. After a predetermined number of iterations, the network outputs the final decomposed illumination, reflectivity, and noise components.

[0034] In step S3, image component enhancement and fusion are performed. This step processes the decomposed physical components individually. The decomposed illumination components are input into an illumination adjustment network, which uses a U-Net architecture. Through multi-scale feature fusion during downsampling and upsampling, the dynamic range of the illumination distribution is adjusted, the brightness of dark areas is increased, and potential overexposed areas are suppressed, outputting the enhanced illumination components.

[0035] Simultaneously, the decomposed illumination, reflectance, and noise components are jointly input into a reflectance restoration network. This network, also employing a U-Net architecture, utilizes complementary multi-channel input information to correct color deviations in the reflectance components and restore subtle texture details obscured by noise, outputting the restored reflectance components. Subsequently, based on the Retinex imaging principle, the enhanced illumination components and the restored reflectance components are multiplied pixel-by-pixel to generate a preliminary enhanced image.

[0036] In step S4, gradient regularization optimization is performed. This step is used to globally constrain the enhancement results during end-to-end training. The preliminary enhanced image generated in step S3 and the corresponding reference normal light image are respectively input into the second encoder trained in step S1. Since the second encoder has learned the gradient distribution pattern of the normal downhole environment during the pre-training stage, the difference in texture structure between the enhanced image and the real normal light image can be quantified by calculating the first-order norm distance between the two in the feature space.

[0037] This difference, as a regularization loss, together with the decomposition loss in the decomposition stage and the enhancement loss in the enhancement stage, constitutes the total loss function. By minimizing this total loss function, the weight parameters in the depth unrolling network, illumination adjustment network, and reflectivity restoration network are jointly adjusted using the backpropagation algorithm, so that the final output enhanced image maintains the consistency of the gradient structure while having appropriate brightness, thereby effectively removing artifacts and residual noise.

[0038] See attached document Figure 1 and attached Figure 2 This invention captures the illumination distribution characteristics and gradient texture characteristics of the underground coal mine environment through independent training units. The specific implementation process is as follows.

[0039] In constructing the illumination prior training unit, the first step is data preparation and augmentation. The system selects images from coal mine maintenance crews during downtime, under conditions where supplementary lighting is on and dust concentration is below a preset threshold, as the training dataset. For each acquired color image, the maximum value of its red, green, and blue channels is calculated to synthesize a single-channel basic illumination map.

[0040] To enable the model to adapt to the complex and varied lighting intensity downhole, contrast-limited adaptive histogram equalization (CLAHE) is performed on the base lighting map. In this process, the image is divided into multiple non-overlapping rectangular blocks. Within each rectangular block, a grayscale histogram of pixels is calculated, and the number of pixels exceeding a preset contrast threshold is evenly distributed to the other parts of the histogram. Subsequently, bilinear interpolation is used to eliminate block artifacts, generating enhanced lighting maps with different brightness levels as input samples.

[0041] Simultaneously, a reconstruction target is constructed for supervised training. Bilateral filtering is performed on the base illumination map, combining spatial proximity and pixel similarity as weighting factors. Bilateral filtering removes high-frequency minute textures and random noise from the base illumination map while preserving edge structure information of equipment such as the coal mining machine and hydraulic supports, resulting in a smooth and edge-preserving target illumination map.

[0042] Subsequently, masking and network training steps are performed. The enhanced illumination map is divided into regular image blocks, and a portion of these blocks are randomly masked according to a preset ratio, retaining only the visible image blocks and their location codes as input. An asymmetric encoder and decoder architecture is constructed using a Visual Transformer (ViT).

[0043] In one specific embodiment, the visual Transformer encoder is configured to include 12 Transformer coding layers, with an embedding dimension of 768 and 12 heads for the multi-head self-attention mechanism. The input image patch size is set to 16×16 pixels. The mask ratio is set to 75% in illumination prior training and 50% in noise prior training to accommodate the sparsity differences of different features.

[0044] The encoder receives visible image patches and extracts global illumination context features using a multi-head self-attention mechanism. The decoder receives the encoder's output and a mask token, attempting to reconstruct the complete target illumination map. During training, the mean squared error loss between the network output and the target illumination map is calculated, and the network parameters are updated using gradient descent. After training, the decoder is removed, retaining only the trained first encoder, which possesses the ability to infer the global illumination structure from locally incomplete illumination information.

[0045] In constructing the noise prior training unit, the aim is to train the model to distinguish between the inherent texture of downhole images and suspended dust noise. First, the image size in the training dataset is uniformly adjusted to 512×512 pixels. The adjusted image is then divided into non-overlapping regions of fixed size 16×16 pixels, and a masking ratio of 50% is set, i.e., half of the region is randomly masked to generate a mask image.

[0046] In this noisy prior training unit, the reconstructed target is no longer the original pixel values, but rather the HOG (Histogram of Oriented Gradients) features. The system first calculates the HOG feature map of the entire normal-light image. Specifically, a one-dimensional discrete differential template is used to convolve the image to obtain the gradient magnitude and direction of each pixel. The image is then divided into small units, and the cumulative gradient magnitudes in each direction within each unit are calculated to form a local one-dimensional histogram. Multiple units are then combined into blocks and normalized. During training, the HOG feature vectors corresponding to the masked regions are extracted, flattened, and used as the target features.

[0047] The network architecture also employs a ViT-based asymmetric encoder and decoder structure. The encoder processes the visible portion of the masked image, while the decoder predicts the HOG feature vectors of the masked region. Since HOG features are robust to changes in illumination and primarily describe the local shape information of the image, this gradient prediction training task forces the model to learn the geometric distribution patterns of equipment and rock walls in an underground coal mine scene. After training, a second encoder is retained, which extracts high-dimensional gradient representations. These are used as regularization constraints in subsequent enhancement processes to suppress dust noise that does not conform to the structural patterns of the underground environment.

[0048] See attached document Figure 1 and attached Figure 2 In this embodiment, the Retinex image decomposition network based on depth unrolling (corresponding to the aforementioned Retinex depth unrolling decomposition module) is constructed as a network containing... A cascaded iterative recurrent neural network architecture. This recurrent neural network expands the variational optimization solution process of the Retinex physics model into differentiable neural network layers, achieving transparency decomposition of low-light images.

[0049] Specifically, the Retinex image decomposition process based on depth unfolding includes an initialization phase and an iterative update phase.

[0050] During the initialization phase, the system receives the low-light image to be enhanced as input. To accelerate network convergence and provide a reasonable physical starting point, the system initializes the illumination, reflectivity, and noise components.

[0051] In one specific embodiment, the maximum values ​​of each RGB channel in the low-light image are extracted as the initial illumination component, the low-light image itself is directly used as the initial reflectivity component, and the initial noise component is set as a zero tensor. Simultaneously, the system sets the total number of iterations. And the weight parameters of each physical component in the optimization process.

[0052] During the iterative update phase, network execution... to The process is repeated in a loop. In each iteration... In the process, the illumination component, reflectivity component, and noise component are updated sequentially, with the specific steps as follows: The illumination composition is updated. The system inputs the illumination composition of the current iteration step into the first encoder that has been trained. The first encoder uses the normal illumination manifold structure it learned during the pre-training phase to extract implicit illumination prior features from the illumination composition.

[0053] The network performs convolution operations and sigmoid non-linear activation on the prior lighting features to generate two sets of feature maps with different physical properties: The first group is a multiplicative feature map, used to adjust the spatial gain of light intensity; The second group consists of additive feature maps, used to supplement local lighting detail biases.

[0054] The system performs element-wise multiplication of the current illumination composition with the multiplicative feature map, and then superimposes the result with the additive feature map to obtain the updated illumination composition.

[0055] The calculation process strictly follows the illumination composition update formula and its operation logic disclosed in the aforementioned hardware operating environment section.

[0056] The reflectance component is updated. The system constructs a sub-optimization objective centered on data fidelity, aiming to find the reflectance distribution of the input image that best restores it under the current illumination and noise estimation conditions.

[0057] To solve this subproblem, this embodiment employs a proximal operator composed of a convolutional neural network instead of traditional numerical iterative solutions. Specifically, the low-light image to be enhanced, the updated illumination components, and the current noise components are concatenated along the channel dimension and input into the reflectance update sub-network. This reflectance update sub-network consists of a series of convolutional layers and ReLU activation function layers stacked together. By learning the residual mapping relationship, it outputs the updated reflectance components. This process utilizes the fitting capability of deep networks to achieve regularization constraints on the reflectance solution space.

[0058] Finally, the noise component is updated. Based on the Retinex imaging model, the system calculates the current image residual using the input image, the updated illumination component, and the updated reflectance component. This image residual mainly contains noise signals not interpreted by the model and some high-frequency textures. To separate the noise component from the residual, the system employs a noise update sub-network based on a soft threshold operator. This noise update sub-network performs nonlinear filtering on the residual features according to a preset threshold parameter or a learnable threshold mapping, retaining signal components that conform to the noise statistical distribution to obtain the updated noise component.

[0059] go through After several alternating iterations, the network outputs the final decomposed components: illumination, reflectivity, and noise, completing the decoupling process from the low-light image to the physical components. Throughout the decomposition process, the updates of each component are guided by both physical model constraints and data-driven priors, ensuring the physical rationality of the decomposition results.

[0060] See attached document Figure 1 and attached Figure 2This section elaborates on how to perform quality enhancement, fusion reconstruction, and gradient-based global constraint optimization using neural networks after obtaining the decomposed physical components.

[0061] In the image component enhancement module (corresponding to step S3 above), the system constructs an illumination adjustment network and a reflectivity restoration network, respectively. Both networks adopt the U-Net neural network architecture, which includes a shrinking path (encoder) and an expanding path (decoder).

[0062] Specifically, the U-Net architecture includes a 4-level downsampling and a 4-level upsampling structure. The number of feature channels in each level is set to [32, 64, 128, 256]. In each skip connection, a channel concatenation operation is used to fuse encoder and decoder features, and after concatenation, a 1×1 convolutional layer is used for channel dimensionality reduction and feature integration.

[0063] Regarding the enhancement of the illumination components, the decomposed illumination components are input into the illumination adjustment network. The shrinking path extracts multi-scale features of the illumination through successive convolution and downsampling operations to capture the global brightness distribution information of the image; The extended path fuses deep semantic features with shallow spatial features through upsampling and skip connections. The network outputs an enhanced illumination component, which, while preserving the original illumination structure, increases the grayscale values ​​of dark areas and compresses the dynamic range of highlight areas.

[0064] In this process, the illumination enhancement loss between the enhanced illumination component and the illumination component of the reference normal light image is calculated.

[0065] Regarding the reconstruction of reflectance components, the decomposed illumination, reflectance, and noise components are concatenated along the channel dimension to form a multi-channel tensor joint input reflectance reconstruction network. The decomposed noise component is introduced as input to provide the network with spatial distribution clues to the noise, enabling it to distinguish between texture details and noise particles. By introducing the decomposed illumination components as input, the aim is to provide the network with local brightness information to help correct color distortion caused by uneven illumination. The network outputs the restored reflectance components.

[0066] In this process, the reflectance enhancement loss between the restored reflectance component and the reflectance component of the reference normal light image is calculated.

[0067] After component enhancement, the system performs a fusion operation. Based on the Retinex physical imaging principle, the enhanced illumination component and the restored reflectivity component are multiplied element-wise to generate a preliminary enhanced image. The computational logic of this fusion process uses the fusion formula disclosed in the aforementioned hardware operating environment section.

[0068] In the gradient regularization optimization module (corresponding to step S4 above), the system introduces a gradient constraint mechanism based on MAE pre-training. The preliminary enhanced image and the reference normal light image are respectively input to the second encoder (corresponding to the encoder of the noise prior training unit) that has been trained. Since the second encoder is trained with the reconstruction of the directional gradient histogram features as the target, the feature representation it extracts pays high attention to the edges, texture direction and gradient distribution of the image, but is not sensitive to absolute color changes.

[0069] The system calculates the first-order norm distance between two feature representations as the regularization loss. This calculation process directly uses the regularization loss formula disclosed in the aforementioned hardware operating environment section. The physical meaning of this regularization loss formula is to constrain the manifold distribution of the enhanced image in the feature space, forcing the enhanced image to maintain consistency with the normal downhole image in terms of gradient texture structure, thereby suppressing unstructured residual noise and sharpening the edges of the coal wall and equipment.

[0070] Finally, a joint optimization step is performed. Before constructing the total loss function, the loss function for the decomposition process is first defined. In a preferred embodiment, the decomposition loss consists of the reconstruction consistency loss and the illumination smoothness loss, and their calculation logic satisfies the following relationship: ; in, Represents the decomposition loss function; This represents the input low-light image to be enhanced; , and These represent the final illumination component, reflectivity component, and noise component output after decomposition by the depth unfolding network, respectively. The weight hyperparameters representing the structural smoothing term are used to adjust the strength of the lighting smoothing constraint. This represents the gradient operator, used to extract spatial gradient information from an image; Represented by natural constant An exponential function with base 0; Represents the gradient sensitivity coefficient, used to determine the gradient sensitivity coefficient based on the input image. The gradient structure adaptively adjusts the smoothness of the illumination components.

[0071] The first constraint requires that the recombined components should reconstruct the input image; the second is a weighted total variation loss, which uses the gradient weights of the input image to constrain the illumination components. Preserve structural edges while smoothing. and The hyperparameters for balancing the weights.

[0072] Construct a total loss function, which is obtained by weighted summation of the decomposition loss generated during the decomposition process, the enhancement loss generated during the enhancement process, and the regularization loss.

[0073] The total loss function satisfies the following relationship: ; in, Represents the total loss function. This represents the decomposition loss (used to constrain the reconstruction error and consistency of each component in the decomposition process). Indicates loss due to increased light intensity. This indicates the loss of reflectivity enhancement. , , These are the corresponding weight hyperparameters.

[0074] The total loss function is minimized using the Adam optimizer or other gradient descent algorithms. Through backpropagation, the error gradient not only updates the parameters of the illumination adjustment network and reflectivity restoration network, but also passes through the fusion operation and each iteration level of the deep unrolling network, jointly adjusting the convolutional weights in the deep unrolling network to achieve end-to-end global optimal solution search.

[0075] In the specific implementation of model training, a phased training strategy is adopted. First, the MAE prior model is pre-trained on a synthetic dataset, with 10 iterations and a learning rate of 1×10⁻⁶. 4 Then, pre-trained weights are loaded, and the entire network is jointly fine-tuned end-to-end. The iteration cycle is 1 round, and the initial learning rate is 2×10⁻⁶. 4 The learning rate was gradually reduced using a cosine annealing strategy. Input images were randomly cropped to 256×256 pixels during training, with a batch size of 8. The entire training process was performed on a computing platform configured with an NVIDIA RTX 3090 or higher performance GPU.

Claims

1. A visual image enhancement method based on learnable priors, characterized in that, Includes the following steps: Step S1: Construct and train the MAE prior model, which includes an illumination prior training unit and a noise prior training unit; The illumination prior training unit trains the first mask autoencoder based on the normal illumination map and retains the trained first encoder; The noise prior training unit trains the second mask autoencoder based on the normal light image and retains the trained second encoder; Step S2: Construct a deep unfolding network with multiple iterations. Input the low-light image to be enhanced into the deep unfolding network. In each iteration, input the current lighting component into the first encoder to extract lighting prior features and update the lighting component. Combine the near-end operator to update the reflectivity component and noise component. Finally, output the decomposed lighting component, reflectivity component and noise component. Step S3: Input the decomposed illumination components into the illumination adjustment network to obtain the enhanced illumination components, and input the decomposed illumination components, reflectivity components, and noise components into the reflectivity restoration network to obtain the restored reflectivity components; The enhanced illumination component and the reduced reflectivity component are fused to obtain a preliminary enhanced image; Step S4: Input the preliminary enhanced image and the reference normal light image into the second encoder to extract gradient representations. Calculate the regularization loss based on the difference between the gradient representations extracted from the preliminary enhanced image and the reference normal light image. Combine the total loss function of the decomposition process and the enhancement process to jointly optimize the parameters of the depth unrolling network, the illumination adjustment network, and the reflectivity restoration network, and output the final enhanced image.

2. The visual image enhancement method based on learnable priors according to claim 1, characterized in that, In step S1, the training process of the illumination prior training unit specifically includes: Acquire environmental images and calculate the maximum light intensity value of the channel to obtain a basic illumination map. Perform contrast-limited adaptive histogram equalization on the basic illumination map to generate training samples. Then, perform random region masking on the training samples to obtain a masked illumination map. Perform bilateral filtering on the base illumination map to generate a target illumination map that preserves edge characteristics; An asymmetric encoder and decoder architecture with a visual Transformer as the backbone is constructed. The mask illumination map is used as input and the target illumination map is used as the reconstruction target for training. After training, the first encoder is retained.

3. The visual image enhancement method based on learnable priors according to claim 1, characterized in that, In step S1, the training process of the noise prior training unit specifically includes: The normal light image is divided into non-overlapping regions of fixed size, and a portion of these regions is randomly masked to generate a masked image. Calculate the orientation gradient histogram features of the normal light image, extract the orientation gradient histogram features corresponding to the masked region and flatten them into vectors as target features; An asymmetric encoder and decoder architecture with a visual Transformer as the backbone is constructed. The mask image is used as input and the target features are used as the reconstruction target for training. After training, the second encoder is retained.

4. The visual image enhancement method based on learnable priors according to claim 1, characterized in that, Step S2 specifically includes: Initialize the illumination component, reflectivity component, and noise component, and set the number of iterations; In each iteration, based on the current illumination component, current reflectivity component, and current noise component, the illumination component, reflectivity component, and noise component for the next iteration are updated sequentially until the set number of iterations is reached.

5. The visual image enhancement method based on learnable priors according to claim 4, characterized in that, In step S2, the step of updating the light composition specifically includes: Input the illumination component of the current iteration into the first encoder to extract the implicit illumination prior features; The prior illumination features are subjected to convolution operations and nonlinear activation processing to generate multiplicative feature maps and additive feature maps, respectively. The current illumination component is multiplied element-wise with the multiplicative feature map, and then superimposed with the additive feature map to obtain the updated illumination component.

6. The visual image enhancement method based on learnable priors according to claim 1, characterized in that, In step S2, the step of updating the reflectivity component and the noise component specifically includes: Based on the updated illumination components and the current noise components, an optimization objective containing a fidelity term is constructed, and the reflectance components for the next iteration are updated by a proximal operator consisting of a convolutional layer and an activation function. Based on the updated illumination and reflectivity components, the noise component for the next iteration is obtained by using a preset threshold and a near-end operator.

7. The visual image enhancement method based on learnable priors according to claim 1, characterized in that, Step S3 specifically includes: Both the illumination adjustment network and the reflectivity restoration network adopt the U-Net neural network architecture; The illumination adjustment network takes the decomposed illumination components as input, extracts and fuses multi-scale features, outputs the enhanced illumination components, and calculates the illumination enhancement loss. The reflectance restoration network combines the input decomposed illumination components, reflectance components, and noise components, and outputs the restored reflectance components after jointly optimizing color and detail. The enhanced illumination component and the restored reflectivity component are multiplied element-wise to generate a preliminary enhanced image.

8. The visual image enhancement method based on learnable priors according to claim 1, characterized in that, In step S4, the calculation process of the regularization loss is as follows: The second encoder is used to extract the feature representations of the preliminary enhanced image and the reference normal light image, respectively. Calculate the first-order norm distance between the two feature representations, and use the first-order norm distance as the regularization loss to constrain the distribution consistency of the enhanced image in the gradient domain.

9. The visual image enhancement method based on learnable priors according to claim 1, characterized in that, Step S4, specifically the step of jointly optimizing the parameters of the depth unfolding network, the illumination adjustment network, and the reflectivity restoration network, includes: Construct a total loss function, which is obtained by weighted summation of the decomposition loss generated by the decomposition process, the enhancement loss generated by the enhancement process, and the regularization loss; The total loss function is minimized using an optimizer, and the weight parameters of each network are adjusted through backpropagation.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.