open-mmlab / mmpose

OpenMMLab Pose Estimation Toolbox and Benchmark.
https://mmpose.readthedocs.io/en/latest/
Apache License 2.0
5.7k stars 1.23k forks source link

How to keep image description in HumanArt dataset when loading this dataset? #2763

Open liming-ai opened 12 months ago

liming-ai commented 12 months ago

What is the feature?

I tried to load HumanArt dataset by:

from mmpose.datasets.datasets.body import HumanArtDataset

train_dataset = HumanArtDataset(
    ann_file='annotations/training_humanart.json',
    data_prefix=dict(img=''),
    data_root="data/HumanArt",
    data_mode="bottomup"
)

Then I print train_dataset[0].keys(), it returns:

dict_keys(['img_id', 'img_path', 'bbox', 'bbox_score', 'num_keypoints', 'keypoints', 'keypoints_visible',
'iscrowd', 'segmentation', 'id', 'category_id', 'raw_ann_info', 'invalid_segs',
'sample_idx', 'upper_body_ids', 'lower_body_ids', 'flip_pairs',
'dataset_keypoint_weights', 'flip_indices', 'skeleton_links'])

However, the description key is missing, I also tried to print train_dataset[0]['raw_ann_info'], but the results still lack of description key.

[{'keypoints': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'keypoints_21': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 375.1914, 260.2715, 2, 0, 0, 0, 0, 0, 0], 'self_contact': [], 'num_keypoints': 0, 'num_keypoints_21': 1, 'iscrowd': 0, 'image_id': 1000000005282, 'area': 0.0, 'bbox': [375.1914, 260.2715, 0.0, 0.0], 'category_id': 1, 'id': 1000000001869, 'annotator': 68892}]

Any other context?

No response

Ben-Louis commented 12 months ago

I did not find description in training_humanart.json. Could you please check if this key exists in the original annotation file?