Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I tried to run it and ran into some problems #3

Closed
binglebai opened this issue Mar 19, 2020 · 10 comments
Closed

I tried to run it and ran into some problems #3

binglebai opened this issue Mar 19, 2020 · 10 comments
Labels

Comments

@binglebai
Copy link

Warning error
Traceback (most recent call last): File "C:/Users/amp/PycharmProjects/untitled3/test.py", line 2, in <module> reader = jaidedread.Reader(['th','en']) File "C:\Users\amp\PycharmProjects\untitled3\venv\lib\site-packages\jaidedread\jaidedread.py", line 87, in __init__ char_list = input_file.read().splitlines() UnicodeDecodeError: 'gbk' codec can't decode byte 0x81 in position 2: illegal multibyte sequence
I don't know what to do about it

@rkcosmos
Copy link
Contributor

I think it has to do with file decoding which was fixed by @wannaphong in the last merge (by adding encoding = "utf-8-sig"). Can you try download the last version

pip install git+git://github.com/jaidedai/jaidedread.git

and try again?

@binglebai
Copy link
Author

How much gpu memory is needed to run this program? Can i change bath_size because my computer only have 2 GiB

@rkcosmos
Copy link
Contributor

Default batch_size is already minimum. It consumed 2.xx GiB on my computer. You can try to run on cpu mode by adding optional argument.

reader = jaidedread.Reader(['en'], gpu = False)

@binglebai
Copy link
Author

i try to run on cpu mode but have new problem
`RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.`

@rkcosmos
Copy link
Contributor

Code is not tested on Windows yet. I'll fix it in next update.

@binglebai
Copy link
Author

Looking forward to the next update

@rkcosmos
Copy link
Contributor

rkcosmos commented Mar 19, 2020

I just tried it on windows. What you need is https://stackoverflow.com/questions/24363300/freeze-support-bug-in-using-scikit-learn-in-the-anaconda-python-distro. Just wrap everything in main() and call it.

for example, in your yourfilename.py

import jaidedread

def main():
    read=jaidedread.Reader(['en'], gpu=False)
    text =read.readtext('covid.jpg', workers=1, batch_size=1)
    print(text)
    
if __name__ == '__main__':
    main()

@binglebai
Copy link
Author

It's working fine
Can you share some information about this?
Or a tutorial?
I am a college student just beginning to study deep learning

@rkcosmos
Copy link
Contributor

I recommend reading those links in 'Acknowledgement and References' Section.

@binglebai
Copy link
Author

thanks

visutida added a commit that referenced this issue Jul 11, 2020
rkcosmos added a commit that referenced this issue Jul 28, 2020
update to recent version
JaidedTeam pushed a commit that referenced this issue May 18, 2023
✨ Add: Test Image, Test Code
thuc-moreh referenced this issue in moreh-dev/EasyOCR Jul 5, 2023
thuc-moreh referenced this issue in moreh-dev/EasyOCR Jul 5, 2023
update to recent version
thuc-moreh referenced this issue in moreh-dev/EasyOCR Jul 5, 2023
✨ Add: Test Image, Test Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants