GithubHelp home page GithubHelp logo

ayesha92ahmad / nlp-image-to-text Goto Github PK

View Code? Open in Web Editor NEW
35.0 2.0 15.0 954 KB

code to extract text from images

License: MIT License

Python 100.00%
ocr text-recognition opencv-python python3 tesseract-ocr

nlp-image-to-text's Introduction

NLP-image-to-text

Code to extract text from images

pip install -r requirements.txt

If you encounter file not found error as below:

FileNotFoundError: [Errno 2] No such file or directory: 'tesseract'

Run the following command

brew install tesseract

Then run the image-to-text.py as below:

 python image-to-text.py <relative filepaths separated by spaces>

We observe that for clean inputs the accuracy is high. See input 2. Noisy input may not have the same effect!

Some sample inputs and outputs:

Input:

Don't watch the clock; Do what it does. keep going. Sam Levenson

Output:

DON’T
WATCH THE
CLOCK;



KEEP GOING.

SAM LEVENSON

/
/

7 J .- - flCESScom

Input:

How to recognize text from image with Python OpenCv OCR?

Output:

How to recognize text from image with Python OpenCv OCR ?

Input:

A negative mind will never give you a positive life.

Output:

A negative mind
will nevergive you
a positivevli‘fe.

Credit: Base code has been taken from Tram Vo Minh's blog. And modifications have been performed on that!

nlp-image-to-text's People

Contributors

ayesha92ahmad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nlp-image-to-text's Issues

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.