mmocr icon indicating copy to clipboard operation
mmocr copied to clipboard

[Docs] Installation does not provide clear examples that work on CPU

Open nigelsim opened this issue 2 years ago • 1 comments

Branch

master branch https://mmocr.readthedocs.io/en/latest/

📚 The doc issue

By default, the mmocr/ocr.py script uses cuda as the device, as opposed to automatically detecting. All of the install and quick start docs suggest you run commands like python mmocr/ocr.py --det DB_r18 --recog CRNN demo/demo_text_ocr.jpg --show to test the system, but these do not work, and fail in an unexpected way that sends users off trying to fix they pyTorch installs.

The docs already show how to otherwise get the system running on a CPU. Could you provide CPU and CUDA examples for these test scripts, at least in the installation.

Suggest a potential alternative/fix

Run the following in MMOCR’s directory:

python mmocr/ocr.py --det DB_r18 --recog CRNN demo/demo_text_ocr.jpg --show

or, for CPU only

python mmocr/ocr.py --det DB_r18 --recog CRNN demo/demo_text_ocr.jpg --show --device cpu

nigelsim avatar Jan 19 '23 06:01 nigelsim

Thanks for the feedback. We will release a new inference implementation that will automatically detect the best device to use. I guess we don't need to revise the docs at this moment.

gaotongxiao avatar Jan 20 '23 02:01 gaotongxiao