Skip to content

Commit 3c389d1

Browse files
committed
updates
1 parent 47d992b commit 3c389d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from tqdm import tqdm
77

88
name = 'supermarket2' # new dataset name
9-
file = '/Users/glennjocher/Downloads/data/supermarket2/export-coco.json' # coco json to convert
9+
file = '../supermarket2/export-coco.json' # coco json to convert
1010

1111

1212
# Convert COCO JSON file into YOLO format labels -------------------------------
@@ -58,7 +58,7 @@ def main(name, file):
5858
box[[1, 3]] /= height[i] # normalize y
5959

6060
with open('out/labels/' + label_name, 'a') as file:
61-
file.write('%g %.6f %.6f %.6f %.6f\n' % (x['category_id'], *box))
61+
file.write('%g %.6f %.6f %.6f %.6f\n' % (x['category_id'] - 1, *box))
6262

6363
# Split data into train, test, and validate files
6464
file_name = sorted(file_name)

0 commit comments

Comments
 (0)