GithubHelp home page GithubHelp logo

b03901165shih / icme22_shadowremoval Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 133.69 MB

[ICME 2022] Shadow Removal Through Learning-based Region Matching And Mapping Function Optimization

License: MIT License

MATLAB 1.22% C++ 3.35% CMake 0.17% C 94.96% Makefile 0.29% Batchfile 0.01%
daisy slic shadow-removal icme2022 learning-based optimization matlab shadow region-matching

icme22_shadowremoval's Introduction

[ICME 2022] Shadow Removal Through Learning-based Region Matching And Mapping Function Optimization

We present a novel shadow removal where the inputs are a single natural image to be restored and its corresponding shadow mask. We first decompose the image by super-pixels and cluster them into several similar regions. Then we train a random forest model to predict matched pairs between shadow and non-shadow regions. By applying a distribution-based mapping function on the matched pairs, we can relight pixels in those shadow regions. An optimization framework based on half-quadratic splitting (HQS) method is also introduced to further improve the quality of the mapping process. We also design a post-processing stage with a boundary inpainting function to generate better visual results. Our experiments show that the proposed method can remove shadows effectively and produce high quality shadow-free images

Overview

This repository contains the Matlab demo code for the shadow removal algorithm described in the following ICME 2022 paper:

Shadow Removal Through Learning-based Region Matching And Mapping Function Optimization
Shih-Wei Hsieh, Chih-Hsiang Yang, Yi-Chang Lu

Requirements

This code is tested in Windows Matlab 2020b version. Other Matlab version may work but the result may be different.

  • Matlab 2020b or higher.
  • Image Processing toolbox

If the priovided mex executable cannot be used in your environment, please follow instructions in readme to compile the mex for the following library:

  • SLIC-superpixel in ./SLIC-superpixel-master/
  • Daisy descriptor in ./DAISY/

Usage

  • Run the demo code:
demo.m

The demo code runs with a small subset of the ISTD dataset.

Results:

Input image | Result (shadow removed) || Input image | Result (shadow removed)

Results

The shadow mask is produced using the code provided here.

The full set of shadow masks and shadow removal results for the ISTD dataset can be download from respective paths.

Citation

If you find this code useful in your research, please give a reference to the paper.

@inproceedings{hsieh2022shadow,
  title={Shadow Removal Through Learning-Based Region Matching and Mapping Function Optimization},
  author={Hsieh, Shih-Wei and Yang, Chih-Hsiang and Lu, Yi-Chang},
  booktitle={2022 IEEE International Conference on Multimedia and Expo (ICME)},
  pages={1--6},
  year={2022},
  organization={IEEE Computer Society}
}

icme22_shadowremoval's People

Contributors

b03901165shih avatar

Stargazers

 avatar  avatar

Watchers

 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.