← 开源
eragonruan

text-detection-ctpn

text detection mainly based on ctpn model in tensorflow, id card detect, connectionist text proposal network

Model DevelopmentClassical MLPython
在 GitHub 打开
增长势头
+024 小时新增 Star0.0%
3.43k
Star
1.31k
Fork
+1
本周
1
贡献者
创建于 2017-09-20 · 更新于 2026-10-13 · 今日第 7955 名
主要开发者

eragonruan/text-detection-ctpn 排名第 7,955,有 3,428 个星标。

同类别比较

eragonruan/text-detection-ctpn 排名第 7,955,此处有 8 个同类条目;clab/dynet 排名第 7,954。

同类别比较
名称排名指标
ShangtongZhang/DeepRL7,938
语言:
Python
星标数:
3,456
分叉数:
694
简介:
Modularized Implementation of Deep RL Algorithms in PyTorch
facebookresearch/PyTorch-BigGraph7,942
语言:
Python
星标数:
3,453
分叉数:
453
简介:
Generate embeddings from large-scale graph-structured data.
tensorflow/adanet7,943
语言:
Jupyter Notebook
星标数:
3,453
分叉数:
522
简介:
Fast and flexible AutoML with learning guarantees.
clab/dynet7,954
语言:
C++
星标数:
3,430
分叉数:
701
简介:
DyNet: The Dynamic Neural Network Toolkit
argilla-io/distilabel7,957
语言:
Python
星标数:
3,421
分叉数:
263
简介:
Distilabel is a framework for synthetic data and AI feedback for engineers who need fast, reliable and scalable pipelines based on verified research papers.
chaofengc/IQA-PyTorch7,958
语言:
Python
星标数:
3,419
分叉数:
260
简介:
🔎 🖼️ 🔥PyTorch Toolbox for Image Quality Assessment, including PSNR, SSIM, LPIPS, FID, NIQE, NRQM(Ma), MUSIQ, TOPIQ, NIMA, DBCNN, BRISQUE, PI and more...
pytorch/ELF7,963
语言:
C++
星标数:
3,409
分叉数:
571
简介:
ELF: a platform for game research with AlphaGoZero/AlphaZero reimplementation
minimaxir/gpt-2-simple7,967
语言:
Python
星标数:
3,404
分叉数:
664
简介:
Python package to easily retrain OpenAI's GPT-2 text-generating model on new texts
关键参数与规格
关键参数与规格
参数值
语言Python
类别Model Development
子类别Classical ML
关键词OCR
星标数3,428
分叉数1,307
贡献者1
创建日期2017-09-20
更新日期2026-10-13
1 天星标数0
7 天星标数1
排名7,955
上次排名8,057
排名变化102
7 天星标排名9,188
上次 7 天星标排名9,252
7 天星标排名变化64
总星标排名3,998
上次总星标排名3,992
总星标排名变化-6
国家China
README 摘录

text-detection-ctpn text detection mainly based on ctpn (connectionist text proposal network). I use id card detect as an example to demonstrate the results, but it should be noticing that this model can be used in almost every horizontal scene text detection task. Also, the origin repo in caffe can be found in here. For more detail about the paper and code, see this blog. If you got any questions, check the issue first, if the problem persists, open

a new issue. *** roadmap [x] freeze the graph for convenient inference [x] pure python, cython nms and cuda nms [x] loss function as referred in paper [x] oriented text connector [x] BLSTM *** demo for a quick demo,you don't have to build the library, simpely use demo_pb. pb in data/ put your images in data/demo, the results will be saved in data/results, and run demo in the root *** parameters there are some parameters you may need to

modify according to your requirement, you can find them in ctpn/text. yml USE_GPU_NMS # whether to use nms implemented in cuda or not DETECT_MODE # H represents horizontal mode, O represents oriented mode, default is H checkpoints_path # the model I provided is in checkpoints/, if you train the model by yourself,it will be saved in output/ *** training setup requirements: python2. 24, opencv-python, easydict,(recommend to install Anaconda) if you do not have a gpu device

,follow here to setup if you have a gpu device, build the library by prepare data First, download the pre-trained model of VGG net and put it in data/pretrain/VGG_imagenet. you can download it from google drive or baidu yun. Second, prepare the training data as referred in paper, or you can download the data I prepared from google drive or baidu yun. Or you can prepare your own data according to the following steps. Modify the

path and gt_path in prepare_training_data/split_label. And run it will generate the prepared data in current folder, and then run to convert the prepared training data into voc format. It will generate a folder named TEXTVOC. move this folder to data/ and then run train Simplely run you can modify some hyper parameters in ctpn/text. The model I provided in checkpoints is trained on GTX1070 for 50k iters. If you are using cuda nms, it

takes about 0. *** some results all the photos used below are collected from the internet. If it affects you, please contact me to delete them. *** oriented text connector oriented text connector has been implemented, i's working, but still need futher improvement. left figure is the result for DETECT_MODE H, right figure for DETECT_MODE O ***

常见问题

记录了多少星标和分叉?

eragonruan/text-detection-ctpn 有 3,428 个星标和 1,307 个分叉。

仓库排名是多少?

eragonruan/text-detection-ctpn 排名第 7,955。

记录的语言和类别是什么?

eragonruan/text-detection-ctpn 有 3,428 个星标,语言为 Python,类别为 Model Development。

哪个仓库排名最接近?

eragonruan/text-detection-ctpn 与 clab/dynet 比较,后者排名第 7,954,有 3,430 个星标。

README

text-detection-ctpn

text detection mainly based on ctpn (connectionist text proposal network). It is implemented in tensorflow. I use id card detect as an example to demonstrate the results, but it should be noticing that this model can be used in almost every horizontal scene text detection task. The origin paper can be found here. Also, the origin repo in caffe can be found in here. For more detail about the paper and code, see this blog. If you got any questions, check the issue first, if the problem persists, open a new issue.


roadmap

  • [x] freeze the graph for convenient inference
  • [x] pure python, cython nms and cuda nms
  • [x] loss function as referred in paper
  • [x] oriented text connector
  • [x] BLSTM

demo

  • for a quick demo,you don't have to build the library, simpely use demo_pb.py for inference.
  • first, git clone git@github.com:eragonruan/text-detection-ctpn.git --depth=1
  • then, download the pb file from release
  • put ctpn.pb in data/
  • put your images in data/demo, the results will be saved in data/results, and run demo in the root
python ./ctpn/demo_pb.py

parameters

there are some parameters you may need to modify according to your requirement, you can find them in ctpn/text.yml

  • USE_GPU_NMS # whether to use nms implemented in cuda or not
  • DETECT_MODE # H represents horizontal mode, O represents oriented mode, default is H
  • checkpoints_path # the model I provided is in checkpoints/, if you train the model by yourself,it will be saved in output/

training

setup

  • requirements: python2.7, tensorflow1.3, cython0.24, opencv-python, easydict,(recommend to install Anaconda)
  • if you do not have a gpu device,follow here to setup
  • if you have a gpu device, build the library by
cd lib/utils
chmod +x make.sh
./make.sh

prepare data

  • First, download the pre-trained model of VGG net and put it in data/pretrain/VGG_imagenet.npy. you can download it from google drive or baidu yun.
  • Second, prepare the training data as referred in paper, or you can download the data I prepared from google drive or baidu yun. Or you can prepare your own data according to the following steps.
  • Modify the path and gt_path in prepare_training_data/split_label.py according to your dataset. And run
cd lib/prepare_training_data
python split_label.py
  • it will generate the prepared data in current folder, and then run
python ToVoc.py
  • to convert the prepared training data into voc format. It will generate a folder named TEXTVOC. move this folder to data/ and then run
cd ../../data
ln -s TEXTVOC VOCdevkit2007

train

Simplely run

python ./ctpn/train_net.py
  • you can modify some hyper parameters in ctpn/text.yml, or just used the parameters I set.
  • The model I provided in checkpoints is trained on GTX1070 for 50k iters.
  • If you are using cuda nms, it takes about 0.2s per iter. So it will takes about 2.5 hours to finished 50k iterations.

some results

NOTICE: all the photos used below are collected from the internet. If it affects you, please contact me to delete them.


oriented text connector

  • oriented text connector has been implemented, i's working, but still need futher improvement.
  • left figure is the result for DETECT_MODE H, right figure for DETECT_MODE O

排名相邻
同类项目