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。