《Single Image Reflection Removal Beyond Linearity》(CVPR 2019)

Overview

Single-Image-Reflection-Removal-Beyond-Linearity

Paper

Single Image Reflection Removal Beyond Linearity.

Qiang Wen, Yinjie Tan, Jing Qin, Wenxi Liu, Guoqiang Han, and Shengfeng He*

Requirement

  • Python 3.5
  • PIL
  • OpenCV-Python
  • Numpy
  • Pytorch 0.4.0
  • Ubuntu 16.04 LTS

Reflection Synthesis

cd ./Synthesis
  • Constrcut these new folders for training and testing

    training set: trainA, trainB, trainC(contains real-world reflection images for adversarial loss.)

    testing set: testA(contains the images to be used as reflection.), testB(contains the images to be used as transmission.)

  • To train the synthesis model:

python3 ./train.py --dataroot path_to_dir_for_reflection_synthesis/ --gpu_ids 0 --save_epoch_freq 1 --batchSize 10

or you can directly:

bash ./synthesis_train.sh
  • To test the synthesis model:
python3 ./test.py --dataroot path_to_dir_for_synthesis/ --gpu_ids 0 --which_epoch 130 --how_many 1

or you can directly:

bash ./synthesis_test.sh

Here is the pre-trained model. And to generate the three types of reflection images, you can use these original images which are from perceptual-reflection-removal.

Due to the copyright, the real reflection images are not released here.

Reflection Removal

cd ./Removal
  • Constrcut these new folders for training and testing

    training set: trainA(contains the reflection ground truth.), trainB(contains the transmission ground truth), trainC(contains the images which have the reflection to remove.), trainW(contains the alpha blending mask ground truth.)

    testing set: testB(contains the transmission ground truth), testC(contains the images which have the reflection to remove.)

  • To train the removal model:

python3 ./train.py --dataroot path_to_dir_for_reflection_removal/ --gpu_ids 0 --save_epoch_freq 1 --batchSize 5 --which_type focused

or you can directly:

bash ./removal_train.sh
  • To test the removal model:
python3 ./test.py --dataroot path_to_dir_for_reflection_removal/ --which_type focused --which_epoch 130 --how_many 1

or you can directly:

bash ./removal_test.sh

Here are the pre-trained models which are trained on the three types of synthetic dataset.

Here are the synthetic training set and testing set for reflection removal.

To evaluate on other datasets, please finetune the pre-trained models or re-train a new model on the specific training set.

Acknowledgments

Part of the code is based upon pytorch-CycleGAN-and-pix2pix.

Citation

@InProceedings{Wen_2019_CVPR,
  author = {Wen, Qiang and Tan, Yinjie and Qin, Jing and Liu, Wenxi and Han, Guoqiang and He, Shengfeng},
  title = {Single Image Reflection Removal Beyond Linearity},
  booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  month = {June},
  year = {2019}
}
Owner
Qiang Wen
Qiang Wen
🌊 Online machine learning in Python

In a nutshell River is a Python library for online machine learning. It is the result of a merger between creme and scikit-multiflow. River's ambition

OnlineML 4k Jan 02, 2023
From Canonical Correlation Analysis to Self-supervised Graph Neural Networks

Code for CCA-SSG model proposed in the NeurIPS 2021 paper From Canonical Correlation Analysis to Self-supervised Graph Neural Networks.

Hengrui Zhang 44 Nov 27, 2022
Learning Multiresolution Matrix Factorization and its Wavelet Networks on Graphs

Project Learning Multiresolution Matrix Factorization and its Wavelet Networks on Graphs, https://arxiv.org/pdf/2111.01940.pdf. Authors Truong Son Hy

5 Jun 28, 2022
[CVPR'22] Weakly Supervised Semantic Segmentation by Pixel-to-Prototype Contrast

wseg Overview The Pytorch implementation of Weakly Supervised Semantic Segmentation by Pixel-to-Prototype Contrast. [arXiv] Though image-level weakly

Ye Du 96 Dec 30, 2022
Multi-objective constrained optimization for energy applications via tree ensembles

Multi-objective constrained optimization for energy applications via tree ensembles

C⚙G - Imperial College London 1 Nov 19, 2021
Code and Resources for the Transformer Encoder Reasoning Network (TERN)

Transformer Encoder Reasoning Network Code for the cross-modal visual-linguistic retrieval method from "Transformer Reasoning Network for Image-Text M

Nicola Messina 53 Dec 30, 2022
🍷 Gracefully claim weekly free games and monthly content from Epic Store.

EPIC 免费人 🚀 优雅地领取 Epic 免费游戏 Introduction 👋 Epic AwesomeGamer 帮助玩家优雅地领取 Epic 免费游戏。 使用 「Epic免费人」可以实现如下需求: get:搬空游戏商店,获取所有常驻免费游戏与免费附加内容; claim:领取周免游戏及其免

571 Dec 28, 2022
PyTorch implementation of the Deep SLDA method from our CVPRW-2020 paper "Lifelong Machine Learning with Deep Streaming Linear Discriminant Analysis"

Lifelong Machine Learning with Deep Streaming Linear Discriminant Analysis This is a PyTorch implementation of the Deep Streaming Linear Discriminant

Tyler Hayes 41 Dec 25, 2022
The all new way to turn your boring vector meshes into the new fad in town; Voxels!

Voxelator The all new way to turn your boring vector meshes into the new fad in town; Voxels! Notes: I have not tested this on a rotated mesh. With fu

6 Feb 03, 2022
Codes and scripts for "Explainable Semantic Space by Grounding Languageto Vision with Cross-Modal Contrastive Learning"

Visually Grounded Bert Language Model This repository is the official implementation of Explainable Semantic Space by Grounding Language to Vision wit

17 Dec 17, 2022
Colossal-AI: A Unified Deep Learning System for Large-Scale Parallel Training

ColossalAI An integrated large-scale model training system with efficient parallelization techniques. arXiv: Colossal-AI: A Unified Deep Learning Syst

HPC-AI Tech 7.9k Jan 08, 2023
SegTransVAE: Hybrid CNN - Transformer with Regularization for medical image segmentation

SegTransVAE: Hybrid CNN - Transformer with Regularization for medical image segmentation This repo is the official implementation for SegTransVAE. Seg

Nguyen Truong Hai 4 Aug 04, 2022
A simple rest api serving a deep learning model that classifies human gender based on their faces. (vgg16 transfare learning)

this is a simple rest api serving a deep learning model that classifies human gender based on their faces. (vgg16 transfare learning)

crispengari 5 Dec 09, 2021
Bayesian optimization in PyTorch

BoTorch is a library for Bayesian Optimization built on PyTorch. BoTorch is currently in beta and under active development! Why BoTorch ? BoTorch Prov

2.5k Dec 31, 2022
CVPR2021 Workshop - HDRUNet: Single Image HDR Reconstruction with Denoising and Dequantization.

HDRUNet [Paper Link] HDRUNet: Single Image HDR Reconstruction with Denoising and Dequantization By Xiangyu Chen, Yihao Liu, Zhengwen Zhang, Yu Qiao an

XyChen 105 Dec 20, 2022
An Approach to Explore Logistic Regression Models

User-centered Regression An Approach to Explore Logistic Regression Models This tool applies the potential of Attribute-RadViz in identifying correlat

0 Nov 12, 2021
Unofficial PyTorch Implementation for HifiFace (https://arxiv.org/abs/2106.09965)

HifiFace — Unofficial Pytorch Implementation Image source: HifiFace: 3D Shape and Semantic Prior Guided High Fidelity Face Swapping (figure 1, pg. 1)

MINDs Lab 218 Jan 04, 2023
Ranking Models in Unlabeled New Environments (iccv21)

Ranking Models in Unlabeled New Environments Prerequisites This code uses the following libraries Python 3.7 NumPy PyTorch 1.7.0 + torchivision 0.8.1

14 Dec 17, 2021
LIAO Shuiying 6 Dec 01, 2022
Tool which allow you to detect and translate text.

Text detection and recognition This repository contains tool which allow to detect region with text and translate it one by one. Description Two pretr

Damian Panek 176 Nov 28, 2022