All Projects → BADBADBADBOY → pytorch.ctpn

BADBADBADBOY / pytorch.ctpn

Licence: other
pytorch, ctpn ,text detection ,ocr,文本检测

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to pytorch.ctpn

Text Detection Ctpn
text detection mainly based on ctpn model in tensorflow, id card detect, connectionist text proposal network
Stars: ✭ 3,242 (+2535.77%)
Mutual labels:  ocr, text-detection, ctpn
Craft Remade
Implementation of CRAFT Text Detection
Stars: ✭ 127 (+3.25%)
Mutual labels:  ocr, text-detection
Differentiablebinarization
DB (Real-time Scene Text Detection with Differentiable Binarization) implementation in Keras and Tensorflow
Stars: ✭ 106 (-13.82%)
Mutual labels:  ocr, text-detection
East icpr
Forked from argman/EAST for the ICPR MTWI 2018 CHALLENGE
Stars: ✭ 154 (+25.2%)
Mutual labels:  ocr, text-detection
Image Text Localization Recognition
A general list of resources to image text localization and recognition 场景文本位置感知与识别的论文资源与实现合集 シーンテキストの位置認識と識別のための論文リソースの要約
Stars: ✭ 788 (+540.65%)
Mutual labels:  ocr, text-detection
Ctpn
Detecting Text in Natural Image with Connectionist Text Proposal Network (ECCV'16)
Stars: ✭ 1,220 (+891.87%)
Mutual labels:  ocr, text-detection
Tedeval
TedEval: A Fair Evaluation Metric for Scene Text Detectors
Stars: ✭ 143 (+16.26%)
Mutual labels:  ocr, text-detection
Dbnet.pytorch
A pytorch re-implementation of Real-time Scene Text Detection with Differentiable Binarization
Stars: ✭ 435 (+253.66%)
Mutual labels:  ocr, text-detection
Adelaidet
AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
Stars: ✭ 2,565 (+1985.37%)
Mutual labels:  ocr, text-detection
Text Detection
Text detection with mainly MSER and SWT
Stars: ✭ 167 (+35.77%)
Mutual labels:  ocr, text-detection
Awesome Deep Text Detection Recognition
A curated list of resources for text detection/recognition (optical character recognition ) with deep learning methods.
Stars: ✭ 2,282 (+1755.28%)
Mutual labels:  ocr, text-detection
Keras Ocr
A packaged and flexible version of the CRAFT text detector and Keras CRNN recognition model.
Stars: ✭ 782 (+535.77%)
Mutual labels:  ocr, text-detection
Seglink
An Implementation of the seglink alogrithm in paper Detecting Oriented Text in Natural Images by Linking Segments
Stars: ✭ 479 (+289.43%)
Mutual labels:  ocr, text-detection
Keras Ctpn
keras复现场景文本检测网络CPTN: 《Detecting Text in Natural Image with Connectionist Text Proposal Network》;欢迎试用,关注,并反馈问题...
Stars: ✭ 89 (-27.64%)
Mutual labels:  ocr, text-detection
Tensorflow psenet
This is a tensorflow re-implementation of PSENet: Shape Robust Text Detection with Progressive Scale Expansion Network.My blog:
Stars: ✭ 472 (+283.74%)
Mutual labels:  ocr, text-detection
Craft keras
Keras implementation of Character Region Awareness for Text Detection (CRAFT)
Stars: ✭ 143 (+16.26%)
Mutual labels:  ocr, text-detection
Chinese Ocr
[python3.6] 运用tf实现自然场景文字检测,keras/pytorch实现ctpn+crnn+ctc实现不定长场景文字OCR识别
Stars: ✭ 2,589 (+2004.88%)
Mutual labels:  ocr, ctpn
React Native Tesseract Ocr
Tesseract OCR wrapper for React Native
Stars: ✭ 384 (+212.2%)
Mutual labels:  ocr, text-detection
Psenet.pytorch
A pytorch re-implementation of PSENet: Shape Robust Text Detection with Progressive Scale Expansion Network
Stars: ✭ 416 (+238.21%)
Mutual labels:  ocr, text-detection
Craft Pytorch
Official implementation of Character Region Awareness for Text Detection (CRAFT)
Stars: ✭ 2,220 (+1704.88%)
Mutual labels:  ocr, text-detection

text-detection-ctpn-pytorch

my blog about CTPN blog

Conlusion

Ctpn works better for horizontal text, but worse for oblique and curved text.If you are interested in text detection and model compression, you can pay attention to the two projects I will do next, psenet and DBNet

setup

nms and bbox utils are written in cython, you have to build the library first.

cd utils/bbox
sh make.sh

It will generate a nms.so and a bbox.so in current folder.


how to test

  • follow setup to build the library
  • download the test model
  • change you own model_path , dir_path and save_path in inference.py
python3 inference.py

test model

base_model Model_size(M) model_file
vgg16_bn 67.7 baiduyun(extract code: 5pgy)
resnet50 137 baiduyun(extract code: 5pgy)
shufflenet_v2_x1_0 25.4 baiduyun (extract code: 5pgy)
mobilenet_v3_large 16.9 baiduyun (extract code: 5pgy)
mobilenet_v3_small 13.5 baiduyun (extract code: 5pgy)

how to train

data format

follow icdar15 dataset format, x1,y1,x2,y2,x3,y3,x4,y4,label

image
│   1.jpg
│   2.jpg   
│		...
label
│   1.txt
│   2.txt
|		...

train

Simplely run

python3 train.py --base_model vgg16_bn --batch_size 4 --size_list [1048]

Some explanations

  1. Support switching basemodel,(mobilenet_v3_large,mobilenet_v3_small, shufflenet_v2_x1_0, shufflenet_v2_x0_5, vgg11, vgg11_bn, vgg16, vgg16_bn, vgg19, vgg19_bn, resnet18, resnet34 ,resnet50, resnet101, resnet152)
  2. Ohem algorithm is added
  3. Support batch training
  4. When the size_list has multiple values, the maximum edge of the training picture will be randomly zoomed when training. It should be noted that you must ensure that your GPU memory supports maximum edge scaling.

performance

only train on icdar2015
rescall prediction hmean
0.4058 0.6117 0.4879

some results in icdar2015


some results in MTWI2018

reference

  1. https://github.com/eragonruan/text-detection-ctpn
  2. https://github.com/AstarLight/Lets_OCR/tree/master/detector/ctpn
  3. https://github.com/xhzdeng/stela
  4. https://github.com/xiaolai-sqlai/mobilenetv3
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].