GithubHelp home page GithubHelp logo

sageref's Introduction

SageRef

SageRef: Single Image Reflection Removal

Usage

$ python main.py --help
usage: main.py [-h] --gpu GPU --mode {train,eval,predict} [--epochs EPOCHS] [--latent_dim LATENT_DIM] [--out_dir OUT_DIR]
               [--data_dir DATA_DIR] [--split_dir SPLIT_DIR] [--batch_size BATCH_SIZE] [--learning_rate LEARNING_RATE]

run the relection removal experiment

optional arguments:
  -h, --help            show this help message and exit
  --gpu GPU             gpu id
  --mode {train,eval,predict}
                        mode: [train, eval, predict]
  --epochs EPOCHS       number of training epochs
  --latent_dim LATENT_DIM
                        latent space feature dimensions
  --out_dir OUT_DIR     output directory
  --data_dir DATA_DIR   data directory
  --split_dir SPLIT_DIR
                        data directory
  --batch_size BATCH_SIZE
                        batch size for training
  --learning_rate LEARNING_RATE
                        learning rate

Datasets Used

Evaluation

Predictions

# run the following code after defining img_path and module
from src.utils import predict
img = Image.open(img_path)
predict(module, img)

Performance Metrics

  • PSNR (Peak Signal-to-Noise Ratio): torchmetrics.PeakSignalNoiseRatio
  • SSIM (Structural Similarity Index): torchmetrics.StructuralSimilarityIndexMeasure
  • LPIPS (Learned Perceptual Image Patch Similarity): torchmetrics.image.lpip.LearnedPerceptualImagePatchSimilarity

Models used for comparisons

  • "Robust Reflection Removal with Reflection-free Flash-only Cues" (CVPR 2021) (pdf, github)
  • "Trash or Treasure? An Interactive Dual-Stream Strategy for Single Image Reflection Separation" (NeurIPS 2021) (pdf, github)
  • "Single Image Reflection Removal Exploiting Misaligned Training Data and Network Enhancements" (CVPR 2019) (pdf,github)
  • "Single Image Reflection Removal with Perceptual Losses" (CVPR 2018) (pdf, github)

Acknowledgement

The network architecture and the codebase is based on Phillip Lippe's UvA Deep Learning Tutorial 9: Deep Autoencoders

sageref's People

Contributors

madaanpulkit avatar araps1 avatar nrishabh avatar lint-action avatar parthvinm avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar

sageref's Issues

Create a dataset for evaluation

This dataset should have a mix of the following:

  • items that have been held out from dataset used for training
  • items that are from a completely different dataset (yet relevant to our problem)
  • some synthetically created images to test any remaining cases (edge cases, anomalies, etc.)

Ideally, we should have at least one dataset that is the standard in the industry for evaluating solutions similar to ours. It will help in comparison with other papers.

Fix LPIPS

LPIPS is throwing some error apparently. So, deal with that.

Add checkpoint callback

Checkpoint with

  • fixed frequency
  • best val metric model
  • latest model (for resume functionality)

Linter config

@ARaps1 can you point me to the source of the linter config code used?
What linter does it use?
And does this only check or does it make changes to the code as well?

The linter is failing on setup.

Create entry point file

We need a main.py file on the top level of the repo dir structure, which takes in all the args and also task to perform (train, eval, infer). This will then call files from src for the configuration provided.

Finalize evaluation metrics and methods

Explore publications to stake out different methods of evaluating the model. Ideal case scenario would be finding a couple of metrics that are standard in the field.

Fix low SSIM

The SSIM is in the order of e-2. Find out why and fix that.

Experimental Setup

Add the following to Readme.md once finalized:

  • Dataset
  • Evaluation metrics
  • Algorithms/Models

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.