weinman / cnn_lstm_ctc_ocr

Tensorflow-based CNN+LSTM trained with CTC-loss for OCR
GNU General Public License v3.0
498 stars 170 forks source link

How can I make own words-000.tfrecord ? #29

Closed hskzlj closed 6 years ago

hskzlj commented 6 years ago

When debugging, I find the type is tensor of image,width...

image = tf.image.decode_jpeg( features['image/encoded'], channels=1 ) #gray width = tf.cast( features['image/width'], tf.int32) # for ctc_loss label = tf.serialize_sparse( features['image/labels'] ) # for batching length = features['text/length'] text = features['text/string'] filename = features['image/filename']

Could you please tell me how to create my own words-000.tfrecord ?

Thank you!

weinman commented 6 years ago

I don't understand your question/problem. If you are running the code as provided and one of the example commands, please provide those details, along with your execution envrionment and a stack trace.

If you have a question about how to do things generally in tensorflow (i.e., storing TFRecords to disk), you should try asking on stackoverflow.

hskzlj commented 6 years ago

Thank you for your answer!

I have not described it in detail. Now I have debug the code and found the field of the image such as image/text_string, image/height ...

So I can make my own tfrecord with my image.

On Tue, Jun 19, 2018 at 9:31 PM, Jerod Weinman notifications@github.com wrote:

I don't understand your question/problem. If you are running the code as provided and one of the example commands, please provide those details, along with your execution envrionment and a stack trace.

If you have a question about how to do things generally in tensorflow (i.e., storing TFRecords to disk), you should try asking on stackoverflow.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/weinman/cnn_lstm_ctc_ocr/issues/29#issuecomment-398399645, or mute the thread https://github.com/notifications/unsubscribe-auth/ASmiIE8diExL1xlbOilHft47PTbbmAM_ks5t-P0wgaJpZM4UtPqX .