GithubHelp home page GithubHelp logo

ocr-detection-ctpn's Introduction

OCR-DETECTION-CTPN

CNN+LSTM (CTPN) for image text detection

example results

detect_test_results

description

To run this repo:

1, python data_base_normalize.py       # to normalize the pre-normalized background images

2, python data_generator.py 0       # to generate validation data

3, python data_generator.py 1       # to generate training data

4, python script_detect.py       # to train and validate


By 1, the pre-normalized images will firstly be rescaled if not of size 800x600, then 800x600 rects will be cropped from the rescaled images. The 800x600 images will be stored in a newly-maked directory, ./images_base.

By 2 and 3, validation data and training data will be generated. These will be store in the newly-maked directories, ./data_valid and ./data_train, respectively.

By 4, the model will be trained and validated. The validation results will be stored in ./data_valid/results. The ckpt files will be stored in a newly-maked directory, ./model_detect.

detection model

The model is mainly based on the method described in the article:

Detecting Text in Natural Image with Connectionist Text Proposal Network

Zhi Tian, Weilin Huang, Tong He, Pan He, Yu Qiao

https://arxiv.org/abs/1609.03605

ocr-detection-ctpn's People

Contributors

li-ming-fan avatar sevenhsu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ocr-detection-ctpn's Issues

The validation results can't be seen in ./data_valid/results.

I can generate generate validation data and training data and they exist in the corresponding position. But The validation results can't be seen in ./data_valid/results. I have checked the path of this file and it's correct. what is the problem, thank you very much.

error when i try training ?

Can you help me fix error when i training ?
ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[1,128,752,1184] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
[[Node: conv_comm/conv3/Conv2D = Conv2D[T=DT_FLOAT, data_format="NCHW", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 1, 1, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/device:GPU:0"](conv_comm/res1/last_relu, conv_comm/conv3/kernel/read)]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.

 [[Node: bdrnn2/bw/bw/stack/_947 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_2734_bdrnn2/bw/bw/stack", tensor_type=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"]()]]

Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.

Usage

Hello - Would it be possible to provide simple usage notes for this? Eg. command to train, command to run demo, etc... Do you know how much faster this implementation is vs tesseract w/ OpenCL?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.