Skip to content

e-flare/toolkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English | 简体中文

Learning to Remove Lens Flare in Event Camera

Haiqian Han     Lingdong Kong     Jianing Li     Ao Liang     Chengtao Zhu     Jiacheng Lyu     Lai Xing Ng
Xiangyang Ji     Wei Tsang Ooi     Benoit R. Cottereau

     

Teaser

Event cameras have the potential to revolutionize vision systems with their high temporal resolution and dynamic range, yet they remain susceptible to lens flare, a fundamental optical artifact that causes severe degradation. In event streams, this optical artifact forms a complex, spatio-temporal distortion that has been largely overlooked.

We present the first systematic framework for removing lens flare from event camera data.

  • We first establish the theoretical foundation by deriving a physics-grounded forward model of the non-linear suppression mechanism.
  • This insight enables the creation of the E-Deflare benchmark, a comprehensive resource featuring a large-scale simulated training set, E-Flare-2.7K, and the first-ever paired real-world test set, E-Flare-R, captured by our novel optical system.
  • Empowered by this benchmark, we design E-DeflareNet, which achieves state-of-the-art restoration performance.

Extensive experiments validate our approach and demonstrate clear benefits for downstream tasks.

📚 Citation

If you find this work helpful for your research, please kindly consider citing our paper:

@article{han2025e-deflare,
    title   = {Learning to Remove Lens Flare in Event Camera},
    author  = {Haiqian Han and Lingdong Kong and Jianing Li and Ao Liang and Chengtao Zhu and Jiacheng Lyu and Lai Xing Ng and Xiangyang Ji and Wei Tsang Ooi and Benoit R. Cottereau},
    journal = {arXiv preprint arXiv:2512.09016},
    year    = {2025}
}

Updates

  • [12/2025] - E-DeflareNet pretrained model weights are now available for download. 🏋️
  • [12/2025] - The E-Flare-2.7K, E-Flare-R, and DSEC-Flare datasets are ready for download at HuggingFace Dataset.
  • [12/2025] - The Project Page is online. 🚀

Outline

⚙️ Installation

For details related to installation and environment setups, kindly refer to INSTALL.md.

♨️ Data Preparation

Kindly refer to our HuggingFace Dataset 🤗 page from here for more details.

💾 Pretrained Models

We provide pretrained E-DeflareNet model weights for inference and evaluation:

Download Links

Model Training Dataset Checkpoint Download
E-DeflareNet E-Flare-2.7K (physics_noRandom_noTen) checkpoint.pth Baidu Netdisk (Code: ejsj) | HuggingFace 🤗

Model Details

  • Architecture: TrueResidualUNet3D with ResidualUNet3D backbone
  • Parameters: ~7M (f_maps: [32, 64, 128, 256], 4 levels)
  • Input/Output: Voxel grid (8 temporal bins, 480×640 resolution)
  • Training: 31 epochs, 40,000 iterations on physics-based simulated flare dataset

For usage instructions, see GET_STARTED.md.

🚀 Getting Started

To learn more usage of this codebase, kindly refer to GET_STARTED.md.

📐 E-Deflare Benchmark

Data Curation, Training & Validation

framework

Summary of Datasets

Dataset Type Split # Samples Description
E-Flare-2.7K Simulated Train 2,545 Large-scale simulated training set. Each sample is a 20ms voxel grid
Test 175
E-Flare-R Real-World Test 150 Real-world paired test set for sim-to-real evaluation
DSEC-Flare Real-World Curated sequences from DSEC showcasing lens flare in public datasets

Experiments on E-Flare-2.7K

Method Chamfer↓ Gaussian↓ MSE↓ PMSE 2↓ PMSE 4↓ R-F1↑ T-F1↑ TP-F1↑
● Raw Input 1.3555 0.5222 0.8315 0.3666 0.3430 0.5138 0.6303 0.6939
● EFR 1.3237 0.5439 0.5357 0.2019 0.1755 0.1616 0.3572 0.4811
● PFD-A 1.3958 0.5397 0.8357 0.3637 0.3392 0.4383 0.5496 0.6125
● PFD-B 1.2496 0.4613 0.2851 0.1159 0.1021 0.4460 0.5155 0.5727
● Voxel Transform 1.2923 0.5576 0.3495 0.1037 0.0829 0.2177 0.5444 0.6318
● E-DeflareNet (Ours) 0.4477 0.2646 0.1269 0.0487 0.0435 0.7071 0.7627 0.7794
Improvement (%) 64.2%↑ 42.6%↑ 55.5%↑ 53.0%↑ 47.5%↑ 58.5%↑ 38.8%↑ 23.4%↑

Qualitative Results on E-Flare-2.7K

e-flare2.7k

Experiments on E-Flare-R

Method Chamfer↓ Gaussian↓ MSE↓ PMSE 2↓ PMSE 4↓ R-F1↑ T-F1↑ TP-F1↑
● Raw Input 1.7855 0.7170 0.8158 0.3431 0.3266 0.2299 0.2915 0.3093
● EFR 1.8191 0.7266 0.3388 0.1403 0.1330 0.0839 0.1807 0.2372
● PFD-A 1.7642 0.7067 0.7924 0.3341 0.3182 0.2386 0.3081 0.3283
● PFD-B 2.0838 0.8504 0.2759 0.1121 0.1049 0.0300 0.0717 0.0880
● Voxel Transform 1.9535 0.8167 0.3140 0.0964 0.0836 0.1036 0.2729 0.3255
● E-DeflareNet (Ours) 1.1368 0.4651 0.1741 0.0690 0.0644 0.3498 0.3386 0.3011
Improvement (%) 35.6%↑ 34.2%↑ 36.9%↑ 28.4%↑ 23.0%↑ 46.6%↑ 9.9%↑ -8.3%↓

Qualitative Results on E-Flare-R

e-flare-r

📝 TODO List

  • Initial release. 🚀
  • Release of the E-Flare-2.7K, E-Flare-R, and DSEC-Flare datasets.
  • Release of the E-DeflareNet pretrained model weights.
  • . . .

License

This work is under the Apache License Version 2.0, while some specific implementations in this codebase might be under other licenses. Kindly refer to LICENSE.md for a more careful check, if you are using our code for commercial matters.

Acknowledgements

This work is under the programme DesCartes and is supported by the National Research Foundation, Prime Minister's Office, Singapore, under its Campus for Research Excellence and Technological Enterprise (CREATE) programme. This work is also supported by the Apple Scholars in AI/ML Ph.D. Fellowship program.

affiliations