How do I import an Encord dataset?

I’ve been annotating images in
I have a dataset of around 3700 images, and got through around 500 of them.
I tried exporting the dataset for the labeled images from Encord in COCO format, and it only outputs the JSON file, not the images nor any other folder structure.
I can upload all 3700 images just fine, but when I try uploading the JSON, nothing happens. There’s no error message, no change of screen, it just keeps showing the normal upload UI as if nothing had happened. If I upload the images together with the JSON, they all go into Not Annotated.

I tried cutting down the dataset to just 1 image so I could test what was the issue, and the same thing happens. Here’s a pastebin to this 1 image dataset COCO JSON: { "info": { "description": "mpv-shot1334.jpg", "contributor": null, -

Hi @kamuidev - do you mind sending the image that corresponds to that label file to so we can troubleshoot this?

Solved it. Here’s the steps I took:

  1. Add a new supercategory to the categories array.
    Roboflow uses the “Annotation group” name you input at the time of project creation as a supercategory for other categories, while Encord just uses a bounding-box supercategory. The former is added into the categories array with id 0, while the latter isn’t in the categories array to begin with. The Roboflow supercategory has "none" as a supercategory itself. This is how your categories array 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" }
  1. 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.
  2. 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.

1 Like

Glad you figured it out! We have documentation here on our formats: Computer Vision Annotation Formats

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.