Uploading keypoint in coco format does not work

Describe your question/issue here! (delete this when you post)
I am uploading a dataset of only one image for now as I am trying to see if the keypoint are displayed properly. The task is keypoint detection on human pose. However after uploading the json file in coco format I do not see the keypoint display in the dataset. How can I solve this?

  • Project Type: Keypoint detection
  • Operating System & Browser: Google Chrome
  • Project Universe Link or Workspace/Project ID:
    *not sure if that the right link: Sign in to Roboflow

Thanks for your help!

Looking at your image, there are no boxes or keypoints defined in the accompanying JSON.

Here’s a random example with multiple key points defined, and are displayed in the UI.

Hello;

Thank you for your reply. Does it mean robotflow does not support coco format? I try to upload a json following coco format but it does not seem to be taken in account.

{
    "images": [
        {
            "id": 10,
            "file_name": "0000010.jpg",
            "width": 1139,
            "height": 815
        }
    ],
    "annotations": [
        {
            "id": 1,
            "image_id": 10,
            "category_id": 1,
            "keypoints": [
                [
                    525.9298095703125,
                    79.680419921875,
                    2
                ],
                [
                    512.9473876953125,
                    63.529022216796875,
                    2
                ],
                [
                    541.768310546875,
                    65.94412231445312,
                    2
                ],
                [
                    492.2723388671875,
                    69.92294311523438,
                    2
                ],
                [
                    557.9517822265625,
                    78.31539916992188,
                    2
                ],
                [
                    455.1761474609375,
                    107.93182373046875,
                    2
                ],
                [
                    591.35400390625,
                    141.07754516601562,
                    2
                ],
                [
                    384.3128662109375,
                    186.94857788085938,
                    2
                ],
                [
                    622.103515625,
                    222.71578979492188,
                    2
                ],
                [
                    417.900146484375,
                    246.18826293945312,
                    2
                ],
                [
                    616.6661376953125,
                    221.25387573242188,
                    2
                ],
                [
                    466.865234375,
                    286.4660339355469,
                    2
                ],
                [
                    542.281494140625,
                    300.1199645996094,
                    2
                ],
                [
                    429.983154296875,
                    445.2668151855469,
                    2
                ],
                [
                    541.2786865234375,
                    462.8659973144531,
                    2
                ],
                [
                    427.361572265625,
                    532.1884765625,
                    2
                ],
                [
                    532.8096923828125,
                    599.9249267578125,
                    2
                ]
            ],
            "num_keypoints": 17,
            "iscrowd": 0,
            "area": 0
        },
        {
            "id": 2,
            "image_id": 10,
            "category_id": 2,
            "keypoints": [
                [
                    700,
                    268,
                    2
                ],
                [
                    708,
                    262,
                    2
                ],
                [
                    694,
                    261,
                    2
                ],
                [
                    720,
                    268,
                    2
                ],
                [
                    688,
                    267,
                    2
                ],
                [
                    738,
                    314,
                    2
                ],
                [
                    668,
                    303,
                    2
                ],
                [
                    747,
                    369,
                    2
                ],
                [
                    649,
                    304,
                    2
                ],
                [
                    755,
                    412,
                    2
                ],
                [
                    649,
                    289,
                    2
                ],
                [
                    714,
                    415,
                    2
                ],
                [
                    669,
                    405,
                    2
                ],
                [
                    715,
                    503,
                    2
                ],
                [
                    669,
                    498,
                    2
                ],
                [
                    704,
                    594,
                    2
                ],
                [
                    664,
                    595,
                    2
                ]
            ],
            "num_keypoints": 17,
            "iscrowd": 0,
            "area": 0
        }
    ],
    "categories": [
        {
            "id": 1,
            "name": "pose1",
            "keypoints": [
                "nose",
                "left_eye",
                "right_eye",
                "left_ear",
                "right_ear",
                "left_shoulder",
                "right_shoulder",
                "left_elbow",
                "right_elbow",
                "left_wrist",
                "right_wrist",
                "left_hip",
                "right_hip",
                "left_knee",
                "right_knee",
                "left_ankle",
                "right_ankle"
            ],
            "skeleton": [
                [
                    1,
                    2
                ],
                [
                    1,
                    3
                ],
                [
                    2,
                    4
                ],
                [
                    3,
                    5
                ],
                [
                    1,
                    6
                ],
                [
                    1,
                    7
                ],
                [
                    6,
                    8
                ],
                [
                    7,
                    9
                ],
                [
                    8,
                    10
                ],
                [
                    9,
                    11
                ],
                [
                    6,
                    12
                ],
                [
                    7,
                    13
                ],
                [
                    12,
                    14
                ],
                [
                    13,
                    15
                ],
                [
                    14,
                    16
                ],
                [
                    15,
                    17
                ]
            ]
        },
        {
            "id": 2,
            "name": "pose2",
            "keypoints": [
                "nose",
                "left_eye",
                "right_eye",
                "left_ear",
                "right_ear",
                "left_shoulder",
                "right_shoulder",
                "left_elbow",
                "right_elbow",
                "left_wrist",
                "right_wrist",
                "left_hip",
                "right_hip",
                "left_knee",
                "right_knee",
                "left_ankle",
                "right_ankle"
            ],
            "skeleton": [
                [
                    1,
                    2
                ],
                [
                    1,
                    3
                ],
                [
                    2,
                    4
                ],
                [
                    3,
                    5
                ],
                [
                    1,
                    6
                ],
                [
                    1,
                    7
                ],
                [
                    6,
                    8
                ],
                [
                    7,
                    9
                ],
                [
                    8,
                    10
                ],
                [
                    9,
                    11
                ],
                [
                    6,
                    12
                ],
                [
                    7,
                    13
                ],
                [
                    12,
                    14
                ],
                [
                    13,
                    15
                ],
                [
                    14,
                    16
                ],
                [
                    15,
                    17
                ]
            ]
        }
    ]
}

I’m not sure about the exact requirements (i.e., maybe you’re using a tool to annotate that doesn’t import as expected in Roboflow), but to see if it’s possible at all I did a quick test:

  • Created a new Keypoint Detection project with an annotation group named “humans”
  • Uploaded an image
  • Hand annotated it to contain a “person” box with keypoints “head” and “body”
  • Added to a dataset, and versioned the dataset
  • Downloaded dataset in COCO format

This gives you a zip with this structure

% tree
.
├── README.dataset.txt
├── README.roboflow.txt
└── train
    ├── _annotations.coco.json
    └── nobot_png.rf.f67a163efc43cfa5226c163eea61db19.jpg

2 directories, 4 files

and the annotations file contains

% python3 -m json.tool train/_annotations.coco.json
{
    "info": {
        "year": "2025",
        "version": "1",
        "description": "Exported from roboflow.com",
        "contributor": "",
        "url": "https://public.roboflow.com/object-detection/undefined",
        "date_created": "2025-01-13T14:27:58+00:00"
    },
    "licenses": [
        {
            "id": 1,
            "url": "https://creativecommons.org/licenses/by/4.0/",
            "name": "CC BY 4.0"
        }
    ],
    "categories": [
        {
            "id": 0,
            "name": "humans",
            "supercategory": "none"
        },
        {
            "id": 1,
            "name": "person",
            "supercategory": "humans",
            "keypoints": [
                "body",
                "head"
            ],
            "skeleton": [
                [
                    1,
                    2
                ]
            ]
        }
    ],
    "images": [
        {
            "id": 0,
            "license": 1,
            "file_name": "nobot_png.rf.f67a163efc43cfa5226c163eea61db19.jpg",
            "height": 640,
            "width": 640,
            "date_captured": "2025-01-13T14:27:58+00:00"
        }
    ],
    "annotations": [
        {
            "id": 0,
            "image_id": 0,
            "category_id": 1,
            "bbox": [
                130,
                98,
                365.5,
                398.5
            ],
            "area": 145651.75,
            "segmentation": [],
            "iscrowd": 0,
            "keypoints": [
                296.125,
                286.11,
                2,
                296.125,
                159.572,
                2
            ]
        }
    ]
}

To test the import, I created a new Keypoint Detection project with a “humans” annotation group, and uploaded the unzipped dataset directory (it didn’t let me use the .zip).

It did prompt me that there was already a project with an annotation group of the same name, but I disabled the “Yes, I want to sync annotations between projects.” option.

The keypoints appear to have imported.