Reputation: 51
I have successfully trained a model for custom instance segmentation using Detectron2. Now I am preparing my custom dataset to train a keypoint detection model using Detectron2. Detectron2 uses COCO formatted dataset for training. The format of COCO dataset for keypoint detection is given below:
"categories": [
{
"supercategory": "person",
"id": 1,
"name": "person",
"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": [
[16,14],[14,12],[17,15],[15,13],[12,13],[6,12],[7,13],[6,7],
[6,8],[7,9],[8,10],[9,11],[2,3],[1,2],[1,3],[2,4],[3,5],[4,6],[5,7]
]
} ]
The format of COCO has a skeleton that tells you the connection between the different keypoints. Also in COCO format they have one supercategory but many keypoints. In my dataset, I have only one type of keypoint and many supercategory. For example, I have a dataset of cars and bicycles. The car and bicycle are separate categories but I have one keypoint and that is the wheel. I want to train the model so that the model can detect the wheel as the keypoint but I do not want to connect the keypints so I do not need the skeleton. The model prediction would be similar to the below image. (NB: I took this image from the internet).
Now my question is how to prepare the dataset in COCO format without the skeleton (or any other solution) and with only one type of keypoint and two objects (car and bicycle). I will use Detectron2 for the keypoint training.
Upvotes: 1
Views: 770