string to int in person_id

This commit is contained in:
David PAGNON 2024-11-10 11:19:42 +01:00 committed by GitHub
parent afd4af2704
commit 24a78695e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -334,7 +334,7 @@ def dataset_to_mmpose2d(coords_df, mmpose_json_file, img_size, markerset='custom
# bbox = [min_x, min_y, max_x, max_y]
bbox = [min_x, min_y, bbox_width, bbox_height] # coco format
id = person_ids[p]
person_id = person_ids[p]
category_id = 1
segmentation = [[min_x, min_y, min_x, max_y, max_x, max_y, max_x, min_y]] # no segmentation
area = np.round(bbox_width * bbox_height, decimals=1)
@ -344,7 +344,7 @@ def dataset_to_mmpose2d(coords_df, mmpose_json_file, img_size, markerset='custom
labels2d_json_data['annotations'] += [{ 'keypoints': coords_list,
'num_keypoints': num_keypoints,
'bbox': bbox,
'id': id,
'id': person_id,
'image_id': file_id,
'category_id': category_id,
'segmentation': segmentation,