Abstract
Background modeling in nighttime surveillance is a persistent challenge due to low contrast, sensor noise, and dynamic illumination. We present N2DGAN (Night-to-Day GAN), a framework that transforms nighttime video frames into high-quality "virtual daytime" images using a two-pathway generative network. By mapping nighttime inputs to a daytime reference image and employing a multi-scale Bayesian inference model for foreground detection, N2DGAN effectively suppresses generative noise and handles extreme environmental conditions. Experimental results on four new datasets demonstrate significant improvements in detection accuracy over traditional and enhancement-based methods.
Introduction
Background modeling—the process of separating moving foreground objects from a static background—is a cornerstone of computer vision, especially in surveillance. While algorithms like Gaussian Mixture Models (GMM) work well in broad daylight, they often fall apart at night. Nighttime video suffers from low contrast, heavy sensor noise, and uneven lighting, such as glare from streetlamps.
Traditional statistical methods often fail to distinguish dark-clothed individuals from dark backgrounds, and simple image enhancement techniques (like brightening the frame) frequently introduce temporal "flicker" that confuses detection algorithms. N2DGAN addresses these issues by essentially "translating" the nighttime problem into a daytime one, where existing tools are much more effective.
Methods
The authors propose a two-stage pipeline consisting of a generative network and a robust statistical detector.
N2DGAN (The Generator)
Unlike standard image enhancers, this GAN is trained to map nighttime frames to a pre-specified daytime reference image of the same scene. To capture both the big picture and fine details, the generator uses a Two-Pathway Architecture:
- Global sub-network: Processes the overall scene for consistency.
- Local sub-networks: Process smaller image patches to maintain high-frequency details.
The model is optimized using a mix of adversarial loss (for realism), perceptual loss (for structural consistency), and pixel-wise MSE/Total Variation losses to ensure temporal smoothness across frames.
Multi-scale Bayes Inference (The Detector)
Even high-quality GANs can produce "hallucinated" noise. To prevent this noise from being flagged as a moving object, the system generates virtual daytime images at multiple scales. It then uses a Bayesian framework to multiply the probabilities across these scales. If a "moving object" persists across all scales, it is confirmed as a true foreground object; if it only appears at one scale, the system recognizes it as GAN-induced noise and ignores it.
Datasets and Experimental Setup
Since there were no public benchmarks for this specific task, the authors collected and labeled four new datasets:
- Lab: An indoor scene with manually controlled lighting.
- Tree: An outdoor scene captured on a windy night to test the model's ability to ignore swaying branches.
- Lake1 & Lake2: Outdoor scenes featuring complex light reflections on water.
Key Results
The N2DGAN framework significantly outperformed both traditional background models and "enhancement-then-detection" pipelines:
- Accuracy: On the 'Tree' and 'Lake2' datasets, N2DGAN improved Intersection over Union (IoU) scores by 75% and 44% respectively compared to the state-of-the-art SUBSENSE algorithm.
- Robustness: When artificial Gaussian noise was added to simulate extreme weather (like heavy rain), N2DGAN was the only method that maintained stable performance.
- Speed: The full model runs at roughly 8 frames per second (fps). While not yet real-time, the local sub-networks can be processed in parallel to increase throughput on optimized hardware.
Limitations and Future Work
The most significant limitation is the requirement for a daytime reference image of the exact same scene. While easy to obtain for fixed surveillance, it limits deployment for mobile cameras. Additionally, current training assumes nighttime frames are relatively free of foreground objects. Future work will focus on making the model robust to outliers, allowing it to learn the background even if subjects are constantly moving through the scene during the training phase.
Summary updated