forked from hku-uas/suas-odcl-training-assets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
coco.backup
46 lines (45 loc) · 1.58 KB
/
coco.backup
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# with open(root_dir / "output" / f"{output_stem}.json", "w", encoding="utf8") as f:
# json.dump(
# {
# "categories": [
# {
# "id": 0,
# "name": "cutout",
# "supercategory": "none"
# },
# {
# "id": 1,
# "name": "letter",
# "supercategory": "none"
# }
# ],
# "images": [
# {
# "id": 0,
# "file_name": f"{output_stem}.png",
# "height": 512,
# "width": 512,
# }
# ],
# "annotations": [
# {
# "id": 0,
# "image_id": 0,
# "category_id": 0,
# "bbox": obj_bbox,
# "area": 0,
# "segmentation": transformed_path_shape,
# "iscrowd": 0
# },
# {
# "id": 1,
# "image_id": 0,
# "category_id": 1,
# "bbox": obj_bbox,
# "area": 0,
# "segmentation": transformed_path_letter,
# "iscrowd": 0
# }
# ]
# }, f, indent=4
# )