Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Shiro-orz/OCR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 

Repository files navigation

OCR

Operate Online

项目已部署到服务器,可通过公网IP进行访问。

Local Operation

环境配置

Ubuntu18.04 + Python3.6 + Tensorflow + keras

Win10 + Python3.7 + Tensorflow + keras

git clone
virtualenv --no-site-packages --python=python3 venv
source venv/bin/activate
pip install -r requirements

配置CTPN

在Linux环境下执行以下代码

cd ctpn/utils/bbox
chmod +x make.sh
./make.sh
#会在当前目录下生成nms.so和bbox.so文件

在Win环境下执行以下代码

cd ctpn/utils/bbox
python setup.py install
#在文件夹中找到*.pyd后缀的文件,移至当前目录下

Prepare Data

CTPN

  • 下载 checkpoint file
  • 把 checkpoints_mlt/ 移至 ctpn/

CRNN

  • 下载预训练的模型
  • 将模型移至 crnn/
  • 在 crnn/densenet/model.py 中,修改 modelPath 可以选择要使用的模型文件

Run

python run.py

浏览器打开本地链接:http://127.0.0.1:5000/

Training

CRNN

1.Prepare data

  • 通过数据增强将原始数据集扩充
python aug.py
  • 将扩充过后的数据集分为训练集和验证集,生成 train.txt 和 test.txt
python cd.py

2.Training

cd python
python train.py

效果展示

图片名称 图片名称 图片名称

Reference

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

DenseNet + CTC : https://github.com/YCG09/chinese_ocr

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published