Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed May 11, 2019
1 parent 47d992b commit 3c389d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from tqdm import tqdm

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


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

with open('out/labels/' + label_name, 'a') as file:
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))

# Split data into train, test, and validate files
file_name = sorted(file_name)
Expand Down

0 comments on commit 3c389d1

Please sign in to comment.