Skip to content

Latest commit

 

History

History
 
 

text_recognition_crnn

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CRNN

An End-to-End Trainable Neural Network for Image-based Sequence Recognition and Its Application to Scene Text Recognition

Results of accuracy evaluation with tools/eval at different text recognition datasets.

Model name ICDAR03(%) IIIT5k(%) CUTE80(%)
CRNN_EN 81.66 74.33 52.78
CRNN_EN_FP16 82.01 74.93 52.34
CRNN_EN_INT8 81.75 75.33 52.43
CRNN_CH 71.28 80.90 67.36
CRNN_CH_FP16 78.63 80.93 67.01
CRNN_CH_INT8 78.11 81.20 67.01

*: 'FP16' or 'INT8' stands for 'model quantized into FP16' or 'model quantized into int8'

Note:

Demo

NOTE:

Python

Run the demo detecting English:

# detect on camera input
python demo.py
# detect on an image
python demo.py --input /path/to/image -v

# get help regarding various parameters
python demo.py --help

Run the demo detecting Chinese:

# detect on camera input
python demo.py --model text_recognition_CRNN_CN_2021nov.onnx
# detect on an image
python demo.py --input /path/to/image --model text_recognition_CRNN_CN_2021nov.onnx

# get help regarding various parameters
python demo.py --help

C++

Install latest OpenCV and CMake >= 3.24.0 to get started with:

# detect on camera input
./build/opencv_zoo_text_recognition_crnn 
# detect on an image
./build/opencv_zoo_text_recognition_crnn --input /path/to/image -v

# get help regarding various parameters
./build/opencv_zoo_text_recognition_crnn --help

Run the demo detecting Chinese:

# detect on camera input
./build/opencv_zoo_text_recognition_crnn  --model=text_recognition_CRNN_CN_2021nov.onnx --charset=charset_3944_CN.txt
# detect on an image
./build/opencv_zoo_text_recognition_crnn  --input=/path/to/image --model=text_recognition_CRNN_CN_2021nov.onnx --charset=charset_3944_CN.txt

# get help regarding various parameters
./build/opencv_zoo_text_recognition_crnn  --help

Examples

CRNNCTC

demo

License

All files in this directory are licensed under Apache 2.0 License.

Reference