Code Monkey home page Code Monkey logo

pytessy's People

Contributors

hyperrixel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pytessy's Issues

A couple of bugs

First off, thanks for this library, it sped up the OCR in my code by 8-10x relative to pytesseract (which I was using previously).

I've noticed a couple of bugs in the (0.1.0) code though:

  1. Line 262 raised an AttributeError for me so I had to change it (I just used dirname(abspath(__file__)) instead, which sets the working dir to where pytessy is installed).
  2. justread_raw calls get_text, I think it should be calling get_text_raw instead.

For reference and for future users, I'm leaving my code here as a sample:

from pytessy.pytessy import PyTessy

ocr = PyTessy(r'C:\Program Files\Tesseract-OCR\tesseract')

bytes = img.tobytes()  # img is a numpy array, such as from np.array(PIL.Image.open(file))
h, w = img.shape[:2]
bpp = len(bytes) // (w * h)
txt = ocr.read(bytes, w, h, bpp)

new release

Do you plan to create a new release based on PR and other forks?

AttributeError: module 'pytessy' has no attribute 'PyTessy'

pip3 install pytessy

import pytessy
from PIL import ImageFilter, Image
ocrReader = pytessy.PyTessy()

C:\Users\hp\Documents\Projects\ExtractImageLoc>python pytessy.py
Traceback (most recent call last):
File "pytessy.py", line 2, in
import pytessy
File "C:\Users\hp\Documents\Projects\ExtractImageLoc\pytessy.py", line 11, in
ocrReader = pytessy.PyTessy()
AttributeError: module 'pytessy' has no attribute 'PyTessy'

Sample code?

Hi! Looks very interesting. Are there any docs, and some sample code? Thank you!

OSError: [WinError 127] The specified procedure could not be found

Seems to struggle when certain other packages are imported, so far I have found bs4 causes an issue.

from pytessy import pytessy
from bs4 import BeautifulSoup
digit_reader = pytessy.PyTessy()

Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\dev\lib\site-packages\IPython\core\interactiveshell.py", line 3296, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 2, in
digit_reader = pytessy.PyTessy()
File "C:\ProgramData\Anaconda3\envs\dev\lib\site-packages\pytessy\pytessy.py", line 322, in init
language=language)
File "C:\ProgramData\Anaconda3\envs\dev\lib\site-packages\pytessy\pytessy.py", line 86, in init
self.setup_lib(lib_path)
File "C:\ProgramData\Anaconda3\envs\dev\lib\site-packages\pytessy\pytessy.py", line 157, in setup_lib
cls.lib = lib = ctypes.CDLL(lib_path)
File "C:\ProgramData\Anaconda3\envs\dev\lib\ctypes_init
.py", line 356, in init
self._handle = _dlopen(self._name, mode)
OSError: [WinError 127] The specified procedure could not be found

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.