All Projects → jinyeying → DC-ShadowNet-Hard-and-Soft-Shadow-Removal

jinyeying / DC-ShadowNet-Hard-and-Soft-Shadow-Removal

Licence: other
[ICCV2021]DC-ShadowNet: Single-Image Hard and Soft Shadow Removal Using Unsupervised Domain-Classifier Guided Network, https://arxiv.org/abs/2207.10434

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to DC-ShadowNet-Hard-and-Soft-Shadow-Removal

SwinIR
SwinIR: Image Restoration Using Swin Transformer (official repository)
Stars: ✭ 1,260 (+1455.56%)
Mutual labels:  restoration, low-level-vision
React Scroll Shadow
Pure CSS shadow to indicate more content in scrollable area
Stars: ✭ 229 (+182.72%)
Mutual labels:  shadow
Real Shadow
Module that casts photorealistic shadows
Stars: ✭ 1,066 (+1216.05%)
Mutual labels:  shadow
Arclayout
With Arc Layout explore new styles and approaches on material design
Stars: ✭ 1,662 (+1951.85%)
Mutual labels:  shadow
Css Vars Ponyfill
Client-side support for CSS custom properties (aka "CSS variables") in legacy and modern browsers
Stars: ✭ 1,166 (+1339.51%)
Mutual labels:  shadow
Flutter shine.dart
Flutter Shine is a library for pretty and realistic shadows, dynamic light positions, extremely customizable shadows, no library dependencies, text or box shadows based on content.
Stars: ✭ 135 (+66.67%)
Mutual labels:  shadow
Rwidgethelper
Android UI 快速开发,专治原生控件各种不服
Stars: ✭ 996 (+1129.63%)
Mutual labels:  shadow
get-css-data
A micro-library for collecting stylesheet data from link and style nodes
Stars: ✭ 29 (-64.2%)
Mutual labels:  shadow
Zydra
Stars: ✭ 178 (+119.75%)
Mutual labels:  shadow
Shadow Rs
A build-time information stored in your rust project.(binary,lib,cdylib,dylib)
Stars: ✭ 117 (+44.44%)
Mutual labels:  shadow
Xselectorutil
一个可以用代码处理控件的阴影效果,及用代码在TextView、EditText、Button等控件设置selector背景(触摸反馈,样式变化、文字颜色变化、hint文字颜色变化等效果)的组件
Stars: ✭ 98 (+20.99%)
Mutual labels:  shadow
Ishadow
Creating a beautiful iOS style shadow [Sketch Plugin]
Stars: ✭ 89 (+9.88%)
Mutual labels:  shadow
Image Shadow
Simple and small Javascript script to display the shadow of an image!
Stars: ✭ 142 (+75.31%)
Mutual labels:  shadow
Shadowsocksx Ng R8
ShadowsocksX-NG-R for MacOS, ShadowsocksR
Stars: ✭ 1,066 (+1216.05%)
Mutual labels:  shadow
Shadowimageview
🔥可以根据图片内容变阴影颜色,更加细腻的阴影效果 It can change color according to the picture, more delicate shadow effect
Stars: ✭ 2,560 (+3060.49%)
Mutual labels:  shadow
Uiutil
UIUtil for Android, Lyrics, Tick animations, Comparisons, Satellite menus, Praise, Slide buttons, TAB indicators, Contact sorting, Drag sorting, Skidding deletes, Shadow effects, RecyclerView nesting RecyclerView, Map list Poi/Drawer effects, Progress settings, Clock set, Damping, Progress, Album, Snap, Progress, CircleDownload, AdvertSwitcher, Carousel ad, FlowLayout, Tag...; 歌词控件、打勾动画、对比、卫星菜单、点赞、滑动按钮、TAB指示器、联系人排序、拖曳排序、侧滑删除、阴影效果.、RecyclerView嵌套RecyclerView.、地图列表Poi/抽屉效果、进度设置、时钟设置、滑动阻尼、相册媒体快照、圆形下载进度,轮播广告, 流式布局,标签...
Stars: ✭ 1,018 (+1156.79%)
Mutual labels:  shadow
Sketch Make Long Shadow
A plugin for Sketch to create long shadows of a user defined length from a shape.
Stars: ✭ 92 (+13.58%)
Mutual labels:  shadow
Shadows
Shädows - A Shadows & Lights engine for löve
Stars: ✭ 134 (+65.43%)
Mutual labels:  shadow
MacOSX-VFS-redirector
Mac OS X file system filter to redirect file operations
Stars: ✭ 38 (-53.09%)
Mutual labels:  shadow
Vqengine
DirectX 11 Renderer written in C++11
Stars: ✭ 250 (+208.64%)
Mutual labels:  shadow

DC-ShadowNet (ICCV'2021)

Introduction

This is an implementation of the following paper.

DC-ShadowNet: Single-Image Hard and Soft Shadow Removal Using Unsupervised Domain-Classifier Guided Network. International Conference on Computer Vision (ICCV'2021)

Yeying Jin, Aashish Sharma and Robby T. Tan

[Paper] [Supplementary] arXiv [Poster] [Slides] [Link]

PWC PWC

Abstract

Shadow removal from a single image is generally still an open problem. Most existing learning-based methods use supervised learning and require a large number of paired images (shadow and corresponding non-shadow images) for training. A recent unsupervised method, Mask-ShadowGAN, addresses this limitation. However, it requires a binary mask to represent shadow regions, making it inapplicable to soft shadows. To address the problem, in this paper, we propose an unsupervised domain-classifier guided shadow removal network, DC-ShadowNet. Specifically, we propose to integrate a shadow/shadow-free domain classifier into a generator and its discriminator, enabling them to focus on shadow regions. To train our network, we introduce novel losses based on physics-based shadow-free chromaticity, shadow-robust perceptual features, and boundary smoothness. Moreover, we show that our unsupervised network can be used for test-time training that further improves the results. Our experiments show that all these novel components allow our method to handle soft shadows, and also to perform better on hard shadows both quantitatively and qualitatively than the existing state-of-the-art shadow removal methods.

Prerequisites

conda env create -f shadow_env.yml

Datasets

  1. SRD (please download train BaiduNetdisk and test from the authors). Extracted Shadow Masks in the SRD Dataset

  2. AISTD

  3. LRSS: Soft Shadow Dataset

  4. ISTD

  5. USR: Unpaired Shadow Removal Dataset

Shadow Removal Results:

1. SRD Dataset Results:

DC-ShadowNet-SRD, SRD-Results

2. AISTD/ISTD+ Dataset Results:

DC-ShadowNet-AISTD, AISTD-Results

3. LRSS Soft Shadow Dataset Results:

DC-ShadowNet-LRSS, LRSS-Results

4. ISTD Dataset Results:

DC-ShadowNet-ISTD, ISTD-Results

5. USR Dataset Results:

DC-ShadowNet-USR, USR-Results

Evaluation

The default root mean squared error (RMSE) evaluation code used by all methods (including ours) actually computes mean absolute error (MAE).

  1. The faster version MAE evaluation code
  2. The original version MAE evaluation code

1. SRD Dataset Evaluation

set the paths of the shadow removal result and the dataset in demo_srd_release.m and then run it.

demo_srd_release.m

Get the following Table 1 in the main paper on the SRD (size: 256x256).

Method Training All Shadow Non-Shadow
DC-ShadowNet Unpaired 4.66 7.70 3.39
Input Image N/A 13.77 37.40 3.96

For SRD (size: 640x840)

Method Training All Shadow Non-Shadow
DC-ShadowNet Unpaired 6.57 9.84 5.52

2. AISTD Dataset Evaluation

set the paths of the shadow removal result and the dataset in demo_aistd_release.m and then run it.

demo_aistd_release.m

Get the following Table 2 in the main paper on the AISTD (size: 256x256).

Method Training All Shadow Non-Shadow
DC-ShadowNet Unpaired 4.6 10.3 3.5

For AISTD (size: 480x640)

Method Training All Shadow Non-Shadow
DC-ShadowNet Unpaired 6.33 11.37 5.38

3. LRSS Soft Shadow Dataset Evaluation

set the paths of the shadow removal result and the dataset in demo_lrss_release.m and then run it.

demo_lrss_release.m

Get the following Table 3 in the main paper on the LRSS dataset (size: 256x256).

Method Training All
DC-ShadowNet Unpaired 3.48
Input Image N/A 12.26

Pre-trained Model

  1. Download the pre-trained SRD model, put in results/SRD/model/

  2. Download the pre-trained AISTD model, put in results/AISTD/model/

  3. Download the pre-trained ISTD model, put in results/ISTD/model/

Test

python main_test.py --dataset SRD --datasetpath [path_to_SRD dataset] --use_original_name False

rename to the original name, please change the suffix of test images accordingly (.jpg or .png)

python main_test.py --dataset SRD --datasetpath [path_to_SRD dataset] --use_original_name True --im_suf_A .jpg

Results in: results/SRD/[iteration]/outputB; results/SRD/[iteration]/inputA_outputB

Train

  1. Implement the papers On the removal of shadows from images (TPAMI,05) and Recovery of Chromaticity Image Free from Shadows via Illumination Invariance (ICCV,03)
    [Update] We will not release our implementation.

  1. Download Datasets and run 1. get the Shadow-Free Chromaticity Maps after Illumination Compensation, and put them in the trainC folder, you should see the following directory structure.
${DC-ShadowNet-Hard-and-Soft-Shadow-Removal}
|-- dataset
    |-- SRD
      |-- trainA ## Shadow 
      |-- trainB ## Shadow-free 
      |-- trainC ## Shadow-Free Chromaticity Maps after Illumination Compensation
      |-- testA  ## Shadow 
      |-- testB  ## Shadow-free 
...
  1. python main_train.py --dataset SRD --datasetpath [path_to_SRD dataset] --iteration [iteration]
    [Update] We have released DCShadowNet_train.py on Dec 7, 2022.

Shadow-Robust Feature

Get the following Figure 5 in the main paper, VGG feature visualization code is in feature_release folder,

python test_VGGfeatures.py

Results in: ./results_VGGfeatures/shadow_VGGfeatures/layernumber/imagenumber/visual_featurenumber_RMSE.jpg

Citation

If this work is useful for your research, please cite our paper.

@inproceedings{jin2021dc,
  title={DC-ShadowNet: Single-Image Hard and Soft Shadow Removal Using Unsupervised Domain-Classifier Guided Network},
  author={Jin, Yeying and Sharma, Aashish and Tan, Robby T},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={5027--5036},
  year={2021}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].