Code Monkey home page Code Monkey logo

cps-ocr-engine's Introduction

CPS-OCR-Engine

An awesome OCR engine developed by SYSU DeepDriving Lab

一个基于深度学习的文字识别系统,支持3755个(一级字库)的印刷体汉字识别。

因为近期在帮学校财务处审计处设计智能票据识别系统(已经支持数十类票据啦),需要用到OCR去识别一些汉字,做智能信息录入。对于汉字的识别,我尝试过Tessercact,实在太烂, 也试过百度的ocr接口,但是感觉不太适合(第一是要钱的,第二毕竟是别人的API,想优化也优化不了),那就自己搞一搞基于深度学习的OCR引擎吧,算是锻炼一下自己。

这个OCR模型专注于电子文档、证件、票据的汉字识别。

*** top 1 accuracy 0.99826 top 5 accuracy 0.99989 ***

数据合成

python gen_printed_char.py --out_dir ./dataset --font_dir ./chinese_fonts --width 30 --height 30 --margin 4 --rotate 30 --rotate_step 1

合成效果

图片说明

训练

python Chinese_OCR.py --mode=train --max_steps=16002 --eval_steps=100 --save_steps=500

模型评估

python Chinese_OCR.py --mode=validation

线上预测

要识别的图像往tmp目录下扔就行了。

 python Chinese_OCR.py --mode=inference 

效果

图片说明 图片说明

我从某篇论文中截图一小段文字,并做了单字切割,送入模型进行OCR预测。

图片说明 图片说明

识别结果全部正确!

图片说明

更多细节请访问我的博客:http://www.cnblogs.com/skyfsm/p/8443107.html

最后分享一下我的模型:链接:https://pan.baidu.com/s/1eTmm0eQ 密码:m7ns

cps-ocr-engine's People

Contributors

astarlight avatar kaiyux avatar

Stargazers

Chenggang Zhao avatar

Watchers

James Cloos avatar

Forkers

jeffreykuang

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.