Giter Club home page Giter Club logo

grabdoc's Introduction

grabdoc

grabdoc is a deep learning based application to extract document from image. The application outputs a RGBA image in which the alpha mask is generated by a Semantic Segmenatation model. The model is based on MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications.

sample result, image from Google Image

The reposity includes a pretrained model and a flask based Web UI.


How to use

Requirements

Python 3.6 and it depends on the following packages listed:

  • Tensorflow==1.13.1
  • opencv-python
  • numpy
  • flask
  • pillow

You can install all those packages via pip.

pip install -r requirements 

If you use docker, you can install the environment from Dockerfile.

CLI

Please note the output image should be specified with a PNG extension

python grabdoc.py samples/ellie.jpg -o output.png

GUI

If you use docker, a Flask web server will be started by default after your container is running. Otherwise, you have to start the web server manually.

python flask/app.py

The port of Flask server is hardcoded to 8080. You can visit the home page via http://{remotehost}:8080/ after it started.

A simele GUI was developed to crop the document intelligently. (I did't upload as the desgin/code is too ugly).

More samples

demo.ipynb is used to generate the results of sample images.

0 2 4 22 23 24

grabdoc's People

Contributors

iamyb avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.