Giter Site home page Giter Site logo

pdf-vision's Introduction

pdf-vision

I'm starting this project because I have a book I want textified that's in PDF format, but it appears to just be scanned pages.

Structure

You can have a scratch/ folder to stash your items, and the gitignore will handle that.

Dependencies

We require:

  • attrs for data classes.
  • PyPDF2 for reading PDFs.
  • Pillow for handling images.
  • Tesseract for OCR.
  • OpenCV for image pre-processing.

For my application, I installed the Serbian language pack.

apt install tesseract-ocr-srp

Getting Started

We recommend a virtual environment.

$ python3 -m venv venv
$ source venv/bin/activate
$ python3 -m pip install -r requirements.txt

Sample Input

The book I used to test this program is a Serbian historical text, and can be downloaded from Google Drive: https://drive.google.com/file/d/1ViI2Hq5ohhPO1pM-u_i2Lv3MAUrYS-l4/view?usp=sharing

Sample Output

Input Image: A paragraph in Cyrillic.

Text Output:

Међу митским бићима у која је веровао 'а мести- мично и данас верује сеоски народ источне Србије и Баната, својом занимљивошћу и архаичношћу истИ- че се женски шумски демон — шумска мајка.

The entire output text ( unadulterated, I haven't fixed it up at all ) can be downloaded as a tarchive here: https://drive.google.com/file/d/1eLnLqTay_zmiPFjzPOuG1D3fOoMJMRCi/view?usp=sharing

pdf-vision's People

Contributors

svidovich avatar dependabot[bot] avatar

Stargazers

NickVido avatar

Watchers

James Cloos 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.