Skip to content

Commit

Permalink
Skip JSON files predicted by models
Browse files Browse the repository at this point in the history
  • Loading branch information
healthonrails committed May 25, 2024
1 parent fbd7ad0 commit 78776d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion annolid/utils/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ def merge_annotation_folders(

for img in imgs:
label_json = img.replace('png', 'json')
assert os.path.exists(label_json)
# skip json files predicted by models
if not os.path.exists(label_json):
continue
dest_json = os.path.basename(label_json).replace(' ', '_')
dest_img = os.path.basename(img).replace(' ', '_')
shutil.copy(img, os.path.join(dest_dir, dest_img))
Expand Down

0 comments on commit 78776d6

Please sign in to comment.