Rain generation algorithms have the potential to improve the generalization of deraining methods and scene understanding in rainy conditions. However, in practice, they produce artifacts and distortions and struggle to control the amount of rain generated due to a lack of proper constraints. In this paper, we propose an unpaired image-to-image translation framework for generating realistic rainy images. We first introduce a Triangular Probability Similarity (TPS) constraint to guide the generated images toward clear and rainy images in the discriminator manifold, thereby minimizing artifacts and distortions during rain generation. Unlike conventional contrastive learning approaches, which indiscriminately push negative samples away from the anchors, we propose a Semantic Noise Contrastive Estimation (SeNCE) strategy and reassess the pushing force of negative samples based on the semantic similarity between the clear and the rainy images and the feature similarity between the anchor and the negative samples. Experiments demonstrate realistic rain generation with minimal artifacts and distortions, which benefits image deraining and object detection in rain. Furthermore, the method can be used to generate realistic snowy and night images, underscoring its potential for broader applicability. Code is available at https://github.com/ShenZheng2000/TPSeNCE.
翻译:雨图生成算法有望提升去雨方法在雨天场景下的泛化能力及场景理解性能。然而,实际应用中的现有算法因缺乏恰当约束而产生伪影与畸变,且难以控制生成雨量。本文提出一种非配对图像到图像翻译框架,用于生成逼真的雨天图像。我们首先引入三角概率相似度约束,引导生成图像在判别器流形中趋近清晰图像与真实雨图,从而最小化雨图生成过程中的伪影与畸变。不同于传统对比学习方法无差别地推开负样本,我们提出语义噪声对比估计策略,基于清晰图像与雨天图像的语义相似度以及锚点与负样本的特征相似度,重新评估负样本的推离作用。实验表明,本方法能以极低伪影和畸变生成逼真雨图,有效提升雨天图像去雨及目标检测性能。此外,该方法还可用于生成逼真的雪景与夜景图像,展现出广泛的应用潜力。代码已开源于 https://github.com/ShenZheng2000/TPSeNCE。