2

I was succesful using easyocr on my computer with gpu and cuda, but now I have to use it also on machine with only cpu. After following the installation guide from https://www.jaided.ai/easyocr/install/ and installing pytorch from https://pytorch.org/get-started/locally/ choosing stable/widnows/pip/python/cpu I just copied example from tutorial https://www.jaided.ai/easyocr/tutorial/ saving the example picture from the website.

I've used pip to install both pytorch, by running pip3 install torch torchvision torchaudio and pip install easyocr in my venv. I've also tried adding opencv-python, sice I've read that sometimes it can help. Imports semm to work fine, I've also used

import torch
x = torch.rand(5, 3)
print(x)

to check if pytorch is installed properly. The problem is, after running the most basic script from tutorial:

import easyocr
reader = easyocr.Reader(['ch_tra', 'en'], gpu=False)
result = reader.readtext('./data/chinese_tra.jpg')
print(result)

There is no output, only this message:

Using CPU. Note: This module is much faster with a GPU.

I've also tried using different images that worked on my machine with GPU, so I think this isn't a problem with image.

Any suggestions on what should I check/do differently to make easyocr work on machine with only cpu?

Edit: I've tried the same approach and steps on machine with cpu only, but linux (ubuntu 20.04). It works fine then.

zorka5
  • 105
  • 1
  • 9
  • @PeterCordes I am not sure if this is wat you are asking, but I've used test image from tutorial (chinese_tra.jpg) – zorka5 Nov 27 '22 at 16:36
  • 1
    And also, as I mentioned - I used images hat worked on my machine with gpu, so I don't think that the problem is with images. – zorka5 Nov 27 '22 at 16:39
  • Oh, if that's a tutorial then it should be fine. I haven't used EasyOCR, I was just here for the [cpu] tag, but this question isn't about CPUs and how they work, it's about easyocr, so I edited tags. I only skimmed a tiny bit of the question, missed those important parts. – Peter Cordes Nov 27 '22 at 16:40
  • You're reporting a bug, either on documentation or code, but in the wrong place. Check the supplier's bugtracker for existing reports and optionally file your own. – Ulrich Eckhardt Nov 27 '22 at 19:01

0 Answers0