fix: bug in generation script
Browse files
font_ds_generate_script.py
CHANGED
@@ -44,9 +44,9 @@ def add_exclusion(font: DSFont, reason: str, dataset_base_dir: str, i: int, j: i
|
|
44 |
runtime_exclusion_list.append(font.path)
|
45 |
with open(unqualified_log_file_name, "a+") as f:
|
46 |
f.write(f"{font.path} # {reason}\n")
|
47 |
-
for
|
48 |
-
image_file_name = f"font_{i}_img_{
|
49 |
-
label_file_name = f"font_{i}_img_{
|
50 |
|
51 |
image_file_path = os.path.join(dataset_base_dir, image_file_name)
|
52 |
label_file_path = os.path.join(dataset_base_dir, label_file_name)
|
|
|
44 |
runtime_exclusion_list.append(font.path)
|
45 |
with open(unqualified_log_file_name, "a+") as f:
|
46 |
f.write(f"{font.path} # {reason}\n")
|
47 |
+
for jj in range(j + 1):
|
48 |
+
image_file_name = f"font_{i}_img_{jj}.jpg"
|
49 |
+
label_file_name = f"font_{i}_img_{jj}.bin"
|
50 |
|
51 |
image_file_path = os.path.join(dataset_base_dir, image_file_name)
|
52 |
label_file_path = os.path.join(dataset_base_dir, label_file_name)
|