0% found this document useful (0 votes)
10 views16 pages

Synthetic Fog Generation for AI Training

This document provides a detailed guide on generating high-fidelity synthetic fog for diffusion model training, emphasizing the application of Koschmieder's law for atmospheric scattering. It outlines the core pipeline for fog synthesis, including the generation of a depth map, physical parameterization, and the application of the Atmospheric Scattering Model, while also discussing advanced techniques for enhanced realism. The document serves as a blueprint for creating a Python script to simulate fog, ensuring that near objects remain visible while distant ones are obscured.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views16 pages

Synthetic Fog Generation for AI Training

This document provides a detailed guide on generating high-fidelity synthetic fog for diffusion model training, emphasizing the application of Koschmieder's law for atmospheric scattering. It outlines the core pipeline for fog synthesis, including the generation of a depth map, physical parameterization, and the application of the Atmospheric Scattering Model, while also discussing advanced techniques for enhanced realism. The document serves as a blueprint for creating a Python script to simulate fog, ensuring that near objects remain visible while distant ones are obscured.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

A Comprehensive Guide to Generating

High-Fidelity Synthetic Fog for Diffusion


Model Training
The Physical Foundation: Implementing Koschmieder's
Law for Atmospheric Scattering
The creation of realistic synthetic fog is fundamentally rooted in the principles of
atmospheric physics, specifically the work of Ludwig Koschmieder, whose law provides
the cornerstone for modeling visibility degradation in hazy or foggy conditions 22 . The
user's requirement for a script that makes close objects visible while obscuring distant
ones is not merely a stylistic choice but a direct application of this physical principle,
which posits that the intensity of light reaching an observer diminishes exponentially
with distance traveled through a scattering medium 11 35 . This exponential attenuation
forms the basis of the widely adopted Atmospheric Scattering Model (ASM), a powerful
tool for generating physically grounded synthetic imagery for applications ranging from
dehazing algorithm evaluation to training generative AI models 10 19 . Understanding the
precise formulation of Koschmieder's law and its constituent components is the first and
most critical step in building a robust fog simulation pipeline.

The standard formulation of Koschmieder's law, consistently referenced across academic


literature, describes the formation of a hazy image I(x) at a given pixel location x as a
combination of two primary effects: the direct transmission of light from the original
scene and the in-scattering of light from the atmosphere itself 4 18 30 . The model is
expressed by the equation:

I(x)=J(x)⋅t(x)+A⋅(1−t(x))

In this equation, J(x) represents the radiance or true color of the scene object at
position x, which would be visible in the absence of any atmospheric interference 4 36 .

The term t(x) is the crucial transmission map, which dictates the fraction of the original
scene radiance J(x) that successfully reaches the camera without being scattered away
4 . This map is the engine of the entire simulation, as it is responsible for creating the
depth-dependent effect where objects farther from the camera become progressively
dimmer and more obscured. Finally, A represents the global atmospheric light, often
referred to as "airlight" 4 40 . This parameter captures the average color and intensity of
the light that has been scattered towards the camera from all directions, effectively
illuminating the entire scene and giving fog its characteristic luminous appearance 30 .

The transmission map t(x) is explicitly defined by Koschmieder's law as an exponential


function of the scene depth d(x) and the atmospheric extinction coefficient β 4 35 :

t(x)=e−β⋅d(x)

Here, d(x) is the distance from the camera to the scene point x. This formula is the
heart of the simulation; it ensures that as depth d(x) increases, the value of t(x)
decreases exponentially, causing the contribution of the original scene radiance J(x) to
fade out 36 41 . The parameter β (beta), the atmospheric extinction coefficient, is a
measure of the density of the scattering particles in the atmosphere. It acts as the master
control for the overall thickness of the simulated fog. A higher value of β corresponds to
denser fog, leading to faster attenuation of light and a lower visibility range 35 . The
relationship between the extinction coefficient β and meteorological visibility V (the
maximum distance at which a large black object can be seen against the horizon sky) is
empirically derived and forms the basis for calibrating the fog simulation to match real-
world conditions 34 40 . The most commonly cited relationship is β ≈ 3.0 / V, where
V is typically expressed in kilometers and β in per kilometer 34 40 . This allows for precise
control over the simulation, enabling the generation of fog corresponding to specific
weather categories, such as light mist, moderate fog, or dense fog, by setting β to the
appropriate value based on a desired visibility level 2 23 . For instance, a value of β =
0.01 m⁻¹ corresponds to a visibility of approximately 100 meters 41 42 , while values
used for validation in controlled environments have been set to 23 meters for medium
fog and 10 meters for dense fog 12 34 .

The estimation of the atmospheric light A is another critical component for achieving
photorealism. Physically, A represents the color of the illuminated fog itself, which is
primarily determined by the ambient light source, typically the sky 30 . A common and
effective method for estimating A from a clear image is to identify regions of the image
that are likely to be far away and thus dominated by the sky's illumination 28 30 . One
practical technique involves segmenting the image into sky and non-sky regions, for
example, using Otsu thresholding to isolate the brightest pixels, and then computing the
mean RGB value within this segmented sky region 30 . Since pixels in the sky are at
effectively infinite depth, the transmission t(x) for these points approaches zero,
meaning the captured pixel intensity I(x) becomes approximately equal to the
atmospheric light A. Therefore, averaging the color of these distant sky pixels provides a
robust and physically grounded estimate of the airlight that will illuminate the synthetic
fog 30 . Some advanced pipelines refine this initial estimate by applying smoothing filters
like bilateral filtering to eliminate texture artifacts and ensure a uniform atmospheric
light across the image 30 . The combination of a depth-dependent transmission map and
a correctly estimated atmospheric light is what transforms the abstract mathematical
model into a visually plausible representation of fog, satisfying the core requirement of
making near objects distinct while rendering distant objects indistinct.

Parameter Symbol Description Method of Determination

Scene Radiance J(x) The original, clear color and intensity of the scene at Provided directly as the input clear image. 4 36
pixel x.

Transmission t(x) The fraction of scene radiance that reaches the camera Calculated using the formula t(x) = exp(-
Map without scattering. It is the core mechanism for depth- β·d(x)). 4 35 41
aware fog.

Atmospheric A The average color and intensity of the scattered light Estimated by computing the mean color of pixels
Light filling the scene (airlight). identified as part of the distant sky region. 4 28

30

Extinction β A constant that determines the density of the fog. Calibrated based on desired meteorological
Coefficient (beta) Higher values result in thicker fog and lower visibility. visibility V using the relation β ≈ 3.0 / V. 4

34 40

Scene Depth d(x) The distance from the camera to the scene point at Generated computationally from the input image
pixel x. using a monocular depth estimation model. 4 18

28

This foundational understanding of Koschmieder's law and its parameters provides the
necessary blueprint for constructing a Python script capable of generating synthetically
foggy images. The subsequent sections will detail the practical steps required to
implement this model, focusing on the generation of the essential depth map and the
calibration of physical parameters to achieve high-fidelity results suitable for training a
sophisticated diffusion model.
The Core Pipeline: From Clear Image to Depth-Aware
Fog Synthesis
The successful implementation of Koschmieder's law hinges on the accurate and efficient
generation of a scene depth map, d(x), from a single input image. Without a reliable
depth map, the exponential decay of the transmission map, t(x) = exp(-β·d(x)),
cannot properly simulate the perception of depth in a foggy environment, leading to
unrealistic results where all objects appear uniformly blurred rather than those at a
distance disappearing first. The provided research consistently outlines a four-stage
pipeline for this process, beginning with acquiring a clear image, followed by monocular
depth estimation, physical parameterization, and finally, the application of the
atmospheric scattering model 2 18 30 . Each stage is critical, and careful selection of
tools and methods at each step is paramount to achieving the desired level of realism for
training a diffusion defogging model.

The first stage involves acquiring the input image. The user has specified real-world car
dashcam images, which are ideal as they provide contextually relevant scenes for
automotive applications 14 . Datasets like BDD100K are rich sources of such footage,
although they may contain adverse weather videos and suffer from poor image quality,
making them less useful for direct training and highlighting the need for high-quality
clear-frame synthesis 14 . The goal is to start with a clean, high-quality image frame from
which to generate the depth map. The second stage, monocular depth estimation, is
arguably the most crucial for realism. Self-supervised neural networks have emerged as
the state-of-the-art solution for this task, as they can learn to estimate depth from
unstructured video sequences by enforcing photometric consistency across frames,
eliminating the need for expensive ground-truth depth sensors 15 . Among these,
Monodepth2 is repeatedly cited as a highly effective and popular choice, particularly
when applied to automotive datasets like BDD100K 2 15 28 . Its self-supervised nature,
leveraging losses based on photometric consistency and edge-aware smoothness, allows it
to produce robust relative depth maps even without absolute scale information 15 . Other
modern alternatives include DepthAnything v2, which offers high-fidelity depth maps
suitable for physically consistent fog simulation 18 . For applications requiring real-time
performance, highly optimized models like RT-MonoDepth and FastDepth are available,
capable of running at hundreds of frames per second on embedded hardware, though
their primary use case is inference rather than offline data generation 24 25 27 . An
important insight from the literature is that for the purpose of applying Koschmieder's
law, only the relative variation in depth is required to create the correct fog gradient;
obtaining absolute metric depth is not strictly necessary, simplifying the pipeline 15 .
Once a relative depth map d(x) is generated, the third stage is physical
parameterization, which involves setting the values for the extinction coefficient β and
the atmospheric light A. The extinction coefficient β controls the overall density of the fog
and is directly linked to meteorological visibility 34 40 . By specifying a desired visibility
level V in meters, β can be calculated using the empirical relationship β = ln(20) /
V, where ln(20) (~3.0) arises from defining minimum identifiable contrast as 1/20 34

40 .This allows for fine-grained control over the fog's intensity, enabling the simulation
of various weather conditions as defined by standards like Chinese national guidelines,
which classify visibilities of 150m, 300m, and 600m as dense, thick, and heavy fog,
respectively 23 . The atmospheric light A is estimated by analyzing the image to find the
color of the sky, which serves as the dominant source of scattered light in the scene 30 . A
common and effective method is to use image segmentation techniques, such as Otsu
thresholding, to identify the brightest regions of the image, which are assumed to
correspond to the sky, and then compute the mean RGB value within this region 30 . This
provides a physically grounded estimate of the airlight that will uniformly illuminate the
synthesized fog 28 .

The final stage is the application of the Atmospheric Scattering Model using the
calculated parameters. The process begins by normalizing the relative depth map d(x) to
a [0, 1] range, which is essential for the transmission map calculation to function
correctly 15 . With the normalized depth l(x), the extinction coefficient β, and the
atmospheric light A, the transmission map t(x) is computed as t(x) = exp(-
β·l(x)) 15 18 . This transmission map is then applied to the original clear image J(x)
along with the atmospheric light A using the core Koschmieder equation: I_foggy(x)
= J(x) <em> t(x) + A </em> (1 - t(x)) 4 18 . To mitigate potential color
bleeding issues, especially in areas with high contrast, some pipelines perform this
operation in a perceptually uniform color space like CIE Lab* before converting back to
RGB for the final output 41 . This four-stage pipeline, combining deep learning for depth
estimation with principled physical modeling, forms the backbone of a robust and
scalable system for generating high-fidelity synthetic fog, providing a solid foundation for
the creation of a comprehensive dataset to train a diffusion model for defogging.
Advanced Techniques for Enhanced Realism and
Physical Accuracy
While the core Koschmieder pipeline provides a strong foundation for generating
physically plausible fog, achieving the highest degree of realism requires moving beyond
its simplified assumptions. The standard model treats the atmosphere as a homogeneous
medium and neglects the wavelength-dependent nature of light scattering, which can
lead to inaccuracies in simulating the subtle color shifts and differential attenuation
observed in real fog 3 11 . To bridge the gap between synthetic and real-world fog,
several advanced techniques grounded in atmospheric optics can be incorporated into the
simulation pipeline. These enhancements, which include separating Rayleigh and Mie
scattering, modeling altitude-dependent effects, and solving the full Radiative Transfer
Equation (RTE), offer greater control over the visual properties of the fog and can
significantly improve the fidelity of the synthetic data for training a diffusion model.

One of the most significant improvements over the basic ASM is to decompose the total
extinction coefficient β into its constituent parts: Rayleigh scattering and Mie scattering
3 37 .Rayleigh scattering is caused by small molecules in the air (like nitrogen and
oxygen) and is strongly dependent on the wavelength of light, following a 1/λ⁴
relationship 3 . This explains why shorter wavelengths, such as blue light, are scattered
much more efficiently than longer wavelengths like red light, a phenomenon that gives
the sky its blue color and can impart a bluish tint to fog under certain lighting conditions
3 . Mie scattering, on the other hand, is caused by larger particles like water droplets in
fog or aerosols in haze, and its scattering properties are nearly independent of
wavelength 3 . By modeling these two types of scattering separately, it becomes possible
to create more nuanced and realistic fog colors. For instance, a daytime fog simulation
could use a combination of both scattering types, while a purely Mie-based model might
be more appropriate for describing dense, white-looking fog. The coefficients for these
scattering processes can be defined for each RGB channel based on established physical
constants; for example, typical Rayleigh coefficients at sea level are around (5.8,
13.5, 33.1) × 10⁻⁶ m⁻¹ for red, green, and blue, respectively, while the Mie
coefficient is often set to a color-independent value like 2 × 10⁻⁵ m⁻¹ 37 . This
wavelength-specific treatment allows for a much richer palette of fog appearances that
can be tuned to match specific environmental conditions.

Further enhancing realism involves accounting for the fact that atmospheric density is not
constant with altitude. In reality, air density decays exponentially with height, which
means that the optical path length through the atmosphere varies depending on the
viewing angle 3 5 . This altitude dependence can be modeled by incorporating an
exponential decay factor into the optical depth calculation 3 . For example, the optical
depth integral ∫σₑ(h) dh can be broken down into a height-dependent term (like
exp(-4x), where x is normalized altitude) and an angle-dependent "scale function" that
accounts for the varying path lengths of rays entering the atmosphere at different angles
3 . While computationally more intensive, implementing this feature can add a layer of
physical plausibility, ensuring that fog appears denser near the horizon and lighter
overhead, a subtle but important detail for outdoor scenes. This is often implemented in
real-time rendering engines via analytical approximations or precomputed lookup tables
to maintain performance 3 39 .

For the ultimate level of physical accuracy, the Beer-Lambert approximation underlying
Koschmieder's law can be replaced entirely by numerically solving the full Radiative
Transfer Equation (RTE) 11 16 . The RTE is a more comprehensive model that explicitly
accounts for the emission, absorption, and scattering of radiation in a participating
medium, including phenomena like multi-scattering, where photons scatter multiple
times before reaching the camera 11 . In dense fog, multi-scattering can contribute
significantly to the perceived brightness and structure of the scene, and failing to account
for it can lead to errors of up to 50% in radiance calculations compared to simpler
models 16 . Solving the RTE is a computationally expensive task, typically involving ray-
marching algorithms and iterative integration along the viewing ray 5 11 . However, this
approach provides the most physically accurate simulation of fog, capturing effects like
volumetric lighting and the intricate interplay of light and particles. Some state-of-the-art
synthetic datasets, such as SynFog, employ volumetric path tracing, a Monte Carlo
method for solving the rendering equation, to model fog as a participating medium,
accounting for both out-scattering and in-scattering effects 23 . While implementing a full
RTE solver is beyond the scope of a simple Python script, understanding its principles is
valuable, as it highlights the trade-offs between computational efficiency and physical
fidelity. For the user's goal of training a diffusion model, a well-implemented version of
the Atmospheric Scattering Model, perhaps enhanced with separate Rayleigh and Mie
scattering terms, represents the optimal balance of realism and feasibility. Such a model
would provide a rich and varied dataset that closely mimics the physical behavior of real-
world fog, thereby increasing the likelihood that the trained defogging model will
generalize effectively to unseen real-world conditions.
Addressing Real-World Challenges in Dashcam Imagery
Generating synthetically foggy images from clear dashcam footage presents unique
challenges that extend beyond the core physics of atmospheric scattering. Real-world
driving scenarios introduce complex and variable conditions, particularly during
nighttime hours, which must be accurately modeled to ensure the synthetic data is truly
representative of the target domain. Simply applying the Koschmieder model to a day-
time image will fail to capture critical nuances such as the interaction of fog with
artificial lights, the high levels of sensor noise inherent in low-light imaging, and the
reduced performance of computer vision models under degraded conditions 29 32 . A
robust fog simulation script must therefore incorporate mechanisms to handle these
challenges, thereby minimizing the "reality gap" between synthetic and real foggy data
and producing a training set that enables a diffusion model to learn meaningful features
for defogging in diverse operational contexts 19 .

Nighttime fog poses a significant challenge because it combines the visibility degradation
of fog with the visual artifacts of low-light photography 32 . Standard fog simulation
pipelines often fall short here because they do not adequately model the sensor noise that
plagues nighttime images, nor do they account for the complex interplay between fog
and the intense, colored glows of headlights and street lamps 32 . Existing synthetic
nighttime dehazing datasets are noted for using "less challenging augmentation," such as
adding only light noise, which fails to replicate the heavy noise and complex lighting
patterns found in real-world conditions 32 . To address this, the fog simulation pipeline
should be extended with a post-processing stage specifically designed for nighttime
mode. This would involve augmenting the synthesized foggy image with realistic noise
patterns, such as Poisson-distributed shot noise, which models the quantum nature of
light detection in camera sensors 23 . Furthermore, the simulation should model how fog
attenuates and scatters artificial light sources. Instead of simply adding a uniform
atmospheric light A, the script could incorporate the positions and intensities of virtual
light sources (e.g., headlights, taillights, street lamps) and calculate their contribution to
the final image using the same transmission map. This would create the characteristic
glow and bloom effects associated with lights viewed through fog, adding a layer of
realism that is critical for training models intended for nighttime driving assistance
systems.

Another major challenge is the degradation of the initial monocular depth estimation in
adverse conditions. While models like Monodepth2 perform well in good lighting, their
accuracy can drop significantly in low-light environments, as demonstrated by
benchmarks like RoboDepth, which explicitly includes fog and low-light corruptions in its
evaluation suite 28 29 . If the depth map is inaccurate, the entire fog simulation will
inherit these errors, resulting in unnatural fog gradients where objects appear closer or
farther than they should be. The user must be aware of this potential weakness and
consider strategies to mitigate it. One approach is to select a depth estimation model that
has been specifically trained or adapted for low-light performance. Alternatively, a more
robust strategy would be to incorporate uncertainty estimation into the depth map. For
instance, if the model outputs a confidence score for each pixel's depth value, the fog
simulation could be weighted accordingly, perhaps reducing the fog density in poorly
estimated regions to prevent the introduction of severe artifacts. This acknowledges the
inherent uncertainty in the data and produces a more reliable synthetic image.

Finally, to further close the reality gap, the pipeline should consider incorporating other
sensor-level artifacts that are characteristic of real cameras. The RoboDepth benchmark
evaluates models against a wide range of corruptions, including motion blur, rolling
shutter effects, JPEG compression, and quantization noise, all of which can affect the
quality of dashcam footage 29 . While these are not atmospheric effects, adding them to
the synthetic pipeline can help the trained diffusion model become more robust to the
imperfections present in real-world data. For example, after generating the foggy image,
one could apply a Gaussian blur to simulate defocus blur or a motion blur filter to mimic
vehicle movement. Similarly, the image could be subjected to JPEG compression artifacts
to match the format of real-world dashcam recordings. The HFLS-Weather dataset
provides a good example of a comprehensive pipeline that goes beyond just fog
simulation, processing scene radiance through a realistic camera model that includes
optics, sensor noise, and ISP stages like white balance and gamma correction 23 . By
adopting a similar philosophy, the user can create a more holistic and realistic synthetic
data generation process. This attention to detail—from sensor noise and artificial lighting
to motion blur and compression artifacts—transforms the fog simulation from a simple
physics experiment into a powerful tool for generating high-fidelity training data that will
enable a diffusion defogging model to perform reliably in the messy and unpredictable
environment of real-world driving.

Evaluating Synthetic Data Quality for Robust Diffusion


Training
Generating a large volume of synthetic foggy images is only half the battle; ensuring their
quality and suitability for training a diffusion model is equally critical. A naive approach
of simply looking at images is insufficient for this task, as subtle inconsistencies in
lighting, color, or fog distribution can lead to a model that fails to generalize to real-
world data. Therefore, a rigorous quantitative evaluation framework is essential for
iteratively tuning the fog simulation parameters and validating the final dataset. The goal
is not just to produce visually plausible images, but to ensure that the statistical
distribution of the synthetic fog images closely matches that of real fog images, thereby
maximizing the effectiveness of the training process 8 9 . Key metrics for this evaluation
include Fréchet Inception Distance (FID), CLIP Score, and no-reference image quality
assessment methods, which together provide a multi-faceted view of the data's realism
and utility.

Fréchet Inception Distance (FID) is a widely accepted metric for evaluating the similarity
between the feature distributions of two sets of images 8 . It works by passing images
through a pre-trained deep neural network (typically InceptionNet) to extract feature
vectors, and then calculating the Fréchet distance between the multivariate Gaussian
distributions of these features. A lower FID score indicates a higher similarity between
the real and synthetic data distributions, suggesting that the synthetic data is of high
quality and diversity 8 . For the user's project, FID would be calculated by comparing a
batch of generated foggy images to a small, curated dataset of real foggy images captured
under similar conditions. This metric is particularly powerful for detecting systematic
biases in the simulation, such as a tendency to produce fog with an incorrect color cast or
a failure to capture the full range of visibility conditions present in the real world.
However, it is important to note that FID scores can be fragile and sensitive to factors like
image format and the specific version of the InceptionNet model used, so it is most
reliable when used for relative comparisons under identical experimental conditions 8 .

While FID measures statistical similarity, the CLIP Score provides a way to assess
semantic alignment between images and text prompts 8 . This metric uses the CLIP
model, which is trained to understand the relationship between images and captions, to
assign a similarity score. By providing carefully engineered prompts that describe the
desired output, such as "foggy dashcam view of a highway at dusk" or "heavy fog
obscuring buildings on a rainy night," one can quantitatively measure whether the
generated images align with the intended concept 8 . A high CLIP score indicates that
the model perceives the generated image as matching the prompt, which is a strong
indicator of semantic realism. This is a crucial check, as two image sets could have a low
FID score yet still be semantically different (e.g., one set contains cars while the other
contains bicycles). For the fog simulation task, CLIP scores can be used to validate that
the generated images are not just visually similar to real fog but also semantically correct
representations of foggy scenes.
Beyond these general-purpose metrics, domain-specific no-reference image quality
assessment (IQA) methods can provide additional insights. For dehazing tasks, a metric
like the Haziness Degree Evaluator (HDE) can quantify the amount of haze in an image
without requiring a ground truth clean version, allowing for an objective measurement of
the fog's density and distribution 4 . Similarly, perceptual metrics like Structural
Similarity Index (SSIM) and Learned Perceptual Image Patch Similarity (LPIPS) can be
used to measure the structural and perceptual fidelity of the synthetic fog against a
reference clear image, helping to ensure that the fog degrades the scene in a natural and
believable way 20 . The paper introducing the FoggyBDD100K dataset reports displaying
quality scores in the corner of figures as a form of qualitative evaluation, demonstrating
the importance of having some measure of performance for each generated sample 2 .
By integrating a combination of these metrics—FID for distributional similarity, CLIP for
semantic alignment, and domain-specific IQA for perceptual quality—the user can build a
comprehensive evaluation suite. This suite will serve as a feedback loop during
development, guiding the selection of optimal parameters for the fog simulation script
and ultimately leading to the creation of a high-quality dataset that maximizes the
chances of training a powerful and generalizable diffusion defogging model.

Evaluation Metric Purpose How It Works Interpretation

Fréchet Inception Measures distributional Compares the feature distributions of Lower FID score indicates higher
Distance (FID) similarity between real and images extracted by a pre-trained similarity and better quality of
synthetic image sets. InceptionNet model. synthetic data. 8

CLIP Score Measures semantic alignment Uses a pre-trained CLIP model to Higher score indicates stronger
between images and text calculate the cosine similarity between semantic correspondence between the
prompts. image and text embeddings. image and the prompt. 8

Structural Similarity Measures perceptual Compares luminance, contrast, and Higher SSIM value indicates better
(SSIM) similarity and structural structure between a synthetic image preservation of structural details. 20
fidelity. and a reference clear image.

Learned Perceptual Measures perceptual Computes the Euclidean distance Lower LPIPS value indicates higher
Image Patch similarity based on deep between deep feature representations perceptual similarity. 20
Similarity (LPIPS) features. of image patches.

Haziness Degree Quantifies the degree of Uses a closed-form optimization of Provides a normalized score
Evaluator (HDE) haziness in an image without features like saturation, brightness, and indicating the severity of the haze
ground truth. sharpness. effect. 4
Limitations and Practical Considerations for
Deployment
Despite the power of physically-grounded fog simulation, it is crucial to acknowledge the
inherent limitations of the models and techniques employed. A comprehensive
understanding of these constraints is vital for setting realistic expectations and ensuring
the safe and effective deployment of any resulting defogging technology. The
Koschmieder model, while foundational, is a simplification of the complex physics
governing light transport in the atmosphere. These simplifications, combined with
dependencies on external components like depth estimators, define the boundaries of
what can be realistically achieved. Furthermore, the very nature of generative models
introduces risks related to overfitting and distributional drift, necessitating careful
validation strategies during the training process.

One of the primary theoretical limitations of Koschmieder's law is its assumption of a


homogeneous atmosphere and a single-scattering event 11 . In reality, light undergoes
multiple scattering events within dense fog, and the optical properties of the atmosphere
can vary spatially 11 16 . The Beer-Lambert approximation that underpins the law breaks
down in these scenarios, potentially leading to inaccuracies in predicting visibility,
especially at extreme ranges or in very dense fog 16 . More advanced models based on the
Radiative Transfer Equation (RTE) are required to fully capture these effects, but they
come with a significant increase in computational complexity 16 . Another subtle but
important consideration relates to the operational relevance of the model. One analysis
argues that Koschmieder's law is fundamentally concerned with "identifiability"—the
ability to recognize an object—and may not accurately model "detectability"—the mere
ability to perceive an object's presence—at typical driving distances of tens of meters 33 .
This distinction suggests that for safety-critical applications like autonomous driving, the
model might underestimate the impact of fog on the ability to detect hazards, a nuance
that should inform the design of any safety validation protocols.

The practical success of the entire fog simulation pipeline is also critically dependent on
the performance of the monocular depth estimation model used to generate the scene
depth map. As highlighted by the RoboDepth benchmark, many state-of-the-art depth
models exhibit significant performance degradation under adverse conditions like fog,
rain, and low light 29 . This creates a chicken-and-egg problem: to simulate fog, you need
a depth map, but the presence of fog can make it difficult to generate an accurate depth
map in the first place. The quality of the synthetic fog is therefore contingent upon the
resilience of the chosen depth estimator to these corruptions. If the depth map is noisy,
blurry, or contains large holes, the resulting fog will inherit these artifacts, leading to an
unrealistic and unusable dataset. This underscores the importance of selecting a depth
model that has been validated on datasets containing challenging weather conditions or,
alternatively, adapting the model specifically for robustness in such scenarios.

Finally, when training a diffusion model, there is a persistent risk of overfitting, where
the model learns to perfectly reconstruct the training data distribution but fails to
generalize to new, unseen examples 7 . This is particularly insidious in generative
models, as the validation loss curve can continue to decrease even as the quality of the
generated samples degrades 9 . This happens because the training and validation data
are both perturbed with noise, making them statistically indistinguishable 9 . To combat
this, it is essential to monitor not just the loss curves but also the distribution of the
generated samples throughout the training process. Regular denoising inference on a
held-out validation set can help track for sample distribution drift 9 . For scientific
datasets with non-standard properties, KL divergence can be a more reliable indicator of
overfitting than traditional metrics 9 . When relying on synthetic data, it is also critical
to consider the ratio of synthetic to real data in the training set. Research on industrial
defect detection has shown that exceeding an optimal synthetic-to-real ratio can actually
degrade performance due to distribution distortion, highlighting the need for careful
empirical tuning 43 . In conclusion, while the proposed pipeline provides a robust
framework for generating high-fidelity synthetic fog, its effectiveness is bounded by the
physical limitations of the model, the performance of its constituent components, and the
inherent challenges of training generative models. A diligent approach to evaluation,
validation, and awareness of these limitations is non-negotiable for developing a reliable
and trustworthy defogging system.

Reference

1. SynFog: A Photo-realistic Synthetic Fog Dataset based on ... [Link]


2403.17094v1
2. A Foggy Weather Simulation Algorithm for Traffic Image ... [Link]
1424-8220/24/6/1966
3. Chapter 16. Accurate Atmospheric Scattering [Link]
gpugems2/part-ii-shading-lighting-and-shadows/chapter-16-accurate-atmospheric-
scattering
4. Automating a Dehazing System by Self-Calibrating on Haze ... https://
[Link]/articles/PMC8513090/
5. Simulating the Colors of the Sky [Link]
generation-virtual-worlds/simulating-sky/[Link]
6. Evaluating Training Data Influence in Diffusion Model [Link]
2410.18639v1
7. Fine-Tuning Stable Diffusion With Validation [Link]
fine-tuning-stable-diffusionwith-validation-3fe1395ab8c3
8. Evaluating Diffusion Models [Link]
evaluation
9. Evaluating diffusion models: why validation loss is not ... [Link]
posts/arya-chavoshi_diffusionmodels-machinelearning-aiforscience-
activity-7384722129302462464-TYSs
10. Gradient-Based Metrics for the Evaluation of Image ... [Link]
2032-6653/14/9/254
11. Generation of Synthetic Non-Homogeneous Fog by ... [Link]
articles/PMC12193759/
12. Qualification of the PAVIN Fog and Rain Platform and Its ... [Link]
2313-433X/9/10/211
13. Numerical modelling of the evolution of the boundary layer ... https://
[Link]/doi/10.1002/wea.3305
14. Into the Fog: Evaluating Robustness of Multiple Object ... [Link]
2404.10534v2
15. Foggy Lane Dataset Synthesized from Monocular Images ... [Link]
1424-8220/22/14/5210
16. Identification of fog Particle Size Distribution by a radiative ... https://
[Link]/science/article/abs/pii/S002240732400030X
17. Physics-Informed Computer Vision: A Review and ... [Link]
10.1145/3689037
18. Real-World Adverse Weather Image Restoration via Dual ... [Link]
2511.05095v1
19. Why Synthetic Data Is Shaping the Future of Computer Vision [Link]
[Link]/2025/09/why-synthetic-data-is-shaping-the-future-of-computer-vision/
20. Enhanced Object Detection Algorithms in Complex ... [Link]
2313-433X/11/12/447
21. Simulation of LiDAR Under Fog with Generative Adversarial ... https://
[Link]/article/10.1007/s12239-025-00319-4
22. Scientific publications on "Light & Color in Nature" [Link]
[Link]
23. SynFog: A Photo-realistic Synthetic Fog Dataset based on ... [Link]
paper/44622
24. Real-time Monocular Depth Estimation on Embedded ... [Link]
2308.10569v2
25. Real-time Monocular Depth Estimation on Embedded ... [Link]
2308.10569
26. Ecalpal/RT-MonoDepth: [ICIP2024] Real-time Monocular ... [Link]
Ecalpal/RT-MonoDepth
27. Fast monocular depth estimation on embedded systems [Link]
handle/1721.1/126546?show=full
28. A Foggy Weather Simulation Algorithm for Traffic Image ... https://
[Link]/38544229/
29. RoboDepth: Robust Out-of-Distribution Depth Estimation ... [Link]
forum?id=SNznC08OOO
30. Research on Haze Image Enhancement based on Dark ... https://
[Link]/articles/PMC9282980/
31. From Filters to VLMs: Benchmarking Defogging Methods ... [Link]
2510.03906v1
32. Nighttime Image Dehazing via Self-Prior Learning [Link]
2403.07408v1
33. How Applicable is the Century-Old Koschmieder Model? https://
[Link]/publication/
307890323_Visibility_How_Applicable_is_the_Century-Old_Koschmieder_Model
34. Qualification of the PAVIN Fog and Rain Platform and Its ... https://
[Link]/articles/PMC10607062/
35. Comparative analysis of dehazing algorithms on real-world ... https://
[Link]/articles/s41598-025-95510-z
36. R3eVision: A Survey on Robust Rendering, Restoration ... [Link]
2506.16262v2
37. Simple, compact (and slow) atmospheric scattering in GLSL in ... https://
[Link]/blog/2018-06-11-scattering/
38. Atmospheric Scattering [Link]
project_websites/AtmosphericScatteringKyleKern/[Link]
39. MartinHahner/LiDAR_fog_sim: LiDAR fog simulation [Link]
MartinHahner/LiDAR_fog_sim
40. Visibility Enhancement and Fog Detection - PubMed Central https://
[Link]/articles/PMC8150865/
41. sakaridis/fog_simulation-SFSU_synthetic [Link]
fog_simulation-SFSU_synthetic
42. IDDM: Bridging Synthetic-to-Real Domain Gap from ... [Link]
2504.21385v1/
43. Latent Diffusion Models to Enhance the Performance of ... [Link]
1424-8220/24/18/6016

You might also like