## 2 Related Work
### Night Method  
The challenge of uneven luminance distribution often plagues nighttime photography, frequently leading to an over-amplification and saturation of bright spots while leaving darker areas inadequately exposed. While prevailing night visibility enhancement strategies concentrate on improving these underexposed segments, they tend to unintentionally heighten the intensity of light, thereby diminishing the visibility in nighttime imagery. To tackle this issue, [PERSON] et al. (2019) proposed Night, an innovative unsupervised approach that artfully merges a layer decomposition network with a network tailored for diminishing light effects. Exploiting the Retinex theory, Night employs an unsupervised end-to-end architecture adept at concurrently intensifying dark regions and mitigating light disturbances. This architecture encompasses networks designated for image decomposition along with light-effects suppression. Figure 2 illustrates the initial processing phase where the network takes a single night image as input, which is subsequently parted into three distinct layers, shading, reflectance, and light-effects layers, each modulated by its own set of unsupervised prior losses, in accordance with the image-layer formulation:  
\[l=R\cdot L+G, \tag{4}\]  
where \(l\) is the input night image, \(R\) and \(L\) are the reflectance and shading layers, and \(G\) represents the light-effects layer.  
Subsequently, the light-effects layer directs the initial input to the dedicated network for suppressing light effects, which has been trained on unpaired images exhibiting varying degrees of light effects. This specialized network generates attention maps with a focus on regions impacted by light effects, serving to restrain these effects while concurrently bolstering illumination in dark regions. Moreover, the network utilizes the gradient exclusion loss, denoted by \(L_{excl}\), which distinguishes between the gradient profiles of the light-effects layer and those of the background. This distinction is instrumental in refining the disentanglement of light effects from the overall scene imagery. The gradient exclusion loss \(L_{excl}\) can be expressed as:  
\[L_{excl}=\sum_{n=1}^{3}\tanh(\lambda_{G^{n}}|\
abla G^{n}|)\odot\tanh(\lambda_ {j_{int}^{n}}|\
abla J_{int}^{n}|), \tag{5}\]  
where \(\
abla\) denotes the gradient, \(\odot\) represents element-wise multiplication, and \(\lambda\) are normalization factors.  
To faithfully reconstruct background details and mitigate the emergence of hallucination or artifacts, the method employs a novel loss function that enforces consistency in structural and high-frequency features, denoted as \(L_{gray-feat}\). This loss function is crucial for preserving the structural integrity and fine textural nuances characteristic of nocturnal scenes. The definition of the loss is as follows:\[L_{gray-feat}=|\phi_{HF}(J_{refine})-\phi_{HF}(J_{gray})|_{1}\] \[+|\phi_{l}^{VGG}(J_{refine})-\phi_{l}^{VGG}(I_{gray})|_{1}, \tag{6}\]  
where \(\phi_{HF}\) and \(\phi_{l}^{VGG}\) represent the high-frequency feature maps and the feature maps from the \(l\)-th layer of the VGG network, respectively. The light-effects suppression network's ultimate output proficiently diminishes light disturbances as it correspondingly amplifies darker zones. This is accomplished by refining the initially approximated background scene \(J_{init}\) to a final light-effects-free output \(J_{refine}\).  
Night method leverages unsupervised learning techniques to enhance night images, achieving a harmonious blend of color and brightness while effectively reducing noise. However, its focus on smoothing and suppressing light effects can sometimes result in a loss of fine details, leading to excessively smooth images. While Night excels in addressing issues related to uneven light distribution and prominent light effects in nighttime photography, it is crucial to strike a careful balance between enhancement and the preservation of image details.