githubharald / SimpleHTR

Handwritten Text Recognition (HTR) system implemented with TensorFlow.
https://towardsdatascience.com/2326a3487cd5
MIT License
1.99k stars 893 forks source link

Blank line filter in dataloader doesn't quite work #151

Closed adam-funk closed 2 years ago

adam-funk commented 2 years ago

I assume line 44 in dataloader_iam.py is supposed to ignore blank lines as well as those starting with # but it doesn't work because lines read from the open file include the newline at the end. I think if not line or line[0] == '#' should be changed to if not line.strip() or line[0] == '#':.

githubharald commented 2 years ago

I think it was just intended to be used for comment lines, not for empty lines. But ignoring empty lines too makes sense, will add it.