Semi-LAR: Semi-supervised Contrastive Learning with Linear Attention for Removal of Nighttime Flares
Abstract
Lens flare removal is challenging due to the large spatial extent of flare artifacts and their entangle-ment with scene structures, while existing meth-ods heavily rely on large-scale paired data. We propose a semi-supervised flare removal frame-work that enables stable learning from unlabeled images by jointly addressing pseudo-label relia-bility and representation discrimination. We pro-pose an adaptive pseudo-label repository that pro-gressively refines pseudo supervision through no-reference quality assessment, momentum-based updates, and invalid label filtering, effectively mit-igating error accumulation. Moreover, we pro-pose a flare-aware contrastive loss that explic-itly treats flare-contaminated inputs as negatives and performs patch-level contrastive learning, en-couraging representations that are discriminative against flare patterns while remaining consistent with reliable pseudo targets. Extensive experi-ments on multiple flare benchmarks demonstrate that the proposed framework is model-agnostic and consistently improves performance and ro-bustness.
Lay Summary
Nighttime photos often contain bright flare artifacts, such as halos, streaks, and glare, when strong light sources shine into the camera lens. These artifacts can make images look blurry, reduce contrast, and hide important scene details. This paper presents a method for removing such nighttime flares while preserving the original background and light source information. A major difficulty in this task is that it is expensive to collect many pairs of flare-corrupted images and clean reference images. To reduce this dependence, our method learns not only from labeled training examples, but also from additional unlabeled nighttime images. It gradually selects and improves reliable training targets from these unlabeled images, while learning to distinguish real scene content from unwanted flare patterns. Experiments on several flare removal benchmarks show that the proposed method can achieve strong restoration quality using much fewer labeled images than fully supervised methods, suggesting that the method can be useful for improving nighttime photography and other vision applications in challenging lighting conditions.