Comments (8)
Thanks for the note! If you find enough other places that vary significantly for Python 3, I'd be happy to have a separate branch that contains updates for Python3 , and I'd merge it with master if it works in both Python2 and Python3.
In any case, several of the jpg files in the raw mjsynth archive are just garbage. You can verify this by trying to load them in any image viewer (they might be truncated, but they tend to be only a handful of bytes relative to the valid images).
I don't know why that is, but the way the TFRecord encoder handles this is to detect the exception inevitably thrown by the image file decoder and let you know know about it whilst moving on to another example.
from cnn_lstm_ctc_ocr.
Thanks for the prompt reply, the problem is, all I see are errors when reading the files. I'll try once in python 2 and see if I get the same error.
from cnn_lstm_ctc_ocr.
Did you run this code on a Windows system?
from cnn_lstm_ctc_ocr.
@Hust-ShuaiWang I'm not sure whether you're asking me or @Kumara-Kaushik, but I can tell you that I did not run any of this repo on a Windows system. Are you suggesting that the problems with bad input data do not occur on a Windows-based file system?
from cnn_lstm_ctc_ocr.
I am asking for @Kumara-Kaushik .I have met the same error when I run this repo on a Windows system.The reason for this problem is that the file has different storage formats on WINDOWS and LINUX.So you have to change the way you read the file.Just change the "with tf.gfile.FastGFile( filename, 'r' ) as f:" to "with tf.gfile.FastGFile( filename, 'rb' ) as f:" (line 133 in mjsynth-tfrecord.py).Detailed error reason, you have to find relevant information yourself, not difficult
from cnn_lstm_ctc_ocr.
@Hust-ShuaiWang Thanks for the report. I'll try out that change on Linux, and if it works there too, I will commit it.
from cnn_lstm_ctc_ocr.
@weinman I can confirm @Hust-ShuaiWang 's technique. I think it works because the 'b' signifies bytes, and the default file opening mode is as text now.
from cnn_lstm_ctc_ocr.
Updated in defd8ae
from cnn_lstm_ctc_ocr.
Related Issues (20)
- Training error HOT 9
- How to deal with single character input HOT 2
- Using Multiple GPU as a train_device HOT 3
- ctc_loss_calculator.cc Not a valid path HOT 3
- are there any pretrain model file HOT 3
- Input shapes: [72,357,1], [4] and with input tensors computed HOT 3
- It's possible to use a pre-trained model? HOT 1
- CuDnn 7.2.1 HOT 1
- get not good result, HOT 2
- FineTune ! HOT 3
- Model learns nothing about certain characters. HOT 1
- TypeError HOT 4
- Fixed sequence length HOT 1
- Training Error when using my data HOT 1
- 0% GPU-Util when testing HOT 1
- Train on vertical patches HOT 1
- Question Regarding End Model HOT 3
- confidence on sess passing HOT 6
- How to convert .ckpt model to SavedModel .pb format for hosting with Tensorflow Model Serving? HOT 6
- How to batch inference? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cnn_lstm_ctc_ocr.