Skip to content

Commit 671e635

Browse files
authored
Merge pull request #59 from fastlabel/bugfix/export-yolo-no-annotations
fix yolo export with no annotations
2 parents e92a6a7 + d59ff7a commit 671e635

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

fastlabel/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,9 @@ def export_yolo(self, tasks: list, output_dir: str = os.path.join("output", "yol
578578
for obj in anno["object"]:
579579
f.write(obj)
580580
f.write("\n")
581-
with open(os.path.join(output_dir, "classes.txt"), 'w', encoding="utf8") as f:
581+
classes_file_path = os.path.join(output_dir, "classes.txt")
582+
os.makedirs(os.path.dirname(classes_file_path), exist_ok=True)
583+
with open(classes_file_path, 'w', encoding="utf8") as f:
582584
for category in categories:
583585
f.write(category["name"])
584586
f.write("\n")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
setuptools.setup(
1010
name="fastlabel",
11-
version="0.9.9",
11+
version="0.9.10",
1212
author="eisuke-ueta",
1313
author_email="[email protected]",
1414
description="The official Python SDK for FastLabel API, the Data Platform for AI",

0 commit comments

Comments
 (0)