Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 1.12 KB

File metadata and controls

49 lines (32 loc) · 1.12 KB

NDL OCR

Input

Input

(Image from 東洋学芸雑誌 第1号)

Output

  • Recognized text
recognized: 號壹第誌雜勢學洋東

Usage

Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.

For the sample image,

$ python3 ndlocr_text_recognition.py

If you want to specify the input image, put the image path after the --input option.

$ python3 ndlocr_text_recognition.py --input IMAGE_PATH

It automatically recognizes whether the text is written vertically or horizontally, but you can also specify that it is written vertically with the --vert option.

$ python3 ndlocr_text_recognition.py --vert

Reference

Framework

Pytorch

Model Format

ONNX opset=11

Netron

ndlenfixed64-mj0-synth1.onnx.prototxt