Coder Social home page Coder Social logo

0x454447415244 / handwritingrecognitionsystem Goto Github PK

View Code? Open in Web Editor NEW
414.0 22.0 135.0 5.02 MB

Handwriting Recognition System based on a deep Convolutional Recurrent Neural Network architecture

License: Other

Python 100.00%
handwriting-recognition tensorflow cnn rnn deep-learning machine-learning

handwritingrecognitionsystem's People

Contributors

0x454447415244 avatar dependabot[bot] avatar wintersoldier13 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  avatar  avatar  avatar  avatar

handwritingrecognitionsystem's Issues

Is this compatible with latest Tensorflow version?

I get the following error

2020-01-23 10:04:15.612666: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2020-01-23 10:04:15.612724: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2020-01-23 10:04:15.612734: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
File "config.py", line 12, in
flags = tf.app.flags
AttributeError: 'module' object has no attribute 'app'

Not working Python37

c:\Python37>python.exe HR\train.py
W0709 14:09:30.364569 6332 deprecation_wrapper.py:119] From HR\train.py:41: The
name tf.placeholder is deprecated. Please use tf.compat.v1.placeholder instead.

W0709 14:09:30.366611 6332 deprecation_wrapper.py:119] From c:\Python37\HR\cnn.
py:71: The name tf.variable_scope is deprecated. Please use tf.compat.v1.variabl
e_scope instead.

W0709 14:09:30.367612 6332 deprecation_wrapper.py:119] From c:\Python37\HR\util
.py:40: The name tf.truncated_normal is deprecated. Please use tf.random.truncat
ed_normal instead.

W0709 14:09:30.459672 6332 deprecation_wrapper.py:119] From c:\Python37\HR\util
.py:47: The name tf.nn.max_pool is deprecated. Please use tf.nn.max_pool2d inste
ad.

W0709 14:09:31.796136 6332 lazy_loader.py:50]
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:

W0709 14:09:31.797139 6332 deprecation.py:323] From c:\Python37\HR\rnn.py:73: L
STMCell.init (from tensorflow.python.ops.rnn_cell_impl) is deprecated and wi
ll be removed in a future version.
Instructions for updating:
This class is equivalent as tf.keras.layers.LSTMCell, and will be replaced by th
at in Tensorflow 2.0.
W0709 14:09:31.798139 6332 deprecation.py:323] From c:\Python37\HR\rnn.py:74: M
ultiRNNCell.init (from tensorflow.python.ops.rnn_cell_impl) is deprecated an
d will be removed in a future version.
Instructions for updating:
This class is equivalent as tf.keras.layers.StackedRNNCells, and will be replace
d by that in Tensorflow 2.0.
W0709 14:09:31.800641 6332 deprecation.py:323] From c:\Python37\HR\rnn.py:81: b
idirectional_dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will
be removed in a future version.
Instructions for updating:
Please use keras.layers.Bidirectional(keras.layers.RNN(cell)), which is equiva
lent to this API
W0709 14:09:31.801141 6332 deprecation.py:323] From c:\Python37\lib\site-packag
es\tensorflow\python\ops\rnn.py:464: dynamic_rnn (from tensorflow.python.ops.rnn
) is deprecated and will be removed in a future version.
Instructions for updating:
Please use keras.layers.RNN(cell), which is equivalent to this API
W0709 14:09:32.159433 6332 deprecation.py:506] From c:\Python37\lib\site-packag
es\tensorflow\python\ops\rnn_cell_impl.py:961: calling Zeros.init (from tens
orflow.python.ops.init_ops) with dtype is deprecated and will be removed in a fu
ture version.
Instructions for updating:
Call initializer instance with the dtype argument instead of passing it to the c
onstructor
W0709 14:09:32.971470 6332 deprecation.py:323] From c:\Python37\lib\site-packag
es\tensorflow\python\ops\rnn.py:244: add_dispatch_support..wrapper (from
tensorflow.python.ops.array_ops) is deprecated and will be removed in a future
version.
Instructions for updating:
Use tf.where in 2.0, which has the same broadcast rule as np.where
W0709 14:09:33.300187 6332 deprecation_wrapper.py:119] From HR\train.py:61: The
name tf.nn.ctc_loss is deprecated. Please use tf.compat.v1.nn.ctc_loss instead.

W0709 14:09:33.302189 6332 deprecation_wrapper.py:119] From HR\train.py:65: The
name tf.summary.scalar is deprecated. Please use tf.compat.v1.summary.scalar in
stead.

W0709 14:09:33.304190 6332 deprecation.py:323] From HR\train.py:70: to_int32 (f
rom tensorflow.python.ops.math_ops) is deprecated and will be removed in a futur
e version.
Instructions for updating:
Use tf.cast instead.
W0709 14:09:33.309194 6332 deprecation.py:323] From HR\train.py:72: to_float (f
rom tensorflow.python.ops.math_ops) is deprecated and will be removed in a futur
e version.
Instructions for updating:
Use tf.cast instead.
W0709 14:09:33.311257 6332 deprecation_wrapper.py:119] From HR\train.py:76: The
name tf.trainable_variables is deprecated. Please use tf.compat.v1.trainable_va
riables instead.

W0709 14:09:35.607799 6332 deprecation_wrapper.py:119] From HR\train.py:80: The
name tf.train.AdamOptimizer is deprecated. Please use tf.compat.v1.train.AdamOp
timizer instead.

Reading ./samples/Images//000033/READ17.000033_01_01_pg_line_1486644351571_780.p
ng
Reading ./samples/Images//000033/READ17.000033_01_02_pg_line_1486644356245_781.p
ng
Traceback (most recent call last):
File "HR\train.py", line 95, in
inputList, seqLens, targetList = ReadData(cfg.TRAIN_LOCATION, cfg.TRAIN_LIST
, cfg.TRAIN_NB, WND_HEIGHT, WND_WIDTH, WND_SHIFT, VEC_PER_WND, cfg.TRAIN_TRANS)
File "c:\Python37\HR\util.py", line 130, in ReadData
h, w = np.shape(image)
ValueError: not enough values to unpack (expected 2, got 0)

c:\Python37>

Loss and CER metrics

How do you see or print the loss and CER for each iteration?

Also, how to graph the loss and CER live with TensorBoard?

Support for TensorBoard for visualizing the network

I noticed that there is a SummaryWriter that writes files in the summary folder. I am trying tensorboard on that folder and I keep getting "Found more than one metagraph event per run. Overwriting the metagraph with the newest event." Any suggestion to make it work fine?

Problems trying to get this working with a Docker/Podman TF container . .

I am new to both Python (but familiar with C and Ruby) and TF - I have the TF container going OK with a "Hello World" but when I do this:

# podman run -it --rm -v ~phr/src/python/HandwritingRecognitionSystem:/tmp -w /tmp tensorflow/tensorflow python train.py

I get this:

2020-05-04 19:57:54.104113: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer.so.6'; dlerror: libnvinfer.so.6: cannot open shared object file: No such file or directory
2020-05-04 19:57:54.104167: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libnvinfer_plugin.so.6'; dlerror: libnvinfer_plugin.so.6: cannot open shared object file: No such file or directory
2020-05-04 19:57:54.104174: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:30] Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with TensorRT, please make sure the missing libraries mentioned above are installed properly.
Traceback (most recent call last):
  File "train.py", line 11, in <module>
    import cv2
ImportError: No module named cv2

It appears that the TF processor thinks I am trying to use an Nvidia GPU and I have tried a few options I found to tell the system there is no GPU but haven't had any luck yet . . - but there is also the missing module cv2 . .

Suggestions?

Thanks,
Phil.

No Checkpoint Found

Hi, I tried to run this as is but it didn't seem to run successfully, it just said No Checkpoint Found

BatchSize parameter setting

I would like to set suitability the training parametrers for a dataset of 8000 line images:
BatchSize and NEpochs.

GENERATE CHECK POINT

Hi, i passed the training step (using train.py file) and model directory is created but the thing is there is no model at all. However i can see the log file but no checkpoint at all.

In shot, i want to ask how to generate a checkpoint (model) to test this script.

Thanks

new image?

how to put some new image so i can change it...?

Training Data and `No checkpoint found`

The README says

To help run the system, sample images from ICDAR2017 Competition on Handwritten Text Recognition on the READ Dataset are added.

I tried reproducing the results of your work by running python3 compute_probs.py and python3 test.py both of which yielded No checkpoint found after the script reads images successfully.
Reading ./samples/Images//000033/READ17.000033_01_18_pg_line_1486644440417_797.png Reading ./samples/Images//000033/READ17.000033_01_19_pg_line_1486644445527_798.png Reading ./samples/Images//000033/READ17.000033_01_20_pg_line_1486644453911_799.png Initializing... 2021-04-06 08:41:30.589865: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorF low binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.

Would you mind sharing the checkpoint file?

Can the ICDAR2017 Competition on Handwritten Text Recognition on the READ Dataset be used to train the model? If yes, please provide details on it's implementation. The link to the dataset in the README is also broken, is this the same dataset?

Please Advise.

Thank you for your time.

What kind of training time can I expect without a GPU

Hi. I know this isn't really an "issue" per se, but it might be useful to have it visible on the site for others who have the same question.

I am running the training now, and its been running for a few hours ( I have no Tensor compatible GPU ).

Is it worth my while purchasing a GPU, or will training finish within a few hours on a regular PC?

How to train the model on the full image recognition after the training on the samples

Hello,
I found your code is amazing and give best results for the handwriting document recognition ,but when I work on it I found difficulties to train the model on the full page after the manually labeled text-line images in the samples?

Please can you give me a samples for "how to train the model on full images and the .tru file of it"?

because I am trying to run it on a different data set for my research and your paper is the state-of-the-art solution.
and I study the config.py but I don't find the way to add full image after the train on lines image

ValueError: Variable RNN_1

image
i got this problem when i try to run train.py
any solution my friend? because i'm trying to understand the flow of program for my Thesis

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.