---
title: 'AECR-Net: Compact Dehazing Deep Network'
url: https://www.emergentmind.com/topics/aecr-net
type: topic
---

# AECR-Net: Compact Dehazing Deep Network

AECR-Net is a compact, end-to-end autoencoder-style deep network designed for single image dehazing and enhancement under challenging visibility conditions such as haze and smoke. The model integrates a feature-attention backbone, contrastive regularization, adaptive mixup, and a dynamic feature enhancement mechanism. AECR-Net has demonstrated state-of-the-art quantitative and qualitative results on both synthetic and real-world haze and smoke benchmarks, with practical utility further validated for gauge image interpretation in adverse visibility applications [2601.10537, 2104.09367].

## 1. Architectural Components

At its core, AECR-Net employs an autoencoder architecture augmented with various feature fusion and regularization modules:

- **Encoder Stem:** Processes an RGB input $I_{in} \in \mathbb{R}^{3 \times H \times W}$ through a $7 \times 7$ convolution (64 channels), ReLU, and InstanceNorm, followed by downsampling (stride-2, 128 channels).
- **Bottleneck:** Comprises $N$ stacked AECR-Blocks, each integrating FFA-Net's Feature Attention (FA) block—composed of Channel-Attention (CA) and Pixel-Attention (PA) sub-modules—with local residuals: $X_{out} = X_{in} + FA(X_{in})$. Every $M$ blocks (typically $M = 2$), attributes a Dynamic Feature Enhancement (DFE) operation to adaptively re-scale channel statistics.
- **Decoder:** Mirrors the encoder with upsampling (using nearest-neighbor or transposed convolutions), ReLU, InstanceNorm, and final $3 \times 3$ convolution projecting to $3$ output channels with sigmoid output activation.
- **Skip Connections:** Employs U-Net-style skip connections to link encoder and decoder layers at corresponding spatial resolutions, enhancing feature fusion.
- **Adaptive Mixup Module:** During training only, generates synthetic feature-space interpolations (mix-of-pairs) between clean and hazy encodings to augment representation diversity for contrastive learning.

The model contains approximately $2.6$–$3$ million parameters, making it compact relative to other state-of-the-art dehazing networks [2104.09367].

## 2. Mathematical Formulation and Losses

AECR-Net’s objective combines image reconstruction fidelity with a pixel-level contrastive constraint:

- **Reconstruction Loss:** Per-pixel $\ell_1$ distance between dehazed output $\hat{Y}$ and ground truth $Y$:
  $$
  L_{rec}(\hat{Y}, Y) = \|Y - \hat{Y}\|_1
  $$
- **Contrastive Loss (InfoNCE):** Given representations $z^+, z^-, \hat{z}$ extracted via a pre-trained feature extractor (e.g., VGG-19), AECR-Net enforces:
  $$
  L_{ctr}(\hat{z}_i) = -\log \frac{\exp(\text{sim}(\hat{z}_i, z^+_i)/\tau)}{\sum_{j=1}^K \exp(\text{sim}(\hat{z}_i, \hat{z}_j)/\tau)}
  $$
  where $\text{sim}(a,b)$ denotes cosine similarity and $\tau$ is a temperature hyperparameter.
- **Total Objective:** Weighted combination,
  $$
  L_{total} = L_{rec} + \lambda L_{ctr}
  $$
  with typical weighting $\lambda=1.0$ or, in some variants, $\beta=0.1$ [2104.09367].

Contrastive regularization constrains network outputs to lie closer to ground truth features while diverging from hazy inputs, narrowing the feasible restoration manifold [2104.09367].

## 3. Feature Engineering: Attention, Mixup, DFE

- **Feature Attention (FA):** Inherits both channel and pixel attention from FFA-Net to emphasize discriminative statistics at multiple representation levels.
- **Adaptive Mixup:** Parameterizes skip-level feature fusion via two learned interpolations:
  $$
  f_{\uparrow 2} = \sigma(\theta_1)f_{\downarrow 1} + (1-\sigma(\theta_1))f_{\uparrow 1}
  $$
  blending encoder and decoder activations to preserve spatial detail and yield sharper reconstructions.
- **Dynamic Feature Enhancement (DFE):** Utilizes two stacked modulated deformable convolutions:
  $$
  y(p) = \sum_{k=1}^K w_k [x(p + p_k + \Delta p_k)] m_k
  $$
  where $\Delta p_k$ are learned offsets, $m_k$ are modulation masks, and $w_k$ are kernel weights, adaptively expanding the receptive field.

Ablation experiments demonstrate each module’s contribution: DFE alone yields $\sim$$+1.7$ dB PSNR, adaptive mixup provides $\sim$$+0.2$ dB, and full contrastive regularizer delivers $\sim$$+0.7$ dB over positives-only [2104.09367].

## 4. Training Protocols and Evaluation

**Datasets:**  
- For gauge image enhancement, synthetic data is generated in Unreal Engine 5.1.1 with realistic global illumination, custom 3D gauge meshes, and both Exponential Height Fog and GPU-simulated smoke particles. Each scene yields images across 10 haze and 10 smoke density levels, with one clear reference.
- RESIDE benchmark is used for generic single-image dehazing, with SOTS (indoor) test set for evaluation, and Dense-Haze and NH-HAZE for real-world validation.

**Hyperparameters:**  
- Optimizer: Adam $(\beta_1=0.9, \beta_2=0.999, \epsilon=10^{-8})$
- Initial LR: $10^{-4}$ or $2 \times 10^{-4}$, stepped or cosine annealing
- Batch size: $4$ (gauge) or $16$ (RESIDE)
- Epochs: $100$
- Loss weights: $\lambda=1.0$, $\beta=0.1$
- Feature extraction for contrastive loss layers: VGG-19, layers indexed {1,3,5,9,13} with progressively increasing weights

No data augmentations are applied beyond density-level variation.

## 5. Quantitative Performance

| Dataset        | Method    | PSNR (dB) | SSIM  | Parameters |
|----------------|-----------|-----------|-------|------------|
| Haze (Gauge)   | AECR-Net  |   ∼44     | 0.98  | 3M         |
|                | FFA-Net   |   ∼30     | 0.96  | -          |
|                | BCCR      |   ∼12     | 0.65  | -          |
| Smoke (Gauge)  | AECR-Net  |   ∼37     | 0.96  | 3M         |
|                | FFA-Net   |   ∼26     | 0.94  | -          |
|                | BCCR      |   ∼9      | 0.55  | -          |
| RESIDE/SOTS    | AECR-Net  |  37.17    | 0.990 | 2.6M       |
|                | FFA-Net   |  36.39    | 0.989 | 4.68M      |
|                | (Others)  |  ∼30      | ∼0.97 | >3M        |

On both synthetic and real-world datasets, AECR-Net matches or outperforms prior methods in PSNR and SSIM, despite its low model size. In custom smoke and haze gauge datasets, AECR-Net improves PSNR by roughly $+13$ dB over FFA-Net [2601.10537, 2104.09367].

## 6. Component-Level Analysis and Practical Impact

- **Contrastive Regularization**: Adding $L_{ctr}$ increases average PSNR by about $+2$ dB (gauge enhancement) and $+0.7$ dB (RESIDE SOTS).
- **Dynamic Feature Enhancement**: Disabling this module leads to $\sim$0.01 drop in SSIM and $\sim$1.7 dB PSNR loss.
- **Adaptive Mixup**: Reduces overfitting to mid-level densities, improving generalization to unseen visibility conditions.
- **FA-Block Depth**: Increasing the number of FA blocks to $N=8$ improves performance, with diminishing returns beyond $N>8$.
- **Parameter Efficiency**: AECR-Net’s compactness (2.6–3M parameters) provides substantial computational and memory advantages relative to previous deep dehazing models [2104.09367].

In infrastructure and emergency response settings, AECR-Net’s enhanced outputs enable more robust post-processing pipelines for automatic and autonomous gauge interpretation, critical in haze- and smoke-obscured environments [2601.10537].

## 7. Availability and Extensions

The official implementation of AECR-Net is available at [https://github.com/GlassyWu/AECR-Net] [2104.09367]. Contrastive regularization has shown universality: adding CR to alternative single-image dehazing architectures yields consistent PSNR and SSIM gains without increased inference costs, supporting AECR-Net’s utility as a general model design motif.

A plausible implication is that AECR-Net’s architecture and learning protocol may generalize to deblurring, low-light enhancement, and other single-image restoration tasks where information degradation results from complex, content-dependent imaging perturbations.

---
**Key References:**  
- "Enhancing the quality of gauge images captured in smoke and haze scenes through deep learning" [2601.10537]  
- "Contrastive Learning for Compact Single Image Dehazing" [2104.09367]

Source: https://www.emergentmind.com/topics/aecr-net