Skip to content

Commit 6cd3ebc

Browse files
No public description
PiperOrigin-RevId: 738996766
1 parent 9402784 commit 6cd3ebc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: official/projects/waste_identification_ml/pre_processing/merge_coco_files_faster.ipynb

+6-1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
" 'categories':categories_list,\n",
133133
" 'annotations':annotations_list\n",
134134
" }\n",
135+
"\n",
136+
" for i in final_json['annotations']:\n",
137+
" i['segmentation'] = [max(i['segmentation'], key=len)]\n",
138+
" i['bbox'] = list(map(lambda x: round(float(x)), i['bbox']))\n",
139+
"\n",
135140
" return final_json"
136141
],
137142
"metadata": {
@@ -194,4 +199,4 @@
194199
]
195200
}
196201
]
197-
}
202+
}

0 commit comments

Comments
 (0)