This repository is the implementation of "Don't Forget Me: Accurate Background Recovery for Text Removal via Modeling Local-Global Context". paper supple
The inference codes are available.
We have updated our retrained model weights on Jul 27. You can download it Here.
For any questions, please email to me. Thank you for your interest.
My environment can be refered as follows:
Install torchlight
cd ./torchlight
python setup.py install
We use SCUT-EnsText and SCUT-Syn.
After downloading, run flist.py
to generate data lists.
mkdir datasets
python flist.py --path path_to_enstext_test_set --output ./datasets/enstext_test.flist
All the images are set to 512 * 512. The strucuture images for LCG block are generated by the official code in RTV methods. You can generate the data yourselves, and we will also provide the test data here. data.
For generating the results with text removal, the commond is as follows:
CUDA_VISIBLE_DEVICES=0 python test.py \
--bs 1 --gpus 1 --prefix CTRNet \
--img_flist your/test/flist/ \
--model your/model/weights --save_path ./results --save \
The PSNR is calculated with [skimage.metrics.peak_signal_noise_ratio]().
The repository is benefit a lot from SPL and DETR. Thanks a lot for their excellent work.
If you find our method or dataset useful for your reserach, please cite:
@ARTICLE{CTRNet,
author ={Liu, Chongyu and Jin, Lianwen and Liu, Yuliang and Luo, canjie and Chen, Bangdong and Guo, Fengjun and Ding, Kai},
journal ={ECCV},
title ={Don’t Forget Me: Accurate Background Recovery for Text Removal via Modeling Local-Global Context},
year ={2022},}
Suggestions and opinions of our work (both positive and negative) are welcome. Please contact the authors by sending email to Chongyu Liu(liuchongyu1996@gmail.com). For commercial usage, please contact Prof. Lianwen Jin via (eelwjin@scut.edu.cn).