Skip to content

Commit

Permalink
fix: not removing dir when --annotate_only
Browse files Browse the repository at this point in the history
  • Loading branch information
sokovninn committed Apr 8, 2024
1 parent a1f11d3 commit 68e9f79
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions datadreamer/pipelines/generate_dataset_from_scratch.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,14 @@ def main():

# Directories for saving images and bboxes
save_dir = args.save_dir
if os.path.exists(save_dir):
shutil.rmtree(save_dir)
os.makedirs(save_dir)
if not args.annotate_only:
if os.path.exists(save_dir):
shutil.rmtree(save_dir)
os.makedirs(save_dir)

bbox_dir = os.path.join(save_dir, "bboxes_visualization")
if os.path.exists(bbox_dir):
shutil.rmtree(bbox_dir)
os.makedirs(bbox_dir)

# Save arguments
Expand Down

0 comments on commit 68e9f79

Please sign in to comment.