Skip to content

ngrxmu/LAB-Net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code for LAB-Net

Paper name

LAB-Net: LAB Color-Space oriented Lightweight Network for Shadow Removal

Our result

ISTD and SRD results

ISTD results

S NS ALL
RMSE PSNR SSIM RMSE PSNR SSIM RMSE PSNR SSIM
6.65 37.17 0.9887 4.49 32.42 0.9727 4.84 30.49 0.9563

All the ISTD results can be found here

SRD results

S NS ALL
RMSE PSNR SSIM RMSE PSNR SSIM RMSE PSNR SSIM
6.56 35.71 0.9818 3.77 36.5 0.9813 4.6 32.22 0.9554

All the SRD results can be found here

more texture results

shadow images:


105-1

125-1

IMG_6581

IMG_6916

results:


105-1

125-1

IMG_6581

IMG_6916

light/dark versions of the same color

shadow images:


97-2

116-4

IMG_6425

IMG_6793

results:


97-2

116-4

IMG_6425

IMG_6793

small/tiny shadows

shadow images:


117-15

124-13

_MG_3121

_MG_5956

results:


117-15

124-13

_MG_3121

_MG_5956

shallow shadows

shadow images:


94-1

97-5

IMG_5467

IMG_5491

results:


94-1

97-5

IMG_5467

IMG_5491

penumbra/soft shadows

shadow images:


99-3

124-4

_MG_5771

IMG_6456

results:


99-3

124-4

_MG_5771

IMG_6456

shadows on black objects

shadow images:


125-1

111-2

_MG_5728

IMG_6760

results:


125-1

111-2

_MG_5728

IMG_6760

Generalization

We test the SBU-TimeLapse Dataset (video), USR and ADE using the model trained on ISTD.

The mask of these data is obtained by shadow detector [1].

[1] Mitigating Intensity Bias in Shadow Detection via Feature Decomposition and Reweighting

SBU-TimeLapse Dataset (video)


shadow image

res

mask

shadow image

res

mask

shadow image

res

mask

shadow image

res

mask

USR


shadow image

res

mask

shadow image

res

mask

shadow image

res

mask

shadow image

res

mask

ADE


shadow image

res

mask

Examples of different modeling methods for L channel and AB channel

shadow images:


10-17

32-8

_MG_2763

IMG_6507

Replacing L channel of input with that of gt without changing the AB channels:


10-17

32-8

_MG_2763

IMG_6507
In these examples, L=G(L), AB=AB.

Requirements

python=3.7.13

pytorch=1.12.1

pip install -r requirments.txt

Train

Train ISTD

1. Modify './script/train.sh'

  1. Adjust loadSize(256), FineSize(256), down_w(256), down_h(256)
  2. Add dataroot(ISTD trainset path), name(task name)

2. Run 'train.sh'

cd script
bash train.sh 0

0 is the gpu number

Train SRD

1. Modify './script/train.sh'

  1. Adjust batchs(1)
  2. Adjust loadSize(400), FineSize(400), down_w(128), down_h(128)
  3. Add dataroot(SRD trainset path), name(task name)

2. Run 'train.sh'

cd script
bash train.sh 0

0 is the gpu number

See loss

You can see the train loss:

cd script
tensorboard --logdir LAB_G_LABNet_name

Test

  1. You can download our pretrained model to test.

Our ISTD checkpoint can be found here

Our SRD checkpoint can be found here

Please move the .pth to a directory to use.

Test ISTD

1. Modify './script/test.sh'

  1. Adjust size_w(640), size_h(480), down_w(256), down_h(256)
  2. Add dataroot(ISTD testset path), name(task name), resroot(path to save the result)

2. Run 'test.sh'

cd script
bash test.sh 0

0 is the gpu number

Test SRD

1. Modify './script/test.sh'

  1. Adjust size_w(840), size_h(640), down_w(128), down_h(128)
  2. Add dataroot(SRD testset path), name(task name), resroot(path to save the result)

2. Run 'test.sh'

cd script
bash test.sh 0

0 is the gpu number

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published