Giter VIP home page Giter VIP logo

bid's Introduction

arXiv, Porject page, Paper, Video, Slide, Poster

Blind Image Decomposition (BID)

BID task requires separating a superimposed image into constituent underlying images in a blind setting, that is, both the source components involved in mixing as well as the mixing mechanism are unknown.

We invite our community to explore the novel BID task, including discovering interesting areas of application, developing novel methods, extending the BID setting,and constructing benchmark datasets.

Blind Image Decomposition
Junlin Han, Weihao Li, Pengfei Fang, Chunyi Sun, Jie Hong, Ali Armin, Lars Petersson, Hongdong Li
DATA61-CSIRO and Australian National University
European Conference on Computer Vision (ECCV), 2022

BID demo:

BIDeN (Blind Image Decomposition Network):

Applications of BID

Deraining (rain streak, snow, haze, raindrop):
Row 1-6 presents 6 cases of a same scene. The 6 cases are (1): rainstreak, (2): rain streak + snow, (3): rain streak + light haze, (4): rain streak + heavy haze, (5): rain streak + moderate haze + raindrop, (6)rain streak + snow + moderate haze + raindrop.

Joint shadow/reflection/watermark removal:

Prerequisites

Python 3.7 or above.

For packages, see requirements.txt.

Getting started

  • Clone this repo:
git clone https://github.com/JunlinHan/BID.git
  • Install PyTorch 1.7 or above and other dependencies (e.g., torchvision, visdom, dominate, gputil).

    For pip users, please type the command pip install -r requirements.txt.

    For Conda users, you can create a new Conda environment using conda env create -f environment.yml. (Recommend)

    We tested our code on both Windows and Ubuntu OS.

BID Datasets

BID Train/Test

  • Detailed instructions are provided at ./models/.
  • To view training results and loss plots, run python -m visdom.server and click the URL http://localhost:8097.

Task I: Mixed image decomposition across multiple domains:

Train (biden n, where n is the maximum number of source components):

python train.py --dataroot ./datasets/image_decom --name biden2 --model biden2 --dataset_mode unaligned2
python train.py --dataroot ./datasets/image_decom --name biden3 --model biden3 --dataset_mode unaligned3
...
python train.py --dataroot ./datasets/image_decom --name biden8 --model biden8 --dataset_mode unaligned8

Test a single case (use n = 3 as an example):

Test a single case:
python test.py --dataroot ./datasets/image_decom --name biden3 --model biden3 --dataset_mode unaligned3 --test_input A
python test.py --dataroot ./datasets/image_decom --name biden3 --model biden3 --dataset_mode unaligned3 --test_input AB

... ane other cases. change test_input to the case you want.

Test all cases:

python test2.py --dataroot ./datasets/image_decom --name biden3 --model biden3 --dataset_mode unaligned3

Task II.A : Real-scenario deraining in driving:

Train:

python train.py --dataroot ./datasets/raina --name task2a --model raina --dataset_mode raina

Task II.B : Real-scenario deraining in general:

Train:

python train.py --dataroot ./datasets/rainb --name task2b --model rainb --dataset_mode rainb

Task III: Joint shadow/reflection/watermark removal:

Train:

python train.py --dataroot ./datasets/jointremoval_v1 --name task3_v1 --model jointremoval --dataset_mode jointremoval
or
python train.py --dataroot ./datasets/jointremoval_v2 --name task3_v2 --model jointremoval --dataset_mode jointremoval

The test results will be saved to an html file here: ./results/.

Apply a pre-trained BIDeN model

We provide our pre-trained BIDeN models at: https://drive.google.com/drive/folders/1UBmdKZXYewJVXHT4dRaat4g8xZ61OyDF?usp=sharing

Download the pre-tained model, unzip it and put it inside ./checkpoints.

Example usage: Download the dataset of task II.A (rain in driving) and pretainred model of task II.A. Test the rain streak case.

python test.py --dataroot ./datasets/raina --name task2a --model raina --dataset_mode raina --test_input B 

Evaluation

For FID score, use pytorch-fid.

For PSNR/SSIM/RMSE/NIQE/BRISQUE, see ./metrics/.

Raindrop effect

See ./raindrop/.

Citation

If you use our code or our results, please consider citing our paper. Thanks in advance!

@inproceedings{han2022bid,
  title={Blind Image Decomposition},
  author={Junlin Han and Weihao Li and Pengfei Fang and Chunyi Sun and Jie Hong and Mohammad Ali Armin and Lars Petersson and Hongdong Li},
  booktitle={European Conference on Computer Vision (ECCV)},
  year={2022}
}

Contact

[email protected] or [email protected]

Acknowledgments

Our code is developed based on DCLGAN and CUT. We thank the auhtors of MPRNet, perceptual-reflection-removal, Double-DIP, Deep-adversarial-decomposition for sharing their source code. We thank exposure-fusion-shadow-removal and ghost-free-shadow-removal for providing the source code and results. We thank pytorch-fid for FID computation.

bid's People

Contributors

junlinhan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bid's Issues

Task II.A中的数据集

我没理解错的话,这个训练数据是随机的,每一次都不一样,这是否会对每次的训练效果产生影响呢?

reflection removal in 360 video

I apologise to ask in this way here,

I am working on a 360 film for an exhibition which has a lot of reflections in the glass of the opposite of the room which of course also part of the 360 recording.

I got your fascinating code running but i am bit confused how to proceed with my own image data.

Do You think Your Project is cape able to take glass reflections away?

Do I need to train my own model for it?

单张图片去除

抱歉 请问您的代码可以进行单张图片的阴影去除么 比如只想用一张图片去测试 貌似也要建立十几个文件夹

关于Task2数据集的疑问

你好,我想请问您在Task2中,为什么在叠加雨、雾、雪、雨滴等图层时,要将图像先加上一再除二?我实验后似乎不能得到与论文中类似的图像,但如果不采用这一步骤则可以得到类似的图像。

Image size in test stage

In the test stage, the size of the output image is 256*256, how to set the size of the output image to the original size?

The size of test dataset on Task II.A

Hi! Nice work!
To change the resolution on test dataset, I follow your advice to change "--preprocess" option to "none". But I meet some errors when processing the input image.
QQ图片20240320213736
I think the possible reason is the input image and rain-steak&snow have different resolutions. So could you give me some advice on how to deal with this situation and get the similar visual results as illustrated in your paper. Thanks a lot!

Train Test Split for the whole BID dataset

Hi, authors! I am writing a survey paper on image deraining and am very interested in your BID dataset. Could you tell me how many training and testing images are included in the BID dataset?

Question about model inference

Hi @JunlinHan,

When performing the test with the following command:

python test.py --dataroot ./datasets/raina --name task2a --model raina --dataset_mode raina --test_input B

--test_input B means I'm only testing with the rain noise cases? Use only the weight of that specific case?

(I'm sorry for this primary question, I would really like to understand about your project)

Thank you!

The size of Task II.A

Hello!Thank you for your excellent work!
I have a question about the test data:
About Task II A. May I ask what is the size of the test data displayed in the paper?

PD3$GL@TX 04ZBY)SS2X OO

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.