Submission json format for Quick Participation

Hi! I am trying to obtain test scores (quick participation format) by sending json file.

The format of the json I’m sending is similar to annotations.json you’ve provided in public_validation_set_2.0.tar.gz (from here, AIcrowd).
In fact, I even tried to send your annotations.json file to the system, but still got the error “TypeError: string indices must be integers”.
Could you please clarify, what’s wrong? Could you please provide an example of submission.json to send to the testing system?

1 Like

Hi @alieksandr_komin,

The annotations present in the validation & training dataset are different from what is expected as a submission.

Useful resources:

COCO: Format for the results
"image_id": int, "category_id": int, "bbox": [x,y,width,height], "score": float,

Link to learn more:

COCO: Format for the datasets
"info": info, "images": [image], "annotations": [annotation], "licenses": [license],

"year": int, "version": str, "description": str, "contributor": str, "url": str, "date_created": datetime,

"id": int, "width": int, "height": int, "file_name": str, "license": int, "flickr_url": str, "coco_url": str, "date_captured": datetime,

"id": int, "name": str, "url": str,

"id": int, "image_id": int, "category_id": int, "segmentation": RLE or [polygon], "area": float, "bbox": [x,y,width,height], "iscrowd": 0 or 1,

"id": int, "name": str, "supercategory": str,

Link to learn more:

Due to this, your submissions which are in dataset format are failing. You can translate them to the results format for successful submissions.

You can also download an example predictions file to learn more as well. :wave:

:mag_right: Other common pitfalls to look out for:

  • image_id, category_id, etc are int and not string.
  • while generating your predictions file please make sure that you are not writing numpy objects, and convert them to int / float respectively.

I downloaded the example predictions file you provided. Here is a screenshot of a single instance loaded via Python’s json library.

I understand most of the categories here, and they match what you provided as the COCO Format for results above. However, “segmentation” (which is a new category) includes a dictionary with keys ‘counts’ and ‘size’. The value for ‘counts’ is being read in as a long string, but I can’t make sense of it. The value for ‘size’ is a list of two integers, [400, 401], and I’m also unsure about the meaning of that. Could you clarify what data (and data types) should be in those two fields within ‘segmentation’?

Thank you very much.