Fix error can't open image files in Python3. #35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1.We tried to use your CRNN network for training, and the Python version we used was 3.7.2,
in the process of generating the LMDB file, I noticed that......an error will occur, Python
3 need to add a "b" flag bit when reading bit type data.
"""
with open(imagePath, 'r') as f:
imageBin = f.read()
"""
into LMDB.LMDB should only accept data of bytes type, so we have to encode data asbyte type.
3.In the process of reading data from LMDB, since the data read out is bytes type, the
string operation cannot be carried out directly, and the bytes type decode needs to be
str.
4.The data sets we used is different form yours, so some of the characters in yout
"alphabets.pu"cannot be found and cause application error. I wrote a function to
generate the corresponding "apphabets.py" module according to the data sets wo imprvoe
compatibility.