TL;DR
Instead of relying on unstable image enhancement (dehazing) preprocessing, this paper introduces a method that uses vision-language prompts from CLIP to guide object detection in hazy environments. By dynamically weighting the loss function based on how much an object's semantic meaning is degraded by haze, the approach achieves state-of-the-art detection performance and generalizes remarkably well to low-light and underwater scenes.
What Problem Does This Paper Address?
Object detection models perform poorly in adverse weather conditions like haze. Haze obscures objects, blurs edges, and weakens the visual cues that detectors rely on to classify and localize targets.
The traditional remedy is to insert an image enhancement module (like a dehazing network) before the detector. However, the authors point out that these image-space fixes are highly unstable. They treat every pixel equally, which often causes them to preferentially enhance the background while ignoring the actual objects of interest. Furthermore, convolutional neural network (CNN)-based enhancement can introduce subtle artifacts—invisible to humans but highly disruptive to detectors—leading to missed or misclassified objects (as illustrated in the failure cases in the paper).
Methods
The authors propose bypassing image enhancement entirely. Instead, they enhance the semantics of degraded objects during training using a novel CLIP-guided Cross-Entropy Loss (CLIP-CE).
The framework relies on two key components:
- Approximation of Mutual Exclusion (AME): For every object candidate, the system crops the region and uses a frozen CLIP visual encoder to compute its embedding. It then compares this embedding against two mutually exclusive text prompts: a positive one ("a photo of a {cls}") and a negative one ("a photo without {cls}"). If an object is heavily obscured by haze, its similarity to the negative prompt increases. This negative similarity score is used as a weight in the loss function, forcing the detector to pay more attention to severely degraded objects.
- Fine-tuned AME (FAME): Because CLIP is frozen, the raw AME weights remain static throughout training, which can cause optimization imbalances. FAME introduces a lightweight, learnable adapter that blends the CLIP embeddings with the detector’s Region of Interest (RoI) features. Supervised by soft labels based on the detector's confidence, FAME dynamically reduces the loss weight for objects the detector becomes confident about, and increases it for those it struggles with.
Datasets
The authors evaluate their method on several challenging datasets, including a massive new benchmark they created:
- HazyCOCO (New): A large-scale synthetic dataset containing 61,258 images. The authors filtered outdoor scenes from COCO2017, extracted depth maps using Depth-Anything, applied a clamping operation to preserve realistic depth hierarchies, and simulated haze using the Atmospheric Scattering Model.
- RTTS: A real-world hazy dataset consisting of 4,322 images.
- ExDark: A low-light dataset (7,363 images) used to test the model's generalizability.
- TrashCan: An underwater dataset (7,083 images) also used for generalizability testing.
Key Insights and Ideas
- Perceptual vs. Semantic Quality: Making an image look "visually pleasing" to humans via dehazing does not inherently make it friendlier to an object detector. Enhancing semantics directly in the loss space is far more robust than manipulating pixels.
- Grounded Hard-Sample Weighting: Standard Focal Loss weights samples purely based on the model's current prediction probability, which can lead to overfitting on noisy data. In contrast, AME leverages CLIP’s robust, pre-trained semantic space to provide a grounded, hierarchical prior of exactly how degraded an object is relative to its surroundings.
Key Results
The proposed CLIP-CE loss consistently outperformed both image-enhancement pipelines and standard direct detection methods:
- Hazy Environments: On the real-world RTTS dataset, the method achieved a state-of-the-art 76.76% mAP, outperforming traditional dehazing (DCP at 74.26%) and Focal Loss (70.20%). On HazyCOCO, it reached 44.92% mAP.
- Cross-Domain Generalization: Without any architecture changes, the method proved highly effective in other adverse domains, achieving 70.42% mAP on the low-light ExDark dataset and 59.63% mAP on the underwater TrashCan dataset.
- Detector Agnostic: The loss function successfully boosted performance when integrated into various architectures, including Faster R-CNN, Deformable-DETR, and RT-DETR.
Limitations and Future Work
A dedicated limitations section was not discussed in the paper. However, the ablation studies reveal that the method is sensitive to prompt engineering. For instance, adding environmental context to the prompt (e.g., "a foggy photo of a {cls}") actually degraded performance compared to the standard "a photo of a {cls}" template. This suggests that the method's efficacy is tightly bound to the specific prompt distributions CLIP was originally trained on, leaving room for future work in automated prompt optimization for adverse weather.
Summary updated