This repository is unofficial implementation of BEDSR-Net: A Deep Shadow Removal Network From a Single Document Image [Lin+, CVPR 2020] with PyTorch.
Shadow image | Non-shadow image | Attention Map | Background color |
---|---|---|---|
- Python3.x
- PyTorch 1.8.0
- matplotlib==3.4.2
- albumentations==0.4.6
You can download the Jung dataset: csv/images.
The data folders should be:
./csv
- /Jung
- /train.csv
- /val.csv
- /test.csv
./dataset
- /Jung
- /train
- /img
- /gt
...
- /val
- /img
- /gt
...
- /test
- /img
- /gt
...
python3 utils/make_configs.py --model benet bedsrnet
python3 train_benet.py ./configs/model\=benet/config.yaml
python3 train_bedsrnet.py ./configs/model\=bedsrnet/config.yaml
You can use W&B by --use_wandb
.
Please check demo.ipynb
.
You can download pretrained models trained on Jung dataset.
When you would like to test your own image, you can use demo.ipynb .
- BEDSR-Net_A_Deep_Shadow_Removal_Network_from_a_Single_Document_Image, Yun-Hsuan Lin, Wen-Chin Chen, Yung-Yu Chuang, National Taiwan University, [paper]
- implementation of BE-Net
- training code for BE-Net
- implementation of SR-Net
- training code for BEDSR-Net
- implementation of ST-CGAN-BE
- calculating code (PSNR/SSIM)
- inference code
- Democode in Colab.
- cleaning up / formatting
- Writing README
- providing pretrained model
- providing synthesized data