Git Product home page Git Product logo

chinese-ocr's Introduction

本文基于tensorflow、keras/pytorch实现对自然场景的文字检测及端到端的OCR中文文字识别

实现功能

  • 文字方向检测 0、90、180、270度检测
  • 文字检测 后期将切换到keras版本文本检测 实现keras端到端的文本检测及识别
  • 不定长OCR识别

环境部署

##GPU环境
sh setup.sh
##CPU环境
sh setup-cpu.sh

模型训练

训练keras版本的crnn

cd train & sh train-keras.sh   

训练pytorch版本的crnn

cd train & sh train-pytorch.sh   

文字方向检测

基于图像分类,在VGG16模型的基础上,训练0、90、180、270度检测的分类模型,详细代码参考angle/predict.py文件,训练图片8000张,准确率88.23%。 模型地址百度云下载

文字检测

支持CPU、GPU环境,一键部署, 文本检测训练参考(https://github.com/eragonruan/text-detection-ctpn)

OCR 端到端识别:GRU+CTC

ocr识别采用GRU+CTC端到到识别技术,实现不分隔识别不定长文字

提供keras 与pytorch版本的训练代码,在理解keras的基础上,可以切换到pytorch版本,此版本更稳定

识别结果展示

文字检测及OCR识别结果

倾斜文字

参考

1.crnn https://github.com/meijieru/crnn.pytorch.git

2.keras-crnn 版本实现参考 https://www.zhihu.com/question/59645822

3.ctpn https://github.com/eragonruan/text-detection-ctpn , https://github.com/tianzhi0549/CTPN

chinese-ocr's People

Contributors

wenlihaoyu avatar

Watchers

 avatar

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.