GithubHelp home page GithubHelp logo

jackzhousz / sg-shadownet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jinwan1994/sg-shadownet

0.0 0.0 0.0 28 KB

Official PyTorch implementation of the paper: “Style-Guided Shadow Removal” (ECCV2022).

Python 100.00%

sg-shadownet's Introduction

SG-ShadowNet

PyTorch implementation of “Style-Guided Shadow Removal”, ECCV2022 .

Intruduction:

Abstract

Shadow removal is an important topic in image restoration, and it can benefit many computer vision tasks. State-of-the-art shadowremoval methods typically employ deep learning by minimizing a pixellevel difference between the de-shadowed region and their corresponding (pseudo) shadow-free version. After shadow removal, the shadow and non-shadow regions may exhibit inconsistent appearance, leading to a visually disharmonious image. To address this problem, we propose a style-guided shadow removal network (SG-ShadowNet) for better imagestyle consistency after shadow removal. In SG-ShadowNet, we first learn the style representation of the non-shadow region via a simple region style estimator. Then we propose a novel effective normalization strategy with the region-level style to adjust the coarsely re-covered shadow region to be more harmonized with the rest of the image. Extensive experiments show that our proposed SG-ShadowNet outperforms all the existing competitive models and achieves a new state-of-the-art performance on ISTD+, SRD, and Video Shadow Removal benchmark datasets.

1. Requirement

Simpy run (Note that the different "scikit-image" versions will affect test results.):

conda install --yes --file requirements.txt

2. Datasets

ISTD+

SRD (please email the authors).

Video Shadow Removal (version 1)

3. Evaluate the Pre-trained Models

We provide our shadow-removal results from GoogleDrive generated on the ISTD+, SRD, and Video Shadow Removal benchmark dataset.

You can also evaluate the pretrained models. Place images and testing mask (ISTD and SRD) in ./input directory and run the below script.

Before executing the script, please download the pretrained model from GoogleDrive, place the models to ./pretrained.

python test.py

Note that, ISTD+ and Video Shadow Removal have to be evaluate using the model trained on the ISTD+ dataset while SRD via the model with SRD dataset.

4. Train Models

Run the following scripts to train models.

python train.py

Acknowledgements

Thanks Zhihao Liu for his useful discussion of this work.

Thanks to previous open-sourced repo: G2R-ShadowNet

sg-shadownet's People

Contributors

jinwan1994 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.