mmocr/demo/docs/ocr_demo.md
Hongbin Sun e2643df439
move demo image to demo/resources (#171)
* move demo image to demo/resources

* update index.rst

* revert

* update github link for demo image
2021-05-12 20:35:39 +08:00

989 B

OCR End2End Demo


End-to-End Test Image Demo

To end-to-end test a single image with text detection and recognition simutaneously:

python demo/ocr_image_demo.py demo/demo_text_det.jpg demo/output.jpg
  • The default config for text detection and recognition are PSENet_ICDAR2015 and SAR, respectively.

  • The predicted result will be saved as demo/output.jpg.

  • To use other algorithms of text detection and recognition, please set arguments: --det-config, --det-ckpt, --recog-config, --recog-ckpt.

Remarks

  1. If --imshow is specified, the demo will also show the image with OpenCV.
  2. The ocr_image_demo.py script only supports GPU and so the --device parameter cannot take cpu as an argument.