Solved it. Hereās the steps I took:
- Add a new supercategory to the
categoriesarray.
Roboflow uses the āAnnotation groupā name you input at the time of project creation as a supercategory for other categories, while Encord just uses abounding-boxsupercategory. The former is added into thecategoriesarray withid0, while the latter isnāt in thecategoriesarray to begin with. The Roboflow supercategory has"none"as a supercategory itself. This is how yourcategoriesarray should look like:
"categories": [
{ "supercategory": "none", "id": 0, "name": "stuff" }, // the actual name of your annotation group here
{ "supercategory": "stuff", "id": 1, "name": "foo" },
{ "supercategory": "stuff", "id": 2, "name": "bar" }
]
- Delete all
"file_name"lines. Encordās COCO JSON has the original file name in"image_title", which is useless, and a generated random filename in"file_name". Ctrl+F in VSCode, check Regular Expression search, input^.*"file_name".*in Find, and Replace All with an empty string to delete all of the useless file names. Then, Find"image_title"and Replace All with"file_name", so you get the"file_name"pointing to the actual file name. - Put this JSON next to all your images and upload by selecting the folder. The annotated ones should go into the Annotated tab. I named my JSON
labels.coco.json, I donāt know if that holds any relevance.
I hope in the future Roboflow takes care of this automatically without user intervention. I also wish the documentation regarding annotation imports was more transparent. All they tell you is that Roboflow can magically import everything, but thereās no concrete specification of each format and how you should set up files correctly for importing.