0x454447415244 / handwritingrecognitionsystem Goto Github PK
View Code? Open in Web Editor NEWHandwriting Recognition System based on a deep Convolutional Recurrent Neural Network architecture
License: Other
Handwriting Recognition System based on a deep Convolutional Recurrent Neural Network architecture
License: Other
Does this project prints the handwriting text in an image
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'
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>
How do you see or print the loss and CER for each iteration?
Also, how to graph the loss and CER live with TensorBoard?
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?
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.
Hi, I tried to run this as is but it didn't seem to run successfully, it just said No Checkpoint Found
What is the procedure to use this code?
I would like to set suitability the training parametrers for a dataset of 8000 line images:
BatchSize and NEpochs.
Can I get the checkpoint file of the trained model?
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
how to put some new image so i can change it...?
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.
Hi,
In my version of TF (1.3.0) there is no leaky_relu module.
Can you please indicate the version of TF used?
Thanks,
Gireesh
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?
Title describes the problem :)
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.