def METHOD_NAME(img_dir, bbx_train, kps_train, num_train):
    dataset_dicts = []
    for idx in range(0, num_train):
        record = {}
        filename = img_dir + "/" + str(idx) + ".jpg"
        height = 480
        width = 640
        record["file_name"] = filename
        record["height"] = height
        record["width"] = width
        kps = []
        for i in range(len(kps_train[idx][0])):
            kps.append(kps_train[idx][0][i])
            kps.append(kps_train[idx][1][i])
            kps.append(2)  # visibility
        objs = []
        obj = {
            "bbox": [bbx_train[idx][0], bbx_train[idx][1], bbx_train[idx][2], bbx_train[idx][3]],
            "bbox_mode": BoxMode.XYXY_ABS,
            "keypoints": kps,  # x-y-visibility
            "category_id": 0,
            "iscrowd": 0
        }
        objs.append(obj)
        record["annotations"] = objs
        dataset_dicts.append(record)
    return dataset_dicts