We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47d992b commit 3c389d1Copy full SHA for 3c389d1
run.py
@@ -6,7 +6,7 @@
6
from tqdm import tqdm
7
8
name = 'supermarket2' # new dataset name
9
-file = '/Users/glennjocher/Downloads/data/supermarket2/export-coco.json' # coco json to convert
+file = '../supermarket2/export-coco.json' # coco json to convert
10
11
12
# Convert COCO JSON file into YOLO format labels -------------------------------
@@ -58,7 +58,7 @@ def main(name, file):
58
box[[1, 3]] /= height[i] # normalize y
59
60
with open('out/labels/' + label_name, 'a') as file:
61
- file.write('%g %.6f %.6f %.6f %.6f\n' % (x['category_id'], *box))
+ file.write('%g %.6f %.6f %.6f %.6f\n' % (x['category_id'] - 1, *box))
62
63
# Split data into train, test, and validate files
64
file_name = sorted(file_name)
0 commit comments