Skip to content

Commit c552243

Browse files
committed
Cleanup2 general_json2yolo.py
1 parent 9561728 commit c552243

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

general_json2yolo.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,11 +357,20 @@ def merge_multi_segment(segments):
357357
return s
358358

359359

360+
def delete_dsstore(path='../datasets'):
361+
# Delete apple .DS_store files
362+
from pathlib import Path
363+
files = list(Path(path).rglob('.DS_store'))
364+
print(files)
365+
for f in files:
366+
f.unlink()
367+
368+
360369
if __name__ == '__main__':
361370
source = 'COCO'
362371

363372
if source == 'COCO':
364-
convert_coco_json('../../Downloads/Objects365') # directory with *.json
373+
convert_coco_json('../datasets/coco/annotations', False, True) # directory with *.json
365374

366375
elif source == 'infolks': # Infolks https://infolks.info/
367376
convert_infolks_json(name='out',

0 commit comments

Comments
 (0)