Skip to content

moliqingwa/chineseocr_lite

Repository files navigation

本项目基于chineseocrpsenet 实现中文自然场景文字检测及识别

环境

pytorch 1.2.0 linux/macos

PSENET 编译

cd psenet/pse
rm -rf pse.so 
make 

实现功能

  • 提供轻量的backone检测模型psenet(8.5M),crnn_lstm_lite(9.5M) 和行文本方向分类网络(1.5M)
  • 任意方向文字检测,识别时判断行文本方向
  • crnn\crnn_lite lstm\dense识别(ocr-dense和ocr-lstm是搬运chineseocr的)
  • 支持竖排文本识别
  • ncnn 实现
  • mnn 实现

2020.03.12更新

  • 升级crnn_lite_lstm_dw.pth模型crnn_lite_lstm_dw_v2.pth , 精度更高
  • 提供竖排文字样例以及字体库(旋转90度的字体)

字体样式:

生成的竖排文本样例:

web服务启动

cd chineseocr_lite## 进入chineseocr目录
python app.py 8080 ##8080端口号,可以设置任意端口

访问服务

http://127.0.0.1:8080/ocr

识别结果展示

ncnn检测识别展示(x86 cpu 单进程)

因为ncnn模型都是dense的 lstm的没转成功,效果差的不少,以后继续优化

参考

  1. crnn https://github.com/meijieru/crnn.pytorch.git
  2. chineseocr https://github.com/chineseocr/chineseocr
  3. Psenet https://github.com/WenmuZhou/PSENet.pytorch
  4. 语言模型实现 https://github.com/lukhy/masr

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published