Skip to content
Snippets Groups Projects
Commit 8577a9e8 authored by Harald Scheidl's avatar Harald Scheidl
Browse files

ignore empty lines and comment lines in IAM dataset file

parent d807bc44
Branches
No related tags found
No related merge requests found
...@@ -40,11 +40,12 @@ class DataLoaderIAM: ...@@ -40,11 +40,12 @@ class DataLoaderIAM:
chars = set() chars = set()
bad_samples_reference = ['a01-117-05-02', 'r06-022-03-05'] # known broken images in IAM dataset bad_samples_reference = ['a01-117-05-02', 'r06-022-03-05'] # known broken images in IAM dataset
for line in f: for line in f:
# ignore comment line # ignore empty and comment lines
line = line.strip()
if not line or line[0] == '#': if not line or line[0] == '#':
continue continue
line_split = line.strip().split(' ') line_split = line.split(' ')
assert len(line_split) >= 9 assert len(line_split) >= 9
# filename: part1-part2-part3 --> part1/part1-part2/part1-part2-part3.png # filename: part1-part2-part3 --> part1/part1-part2/part1-part2-part3.png
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment