Chinese Ocr

基于CTPN(tensorflow)+CRNN(pytorch)+CTC的不定长文本检测和识别
Alternatives To Chinese Ocr
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Transformers88,46364911a day ago91June 21, 2022618apache-2.0Python
🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
Real Time Voice Cloning40,272
8 days ago104otherPython
Clone a voice in 5 seconds to generate arbitrary speech in real-time
Ray24,80780199a day ago76June 09, 20222,872apache-2.0Python
Ray is a unified framework for scaling AI and Python applications. Ray consists of a core distributed runtime and a toolkit of libraries (Ray AIR) for accelerating ML workloads.
Netron21,780463a day ago489July 04, 202222mitJavaScript
Visualizer for neural network, deep learning, and machine learning models
D2l En16,954
12 days ago83otherPython
Interactive deep learning book with multi-framework code, math, and discussions. Adopted at 400 universities from 60 countries including Stanford, MIT, Harvard, and Cambridge.
Ncnn16,760
2 days ago19July 01, 2022957otherC++
ncnn is a high-performance neural network inference framework optimized for the mobile platform
Datasets15,6339208a day ago52June 15, 2022532apache-2.0Python
🤗 The largest hub of ready-to-use datasets for ML models with fast, easy-to-use and efficient data manipulation tools
Deeplearning Models15,594
a month ago5mitJupyter Notebook
A collection of various deep learning architectures, models, and tips
Onnx14,351148245a day ago26June 18, 2022373apache-2.0Python
Open standard for machine learning interoperability
Horovod13,14220106 days ago72June 21, 2022344otherPython
Distributed training framework for TensorFlow, Keras, PyTorch, and Apache MXNet.
Alternatives To Chinese Ocr
Select To Compare


Alternative Project Comparisons
Readme

chinese-ocr

基于CTPN(tensorflow)+CRNN(pytorch)+CTC的不定长文本检测和识别

环境部署

sh setup.sh  
  
使用环境: python 3.6 + tensorflow 1.10 + pytorch 0.4.1
  • 注:CPU环境执行前需注释掉for gpu部分,并解开for cpu部分的注释

Demo

python demo.py    

下载 预训练模型

CRNN

将pytorch-crnn.pth放入/train/models中

CTPN

将checkpoints.zip解压后的内容放入/ctpn/checkpoints中

模型训练

warp-ctc安装pytorch版

详见 warp-ctc.pytorch

CTPN训练

详见 tensorflow-ctpn

CRNN训练

1.数据准备

下载训练集

  • 共约364万张图片,按照99:1划分成训练集和验证集
  • 数据利用中文语料库(新闻 + 文言文),通过字体、大小、灰度、模糊、透视、拉伸等变化随机生成
  • 包含汉字、英文字母、数字和标点共5990个字符
  • 每个样本固定10个字符,字符随机截取自语料库中的句子
  • 图片分辨率统一为280x32

修改/train/config.py中train_data_rootvalidation_data_root以及image_path

2.训练

cd train  
python train.py

3.训练结果

效果展示

CTPN

OCR

参考

warp-ctc-pytorch
chinese_ocr-(tensorflow+keras)
CTPN-tensorflow
crnn-pytorch

Popular Pytorch Projects
Popular Tensorflow Projects
Popular Machine Learning Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Python
Pytorch
Tensorflow
Chinese
Ocr
Ctc
Crnn