Stop printing warning message "Using CPU. Note: This module is much faster with a GPU."

Viewed 957

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.

2 Answers

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)

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

Related