Giter VIP home page Giter VIP logo

flash-reflection-removal's Introduction

Robust Reflection Removal with Reflection-free Flash-only Cues (RFC)

Tensorflow implementation for:
Robust Reflection Removal with Reflection-free Flash-only Cues
Chenyang Lei, Qifeng Chen
HKUST

in CVPR 2021

News

  • 2022.03.15 PyTorch version is released

To Do

  • Release test code
  • Prepare paper and upload to arxiv
  • Make project page
  • Release training code
  • Release dataset
  • Release raw data processing code

TL;DR quickstart

To setup a conda environment, test on demo data:

conda env create -f environment.yml
conda activate flashrr-rfc
bash download.sh
python test.py

Setup

Environment

This code is based on tensorflow. It has been tested on Ubuntu 18.04 LTS.

Anaconda is recommended: Ubuntu 18.04 | Ubuntu 16.04

After installing Anaconda, you can setup the environment simply by

conda env create -f environment.yml

Download checkpoint and VGG model

You can download the ckpt and VGG model by

bash download.sh

Quick inference

You can get the results for the demo data by:

python test.py

If you prepare your own dataset, note that each data sample must contains an ambient image and a flash-only iamge:

python test.py --testset /path/to/your/testset

Training

Reproduce our results

First, download the dataset:

bash download_data.sh

Then, you can train a model by

python train.py --model YOUR_MODEL_NAME

Raw data preprocessing

First, download raw images on OneDrive (70MB for each iamge).

Then,

python rawdata_processing.py

Three rgb images will be saved in ./ dir. You can modify the resolutions by yourself in the code.

What is a RFC (Reflection-free Flash-only Cue)?

The reflection-free cue exploits a flash-only image obtained by subtracting the ambient image from the corresponding flash image in raw data space. The flash-only image is equivalent to an image taken in a dark environment with only a flash on. The reflection disappears in this flash-only image.

Please check our Project Page for detailed explanation.

Citation

If you find our work useful for your research, please consider citing the following papers :)

@InProceedings{Lei_2021_RFC,
     title={Robust Reflection Removal with Reflection-free Flash-only Cues}, 
     author={Chenyang Lei and Qifeng Chen},
     booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
     year = {2021}
}

If you are also interested in the polarization reflection removal, please refer to this work.

If you use the synthetic dataset, please cite these two papers since we use their data to synthesize the images:

Contact

Please contact me if there is any question (Chenyang Lei, [email protected])

License

TBD

flash-reflection-removal's People

Contributors

chenyanglei avatar xjiangan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.