2

I am running a Python program using the excellent EasyOCR module. It relies on PyTorch for image detection and every time I run it, it produces a warning: "Using CPU. Note: This module is much faster with a GPU." for each iteration.

What can I add to my code to stop this output without stopping other output? I don't have a GPU so that is not an option.

wovano
  • 4,543
  • 5
  • 22
  • 49

2 Answers2

7

After looking into the source code, I noticed that verbose is set to True by default in the constructor.

After setting verbose=False the message stops appearing.

reader = easyocr.Reader(['en'], gpu=False, verbose=False)
wovano
  • 4,543
  • 5
  • 22
  • 49
Thunduaga
  • 71
  • 2
-1

I think there is a command line parameter --gpu=false. Have you tried that?

Kilian
  • 468
  • 2
  • 9