All Projects → chineseocr → Chineseocr

chineseocr / Chineseocr

Licence: mit
yolo3+ocr

Programming Languages

python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
CSS
56736 projects
Jupyter Notebook
11667 projects
HTML
75241 projects
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to Chineseocr

align iranian national id card
A program to align rotated id cards and extract user data from it.
Stars: ✭ 48 (-98.95%)
Mutual labels:  ocr, idcard
ID-Card-Passport-Recognition-SDK-Android
On-Device ID Card & Passport & Driver License Recognition SDK for Android
Stars: ✭ 223 (-95.11%)
Mutual labels:  ocr, idcard
idcardocr
离线环境下第二代居民身份证信息识别
Stars: ✭ 358 (-92.15%)
Mutual labels:  ocr, idcard
Qanswer
【Deprecated】🥇🥇🥇 冲顶大会等游戏答题助手,提供答题辅助决策 ,帮助顺利吃鸡
Stars: ✭ 326 (-92.85%)
Mutual labels:  ocr
Megreader
A research project for text detection and recognition using PyTorch 1.2.
Stars: ✭ 332 (-92.72%)
Mutual labels:  ocr
Tessdata
Trained models with support for legacy and LSTM OCR engine
Stars: ✭ 4,173 (-8.45%)
Mutual labels:  ocr
Psenet.pytorch
A pytorch re-implementation of PSENet: Shape Robust Text Detection with Progressive Scale Expansion Network
Stars: ✭ 416 (-90.87%)
Mutual labels:  ocr
Crnn attention ocr chinese
CRNN with attention to do OCR,add Chinese recognition
Stars: ✭ 315 (-93.09%)
Mutual labels:  ocr
Mayan Edms
Repository mirror of GtLab: https://gitlab.com/mayan-edms/mayan-edms Please use the upstream repository for issues and pull requests.
Stars: ✭ 398 (-91.27%)
Mutual labels:  ocr
Ocrserver
A simple OCR API server, seriously easy to be deployed by Docker, on Heroku as well
Stars: ✭ 359 (-92.12%)
Mutual labels:  ocr
Ccextractor
CCExtractor - Official version maintained by the core team
Stars: ✭ 356 (-92.19%)
Mutual labels:  ocr
Awesome Ocr Resources
A collection of resources (including the papers and datasets) of OCR (Optical Character Recognition).
Stars: ✭ 335 (-92.65%)
Mutual labels:  ocr
React Native Tesseract Ocr
Tesseract OCR wrapper for React Native
Stars: ✭ 384 (-91.58%)
Mutual labels:  ocr
Idcardocr
离线环境下第二代居民身份证信息识别
Stars: ✭ 328 (-92.8%)
Mutual labels:  ocr
Opensearchserver
Open-source Enterprise Grade Search Engine Software
Stars: ✭ 408 (-91.05%)
Mutual labels:  ocr
Baidu Ocr Api
👓 Baidu OCR Api For Node.js
Stars: ✭ 315 (-93.09%)
Mutual labels:  ocr
Baiduyun deeplearning competition
百度云魅族深度学习应用大赛
Stars: ✭ 393 (-91.38%)
Mutual labels:  ocr
Card Ocr
身份证识别OCR
Stars: ✭ 345 (-92.43%)
Mutual labels:  ocr
Cnn lstm ctc tensorflow
CNN+LSTM+CTC based OCR implemented using tensorflow.
Stars: ✭ 343 (-92.47%)
Mutual labels:  ocr
Camera
二代身份证信息识别
Stars: ✭ 360 (-92.1%)
Mutual labels:  ocr

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

darknet 优化版本:https://github.com/chineseocr/darknet-ocr.git

训练代码(master分支)

ocr训练数据集

ocr ctc训练数据集(压缩包解码:chineseocr)
百度网盘地址:链接: https://pan.baidu.com/s/1UcUKUUELLwdM29zfbztzdw 提取码: atwn
gofile地址:http://gofile.me/4Nlqh/uT32hAjbx 密码 https://github.com/chineseocr/chineseocr

实现功能

  • 文字方向检测 0、90、180、270度检测(支持dnn/tensorflow)
  • 支持(darknet/opencv dnn /keras)文字检测,支持darknet/keras训练
  • 不定长OCR训练(英文、中英文) crnn\dense ocr 识别及训练 ,新增pytorch转keras模型代码(tools/pytorch_to_keras.py)
  • 支持darknet 转keras, keras转darknet, pytorch 转keras模型
  • 身份证/火车票结构化数据识别
  • 新增CNN+ctc模型,支持DNN模块调用OCR,单行图像平均时间为0.02秒以下
  • CPU版本加速
  • 支持基于用户字典OCR识别
  • 新增语言模型修正OCR识别结果
  • 支持树莓派实时识别方案

环境部署

GPU部署 参考:setup.md
CPU部署 参考:setup-cpu.md

下载编译darknet(如果直接运用opencv dnn或者keras yolo3 可忽略darknet的编译)

git clone https://github.com/pjreddie/darknet.git 
mv darknet chineseocr/
##编译对GPU、cudnn的支持 修改 Makefile
#GPU=1
#CUDNN=1
#OPENCV=0
#OPENMP=0
make 

修改 darknet/python/darknet.py line 48
root = '/root/'##chineseocr所在目录
lib = CDLL(root+"chineseocr/darknet/libdarknet.so", RTLD_GLOBAL)

下载模型文件

模型文件地址:

模型转换(非必须)

pytorch ocr 转keras ocr

python tools/pytorch_to_keras.py  -weights_path models/ocr-dense.pth -output_path models/ocr-dense-keras.h5

darknet 转keras

python tools/darknet_to_keras.py -cfg_path models/text.cfg -weights_path models/text.weights -output_path models/text.h5

keras 转darknet

python tools/keras_to_darknet.py -cfg_path models/text.cfg -weights_path models/text.h5 -output_path models/text.weights

模型选择

参考config.py文件

构建docker镜像

##下载Anaconda3 python 环境安装包(https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh) 放置在chineseocr目录下   
##建立镜像   
docker build -t chineseocr .   
##启动服务   
docker run -d -p 8080:8080 chineseocr /root/anaconda3/bin/python app.py

web服务启动

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

访问服务

http://127.0.0.1:8080/ocr

识别结果展示

参考

  1. yolo3 https://github.com/pjreddie/darknet.git
  2. crnn https://github.com/meijieru/crnn.pytorch.git
  3. ctpn https://github.com/eragonruan/text-detection-ctpn
  4. CTPN https://github.com/tianzhi0549/CTPN
  5. keras yolo3 https://github.com/qqwweee/keras-yolo3.git
  6. darknet keras 模型转换参考 参考:https://www.cnblogs.com/shouhuxianjian/p/10567201.html
  7. 语言模型实现 https://github.com/lukhy/masr

技术支持

mail:[email protected]
wechat:lywen52

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].