githubharald / SimpleHTR

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

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

Closed adam-funk closed 1 year ago

adam-funk commented 1 year 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 1 year 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.