Skip to content

Latest commit

 

History

History

ndlocr_text_recognition

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

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