Coder Social home page Coder Social logo

de-gan's Introduction

DE-GAN: A Conditional Generative Adversarial Network for Document Enhancement

Description

This is an implementation for the paper DE-GAN: A Conditional Generative Adversarial Network for Document Enhancement
DE-GAN is a conditional generative adversarial network designed to enhance the document quality before the recognition process. It could be used for document cleaning, binarization, deblurring and watermark removal. The weights are available to test the enhancement.

License

This work is only allowed for academic research use. For commercial use, please contact the author.

Download

  • Clone this repo:
git clone https://github.com/dali92002/DE-GAN
cd DE-GAN

Requirements

  • install the requirements.txt

Using DE-GAN

Document binarization

  • To binarize an image use the followng command:
python enhance.py binarize ./image_to_binarize ./directory_to_binarized_image

image:

alt text

binarized image:

alt text

Document deblurring

  • To deblur an image use the followng command:
python enhance.py deblur ./image_to_deblur ./directory_to_deblurred_image

blurred image:

alt text

enhanced image:

alt text

Watermark removal

  • To remove a watermark from an image use the followng command:
python enhance.py unwatermark ./image_to_unwatermark ./directory_to_unwatermarked_image

watermarked image:

alt text

clean image:

alt text

Document cleaning

  • Will be added: degraded image:

    alt text

    cleaned image:

    alt text

Training with your own data

  • To train with your own data, place your degraded images in the folder "images/A/" and the corresponding ground-truth in the folder "images/B/". It is necessary that each degraded image and its corresponding gt are having the same name (could have different extentions), also, the number images should be the same in both folders.
  • Command to train:
python train.py 
  • Specifying the batch size and the number of epochs could be done inside the code.

Citation

  • If this work was useful for you, please cite it as:
@ARTICLE{Souibgui2020,
  author={Mohamed Ali Souibgui  and Yousri Kessentini},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence}, 
  title={DE-GAN: A Conditional Generative Adversarial Network for Document Enhancement}, 
  year={2020},
  doi={10.1109/TPAMI.2020.3022406}}

de-gan's People

Contributors

dali92002 avatar

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.