% ---------------------------------------------------------------------
% EG author guidelines plus sample file for EG publication using LaTeX2e input
% D.Fellner, v2.04, Dec 14, 2023


\title[Hybrid Contrast-Aware Fog Detection for Automotive Vision Systems]%
      {Hybrid Contrast-Aware Fog Detection for Automotive Vision Systems}


% for anonymous conference submission please enter your SUBMISSION ID
% instead of the author's name (and leave the affiliation blank) !!
% for final version: please provide your *own* ORCID in the brackets following \orcid; see https://orcid.org/ for more details.
\author[J. Procházková,  P. Mikuláček, P.  Štarha]
{\parbox{\textwidth}{\centering J.\,Procházková $^{1}$\orcid{0000-0002-7963-1942}
      P. Mikuláček$^{1}$\thanks{corresponding author}\orcid{0009-0006-3870-1656} and
       P. Štarha$^1$\orcid{0009-0006-3870-1656} 
      }
     \\
% For Computer Graphics Forum: Please use the abbreviation of your first name.
{\parbox{\textwidth}{\centering $^1$Brno University of Technology,  Faculty of Mechanical Engineering,  Czech Republic
     }
}
}
% ------------------------------------------------------------------------

% if the Editors-in-Chief have given you the data, you may uncomment
% the following five lines and insert it here
%
% \volume{36}   % the volume in which the issue will be published;
% \issue{1}     % the issue number of the publication
% \pStartPage{1}      % set starting page


%-------------------------------------------------------------------------
\begin{document}

% uncomment for using teaser
% \teaser{
%  \includegraphics[width=0.9\linewidth]{eg_new}
%  \centering
%   \caption{New EG Logo}
% \label{fig:teaser}
%}

\maketitle
%-------------------------------------------------------------------------
\begin{abstract}
 Modern vehicles are equipped with a wide range of Advanced Driver Assistance Systems (ADAS) that rely heavily on camera-based perception. Reliable visibility estimation -- particularly under fog condition -- remains a significant challenge. Accurate fog detection can enable proactive system responses, such as automatic activation of fog lights, and enhance operational safety. We present a contrast-aware anomaly detection framework for image-based fog detection.  Our algorithm combines multi-scale Difference of Gaussians  responses and Gaussian-weighted local Root Mean Squared contrast with a convolutional autoencoder. The model is trained exclusively on clear-weather imagery to learn the nominal scene distribution, and visibility degradation is detected as a reconstruction deviation from this learned representation. Evaluation on a separate test set containing clear and fog conditions demonstrates an AUC of 0.91, achieved without using fog samples during training. The framework provides a practical basis for camera-based visibility monitoring in automotive environments.
%-------------------------------------------------------------------------
%  ACM CCS 1998
%  (see https://www.acm.org/publications/computing-classification-system/1998)
% \begin{classification} % according to https://www.acm.org/publications/computing-classification-system/1998
% \CCScat{Computer Graphics}{I.3.3}{Picture/Image Generation}{Line and curve generation}
% \end{classification}
%-------------------------------------------------------------------------
%  ACM CCS 2012
  % (see https://www.acm.org/publications/class-2012)


\begin{CCSXML}
<ccs2012>
   <concept>
       <concept_id>10010147.10010178.10010224</concept_id>
       <concept_desc>Computing methodologies~Computer vision</concept_desc>
       <concept_significance>500</concept_significance>
       </concept>
   <concept>
       <concept_id>10010147.10010257.10010293.10010294</concept_id>
       <concept_desc>Computing methodologies~Neural networks</concept_desc>
       <concept_significance>300</concept_significance>
       </concept>
 </ccs2012>
\end{CCSXML}

\ccsdesc[500]{Computing methodologies~Computer vision}
\ccsdesc[300]{Computing methodologies~Neural networks}


\printccsdesc   
\end{abstract}  
%-------------------------------------------------------------------------
\


\section{Introduction}

Reliable perception under adverse weather conditions remains a major challenge for camera-based systems in real-world environments. Fog is particularly critical, as atmospheric scattering reduces contrast and suppresses fine-scale structure, directly affecting safety-relevant perception and system behavior in automotive applications. Despite the widespread deployment of camera-based driver assistance systems, explicit visibility assessment is not commonly implemented.  This motivates image-based visibility estimation methods operating directly on camera data and remaining robust across heterogeneous driving environments.


To address these challenges, we propose a hybrid visibility estimation method combining contrast analysis with a contrast-regularized convolutional autoencoder (CAE). The approach uses multi-scale Difference of Gaussians (DoG) and Gaussian-weighted local Root Mean Square (RMS) contrast to capture visibility degradation. The CAE is trained on clear imagery to model the nominal scene distribution. The objective minimizes both reconstruction error and discrepancies in contrast descriptors. Fog is detected as an increased deviation from the learned clear distribution.


\begin{figure*}[t]
    \centering
    \includegraphics[width=.9\linewidth]{images/scheme.pdf}
    \caption{Hybrid visibility assessment framework combining contrast statistics and latent feature analysis.}
    \label{fig:architecture}
\end{figure*}


\section{Related Work}

Most prior work addresses recognition under fog or haze, typically using learning-based approaches \cite{Ayoub2025}. Two dominant strategies can be identified: image restoration (dehazing) as preprocessing, and training recognition models directly on fog-affected data to improve robustness. Direct fog detection has received less attention. Existing methods rely either on contrast-based descriptors derived only from atmospheric scattering principles \cite{Pavlic2012}, or on supervised classifiers trained to categorize visibility conditions, often based on object-detection backbones such as YOL O \cite{Wang2022}.  Hybrid method based on combination of edge detector with multitask network cascade and overview of recent methods is in \cite{Yang2023}.  However, contrast-based methods are sensitive to illumination changes and generalize poorly across diverse scenes, while supervised approaches require extensive labeled data. These limitations motivate the proposed hybrid approach.

\section{Methodology}

For the initial training of the framework, datasets were prepared with various conditions, including brightness, clouds, and daytime/nighttime period.  Multi-scale DoG and local RMS contrast capture structural and radiometric visibility degradation.  The CAE was designed with four hidden convolutional layers, and the number of training parameters is 1.3 mil. , latent layer has 256 channels. 
Scheme of proposed framework is in Fig. \ref{fig:architecture}.    The training data comprise eight internally collected driving datasets acquired during controlled test drives using instrumented vehicles. After preprocessing and temporal subsampling,  approximately 5,000 clear-weather frames were retained for training. No fog images were used during training.

The CAE is trained exclusively on clear imagery to learn the nominal appearance of scenes, minimizing both pixel-wise reconstruction error $ L_{pix} $ and differences between contrast descriptors  computed from the original and reconstructed images $ L_{DoG}, L_{RMS}$.  The model is optimized using L1loss (MAE): 
$L_{pix} = \| (I - \hat{I}) \|_1$
\[
L_{DoG} = \| DoG(I) - DoG(\hat{I}) \|_1, \qquad
L_{RMS} = \| RMS(I) - RMS(\hat{I}) \|_1,
\]
leading to the hybrid objective $
L = L_{pix} + \alpha L_{DoG} + \beta L_{RMS}.
$

Two inference strategies can be considered. The first relies solely on the pixel-wise reconstruction error, $S = L_{pix} = \| I - \hat{I} \|_1,$
where the influence of DoG and RMS is implicit through the hybrid training process. This approach is computationally efficient and suitable for real-time applications, but it does not explicitly evaluate structural and contrast deviations during inference. The second strategy mirrors the hybrid training objective by combining pixel and descriptor-based errors,
$S = L_{pix} + \lambda_2 L_{DoG} + \lambda_3 L_{RMS}.$

This formulation explicitly accounts for structural and contrast discrepancies and can better capture visibility-related degradation, although it requires higher computational cost and additional weighting calibration.


\section{Results and Conclusion}

The proposed hybrid contrast-aware framework enables visibility degradation detection using a one-class training paradigm. By combining structural contrast descriptors with a contrast-regularized CAE, the method models nominal clear-weather appearance and detects fog as a deviation from this learned distribution.
Experimental evaluation on real-world automotive data achieved an AUC of 0.91 despite the absence of fog samples during training, indicating strong discriminative capability for visibility degradation detection.
The framework is suitable for integration into camera-based ADAS visibility monitoring. Future work will focus on expanding evaluation datasets and investigating multimodal sensor fusion for enhanced robustness under adverse weather conditions.A representative subset of the dataset is publicly available at \cite{prochazkova2026dataset}.


\section*{Acknowledgment}
This publication was supported by the project "Innovative Technologies
for Smart Low Emission Mobilities", funded as project No.
CZ.02.01.01\/00\/23\_020\/0008528 by Programme Johannes Amos Comenius, call
Intersectoral cooperation.

 \printbibliography                
 
 
\end{document}
