Low-Light Image Enhancement and Night Scene Understanding
Module: Computer Vision | Difficulty: Premium
Retinex Theory
where is illumination, is reflectance.
Low-Light Enhancement Loss
Illumination Map Estimation
where is a lightweight network, is sigmoid.
| Model | LOL PSNR | LOL SSIM | MEF SSIM | Speed | |-------|----------|----------|----------|-------| | RetinexNet | 21.3 | 0.82 | 0.85 | Fast | | Zero-DCE | 24.4 | 0.88 | 0.89 | Very Fast | | EnlightenGAN | 25.1 | 0.89 | 0.91 | Fast | | SCI | 26.2 | 0.91 | 0.92 | Very Fast | | LLLM | 27.5 | 0.93 | 0.94 | Slow |
import torch
import torch.nn as nn
class ZeroDCENet(nn.Module):
def __init__(self):
super().__init__()
self.enhancer = nn.Sequential(
nn.Conv2d(3, 32, 3, padding=1), nn.ReLU(inplace=True),
nn.Conv2d(32, 32, 3, padding=1), nn.ReLU(inplace=True),
nn.Conv2d(32, 32, 3, padding=1), nn.ReLU(inplace=True),
nn.Conv2d(32, 32, 3, padding=1), nn.ReLU(inplace=True),
nn.Conv2d(32, 32, 3, padding=1), nn.ReLU(inplace=True),
nn.Conv2d(32, 32, 3, padding=1), nn.ReLU(inplace=True),
nn.Conv2d(32, 32, 3, padding=1), nn.ReLU(inplace=True),
nn.Conv2d(32, 3, 3, padding=1), nn.Tanh(),
)
def forward(self, x):
enhancement = self.enhancer(x)
return x * enhancement + x
class RetinexDecomposition(nn.Module):
def __init__(self):
super().__init__()
self.reflectance_net = nn.Sequential(
nn.Conv2d(3, 64, 3, padding=1), nn.ReLU(inplace=True),
nn.Conv2d(64, 64, 3, padding=1), nn.ReLU(inplace=True),
nn.Conv2d(64, 3, 3, padding=1), nn.Sigmoid(),
)
self.illumination_net = nn.Sequential(
nn.Conv2d(3, 32, 3, padding=1), nn.ReLU(inplace=True),
nn.Conv2d(32, 32, 3, padding=1), nn.ReLU(inplace=True),
nn.Conv2d(32, 1, 3, padding=1), nn.Sigmoid(),
)
def forward(self, x):
R = self.reflectance_net(x)
L = self.illumination_net(x)
return R, L, R * L
Research Insight: Low-light image enhancement has evolved from Retinex-based decomposition to end-to-end learned approaches. Zero-DCE demonstrated that self-supervised learning without paired data can achieve impressive results by formulating enhancement as a curve estimation task. The key insight is that low-light enhancement must balance noise reduction with detail preservation: aggressive denoising destroys textures, while insufficient denoising leaves noise. SCI introduced self-calibrated illumination learning that jointly enhances and denoises, achieving real-time performance on mobile devices.