Coder Social home page Coder Social logo

swhl / ctrnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lcy0604/ctrnet

0.0 0.0 0.0 191 KB

This repository is the implementation of "Don't Forget Me: Accurate Background Recovery for Text Removal via Modeling Local-Global Context".

License: MIT License

Shell 0.39% Python 99.18% Dockerfile 0.43%

ctrnet's Introduction

CTRNet


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.

Environment

My environment can be refered as follows:

  • Python 3.6.9
  • PyTorch 1.3 (1.3+ is also work)
  • Inplace_Abn (Only for training, the pretrained model can be downloaded at ASL, which is trained on OpenImage)
  • torchlight
  • Polygon3
  • shapely
  • skimage

Install torchlight

cd ./torchlight
python setup.py install

Datasets

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.

Testing

For generating the results with text removal, the commond is as follows:

CUDA_VISIBLE_DEVICES=0 python test.py \
        --bs 1 --gpus 1 \
        --img_flist your/test/flist/ \
        --model your/model/weights --save_path ./results --save

The PSNR is calculated with skimage.metrics.peak_signal_noise_ratio.

Acknowledge

The repository is benefit a lot from SPL and DETR. Thanks a lot for their excellent work.

Citation

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},}

Feedback

Suggestions and opinions of our work (both positive and negative) are welcome. Please contact the authors by sending email to Chongyu Liu([email protected]). For commercial usage, please contact Prof. Lianwen Jin via ([email protected]).

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.