TPSeNCE: Towards Artifact-Free Realistic Rain Generation for Deraining and Object Detection in Rain

Shen Zheng, Changjie Lu, Srinivasa G. Narasimhan · DOI

Abstract

TPSeNCE is a novel unpaired image-to-image translation framework designed to generate highly realistic, artifact-free rainy images. By introducing a geometric constraint via Triangular Probability Similarity (TPS) loss and a semantically-aware contrastive loss (SeNCE), the method produces high-quality data that preserves scene integrity. Experimental results on datasets like BDD100K demonstrate that TPSeNCE significantly boosts the performance of downstream tasks, including image deraining and object detection, by providing superior synthetic training data compared to existing state-of-the-art methods.

Introduction

Computer vision systems, particularly those in autonomous driving, often face significant performance degradation in rainy conditions due to obscured details and reflections. Developing robust models requires large datasets of rainy images paired with "ground truth" clear versions. However, capturing identical scenes in varying weather conditions is practically impossible.

While synthetic rain can be added to clear images, it often lacks realism and fails to help models generalize to real-world scenarios. Unpaired image-to-image (I2I) translation, such as CycleGAN, offers an alternative but frequently introduces "hallucinations"—unwanted artifacts and distortions—or fails to control rain density. TPSeNCE addresses these challenges by generating realistic rain that preserves the original scene's integrity without common distortions.

Methods

The TPSeNCE framework introduces two primary innovations to the standard GAN-based translation pipeline to ensure high-fidelity generation.

The TPSeNCE framework architecture, incorporating TPS and SeNCE losses.

Triangular Probability Similarity (TPS) Loss

Analysis of the discriminator's feature space using T-SNE reveals that high-quality generated images naturally fall on a line segment between the "clear" and "real rainy" distributions. Conversely, images with artifacts deviate from this optimal manifold. The TPS loss leverages the triangular inequality to force generated images onto this line segment, effectively suppressing hallucinations and structural distortions.

T-SNE visualization of the discriminator feature space, showing the distribution of clear, rainy, and generated images.

Semantic Noise Contrastive Estimation (SeNCE)

Traditional contrastive learning methods often push "negative" patches away from an "anchor" patch indiscriminately. SeNCE improves upon this by incorporating semantic information via mean Pixel Accuracy (mPA) from segmentation maps. If clear and rainy images are semantically similar (e.g., sharing a car in the same location), SeNCE adjusts the contrastive "pushing force." This ensures a better balance between rain streaks and wet-surface reflections, preventing the model from over-generating rain that obscures features or under-generating rain that appears unrealistic.

Results and Discussion

The model was evaluated on several prominent driving datasets, including BDD100K, INIT, and Boreas. TPSeNCE achieved state-of-the-art scores in Kernel Inception Distance (KID) and Fréchet Inception Distance (FID) on BDD100K, indicating superior visual realism.

Key findings include:

  • Improved Downstream Performance: Deraining models trained on TPSeNCE-generated data outperformed those trained on other synthetic datasets when tested on real-world rain.
  • Object Detection Gains: A Yolov3 detector fine-tuned on TPSeNCE rainy images showed a significant performance jump on the BDD100K rainy test set, increasing mAP from 0.171 to 0.262.
  • Generalization: The framework proved weather-agnostic, producing convincing results for night-time and snowy scene generation.

The success of TPSeNCE highlights the value of using geometric constraints in discriminator manifolds and prioritizing semantic similarity over pixel-level metrics in unpaired translation tasks.

Conclusion

TPSeNCE provides a robust framework for generating realistic, artifact-free weather data. While highly effective for mild to moderate rain, future work will focus on extreme weather conditions involving intense occlusion and light scattering. Integrating physics-based rain models could further enhance realism in these challenging scenarios.

Summary updated

BibTeX
@inproceedings{zheng2024tpsence,
  author = {Shen Zheng and Changjie Lu and Srinivasa G. Narasimhan},
  title = {{TPSeNCE: Towards Artifact-Free Realistic Rain Generation for Deraining and Object Detection in Rain}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2024},
  doi = {10.1109/wacv57701.2024.00531},
}
Figure