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.
翻译:降雨生成算法有望提升去雨方法及雨天场景理解的泛化能力。然而在实际应用中,由于缺乏适当约束,这些算法会产生伪影和畸变,并难以控制生成的雨量。本文提出一种无配对图像到图像转换框架,用于生成具有真实感的雨天图像。我们首先引入三角概率相似度(TPS)约束,引导生成的图像在判别器流形上同时遵循清晰图像与雨天图像的分布,从而最小化降雨生成过程中的伪影与畸变。与将负样本不加区分地推离锚点的传统对比学习策略不同,我们提出语义噪声对比估计(SeNCE)策略,基于清晰图像与雨天图像间的语义相似度以及锚点与负样本间的特征相似度,重新评估负样本的推离强度。实验表明,该方法能以最少伪影与畸变实现真实感降雨生成,从而惠及雨天图像去雨与目标检测任务。此外,本方法还可用于生成真实感的雪景与夜景图像,彰显其广泛适用潜力。代码已开源在 https://github.com/ShenZheng2000/TPSeNCE。