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

EasyOCR is not giving output and exiting before printing anything and also no error on console!!!! #1362

Open
Ctmax-ui opened this issue Jan 9, 2025 · 4 comments

Comments

@Ctmax-ui
Copy link

Ctmax-ui commented Jan 9, 2025

When i run the code it just exiting halfway there not even giving output, please help me

my system config:

  • Python 3.12.8
  • windows 10
  • i5 3gen
  • 8gb ram
  • 730 NVidia gpu
  • 256 SSD

project structure:
image

input images:
d
image

code:

import torch
import easyocr
import cv2

print(f"PyTorch version: {torch.__version__}")
print(f"EasyOCR version: {easyocr.__version__}")
print(f"OpenCV version: {cv2.__version__}")

try:
    reader = easyocr.Reader(['en'])
    result = reader.readtext('input/d.png')
    print(result)
    result = reader.readtext('input/image.jpg')
    print(f"OCR Result: {result}")
except Exception as e:
    print(f"An error occurred: {e}")

output:

PS C:\Users\user\Desktop\my-projects\random-stuff\python-image-translator> python .\testocr.py
PyTorch version: 2.5.1+cpu
EasyOCR version: 1.7.2
OpenCV version: 4.10.0
Neither CUDA nor MPS are available - defaulting to CPU. Note: This module is much faster with a GPU.
PS C:\Users\user\Desktop\my-projects\random-stuff\python-image-translator> 
PS C:\Users\user\Desktop\my-projects\random-stuff\python-image-translator> python .\testocr.py
PyTorch version: 2.5.1+cpu
EasyOCR version: 1.7.2
OpenCV version: 4.10.0
Neither CUDA nor MPS are available - defaulting to CPU. Note: This module is much faster with a GPU.
PS C:\Users\user\Desktop\my-projects\random-stuff\python-image-translator> 
@Maryam483
Copy link

yes same issue with me, the code works fine on Colab with CPU setting but not on laptop

@Ctmax-ui
Copy link
Author

yes same issue with me, the code works fine on Colab with CPU setting but not on laptop

and the worst part is, not giving any error !!!

@Maryam483
Copy link

Maryam483 commented Jan 15, 2025

then how we solve this issue ?? there is no help on internet

@Ctmax-ui
Copy link
Author

then how we solve this issue ?? there is no help on internet

No idea, maybe you could try to reinstall your os.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants