From b509155e4eebea56a89e00eeb8659887fb33aaff Mon Sep 17 00:00:00 2001 From: Yining Li Date: Tue, 7 Sep 2021 15:06:12 +0800 Subject: [PATCH] Add DatasetInfo and refactor dataset base classes (#901) * add dataset info (#663) * Fix import and deprecation issues in unit tests (#871) * fix some bugs in the unit test of smpl model. * reorganize `tests/` to solve importing issue (PEP 420) * fix deprecation warnings in unit tests Co-authored-by: ly015 * add benchmark regression test script with tmux (#849) * test the simple case using tmux to run multiple benchmark regression test tasks * modify and rename the config file and script * Delete config_list.yaml * modify the config and rename the filename * Delete test_benchmark_tmux.py * modify the script and rename the filename * Update setup.cfg * using mmcv.load to avoid introducing the extra dependency on yaml * fix some typo * refactor the config file and modify the script accordingly * modify the config and script * rename the config file * Correct dataset preparation guide of WFLW (#873) * add pr template (#875) * add CITATION.cff and update setup.py (#876) * Add copyright header and pre-commit hook (#872) * Add pre-commit hook to automatically add copyright file header * update files with copyright header * Limit copyright checking in the first 2 lines of a file * Exclude configs in demo/ * set max-header-lines as 5 * rebase to master and add copyright to new files * move benchmark_regression into .dev_scripts/benchmark * Translate tasks/2d_body_keypoint.md (#842) * 2rd PR remove poseval * fix lint * revise the CN version Co-authored-by: ly015 * fix some bugs in the unit test of smpl model. * * reorganiz `tests/` to solve importing issue (PEP 420) * add dataset info * fix lint * * fix wrongly modified parts in previous rebase * fix lint * rename datasets/_base_ as datasets/base * resolve compatibility of pose_limb_color * Add dummy dataset base classes with old names for compatibility * * Rewrite relative unittest based on dataset_info * Add bc-breaking test for functions related to dataset_info * Rename DatasetInfo.dataset_info as DatasetInfo._dataset_info * Fix dataset_info of h36m dataset * Handle breaking change pose_limb_color -> pose_link_color * add unittest for old-fashioned dataset initialization without dataset_info * resolve naming conflict in unittests Co-authored-by: zengwang430521 Co-authored-by: ly015 * fix typo * fix typo Co-authored-by: Jas Co-authored-by: zengwang430521 --- configs/_base_/datasets/300w.py | 384 ++++++ configs/_base_/datasets/aflw.py | 83 ++ configs/_base_/datasets/aic.py | 140 ++ configs/_base_/datasets/animalpose.py | 166 +++ configs/_base_/datasets/atrw.py | 144 +++ configs/_base_/datasets/coco.py | 181 +++ configs/_base_/datasets/coco_wholebody.py | 1150 +++++++++++++++++ configs/_base_/datasets/cofw.py | 134 ++ configs/_base_/datasets/crowdpose.py | 147 +++ configs/_base_/datasets/deepfashion_full.py | 74 ++ configs/_base_/datasets/deepfashion_lower.py | 46 + configs/_base_/datasets/deepfashion_upper.py | 60 + configs/_base_/datasets/fly.py | 237 ++++ configs/_base_/datasets/freihand2d.py | 144 +++ configs/_base_/datasets/h36m.py | 152 +++ configs/_base_/datasets/horse10.py | 201 +++ configs/_base_/datasets/interhand2d.py | 142 ++ configs/_base_/datasets/interhand3d.py | 487 +++++++ configs/_base_/datasets/jhmdb.py | 129 ++ configs/_base_/datasets/locust.py | 263 ++++ configs/_base_/datasets/macaque.py | 183 +++ configs/_base_/datasets/mhp.py | 156 +++ configs/_base_/datasets/mpi_inf_3dhp.py | 132 ++ configs/_base_/datasets/mpii.py | 155 +++ configs/_base_/datasets/mpii_trb.py | 380 ++++++ configs/_base_/datasets/ochuman.py | 181 +++ configs/_base_/datasets/onehand10k.py | 142 ++ configs/_base_/datasets/panoptic_hand2d.py | 143 ++ configs/_base_/datasets/posetrack18.py | 176 +++ configs/_base_/datasets/rhd2d.py | 141 ++ configs/_base_/datasets/wflw.py | 582 +++++++++ configs/_base_/datasets/zebra.py | 64 + .../hrnet_w32_animalpose_256x256.py | 10 +- .../hrnet_w48_animalpose_256x256.py | 10 +- .../animalpose/res101_animalpose_256x256.py | 10 +- .../animalpose/res152_animalpose_256x256.py | 10 +- .../animalpose/res50_animalpose_256x256.py | 10 +- .../atrw/hrnet_w32_atrw_256x256.py | 10 +- .../atrw/hrnet_w48_atrw_256x256.py | 10 +- .../atrw/res101_atrw_256x256.py | 10 +- .../atrw/res152_atrw_256x256.py | 10 +- .../atrw/res50_atrw_256x256.py | 10 +- .../topdown_heatmap/fly/res101_fly_192x192.py | 10 +- .../topdown_heatmap/fly/res152_fly_192x192.py | 10 +- .../topdown_heatmap/fly/res50_fly_192x192.py | 10 +- .../hrnet_w32_horse10_256x256-split1.py | 10 +- .../hrnet_w32_horse10_256x256-split2.py | 10 +- .../hrnet_w32_horse10_256x256-split3.py | 10 +- .../hrnet_w48_horse10_256x256-split1.py | 10 +- .../hrnet_w48_horse10_256x256-split2.py | 10 +- .../hrnet_w48_horse10_256x256-split3.py | 10 +- .../horse10/res101_horse10_256x256-split1.py | 10 +- .../horse10/res101_horse10_256x256-split2.py | 10 +- .../horse10/res101_horse10_256x256-split3.py | 10 +- .../horse10/res152_horse10_256x256-split1.py | 10 +- .../horse10/res152_horse10_256x256-split2.py | 10 +- .../horse10/res152_horse10_256x256-split3.py | 10 +- .../horse10/res50_horse10_256x256-split1.py | 10 +- .../horse10/res50_horse10_256x256-split2.py | 10 +- .../horse10/res50_horse10_256x256-split3.py | 10 +- .../locust/res101_locust_160x160.py | 10 +- .../locust/res152_locust_160x160.py | 10 +- .../locust/res50_locust_160x160.py | 10 +- .../macaque/hrnet_w32_macaque_256x192.py | 10 +- .../macaque/hrnet_w48_macaque_256x192.py | 10 +- .../macaque/res101_macaque_256x192.py | 10 +- .../macaque/res152_macaque_256x192.py | 10 +- .../macaque/res50_macaque_256x192.py | 10 +- .../zebra/res101_zebra_160x160.py | 10 +- .../zebra/res152_zebra_160x160.py | 10 +- .../zebra/res50_zebra_160x160.py | 10 +- .../aic/higherhrnet_w32_aic_512x512.py | 10 +- .../aic/higherhrnet_w32_aic_512x512_udp.py | 10 +- .../aic/hrnet_w32_aic_512x512.py | 10 +- .../coco/higherhrnet_w32_coco_512x512.py | 10 +- .../coco/higherhrnet_w32_coco_512x512_udp.py | 10 +- .../coco/higherhrnet_w32_coco_640x640.py | 10 +- .../coco/higherhrnet_w32_coco_640x640_udp.py | 10 +- .../coco/higherhrnet_w48_coco_512x512.py | 10 +- .../coco/higherhrnet_w48_coco_512x512_udp.py | 10 +- .../coco/hrnet_w32_coco_512x512.py | 10 +- .../coco/hrnet_w32_coco_512x512_udp.py | 10 +- .../coco/hrnet_w32_coco_640x640.py | 10 +- .../coco/hrnet_w32_coco_640x640_udp.py | 10 +- .../coco/hrnet_w48_coco_512x512.py | 10 +- .../coco/hrnet_w48_coco_512x512_udp.py | 10 +- .../coco/hrnet_w48_coco_640x640.py | 10 +- .../coco/hrnet_w48_coco_640x640_udp.py | 10 +- .../coco/mobilenetv2_coco_512x512.py | 10 +- .../coco/res101_coco_512x512.py | 10 +- .../coco/res101_coco_640x640.py | 10 +- .../coco/res152_coco_512x512.py | 10 +- .../coco/res152_coco_640x640.py | 10 +- .../coco/res50_coco_512x512.py | 10 +- .../coco/res50_coco_640x640.py | 10 +- .../higherhrnet_w32_crowdpose_512x512.py | 10 +- .../higherhrnet_w32_crowdpose_512x512_udp.py | 10 +- .../higherhrnet_w32_crowdpose_640x640.py | 10 +- .../higherhrnet_w32_crowdpose_640x640_udp.py | 10 +- .../higherhrnet_w48_crowdpose_512x512.py | 10 +- .../higherhrnet_w48_crowdpose_512x512_udp.py | 10 +- .../mobilenetv2_crowdpose_512x512.py | 10 +- .../crowdpose/res101_crowdpose_512x512.py | 10 +- .../crowdpose/res152_crowdpose_512x512.py | 10 +- .../crowdpose/res50_crowdpose_512x512.py | 10 +- .../mhp/hrnet_w48_mhp_512x512.py | 10 +- .../deeppose/coco/res101_coco_256x192.py | 10 +- .../deeppose/coco/res152_coco_256x192.py | 10 +- .../deeppose/coco/res50_coco_256x192.py | 10 +- .../deeppose/mpii/res101_mpii_256x256.py | 10 +- .../deeppose/mpii/res152_mpii_256x256.py | 10 +- .../deeppose/mpii/res50_mpii_256x256.py | 10 +- .../aic/hrnet_w32_aic_256x192.py | 10 +- .../aic/hrnet_w32_aic_384x288.py | 10 +- .../aic/hrnet_w48_aic_256x192.py | 10 +- .../aic/hrnet_w48_aic_384x288.py | 10 +- .../topdown_heatmap/aic/res101_aic_256x192.py | 10 +- .../topdown_heatmap/aic/res101_aic_384x288.py | 10 +- .../topdown_heatmap/aic/res152_aic_256x192.py | 10 +- .../topdown_heatmap/aic/res152_aic_384x288.py | 10 +- .../topdown_heatmap/aic/res50_aic_256x192.py | 10 +- .../topdown_heatmap/aic/res50_aic_384x288.py | 10 +- .../coco/2xmspn50_coco_256x192.py | 10 +- .../coco/2xrsn50_coco_256x192.py | 10 +- .../coco/3xmspn50_coco_256x192.py | 10 +- .../coco/3xrsn50_coco_256x192.py | 10 +- .../coco/4xmspn50_coco_256x192.py | 10 +- .../coco/alexnet_coco_256x192.py | 10 +- .../topdown_heatmap/coco/cpm_coco_256x192.py | 10 +- .../topdown_heatmap/coco/cpm_coco_384x288.py | 10 +- .../coco/hourglass52_coco_256x256.py | 10 +- .../coco/hourglass52_coco_384x384.py | 10 +- .../coco/hrnet_w32_coco_256x192.py | 10 +- .../hrnet_w32_coco_256x192_coarsedropout.py | 10 +- .../coco/hrnet_w32_coco_256x192_dark.py | 10 +- .../coco/hrnet_w32_coco_256x192_gridmask.py | 10 +- .../hrnet_w32_coco_256x192_photometric.py | 10 +- .../coco/hrnet_w32_coco_256x192_udp.py | 10 +- .../hrnet_w32_coco_256x192_udp_regress.py | 10 +- .../coco/hrnet_w32_coco_384x288.py | 10 +- .../coco/hrnet_w32_coco_384x288_dark.py | 10 +- .../coco/hrnet_w32_coco_384x288_udp.py | 10 +- .../coco/hrnet_w48_coco_256x192.py | 10 +- .../coco/hrnet_w48_coco_256x192_dark.py | 10 +- .../coco/hrnet_w48_coco_256x192_udp.py | 10 +- .../coco/hrnet_w48_coco_384x288.py | 10 +- .../coco/hrnet_w48_coco_384x288_dark.py | 10 +- .../coco/hrnet_w48_coco_384x288_udp.py | 10 +- .../coco/mobilenetv2_coco_256x192.py | 10 +- .../coco/mobilenetv2_coco_384x288.py | 10 +- .../coco/mspn50_coco_256x192.py | 10 +- .../coco/res101_coco_256x192.py | 10 +- .../coco/res101_coco_256x192_dark.py | 10 +- .../coco/res101_coco_384x288.py | 10 +- .../coco/res101_coco_384x288_dark.py | 10 +- .../coco/res152_coco_256x192.py | 10 +- .../coco/res152_coco_256x192_dark.py | 10 +- .../coco/res152_coco_384x288.py | 10 +- .../coco/res152_coco_384x288_dark.py | 10 +- .../coco/res50_coco_256x192.py | 10 +- .../coco/res50_coco_256x192_dark.py | 10 +- .../coco/res50_coco_384x288.py | 10 +- .../coco/res50_coco_384x288_dark.py | 10 +- .../coco/resnest101_coco_256x192.py | 10 +- .../coco/resnest101_coco_384x288.py | 10 +- .../coco/resnest200_coco_256x192.py | 10 +- .../coco/resnest200_coco_384x288.py | 10 +- .../coco/resnest269_coco_256x192.py | 10 +- .../coco/resnest269_coco_384x288.py | 10 +- .../coco/resnest50_coco_256x192.py | 10 +- .../coco/resnest50_coco_384x288.py | 10 +- .../coco/resnetv1d101_coco_256x192.py | 10 +- .../coco/resnetv1d101_coco_384x288.py | 10 +- .../coco/resnetv1d152_coco_256x192.py | 10 +- .../coco/resnetv1d152_coco_384x288.py | 10 +- .../coco/resnetv1d50_coco_256x192.py | 10 +- .../coco/resnetv1d50_coco_384x288.py | 10 +- .../coco/resnext101_coco_256x192.py | 10 +- .../coco/resnext101_coco_384x288.py | 10 +- .../coco/resnext152_coco_256x192.py | 10 +- .../coco/resnext152_coco_384x288.py | 10 +- .../coco/resnext50_coco_256x192.py | 10 +- .../coco/resnext50_coco_384x288.py | 10 +- .../coco/rsn18_coco_256x192.py | 10 +- .../coco/rsn50_coco_256x192.py | 10 +- .../coco/scnet101_coco_256x192.py | 10 +- .../coco/scnet101_coco_384x288.py | 10 +- .../coco/scnet50_coco_256x192.py | 10 +- .../coco/scnet50_coco_384x288.py | 10 +- .../coco/seresnet101_coco_256x192.py | 10 +- .../coco/seresnet101_coco_384x288.py | 10 +- .../coco/seresnet152_coco_256x192.py | 10 +- .../coco/seresnet152_coco_384x288.py | 10 +- .../coco/seresnet50_coco_256x192.py | 10 +- .../coco/seresnet50_coco_384x288.py | 10 +- .../coco/shufflenetv1_coco_256x192.py | 10 +- .../coco/shufflenetv1_coco_384x288.py | 10 +- .../coco/shufflenetv2_coco_256x192.py | 10 +- .../coco/shufflenetv2_coco_384x288.py | 10 +- .../coco/vgg16_bn_coco_256x192.py | 10 +- .../crowdpose/hrnet_w32_crowdpose_256x192.py | 7 +- .../crowdpose/hrnet_w32_crowdpose_384x288.py | 7 +- .../crowdpose/hrnet_w48_crowdpose_256x192.py | 7 +- .../crowdpose/hrnet_w48_crowdpose_384x288.py | 7 +- .../crowdpose/res101_crowdpose_256x192.py | 7 +- .../crowdpose/res101_crowdpose_320x256.py | 7 +- .../crowdpose/res101_crowdpose_384x288.py | 7 +- .../crowdpose/res152_crowdpose_256x192.py | 7 +- .../crowdpose/res152_crowdpose_384x288.py | 7 +- .../crowdpose/res50_crowdpose_256x192.py | 7 +- .../crowdpose/res50_crowdpose_384x288.py | 7 +- .../h36m/hrnet_w32_h36m_256x256.py | 10 +- .../h36m/hrnet_w48_h36m_256x256.py | 10 +- .../jhmdb/cpm_jhmdb_sub1_368x368.py | 10 +- .../jhmdb/cpm_jhmdb_sub2_368x368.py | 10 +- .../jhmdb/cpm_jhmdb_sub3_368x368.py | 10 +- .../jhmdb/res50_2deconv_jhmdb_sub1_256x256.py | 10 +- .../jhmdb/res50_2deconv_jhmdb_sub2_256x256.py | 10 +- .../jhmdb/res50_2deconv_jhmdb_sub3_256x256.py | 10 +- .../jhmdb/res50_jhmdb_sub1_256x256.py | 10 +- .../jhmdb/res50_jhmdb_sub2_256x256.py | 10 +- .../jhmdb/res50_jhmdb_sub3_256x256.py | 10 +- .../topdown_heatmap/mhp/res50_mhp_256x192.py | 10 +- .../topdown_heatmap/mpii/cpm_mpii_368x368.py | 10 +- .../mpii/hourglass52_mpii_256x256.py | 10 +- .../mpii/hourglass52_mpii_384x384.py | 10 +- .../mpii/hrnet_w32_mpii_256x256.py | 10 +- .../mpii/hrnet_w32_mpii_256x256_dark.py | 10 +- .../mpii/hrnet_w32_mpii_256x256_udp.py | 10 +- .../mpii/hrnet_w48_mpii_256x256.py | 10 +- .../mpii/hrnet_w48_mpii_256x256_dark.py | 10 +- .../mpii/hrnet_w48_mpii_256x256_udp.py | 10 +- .../mpii/mobilenetv2_mpii_256x256.py | 10 +- .../mpii/res101_mpii_256x256.py | 10 +- .../mpii/res152_mpii_256x256.py | 10 +- .../mpii/res50_mpii_256x256.py | 10 +- .../mpii/resnetv1d101_mpii_256x256.py | 10 +- .../mpii/resnetv1d152_mpii_256x256.py | 10 +- .../mpii/resnetv1d50_mpii_256x256.py | 10 +- .../mpii/resnext101_mpii_256x256.py | 10 +- .../mpii/resnext152_mpii_256x256.py | 10 +- .../mpii/resnext50_mpii_256x256.py | 10 +- .../mpii/scnet101_mpii_256x256.py | 10 +- .../mpii/scnet50_mpii_256x256.py | 10 +- .../mpii/seresnet101_mpii_256x256.py | 10 +- .../mpii/seresnet152_mpii_256x256.py | 10 +- .../mpii/seresnet50_mpii_256x256.py | 10 +- .../mpii/shufflenetv1_mpii_256x256.py | 10 +- .../mpii/shufflenetv2_mpii_256x256.py | 10 +- .../mpii_trb/res101_mpii_trb_256x256.py | 7 +- .../mpii_trb/res152_mpii_trb_256x256.py | 7 +- .../mpii_trb/res50_mpii_trb_256x256.py | 7 +- .../ochuman/res101_ochuman_256x192.py | 10 +- .../ochuman/res101_ochuman_384x288.py | 10 +- .../ochuman/res152_ochuman_256x192.py | 10 +- .../ochuman/res152_ochuman_384x288.py | 10 +- .../ochuman/res50_ochuman_256x192.py | 10 +- .../ochuman/res50_ochuman_384x288.py | 10 +- .../hrnet_w32_posetrack18_256x192.py | 10 +- .../posetrack18/res50_posetrack18_256x192.py | 10 +- .../pose_lift/h36m/simplebaseline3d_h36m.py | 10 +- ..._h36m_1frame_fullconv_supervised_cpn_ft.py | 10 +- ...se3d_h36m_243frames_fullconv_supervised.py | 10 +- ...6m_243frames_fullconv_supervised_cpn_ft.py | 10 +- ..._h36m_27frames_fullconv_semi-supervised.py | 13 +- ...7frames_fullconv_semi-supervised_cpn_ft.py | 13 +- ...ose3d_h36m_27frames_fullconv_supervised.py | 10 +- ...ose3d_h36m_81frames_fullconv_supervised.py | 10 +- .../hmr/mixed/res50_mixed_224x224.py | 2 +- .../deeppose/wflw/res50_wflw_256x256.py | 10 +- .../wflw/res50_wflw_256x256_wingloss.py | 10 +- .../300w/hrnetv2_w18_300w_256x256.py | 10 +- .../300w/hrnetv2_w18_300w_256x256_dark.py | 10 +- .../300w/res50_300w_256x256.py | 10 +- .../aflw/hrnetv2_w18_aflw_256x256.py | 10 +- .../aflw/hrnetv2_w18_aflw_256x256_dark.py | 10 +- .../aflw/res50_aflw_256x256.py | 10 +- .../cofw/hrnetv2_w18_cofw_256x256.py | 10 +- .../cofw/hrnetv2_w18_cofw_256x256_dark.py | 10 +- .../cofw/res50_cofw_256x256.py | 10 +- .../wflw/hrnetv2_w18_wflw_256x256.py | 10 +- .../wflw/hrnetv2_w18_wflw_256x256_dark.py | 10 +- .../wflw/res50_wflw_256x256.py | 10 +- .../res101_deepfashion_full_256x192.py | 10 +- .../res101_deepfashion_lower_256x192.py | 10 +- .../res101_deepfashion_upper_256x192.py | 10 +- .../res152_deepfashion_full_256x192.py | 10 +- .../res152_deepfashion_lower_256x192.py | 10 +- .../res152_deepfashion_upper_256x192.py | 10 +- .../res50_deepfashion_full_256x192.py | 10 +- .../res50_deepfashion_lower_256x192.py | 10 +- .../res50_deepfashion_upper_256x192.py | 10 +- .../hrnet_w32_deepfashion_full_256x192.py | 10 +- .../hrnet_w32_deepfashion_full_256x192_udp.py | 10 +- .../hrnet_w32_deepfashion_lower_256x192.py | 10 +- ...hrnet_w32_deepfashion_lower_256x192_udp.py | 10 +- .../hrnet_w32_deepfashion_upper_256x192.py | 10 +- ...hrnet_w32_deepfashion_upper_256x192_udp.py | 10 +- .../hrnet_w48_deepfashion_full_256x192.py | 10 +- .../hrnet_w48_deepfashion_full_256x192_udp.py | 10 +- .../hrnet_w48_deepfashion_lower_256x192.py | 10 +- ...hrnet_w48_deepfashion_lower_256x192_udp.py | 10 +- .../hrnet_w48_deepfashion_upper_256x192.py | 10 +- ...hrnet_w48_deepfashion_upper_256x192_udp.py | 10 +- .../res101_deepfashion_full_256x192.py | 10 +- .../res101_deepfashion_lower_256x192.py | 10 +- .../res101_deepfashion_upper_256x192.py | 10 +- .../res152_deepfashion_full_256x192.py | 10 +- .../res152_deepfashion_lower_256x192.py | 10 +- .../res152_deepfashion_upper_256x192.py | 10 +- .../res50_deepfashion_full_256x192.py | 10 +- .../res50_deepfashion_lower_256x192.py | 10 +- .../res50_deepfashion_upper_256x192.py | 10 +- .../onehand10k/res50_onehand10k_256x256.py | 10 +- .../panoptic2d/res50_panoptic2d_256x256.py | 10 +- .../deeppose/rhd2d/res50_rhd2d_256x256.py | 10 +- .../freihand2d/res50_freihand2d_224x224.py | 10 +- .../res50_interhand2d_all_256x256.py | 10 +- .../res50_interhand2d_human_256x256.py | 10 +- .../res50_interhand2d_machine_256x256.py | 10 +- .../hrnetv2_w18_onehand10k_256x256.py | 10 +- .../hrnetv2_w18_onehand10k_256x256_dark.py | 10 +- .../hrnetv2_w18_onehand10k_256x256_udp.py | 10 +- .../mobilenetv2_onehand10k_256x256.py | 10 +- .../onehand10k/res50_onehand10k_256x256.py | 10 +- .../hrnetv2_w18_panoptic2d_256x256.py | 10 +- .../hrnetv2_w18_panoptic2d_256x256_dark.py | 10 +- .../hrnetv2_w18_panoptic2d_256x256_udp.py | 10 +- .../mobilenetv2_panoptic2d_256x256.py | 10 +- .../panoptic2d/res50_panoptic2d_256x256.py | 10 +- .../rhd2d/hrnetv2_w18_rhd2d_256x256.py | 10 +- .../rhd2d/hrnetv2_w18_rhd2d_256x256_dark.py | 10 +- .../rhd2d/hrnetv2_w18_rhd2d_256x256_udp.py | 10 +- .../rhd2d/mobilenetv2_rhd2d_256x256.py | 10 +- .../rhd2d/res50_rhd2d_224x224.py | 10 +- .../rhd2d/res50_rhd2d_256x256.py | 10 +- .../res50_interhand3d_all_256x256.py | 10 +- .../higherhrnet_w32_coco_wholebody_512x512.py | 10 +- .../higherhrnet_w32_coco_wholebody_640x640.py | 10 +- .../higherhrnet_w48_coco_wholebody_512x512.py | 10 +- .../higherhrnet_w48_coco_wholebody_640x640.py | 10 +- .../hrnet_w32_coco_wholebody_512x512.py | 10 +- .../hrnet_w32_coco_wholebody_640x640.py | 10 +- .../hrnet_w48_coco_wholebody_512x512.py | 10 +- .../hrnet_w48_coco_wholebody_640x640.py | 10 +- .../hrnet_w32_coco_wholebody_256x192.py | 10 +- .../hrnet_w32_coco_wholebody_256x192_dark.py | 10 +- .../hrnet_w32_coco_wholebody_384x288.py | 10 +- .../hrnet_w32_coco_wholebody_384x288_dark.py | 10 +- .../hrnet_w48_coco_wholebody_256x192.py | 10 +- .../hrnet_w48_coco_wholebody_256x192_dark.py | 10 +- .../hrnet_w48_coco_wholebody_384x288.py | 10 +- .../hrnet_w48_coco_wholebody_384x288_dark.py | 10 +- ...et_w48_coco_wholebody_384x288_dark_plus.py | 10 +- .../res101_coco_wholebody_256x192.py | 10 +- .../res101_coco_wholebody_384x288.py | 10 +- .../res152_coco_wholebody_256x192.py | 10 +- .../res152_coco_wholebody_384x288.py | 10 +- .../res50_coco_wholebody_256x192.py | 10 +- .../res50_coco_wholebody_384x288.py | 10 +- demo/body3d_two_stage_img_demo.py | 23 + demo/bottom_up_img_demo.py | 15 +- demo/bottom_up_pose_tracking_demo.py | 15 +- demo/bottom_up_video_demo.py | 15 +- demo/face_img_demo.py | 12 + demo/face_video_demo.py | 12 + demo/top_down_img_demo.py | 12 + demo/top_down_img_demo_with_mmdet.py | 12 + .../top_down_pose_tracking_demo_with_mmdet.py | 12 + ...down_pose_tracking_demo_with_mmtracking.py | 12 + ..._down_video_demo_full_frame_without_det.py | 12 + demo/top_down_video_demo_with_mmdet.py | 12 + mmpose/apis/inference.py | 640 ++++----- mmpose/apis/inference_3d.py | 171 +-- mmpose/apis/inference_tracking.py | 123 +- mmpose/apis/train.py | 5 +- .../core/post_processing/one_euro_filter.py | 2 +- mmpose/core/visualization/image.py | 61 +- mmpose/datasets/__init__.py | 3 +- mmpose/datasets/dataset_info.py | 104 ++ .../datasets/animal/animal_atrw_dataset.py | 62 +- .../datasets/animal/animal_base_dataset.py | 153 +-- .../datasets/animal/animal_fly_dataset.py | 89 +- .../datasets/animal/animal_horse10_dataset.py | 75 +- .../datasets/animal/animal_locust_dataset.py | 89 +- .../datasets/animal/animal_macaque_dataset.py | 66 +- .../datasets/animal/animal_pose_dataset.py | 68 +- .../datasets/animal/animal_zebra_dataset.py | 86 +- mmpose/datasets/datasets/base/__init__.py | 13 + .../kpt_2d_sview_rgb_img_bottom_up_dataset.py | 189 +++ .../kpt_2d_sview_rgb_img_top_down_dataset.py | 282 ++++ .../base/kpt_3d_sview_kpt_2d_dataset.py | 226 ++++ .../kpt_3d_sview_rgb_img_top_down_dataset.py | 257 ++++ .../datasets/body3d/body3d_base_dataset.py | 221 +--- .../datasets/body3d/body3d_h36m_dataset.py | 36 +- .../body3d/body3d_mpi_inf_3dhp_dataset.py | 35 +- .../datasets/bottom_up/bottom_up_aic.py | 57 +- .../bottom_up/bottom_up_base_dataset.py | 100 +- .../datasets/bottom_up/bottom_up_coco.py | 116 +- .../bottom_up/bottom_up_coco_wholebody.py | 122 +- .../datasets/bottom_up/bottom_up_crowdpose.py | 63 +- .../datasets/bottom_up/bottom_up_mhp.py | 62 +- .../datasets/face/face_300w_dataset.py | 79 +- .../datasets/face/face_aflw_dataset.py | 75 +- .../datasets/face/face_base_dataset.py | 153 +-- .../datasets/face/face_cofw_dataset.py | 73 +- .../datasets/face/face_wflw_dataset.py | 81 +- .../datasets/fashion/deepfashion_dataset.py | 60 +- .../datasets/fashion/fashion_base_dataset.py | 225 +--- mmpose/datasets/datasets/hand/__init__.py | 2 +- .../datasets/hand/freihand_dataset.py | 28 +- .../datasets/hand/hand_base_dataset.py | 224 +--- .../datasets/hand/interhand2d_dataset.py | 31 +- .../datasets/hand/interhand3d_dataset.py | 102 +- .../datasets/hand/onehand10k_dataset.py | 28 +- ..._dataset.py => panoptic_hand2d_dataset.py} | 34 +- .../datasets/datasets/hand/rhd2d_dataset.py | 28 +- .../datasets/mesh/mesh_base_dataset.py | 2 +- mmpose/datasets/datasets/mesh/mosh_dataset.py | 2 +- .../datasets/top_down/topdown_aic_dataset.py | 62 +- .../datasets/top_down/topdown_base_dataset.py | 78 +- .../datasets/top_down/topdown_coco_dataset.py | 118 +- .../topdown_coco_wholebody_dataset.py | 120 +- .../top_down/topdown_crowdpose_dataset.py | 68 +- .../datasets/top_down/topdown_h36m_dataset.py | 152 +-- .../top_down/topdown_jhmdb_dataset.py | 61 +- .../datasets/top_down/topdown_mhp_dataset.py | 58 +- .../datasets/top_down/topdown_mpii_dataset.py | 41 +- .../top_down/topdown_mpii_trb_dataset.py | 41 +- .../top_down/topdown_ochuman_dataset.py | 63 +- .../top_down/topdown_posetrack18_dataset.py | 65 +- .../datasets/pipelines/bottom_up_transform.py | 15 +- mmpose/deprecated.py | 8 +- .../models/detectors/associative_embedding.py | 13 +- mmpose/models/detectors/interhand_3d.py | 14 +- mmpose/models/detectors/pose_lifter.py | 24 +- mmpose/models/detectors/top_down.py | 13 +- tests/test_apis/test_inference.py | 64 +- tests/test_apis/test_inference_3d.py | 43 +- tests/test_apis/test_inference_tracking.py | 44 +- .../test_animal_dataset_compatibility.py | 415 ++++++ .../test_body3d_dataset_compatibility.py | 266 ++++ .../test_bottom_up_dataset_compatibility.py | 325 +++++ .../test_deprecated_dataset_base.py | 28 + .../test_face_dataset_compatibility.py | 170 +++ .../test_fashion_dataset_compatibility.py | 69 + .../test_hand_dataset_compatibility.py | 388 ++++++ .../test_inference_compatibility.py | 140 ++ .../test_top_down_dataset_compatibility.py | 745 +++++++++++ tests/test_datasets/test_animal_dataset.py | 87 +- tests/test_datasets/test_body3d_dataset.py | 25 +- tests/test_datasets/test_bottom_up_dataset.py | 31 +- tests/test_datasets/test_dataset_info.py | 77 ++ tests/test_datasets/test_face_dataset.py | 124 +- tests/test_datasets/test_fashion_dataset.py | 55 +- tests/test_datasets/test_hand_dataset.py | 84 +- tests/test_datasets/test_top_down_dataset.py | 104 +- tests/test_eval_hook.py | 5 +- tests/test_visualization.py | 8 +- tests/utils/data_utils.py | 47 + 460 files changed, 14864 insertions(+), 4596 deletions(-) create mode 100644 configs/_base_/datasets/300w.py create mode 100644 configs/_base_/datasets/aflw.py create mode 100644 configs/_base_/datasets/aic.py create mode 100644 configs/_base_/datasets/animalpose.py create mode 100644 configs/_base_/datasets/atrw.py create mode 100644 configs/_base_/datasets/coco.py create mode 100644 configs/_base_/datasets/coco_wholebody.py create mode 100644 configs/_base_/datasets/cofw.py create mode 100644 configs/_base_/datasets/crowdpose.py create mode 100644 configs/_base_/datasets/deepfashion_full.py create mode 100644 configs/_base_/datasets/deepfashion_lower.py create mode 100644 configs/_base_/datasets/deepfashion_upper.py create mode 100644 configs/_base_/datasets/fly.py create mode 100644 configs/_base_/datasets/freihand2d.py create mode 100644 configs/_base_/datasets/h36m.py create mode 100644 configs/_base_/datasets/horse10.py create mode 100644 configs/_base_/datasets/interhand2d.py create mode 100644 configs/_base_/datasets/interhand3d.py create mode 100644 configs/_base_/datasets/jhmdb.py create mode 100644 configs/_base_/datasets/locust.py create mode 100644 configs/_base_/datasets/macaque.py create mode 100644 configs/_base_/datasets/mhp.py create mode 100644 configs/_base_/datasets/mpi_inf_3dhp.py create mode 100644 configs/_base_/datasets/mpii.py create mode 100644 configs/_base_/datasets/mpii_trb.py create mode 100644 configs/_base_/datasets/ochuman.py create mode 100644 configs/_base_/datasets/onehand10k.py create mode 100644 configs/_base_/datasets/panoptic_hand2d.py create mode 100644 configs/_base_/datasets/posetrack18.py create mode 100644 configs/_base_/datasets/rhd2d.py create mode 100644 configs/_base_/datasets/wflw.py create mode 100644 configs/_base_/datasets/zebra.py create mode 100644 mmpose/datasets/dataset_info.py create mode 100644 mmpose/datasets/datasets/base/__init__.py create mode 100644 mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_bottom_up_dataset.py create mode 100644 mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_top_down_dataset.py create mode 100644 mmpose/datasets/datasets/base/kpt_3d_sview_kpt_2d_dataset.py create mode 100644 mmpose/datasets/datasets/base/kpt_3d_sview_rgb_img_top_down_dataset.py rename mmpose/datasets/datasets/hand/{panoptic_dataset.py => panoptic_hand2d_dataset.py} (86%) create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset_compatibility.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset_compatibility.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset_compatibility.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_deprecated_dataset_base.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset_compatibility.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset_compatibility.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset_compatibility.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference_compatibility.py create mode 100644 tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset_compatibility.py create mode 100644 tests/test_datasets/test_dataset_info.py create mode 100644 tests/utils/data_utils.py diff --git a/configs/_base_/datasets/300w.py b/configs/_base_/datasets/300w.py new file mode 100644 index 0000000000..10c343a2ad --- /dev/null +++ b/configs/_base_/datasets/300w.py @@ -0,0 +1,384 @@ +dataset_info = dict( + dataset_name='300w', + paper_info=dict( + author='Sagonas, Christos and Antonakos, Epameinondas ' + 'and Tzimiropoulos, Georgios and Zafeiriou, Stefanos ' + 'and Pantic, Maja', + title='300 faces in-the-wild challenge: ' + 'Database and results', + container='Image and vision computing', + year='2016', + homepage='https://ibug.doc.ic.ac.uk/resources/300-W/', + ), + keypoint_info={ + 0: + dict( + name='kpt-0', id=0, color=[255, 255, 255], type='', swap='kpt-16'), + 1: + dict( + name='kpt-1', id=1, color=[255, 255, 255], type='', swap='kpt-15'), + 2: + dict( + name='kpt-2', id=2, color=[255, 255, 255], type='', swap='kpt-14'), + 3: + dict( + name='kpt-3', id=3, color=[255, 255, 255], type='', swap='kpt-13'), + 4: + dict( + name='kpt-4', id=4, color=[255, 255, 255], type='', swap='kpt-12'), + 5: + dict( + name='kpt-5', id=5, color=[255, 255, 255], type='', swap='kpt-11'), + 6: + dict( + name='kpt-6', id=6, color=[255, 255, 255], type='', swap='kpt-10'), + 7: + dict(name='kpt-7', id=7, color=[255, 255, 255], type='', swap='kpt-9'), + 8: + dict(name='kpt-8', id=8, color=[255, 255, 255], type='', swap=''), + 9: + dict(name='kpt-9', id=9, color=[255, 255, 255], type='', swap='kpt-7'), + 10: + dict( + name='kpt-10', id=10, color=[255, 255, 255], type='', + swap='kpt-6'), + 11: + dict( + name='kpt-11', id=11, color=[255, 255, 255], type='', + swap='kpt-5'), + 12: + dict( + name='kpt-12', id=12, color=[255, 255, 255], type='', + swap='kpt-4'), + 13: + dict( + name='kpt-13', id=13, color=[255, 255, 255], type='', + swap='kpt-3'), + 14: + dict( + name='kpt-14', id=14, color=[255, 255, 255], type='', + swap='kpt-2'), + 15: + dict( + name='kpt-15', id=15, color=[255, 255, 255], type='', + swap='kpt-1'), + 16: + dict( + name='kpt-16', id=16, color=[255, 255, 255], type='', + swap='kpt-0'), + 17: + dict( + name='kpt-17', + id=17, + color=[255, 255, 255], + type='', + swap='kpt-26'), + 18: + dict( + name='kpt-18', + id=18, + color=[255, 255, 255], + type='', + swap='kpt-25'), + 19: + dict( + name='kpt-19', + id=19, + color=[255, 255, 255], + type='', + swap='kpt-24'), + 20: + dict( + name='kpt-20', + id=20, + color=[255, 255, 255], + type='', + swap='kpt-23'), + 21: + dict( + name='kpt-21', + id=21, + color=[255, 255, 255], + type='', + swap='kpt-22'), + 22: + dict( + name='kpt-22', + id=22, + color=[255, 255, 255], + type='', + swap='kpt-21'), + 23: + dict( + name='kpt-23', + id=23, + color=[255, 255, 255], + type='', + swap='kpt-20'), + 24: + dict( + name='kpt-24', + id=24, + color=[255, 255, 255], + type='', + swap='kpt-19'), + 25: + dict( + name='kpt-25', + id=25, + color=[255, 255, 255], + type='', + swap='kpt-18'), + 26: + dict( + name='kpt-26', + id=26, + color=[255, 255, 255], + type='', + swap='kpt-17'), + 27: + dict(name='kpt-27', id=27, color=[255, 255, 255], type='', swap=''), + 28: + dict(name='kpt-28', id=28, color=[255, 255, 255], type='', swap=''), + 29: + dict(name='kpt-29', id=29, color=[255, 255, 255], type='', swap=''), + 30: + dict(name='kpt-30', id=30, color=[255, 255, 255], type='', swap=''), + 31: + dict( + name='kpt-31', + id=31, + color=[255, 255, 255], + type='', + swap='kpt-35'), + 32: + dict( + name='kpt-32', + id=32, + color=[255, 255, 255], + type='', + swap='kpt-34'), + 33: + dict(name='kpt-33', id=33, color=[255, 255, 255], type='', swap=''), + 34: + dict( + name='kpt-34', + id=34, + color=[255, 255, 255], + type='', + swap='kpt-32'), + 35: + dict( + name='kpt-35', + id=35, + color=[255, 255, 255], + type='', + swap='kpt-31'), + 36: + dict( + name='kpt-36', + id=36, + color=[255, 255, 255], + type='', + swap='kpt-45'), + 37: + dict( + name='kpt-37', + id=37, + color=[255, 255, 255], + type='', + swap='kpt-44'), + 38: + dict( + name='kpt-38', + id=38, + color=[255, 255, 255], + type='', + swap='kpt-43'), + 39: + dict( + name='kpt-39', + id=39, + color=[255, 255, 255], + type='', + swap='kpt-42'), + 40: + dict( + name='kpt-40', + id=40, + color=[255, 255, 255], + type='', + swap='kpt-47'), + 41: + dict( + name='kpt-41', + id=41, + color=[255, 255, 255], + type='', + swap='kpt-46'), + 42: + dict( + name='kpt-42', + id=42, + color=[255, 255, 255], + type='', + swap='kpt-39'), + 43: + dict( + name='kpt-43', + id=43, + color=[255, 255, 255], + type='', + swap='kpt-38'), + 44: + dict( + name='kpt-44', + id=44, + color=[255, 255, 255], + type='', + swap='kpt-37'), + 45: + dict( + name='kpt-45', + id=45, + color=[255, 255, 255], + type='', + swap='kpt-36'), + 46: + dict( + name='kpt-46', + id=46, + color=[255, 255, 255], + type='', + swap='kpt-41'), + 47: + dict( + name='kpt-47', + id=47, + color=[255, 255, 255], + type='', + swap='kpt-40'), + 48: + dict( + name='kpt-48', + id=48, + color=[255, 255, 255], + type='', + swap='kpt-54'), + 49: + dict( + name='kpt-49', + id=49, + color=[255, 255, 255], + type='', + swap='kpt-53'), + 50: + dict( + name='kpt-50', + id=50, + color=[255, 255, 255], + type='', + swap='kpt-52'), + 51: + dict(name='kpt-51', id=51, color=[255, 255, 255], type='', swap=''), + 52: + dict( + name='kpt-52', + id=52, + color=[255, 255, 255], + type='', + swap='kpt-50'), + 53: + dict( + name='kpt-53', + id=53, + color=[255, 255, 255], + type='', + swap='kpt-49'), + 54: + dict( + name='kpt-54', + id=54, + color=[255, 255, 255], + type='', + swap='kpt-48'), + 55: + dict( + name='kpt-55', + id=55, + color=[255, 255, 255], + type='', + swap='kpt-59'), + 56: + dict( + name='kpt-56', + id=56, + color=[255, 255, 255], + type='', + swap='kpt-58'), + 57: + dict(name='kpt-57', id=57, color=[255, 255, 255], type='', swap=''), + 58: + dict( + name='kpt-58', + id=58, + color=[255, 255, 255], + type='', + swap='kpt-56'), + 59: + dict( + name='kpt-59', + id=59, + color=[255, 255, 255], + type='', + swap='kpt-55'), + 60: + dict( + name='kpt-60', + id=60, + color=[255, 255, 255], + type='', + swap='kpt-64'), + 61: + dict( + name='kpt-61', + id=61, + color=[255, 255, 255], + type='', + swap='kpt-63'), + 62: + dict(name='kpt-62', id=62, color=[255, 255, 255], type='', swap=''), + 63: + dict( + name='kpt-63', + id=63, + color=[255, 255, 255], + type='', + swap='kpt-61'), + 64: + dict( + name='kpt-64', + id=64, + color=[255, 255, 255], + type='', + swap='kpt-60'), + 65: + dict( + name='kpt-65', + id=65, + color=[255, 255, 255], + type='', + swap='kpt-67'), + 66: + dict(name='kpt-66', id=66, color=[255, 255, 255], type='', swap=''), + 67: + dict( + name='kpt-67', + id=67, + color=[255, 255, 255], + type='', + swap='kpt-65'), + }, + skeleton_info={}, + joint_weights=[1.] * 68, + sigmas=[]) diff --git a/configs/_base_/datasets/aflw.py b/configs/_base_/datasets/aflw.py new file mode 100644 index 0000000000..bf534cbb75 --- /dev/null +++ b/configs/_base_/datasets/aflw.py @@ -0,0 +1,83 @@ +dataset_info = dict( + dataset_name='aflw', + paper_info=dict( + author='Koestinger, Martin and Wohlhart, Paul and ' + 'Roth, Peter M and Bischof, Horst', + title='Annotated facial landmarks in the wild: ' + 'A large-scale, real-world database for facial ' + 'landmark localization', + container='2011 IEEE international conference on computer ' + 'vision workshops (ICCV workshops)', + year='2011', + homepage='https://www.tugraz.at/institute/icg/research/' + 'team-bischof/lrs/downloads/aflw/', + ), + keypoint_info={ + 0: + dict(name='kpt-0', id=0, color=[255, 255, 255], type='', swap='kpt-5'), + 1: + dict(name='kpt-1', id=1, color=[255, 255, 255], type='', swap='kpt-4'), + 2: + dict(name='kpt-2', id=2, color=[255, 255, 255], type='', swap='kpt-3'), + 3: + dict(name='kpt-3', id=3, color=[255, 255, 255], type='', swap='kpt-2'), + 4: + dict(name='kpt-4', id=4, color=[255, 255, 255], type='', swap='kpt-1'), + 5: + dict(name='kpt-5', id=5, color=[255, 255, 255], type='', swap='kpt-0'), + 6: + dict( + name='kpt-6', id=6, color=[255, 255, 255], type='', swap='kpt-11'), + 7: + dict( + name='kpt-7', id=7, color=[255, 255, 255], type='', swap='kpt-10'), + 8: + dict(name='kpt-8', id=8, color=[255, 255, 255], type='', swap='kpt-9'), + 9: + dict(name='kpt-9', id=9, color=[255, 255, 255], type='', swap='kpt-8'), + 10: + dict( + name='kpt-10', id=10, color=[255, 255, 255], type='', + swap='kpt-7'), + 11: + dict( + name='kpt-11', id=11, color=[255, 255, 255], type='', + swap='kpt-6'), + 12: + dict( + name='kpt-12', + id=12, + color=[255, 255, 255], + type='', + swap='kpt-14'), + 13: + dict(name='kpt-13', id=13, color=[255, 255, 255], type='', swap=''), + 14: + dict( + name='kpt-14', + id=14, + color=[255, 255, 255], + type='', + swap='kpt-12'), + 15: + dict( + name='kpt-15', + id=15, + color=[255, 255, 255], + type='', + swap='kpt-17'), + 16: + dict(name='kpt-16', id=16, color=[255, 255, 255], type='', swap=''), + 17: + dict( + name='kpt-17', + id=17, + color=[255, 255, 255], + type='', + swap='kpt-15'), + 18: + dict(name='kpt-18', id=18, color=[255, 255, 255], type='', swap='') + }, + skeleton_info={}, + joint_weights=[1.] * 19, + sigmas=[]) diff --git a/configs/_base_/datasets/aic.py b/configs/_base_/datasets/aic.py new file mode 100644 index 0000000000..9ecdbe3f0a --- /dev/null +++ b/configs/_base_/datasets/aic.py @@ -0,0 +1,140 @@ +dataset_info = dict( + dataset_name='aic', + paper_info=dict( + author='Wu, Jiahong and Zheng, He and Zhao, Bo and ' + 'Li, Yixin and Yan, Baoming and Liang, Rui and ' + 'Wang, Wenjia and Zhou, Shipei and Lin, Guosen and ' + 'Fu, Yanwei and others', + title='Ai challenger: A large-scale dataset for going ' + 'deeper in image understanding', + container='arXiv', + year='2017', + homepage='https://github.com/AIChallenger/AI_Challenger_2017', + ), + keypoint_info={ + 0: + dict( + name='right_shoulder', + id=0, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 1: + dict( + name='right_elbow', + id=1, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 2: + dict( + name='right_wrist', + id=2, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 3: + dict( + name='left_shoulder', + id=3, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 4: + dict( + name='left_elbow', + id=4, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 5: + dict( + name='left_wrist', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 6: + dict( + name='right_hip', + id=6, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 7: + dict( + name='right_knee', + id=7, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 8: + dict( + name='right_ankle', + id=8, + color=[255, 128, 0], + type='lower', + swap='left_ankle'), + 9: + dict( + name='left_hip', + id=9, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 10: + dict( + name='left_knee', + id=10, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 11: + dict( + name='left_ankle', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 12: + dict( + name='head_top', + id=12, + color=[51, 153, 255], + type='upper', + swap=''), + 13: + dict(name='neck', id=13, color=[51, 153, 255], type='upper', swap='') + }, + skeleton_info={ + 0: + dict(link=('right_wrist', 'right_elbow'), id=0, color=[255, 128, 0]), + 1: dict( + link=('right_elbow', 'right_shoulder'), id=1, color=[255, 128, 0]), + 2: dict(link=('right_shoulder', 'neck'), id=2, color=[51, 153, 255]), + 3: dict(link=('neck', 'left_shoulder'), id=3, color=[51, 153, 255]), + 4: dict(link=('left_shoulder', 'left_elbow'), id=4, color=[0, 255, 0]), + 5: dict(link=('left_elbow', 'left_wrist'), id=5, color=[0, 255, 0]), + 6: dict(link=('right_ankle', 'right_knee'), id=6, color=[255, 128, 0]), + 7: dict(link=('right_knee', 'right_hip'), id=7, color=[255, 128, 0]), + 8: dict(link=('right_hip', 'left_hip'), id=8, color=[51, 153, 255]), + 9: dict(link=('left_hip', 'left_knee'), id=9, color=[0, 255, 0]), + 10: dict(link=('left_knee', 'left_ankle'), id=10, color=[0, 255, 0]), + 11: dict(link=('head_top', 'neck'), id=11, color=[51, 153, 255]), + 12: dict( + link=('right_shoulder', 'right_hip'), id=12, color=[51, 153, 255]), + 13: + dict(link=('left_shoulder', 'left_hip'), id=13, color=[51, 153, 255]) + }, + joint_weights=[ + 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1. + ], + + # 'https://github.com/AIChallenger/AI_Challenger_2017/blob/master/' + # 'Evaluation/keypoint_eval/keypoint_eval.py#L50' + # delta = 2 x sigma + sigmas=[ + 0.01388152, 0.01515228, 0.01057665, 0.01417709, 0.01497891, 0.01402144, + 0.03909642, 0.03686941, 0.01981803, 0.03843971, 0.03412318, 0.02415081, + 0.01291456, 0.01236173 + ]) diff --git a/configs/_base_/datasets/animalpose.py b/configs/_base_/datasets/animalpose.py new file mode 100644 index 0000000000..d5bb62d951 --- /dev/null +++ b/configs/_base_/datasets/animalpose.py @@ -0,0 +1,166 @@ +dataset_info = dict( + dataset_name='animalpose', + paper_info=dict( + author='Cao, Jinkun and Tang, Hongyang and Fang, Hao-Shu and ' + 'Shen, Xiaoyong and Lu, Cewu and Tai, Yu-Wing', + title='Cross-Domain Adaptation for Animal Pose Estimation', + container='The IEEE International Conference on ' + 'Computer Vision (ICCV)', + year='2019', + homepage='https://sites.google.com/view/animal-pose/', + ), + keypoint_info={ + 0: + dict( + name='L_Eye', id=0, color=[0, 255, 0], type='upper', swap='R_Eye'), + 1: + dict( + name='R_Eye', + id=1, + color=[255, 128, 0], + type='upper', + swap='L_Eye'), + 2: + dict( + name='L_EarBase', + id=2, + color=[0, 255, 0], + type='upper', + swap='R_EarBase'), + 3: + dict( + name='R_EarBase', + id=3, + color=[255, 128, 0], + type='upper', + swap='L_EarBase'), + 4: + dict(name='Nose', id=4, color=[51, 153, 255], type='upper', swap=''), + 5: + dict(name='Throat', id=5, color=[51, 153, 255], type='upper', swap=''), + 6: + dict( + name='TailBase', id=6, color=[51, 153, 255], type='lower', + swap=''), + 7: + dict( + name='Withers', id=7, color=[51, 153, 255], type='upper', swap=''), + 8: + dict( + name='L_F_Elbow', + id=8, + color=[0, 255, 0], + type='upper', + swap='R_F_Elbow'), + 9: + dict( + name='R_F_Elbow', + id=9, + color=[255, 128, 0], + type='upper', + swap='L_F_Elbow'), + 10: + dict( + name='L_B_Elbow', + id=10, + color=[0, 255, 0], + type='lower', + swap='R_B_Elbow'), + 11: + dict( + name='R_B_Elbow', + id=11, + color=[255, 128, 0], + type='lower', + swap='L_B_Elbow'), + 12: + dict( + name='L_F_Knee', + id=12, + color=[0, 255, 0], + type='upper', + swap='R_F_Knee'), + 13: + dict( + name='R_F_Knee', + id=13, + color=[255, 128, 0], + type='upper', + swap='L_F_Knee'), + 14: + dict( + name='L_B_Knee', + id=14, + color=[0, 255, 0], + type='lower', + swap='R_B_Knee'), + 15: + dict( + name='R_B_Knee', + id=15, + color=[255, 128, 0], + type='lower', + swap='L_B_Knee'), + 16: + dict( + name='L_F_Paw', + id=16, + color=[0, 255, 0], + type='upper', + swap='R_F_Paw'), + 17: + dict( + name='R_F_Paw', + id=17, + color=[255, 128, 0], + type='upper', + swap='L_F_Paw'), + 18: + dict( + name='L_B_Paw', + id=18, + color=[0, 255, 0], + type='lower', + swap='R_B_Paw'), + 19: + dict( + name='R_B_Paw', + id=19, + color=[255, 128, 0], + type='lower', + swap='L_B_Paw') + }, + skeleton_info={ + 0: dict(link=('L_Eye', 'R_Eye'), id=0, color=[51, 153, 255]), + 1: dict(link=('L_Eye', 'L_EarBase'), id=1, color=[0, 255, 0]), + 2: dict(link=('R_Eye', 'R_EarBase'), id=2, color=[255, 128, 0]), + 3: dict(link=('L_Eye', 'Nose'), id=3, color=[0, 255, 0]), + 4: dict(link=('R_Eye', 'Nose'), id=4, color=[255, 128, 0]), + 5: dict(link=('Nose', 'Throat'), id=5, color=[51, 153, 255]), + 6: dict(link=('Throat', 'Withers'), id=6, color=[51, 153, 255]), + 7: dict(link=('TailBase', 'Withers'), id=7, color=[51, 153, 255]), + 8: dict(link=('Throat', 'L_F_Elbow'), id=8, color=[0, 255, 0]), + 9: dict(link=('L_F_Elbow', 'L_F_Knee'), id=9, color=[0, 255, 0]), + 10: dict(link=('L_F_Knee', 'L_F_Paw'), id=10, color=[0, 255, 0]), + 11: dict(link=('Throat', 'R_F_Elbow'), id=11, color=[255, 128, 0]), + 12: dict(link=('R_F_Elbow', 'R_F_Knee'), id=12, color=[255, 128, 0]), + 13: dict(link=('R_F_Knee', 'R_F_Paw'), id=13, color=[255, 128, 0]), + 14: dict(link=('TailBase', 'L_B_Elbow'), id=14, color=[0, 255, 0]), + 15: dict(link=('L_B_Elbow', 'L_B_Knee'), id=15, color=[0, 255, 0]), + 16: dict(link=('L_B_Knee', 'L_B_Paw'), id=16, color=[0, 255, 0]), + 17: dict(link=('TailBase', 'R_B_Elbow'), id=17, color=[255, 128, 0]), + 18: dict(link=('R_B_Elbow', 'R_B_Knee'), id=18, color=[255, 128, 0]), + 19: dict(link=('R_B_Knee', 'R_B_Paw'), id=19, color=[255, 128, 0]) + }, + joint_weights=[ + 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.2, 1.2, + 1.5, 1.5, 1.5, 1.5 + ], + + # Note: The original paper did not provide enough information about + # the sigmas. We modified from 'https://github.com/cocodataset/' + # 'cocoapi/blob/master/PythonAPI/pycocotools/cocoeval.py#L523' + sigmas=[ + 0.025, 0.025, 0.026, 0.035, 0.035, 0.10, 0.10, 0.10, 0.107, 0.107, + 0.107, 0.107, 0.087, 0.087, 0.087, 0.087, 0.089, 0.089, 0.089, 0.089 + ]) diff --git a/configs/_base_/datasets/atrw.py b/configs/_base_/datasets/atrw.py new file mode 100644 index 0000000000..7ec71c8c50 --- /dev/null +++ b/configs/_base_/datasets/atrw.py @@ -0,0 +1,144 @@ +dataset_info = dict( + dataset_name='atrw', + paper_info=dict( + author='Li, Shuyuan and Li, Jianguo and Tang, Hanlin ' + 'and Qian, Rui and Lin, Weiyao', + title='ATRW: A Benchmark for Amur Tiger ' + 'Re-identification in the Wild', + container='Proceedings of the 28th ACM ' + 'International Conference on Multimedia', + year='2020', + homepage='https://cvwc2019.github.io/challenge.html', + ), + keypoint_info={ + 0: + dict( + name='left_ear', + id=0, + color=[51, 153, 255], + type='upper', + swap='right_ear'), + 1: + dict( + name='right_ear', + id=1, + color=[51, 153, 255], + type='upper', + swap='left_ear'), + 2: + dict(name='nose', id=2, color=[51, 153, 255], type='upper', swap=''), + 3: + dict( + name='right_shoulder', + id=3, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 4: + dict( + name='right_front_paw', + id=4, + color=[255, 128, 0], + type='upper', + swap='left_front_paw'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='left_front_paw', + id=6, + color=[0, 255, 0], + type='upper', + swap='right_front_paw'), + 7: + dict( + name='right_hip', + id=7, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 8: + dict( + name='right_knee', + id=8, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 9: + dict( + name='right_back_paw', + id=9, + color=[255, 128, 0], + type='lower', + swap='left_back_paw'), + 10: + dict( + name='left_hip', + id=10, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 11: + dict( + name='left_knee', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 12: + dict( + name='left_back_paw', + id=12, + color=[0, 255, 0], + type='lower', + swap='right_back_paw'), + 13: + dict(name='tail', id=13, color=[51, 153, 255], type='lower', swap=''), + 14: + dict( + name='center', id=14, color=[51, 153, 255], type='lower', swap=''), + }, + skeleton_info={ + 0: + dict(link=('left_ear', 'nose'), id=0, color=[51, 153, 255]), + 1: + dict(link=('right_ear', 'nose'), id=1, color=[51, 153, 255]), + 2: + dict(link=('nose', 'center'), id=2, color=[51, 153, 255]), + 3: + dict( + link=('left_shoulder', 'left_front_paw'), id=3, color=[0, 255, 0]), + 4: + dict(link=('left_shoulder', 'center'), id=4, color=[0, 255, 0]), + 5: + dict( + link=('right_shoulder', 'right_front_paw'), + id=5, + color=[255, 128, 0]), + 6: + dict(link=('right_shoulder', 'center'), id=6, color=[255, 128, 0]), + 7: + dict(link=('tail', 'center'), id=7, color=[51, 153, 255]), + 8: + dict(link=('right_back_paw', 'right_knee'), id=8, color=[255, 128, 0]), + 9: + dict(link=('right_knee', 'right_hip'), id=9, color=[255, 128, 0]), + 10: + dict(link=('right_hip', 'tail'), id=10, color=[255, 128, 0]), + 11: + dict(link=('left_back_paw', 'left_knee'), id=11, color=[0, 255, 0]), + 12: + dict(link=('left_knee', 'left_hip'), id=12, color=[0, 255, 0]), + 13: + dict(link=('left_hip', 'tail'), id=13, color=[0, 255, 0]), + }, + joint_weights=[1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], + sigmas=[ + 0.0277, 0.0823, 0.0831, 0.0202, 0.0716, 0.0263, 0.0646, 0.0302, 0.0440, + 0.0316, 0.0333, 0.0547, 0.0263, 0.0683, 0.0539 + ]) diff --git a/configs/_base_/datasets/coco.py b/configs/_base_/datasets/coco.py new file mode 100644 index 0000000000..865a95bc02 --- /dev/null +++ b/configs/_base_/datasets/coco.py @@ -0,0 +1,181 @@ +dataset_info = dict( + dataset_name='coco', + paper_info=dict( + author='Lin, Tsung-Yi and Maire, Michael and ' + 'Belongie, Serge and Hays, James and ' + 'Perona, Pietro and Ramanan, Deva and ' + r'Doll{\'a}r, Piotr and Zitnick, C Lawrence', + title='Microsoft coco: Common objects in context', + container='European conference on computer vision', + year='2014', + homepage='http://cocodataset.org/', + ), + keypoint_info={ + 0: + dict(name='nose', id=0, color=[51, 153, 255], type='upper', swap=''), + 1: + dict( + name='left_eye', + id=1, + color=[51, 153, 255], + type='upper', + swap='right_eye'), + 2: + dict( + name='right_eye', + id=2, + color=[51, 153, 255], + type='upper', + swap='left_eye'), + 3: + dict( + name='left_ear', + id=3, + color=[51, 153, 255], + type='upper', + swap='right_ear'), + 4: + dict( + name='right_ear', + id=4, + color=[51, 153, 255], + type='upper', + swap='left_ear'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='right_shoulder', + id=6, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 7: + dict( + name='left_elbow', + id=7, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 8: + dict( + name='right_elbow', + id=8, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 9: + dict( + name='left_wrist', + id=9, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='left_hip', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 12: + dict( + name='right_hip', + id=12, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 13: + dict( + name='left_knee', + id=13, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 14: + dict( + name='right_knee', + id=14, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 15: + dict( + name='left_ankle', + id=15, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 16: + dict( + name='right_ankle', + id=16, + color=[255, 128, 0], + type='lower', + swap='left_ankle') + }, + skeleton_info={ + 0: + dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), + 2: + dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), + 5: + dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), + 6: + dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), + 7: + dict( + link=('left_shoulder', 'right_shoulder'), + id=7, + color=[51, 153, 255]), + 8: + dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), + 9: + dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('left_eye', 'right_eye'), id=12, color=[51, 153, 255]), + 13: + dict(link=('nose', 'left_eye'), id=13, color=[51, 153, 255]), + 14: + dict(link=('nose', 'right_eye'), id=14, color=[51, 153, 255]), + 15: + dict(link=('left_eye', 'left_ear'), id=15, color=[51, 153, 255]), + 16: + dict(link=('right_eye', 'right_ear'), id=16, color=[51, 153, 255]), + 17: + dict(link=('left_ear', 'left_shoulder'), id=17, color=[51, 153, 255]), + 18: + dict( + link=('right_ear', 'right_shoulder'), id=18, color=[51, 153, 255]) + }, + joint_weights=[ + 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, 1.2, 1.5, + 1.5 + ], + sigmas=[ + 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, 0.062, + 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 + ]) diff --git a/configs/_base_/datasets/coco_wholebody.py b/configs/_base_/datasets/coco_wholebody.py new file mode 100644 index 0000000000..1756862b54 --- /dev/null +++ b/configs/_base_/datasets/coco_wholebody.py @@ -0,0 +1,1150 @@ +dataset_info = dict( + dataset_name='coco_wholebody', + paper_info=dict( + author='Jin, Sheng and Xu, Lumin and Xu, Jin and ' + 'Wang, Can and Liu, Wentao and ' + 'Qian, Chen and Ouyang, Wanli and Luo, Ping', + title='Whole-Body Human Pose Estimation in the Wild', + container='Proceedings of the European ' + 'Conference on Computer Vision (ECCV)', + year='2020', + homepage='https://github.com/jin-s13/COCO-WholeBody/', + ), + keypoint_info={ + 0: + dict(name='nose', id=0, color=[51, 153, 255], type='upper', swap=''), + 1: + dict( + name='left_eye', + id=1, + color=[51, 153, 255], + type='upper', + swap='right_eye'), + 2: + dict( + name='right_eye', + id=2, + color=[51, 153, 255], + type='upper', + swap='left_eye'), + 3: + dict( + name='left_ear', + id=3, + color=[51, 153, 255], + type='upper', + swap='right_ear'), + 4: + dict( + name='right_ear', + id=4, + color=[51, 153, 255], + type='upper', + swap='left_ear'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='right_shoulder', + id=6, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 7: + dict( + name='left_elbow', + id=7, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 8: + dict( + name='right_elbow', + id=8, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 9: + dict( + name='left_wrist', + id=9, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='left_hip', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 12: + dict( + name='right_hip', + id=12, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 13: + dict( + name='left_knee', + id=13, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 14: + dict( + name='right_knee', + id=14, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 15: + dict( + name='left_ankle', + id=15, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 16: + dict( + name='right_ankle', + id=16, + color=[255, 128, 0], + type='lower', + swap='left_ankle'), + 17: + dict( + name='left_big_toe', + id=17, + color=[255, 128, 0], + type='lower', + swap='right_big_toe'), + 18: + dict( + name='left_small_toe', + id=18, + color=[255, 128, 0], + type='lower', + swap='right_small_toe'), + 19: + dict( + name='left_heel', + id=19, + color=[255, 128, 0], + type='lower', + swap='right_heel'), + 20: + dict( + name='right_big_toe', + id=20, + color=[255, 128, 0], + type='lower', + swap='left_big_toe'), + 21: + dict( + name='right_small_toe', + id=21, + color=[255, 128, 0], + type='lower', + swap='left_small_toe'), + 22: + dict( + name='right_heel', + id=22, + color=[255, 128, 0], + type='lower', + swap='left_heel'), + 23: + dict( + name='face-0', + id=23, + color=[255, 255, 255], + type='', + swap='face-16'), + 24: + dict( + name='face-1', + id=24, + color=[255, 255, 255], + type='', + swap='face-15'), + 25: + dict( + name='face-2', + id=25, + color=[255, 255, 255], + type='', + swap='face-14'), + 26: + dict( + name='face-3', + id=26, + color=[255, 255, 255], + type='', + swap='face-13'), + 27: + dict( + name='face-4', + id=27, + color=[255, 255, 255], + type='', + swap='face-12'), + 28: + dict( + name='face-5', + id=28, + color=[255, 255, 255], + type='', + swap='face-11'), + 29: + dict( + name='face-6', + id=29, + color=[255, 255, 255], + type='', + swap='face-10'), + 30: + dict( + name='face-7', + id=30, + color=[255, 255, 255], + type='', + swap='face-9'), + 31: + dict(name='face-8', id=31, color=[255, 255, 255], type='', swap=''), + 32: + dict( + name='face-9', + id=32, + color=[255, 255, 255], + type='', + swap='face-7'), + 33: + dict( + name='face-10', + id=33, + color=[255, 255, 255], + type='', + swap='face-6'), + 34: + dict( + name='face-11', + id=34, + color=[255, 255, 255], + type='', + swap='face-5'), + 35: + dict( + name='face-12', + id=35, + color=[255, 255, 255], + type='', + swap='face-4'), + 36: + dict( + name='face-13', + id=36, + color=[255, 255, 255], + type='', + swap='face-3'), + 37: + dict( + name='face-14', + id=37, + color=[255, 255, 255], + type='', + swap='face-2'), + 38: + dict( + name='face-15', + id=38, + color=[255, 255, 255], + type='', + swap='face-1'), + 39: + dict( + name='face-16', + id=39, + color=[255, 255, 255], + type='', + swap='face-0'), + 40: + dict( + name='face-17', + id=40, + color=[255, 255, 255], + type='', + swap='face-26'), + 41: + dict( + name='face-18', + id=41, + color=[255, 255, 255], + type='', + swap='face-25'), + 42: + dict( + name='face-19', + id=42, + color=[255, 255, 255], + type='', + swap='face-24'), + 43: + dict( + name='face-20', + id=43, + color=[255, 255, 255], + type='', + swap='face-23'), + 44: + dict( + name='face-21', + id=44, + color=[255, 255, 255], + type='', + swap='face-22'), + 45: + dict( + name='face-22', + id=45, + color=[255, 255, 255], + type='', + swap='face-21'), + 46: + dict( + name='face-23', + id=46, + color=[255, 255, 255], + type='', + swap='face-20'), + 47: + dict( + name='face-24', + id=47, + color=[255, 255, 255], + type='', + swap='face-19'), + 48: + dict( + name='face-25', + id=48, + color=[255, 255, 255], + type='', + swap='face-18'), + 49: + dict( + name='face-26', + id=49, + color=[255, 255, 255], + type='', + swap='face-17'), + 50: + dict(name='face-27', id=50, color=[255, 255, 255], type='', swap=''), + 51: + dict(name='face-28', id=51, color=[255, 255, 255], type='', swap=''), + 52: + dict(name='face-29', id=52, color=[255, 255, 255], type='', swap=''), + 53: + dict(name='face-30', id=53, color=[255, 255, 255], type='', swap=''), + 54: + dict( + name='face-31', + id=54, + color=[255, 255, 255], + type='', + swap='face-35'), + 55: + dict( + name='face-32', + id=55, + color=[255, 255, 255], + type='', + swap='face-34'), + 56: + dict(name='face-33', id=56, color=[255, 255, 255], type='', swap=''), + 57: + dict( + name='face-34', + id=57, + color=[255, 255, 255], + type='', + swap='face-32'), + 58: + dict( + name='face-35', + id=58, + color=[255, 255, 255], + type='', + swap='face-31'), + 59: + dict( + name='face-36', + id=59, + color=[255, 255, 255], + type='', + swap='face-45'), + 60: + dict( + name='face-37', + id=60, + color=[255, 255, 255], + type='', + swap='face-44'), + 61: + dict( + name='face-38', + id=61, + color=[255, 255, 255], + type='', + swap='face-43'), + 62: + dict( + name='face-39', + id=62, + color=[255, 255, 255], + type='', + swap='face-42'), + 63: + dict( + name='face-40', + id=63, + color=[255, 255, 255], + type='', + swap='face-47'), + 64: + dict( + name='face-41', + id=64, + color=[255, 255, 255], + type='', + swap='face-46'), + 65: + dict( + name='face-42', + id=65, + color=[255, 255, 255], + type='', + swap='face-39'), + 66: + dict( + name='face-43', + id=66, + color=[255, 255, 255], + type='', + swap='face-38'), + 67: + dict( + name='face-44', + id=67, + color=[255, 255, 255], + type='', + swap='face-37'), + 68: + dict( + name='face-45', + id=68, + color=[255, 255, 255], + type='', + swap='face-36'), + 69: + dict( + name='face-46', + id=69, + color=[255, 255, 255], + type='', + swap='face-41'), + 70: + dict( + name='face-47', + id=70, + color=[255, 255, 255], + type='', + swap='face-40'), + 71: + dict( + name='face-48', + id=71, + color=[255, 255, 255], + type='', + swap='face-54'), + 72: + dict( + name='face-49', + id=72, + color=[255, 255, 255], + type='', + swap='face-53'), + 73: + dict( + name='face-50', + id=73, + color=[255, 255, 255], + type='', + swap='face-52'), + 74: + dict(name='face-51', id=74, color=[255, 255, 255], type='', swap=''), + 75: + dict( + name='face-52', + id=75, + color=[255, 255, 255], + type='', + swap='face-50'), + 76: + dict( + name='face-53', + id=76, + color=[255, 255, 255], + type='', + swap='face-49'), + 77: + dict( + name='face-54', + id=77, + color=[255, 255, 255], + type='', + swap='face-48'), + 78: + dict( + name='face-55', + id=78, + color=[255, 255, 255], + type='', + swap='face-59'), + 79: + dict( + name='face-56', + id=79, + color=[255, 255, 255], + type='', + swap='face-58'), + 80: + dict(name='face-57', id=80, color=[255, 255, 255], type='', swap=''), + 81: + dict( + name='face-58', + id=81, + color=[255, 255, 255], + type='', + swap='face-56'), + 82: + dict( + name='face-59', + id=82, + color=[255, 255, 255], + type='', + swap='face-55'), + 83: + dict( + name='face-60', + id=83, + color=[255, 255, 255], + type='', + swap='face-64'), + 84: + dict( + name='face-61', + id=84, + color=[255, 255, 255], + type='', + swap='face-63'), + 85: + dict(name='face-62', id=85, color=[255, 255, 255], type='', swap=''), + 86: + dict( + name='face-63', + id=86, + color=[255, 255, 255], + type='', + swap='face-61'), + 87: + dict( + name='face-64', + id=87, + color=[255, 255, 255], + type='', + swap='face-60'), + 88: + dict( + name='face-65', + id=88, + color=[255, 255, 255], + type='', + swap='face-67'), + 89: + dict(name='face-66', id=89, color=[255, 255, 255], type='', swap=''), + 90: + dict( + name='face-67', + id=90, + color=[255, 255, 255], + type='', + swap='face-65'), + 91: + dict( + name='left_wrist', + id=91, + color=[255, 255, 255], + type='', + swap='right_wrist'), + 92: + dict( + name='left_thumb1', + id=92, + color=[255, 128, 0], + type='', + swap='right_thumb1'), + 93: + dict( + name='left_thumb2', + id=93, + color=[255, 128, 0], + type='', + swap='right_thumb2'), + 94: + dict( + name='left_thumb3', + id=94, + color=[255, 128, 0], + type='', + swap='right_thumb3'), + 95: + dict( + name='left_thumb4', + id=95, + color=[255, 128, 0], + type='', + swap='right_thumb4'), + 96: + dict( + name='left_forefinger1', + id=96, + color=[255, 153, 255], + type='', + swap='right_forefinger1'), + 97: + dict( + name='left_forefinger2', + id=97, + color=[255, 153, 255], + type='', + swap='right_forefinger2'), + 98: + dict( + name='left_forefinger3', + id=98, + color=[255, 153, 255], + type='', + swap='right_forefinger3'), + 99: + dict( + name='left_forefinger4', + id=99, + color=[255, 153, 255], + type='', + swap='right_forefinger4'), + 100: + dict( + name='left_middle_finger1', + id=100, + color=[102, 178, 255], + type='', + swap='right_middle_finger1'), + 101: + dict( + name='left_middle_finger2', + id=101, + color=[102, 178, 255], + type='', + swap='right_middle_finger2'), + 102: + dict( + name='left_middle_finger3', + id=102, + color=[102, 178, 255], + type='', + swap='right_middle_finger3'), + 103: + dict( + name='left_middle_finger4', + id=103, + color=[102, 178, 255], + type='', + swap='right_middle_finger4'), + 104: + dict( + name='left_ring_finger1', + id=104, + color=[255, 51, 51], + type='', + swap='right_ring_finger1'), + 105: + dict( + name='left_ring_finger2', + id=105, + color=[255, 51, 51], + type='', + swap='right_ring_finger2'), + 106: + dict( + name='left_ring_finger3', + id=106, + color=[255, 51, 51], + type='', + swap='right_ring_finger3'), + 107: + dict( + name='left_ring_finger4', + id=107, + color=[255, 51, 51], + type='', + swap='right_ring_finger4'), + 108: + dict( + name='left_pinky_finger1', + id=108, + color=[0, 255, 0], + type='', + swap='right_pinky_finger1'), + 109: + dict( + name='left_pinky_finger2', + id=109, + color=[0, 255, 0], + type='', + swap='right_pinky_finger2'), + 110: + dict( + name='left_pinky_finger3', + id=110, + color=[0, 255, 0], + type='', + swap='right_pinky_finger3'), + 111: + dict( + name='left_pinky_finger4', + id=111, + color=[0, 255, 0], + type='', + swap='right_pinky_finger4'), + 112: + dict( + name='right_wrist', + id=112, + color=[255, 255, 255], + type='', + swap='left_wrist'), + 113: + dict( + name='right_thumb1', + id=113, + color=[255, 128, 0], + type='', + swap='left_thumb1'), + 114: + dict( + name='right_thumb2', + id=114, + color=[255, 128, 0], + type='', + swap='left_thumb2'), + 115: + dict( + name='right_thumb3', + id=115, + color=[255, 128, 0], + type='', + swap='left_thumb3'), + 116: + dict( + name='right_thumb4', + id=116, + color=[255, 128, 0], + type='', + swap='left_thumb4'), + 117: + dict( + name='right_forefinger1', + id=117, + color=[255, 153, 255], + type='', + swap='left_forefinger1'), + 118: + dict( + name='right_forefinger2', + id=118, + color=[255, 153, 255], + type='', + swap='left_forefinger2'), + 119: + dict( + name='right_forefinger3', + id=119, + color=[255, 153, 255], + type='', + swap='left_forefinger3'), + 120: + dict( + name='right_forefinger4', + id=120, + color=[255, 153, 255], + type='', + swap='left_forefinger4'), + 121: + dict( + name='right_middle_finger1', + id=121, + color=[102, 178, 255], + type='', + swap='left_middle_finger1'), + 122: + dict( + name='right_middle_finger2', + id=122, + color=[102, 178, 255], + type='', + swap='left_middle_finger2'), + 123: + dict( + name='right_middle_finger3', + id=123, + color=[102, 178, 255], + type='', + swap='left_middle_finger3'), + 124: + dict( + name='right_middle_finger4', + id=124, + color=[102, 178, 255], + type='', + swap='left_middle_finger4'), + 125: + dict( + name='right_ring_finger1', + id=125, + color=[255, 51, 51], + type='', + swap='left_ring_finger1'), + 126: + dict( + name='right_ring_finger2', + id=126, + color=[255, 51, 51], + type='', + swap='left_ring_finger2'), + 127: + dict( + name='right_ring_finger3', + id=127, + color=[255, 51, 51], + type='', + swap='left_ring_finger3'), + 128: + dict( + name='right_ring_finger4', + id=128, + color=[255, 51, 51], + type='', + swap='left_ring_finger4'), + 129: + dict( + name='right_pinky_finger1', + id=129, + color=[0, 255, 0], + type='', + swap='left_pinky_finger1'), + 130: + dict( + name='right_pinky_finger2', + id=130, + color=[0, 255, 0], + type='', + swap='left_pinky_finger2'), + 131: + dict( + name='right_pinky_finger3', + id=131, + color=[0, 255, 0], + type='', + swap='left_pinky_finger3'), + 132: + dict( + name='right_pinky_finger4', + id=132, + color=[0, 255, 0], + type='', + swap='left_pinky_finger4') + }, + skeleton_info={ + 0: + dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), + 2: + dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), + 5: + dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), + 6: + dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), + 7: + dict( + link=('left_shoulder', 'right_shoulder'), + id=7, + color=[51, 153, 255]), + 8: + dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), + 9: + dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('left_eye', 'right_eye'), id=12, color=[51, 153, 255]), + 13: + dict(link=('nose', 'left_eye'), id=13, color=[51, 153, 255]), + 14: + dict(link=('nose', 'right_eye'), id=14, color=[51, 153, 255]), + 15: + dict(link=('left_eye', 'left_ear'), id=15, color=[51, 153, 255]), + 16: + dict(link=('right_eye', 'right_ear'), id=16, color=[51, 153, 255]), + 17: + dict(link=('left_ear', 'left_shoulder'), id=17, color=[51, 153, 255]), + 18: + dict( + link=('right_ear', 'right_shoulder'), id=18, color=[51, 153, 255]), + 19: + dict(link=('left_ankle', 'left_big_toe'), id=19, color=[0, 255, 0]), + 20: + dict(link=('left_ankle', 'left_small_toe'), id=20, color=[0, 255, 0]), + 21: + dict(link=('left_ankle', 'left_heel'), id=21, color=[0, 255, 0]), + 22: + dict( + link=('right_ankle', 'right_big_toe'), id=22, color=[255, 128, 0]), + 23: + dict( + link=('right_ankle', 'right_small_toe'), + id=23, + color=[255, 128, 0]), + 24: + dict(link=('right_ankle', 'right_heel'), id=24, color=[255, 128, 0]), + 25: + dict(link=('left_wrist', 'left_thumb1'), id=25, color=[255, 128, 0]), + 26: + dict(link=('left_thumb1', 'left_thumb2'), id=26, color=[255, 128, 0]), + 27: + dict(link=('left_thumb2', 'left_thumb3'), id=27, color=[255, 128, 0]), + 28: + dict(link=('left_thumb3', 'left_thumb4'), id=28, color=[255, 128, 0]), + 29: + dict( + link=('left_wrist', 'left_forefinger1'), + id=29, + color=[255, 153, 255]), + 30: + dict( + link=('left_forefinger1', 'left_forefinger2'), + id=30, + color=[255, 153, 255]), + 31: + dict( + link=('left_forefinger2', 'left_forefinger3'), + id=31, + color=[255, 153, 255]), + 32: + dict( + link=('left_forefinger3', 'left_forefinger4'), + id=32, + color=[255, 153, 255]), + 33: + dict( + link=('left_wrist', 'left_middle_finger1'), + id=33, + color=[102, 178, 255]), + 34: + dict( + link=('left_middle_finger1', 'left_middle_finger2'), + id=34, + color=[102, 178, 255]), + 35: + dict( + link=('left_middle_finger2', 'left_middle_finger3'), + id=35, + color=[102, 178, 255]), + 36: + dict( + link=('left_middle_finger3', 'left_middle_finger4'), + id=36, + color=[102, 178, 255]), + 37: + dict( + link=('left_wrist', 'left_ring_finger1'), + id=37, + color=[255, 51, 51]), + 38: + dict( + link=('left_ring_finger1', 'left_ring_finger2'), + id=38, + color=[255, 51, 51]), + 39: + dict( + link=('left_ring_finger2', 'left_ring_finger3'), + id=39, + color=[255, 51, 51]), + 40: + dict( + link=('left_ring_finger3', 'left_ring_finger4'), + id=40, + color=[255, 51, 51]), + 41: + dict( + link=('left_wrist', 'left_pinky_finger1'), + id=41, + color=[0, 255, 0]), + 42: + dict( + link=('left_pinky_finger1', 'left_pinky_finger2'), + id=42, + color=[0, 255, 0]), + 43: + dict( + link=('left_pinky_finger2', 'left_pinky_finger3'), + id=43, + color=[0, 255, 0]), + 44: + dict( + link=('left_pinky_finger3', 'left_pinky_finger4'), + id=44, + color=[0, 255, 0]), + 45: + dict(link=('right_wrist', 'right_thumb1'), id=45, color=[255, 128, 0]), + 46: + dict( + link=('right_thumb1', 'right_thumb2'), id=46, color=[255, 128, 0]), + 47: + dict( + link=('right_thumb2', 'right_thumb3'), id=47, color=[255, 128, 0]), + 48: + dict( + link=('right_thumb3', 'right_thumb4'), id=48, color=[255, 128, 0]), + 49: + dict( + link=('right_wrist', 'right_forefinger1'), + id=49, + color=[255, 153, 255]), + 50: + dict( + link=('right_forefinger1', 'right_forefinger2'), + id=50, + color=[255, 153, 255]), + 51: + dict( + link=('right_forefinger2', 'right_forefinger3'), + id=51, + color=[255, 153, 255]), + 52: + dict( + link=('right_forefinger3', 'right_forefinger4'), + id=52, + color=[255, 153, 255]), + 53: + dict( + link=('right_wrist', 'right_middle_finger1'), + id=53, + color=[102, 178, 255]), + 54: + dict( + link=('right_middle_finger1', 'right_middle_finger2'), + id=54, + color=[102, 178, 255]), + 55: + dict( + link=('right_middle_finger2', 'right_middle_finger3'), + id=55, + color=[102, 178, 255]), + 56: + dict( + link=('right_middle_finger3', 'right_middle_finger4'), + id=56, + color=[102, 178, 255]), + 57: + dict( + link=('right_wrist', 'right_ring_finger1'), + id=57, + color=[255, 51, 51]), + 58: + dict( + link=('right_ring_finger1', 'right_ring_finger2'), + id=58, + color=[255, 51, 51]), + 59: + dict( + link=('right_ring_finger2', 'right_ring_finger3'), + id=59, + color=[255, 51, 51]), + 60: + dict( + link=('right_ring_finger3', 'right_ring_finger4'), + id=60, + color=[255, 51, 51]), + 61: + dict( + link=('right_wrist', 'right_pinky_finger1'), + id=61, + color=[0, 255, 0]), + 62: + dict( + link=('right_pinky_finger1', 'right_pinky_finger2'), + id=62, + color=[0, 255, 0]), + 63: + dict( + link=('right_pinky_finger2', 'right_pinky_finger3'), + id=63, + color=[0, 255, 0]), + 64: + dict( + link=('right_pinky_finger3', 'right_pinky_finger4'), + id=64, + color=[0, 255, 0]) + }, + joint_weights=[1.] * 133, + + # 'https://github.com/jin-s13/COCO-WholeBody/blob/master/' + # 'evaluation/myeval_wholebody.py#L170' + sigmas=[ + 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, 0.062, + 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089, 0.068, 0.066, 0.066, + 0.092, 0.094, 0.094, 0.042, 0.043, 0.044, 0.043, 0.040, 0.035, 0.031, + 0.025, 0.020, 0.023, 0.029, 0.032, 0.037, 0.038, 0.043, 0.041, 0.045, + 0.013, 0.012, 0.011, 0.011, 0.012, 0.012, 0.011, 0.011, 0.013, 0.015, + 0.009, 0.007, 0.007, 0.007, 0.012, 0.009, 0.008, 0.016, 0.010, 0.017, + 0.011, 0.009, 0.011, 0.009, 0.007, 0.013, 0.008, 0.011, 0.012, 0.010, + 0.034, 0.008, 0.008, 0.009, 0.008, 0.008, 0.007, 0.010, 0.008, 0.009, + 0.009, 0.009, 0.007, 0.007, 0.008, 0.011, 0.008, 0.008, 0.008, 0.01, + 0.008, 0.029, 0.022, 0.035, 0.037, 0.047, 0.026, 0.025, 0.024, 0.035, + 0.018, 0.024, 0.022, 0.026, 0.017, 0.021, 0.021, 0.032, 0.02, 0.019, + 0.022, 0.031, 0.029, 0.022, 0.035, 0.037, 0.047, 0.026, 0.025, 0.024, + 0.035, 0.018, 0.024, 0.022, 0.026, 0.017, 0.021, 0.021, 0.032, 0.02, + 0.019, 0.022, 0.031 + ]) diff --git a/configs/_base_/datasets/cofw.py b/configs/_base_/datasets/cofw.py new file mode 100644 index 0000000000..2fb7ad2f8d --- /dev/null +++ b/configs/_base_/datasets/cofw.py @@ -0,0 +1,134 @@ +dataset_info = dict( + dataset_name='cofw', + paper_info=dict( + author='Burgos-Artizzu, Xavier P and Perona, ' + r'Pietro and Doll{\'a}r, Piotr', + title='Robust face landmark estimation under occlusion', + container='Proceedings of the IEEE international ' + 'conference on computer vision', + year='2013', + homepage='http://www.vision.caltech.edu/xpburgos/ICCV13/', + ), + keypoint_info={ + 0: + dict(name='kpt-0', id=0, color=[255, 255, 255], type='', swap='kpt-1'), + 1: + dict(name='kpt-1', id=1, color=[255, 255, 255], type='', swap='kpt-0'), + 2: + dict(name='kpt-2', id=2, color=[255, 255, 255], type='', swap='kpt-3'), + 3: + dict(name='kpt-3', id=3, color=[255, 255, 255], type='', swap='kpt-2'), + 4: + dict(name='kpt-4', id=4, color=[255, 255, 255], type='', swap='kpt-6'), + 5: + dict(name='kpt-5', id=5, color=[255, 255, 255], type='', swap='kpt-7'), + 6: + dict(name='kpt-6', id=6, color=[255, 255, 255], type='', swap='kpt-4'), + 7: + dict(name='kpt-7', id=7, color=[255, 255, 255], type='', swap='kpt-5'), + 8: + dict(name='kpt-8', id=8, color=[255, 255, 255], type='', swap='kpt-9'), + 9: + dict(name='kpt-9', id=9, color=[255, 255, 255], type='', swap='kpt-8'), + 10: + dict( + name='kpt-10', + id=10, + color=[255, 255, 255], + type='', + swap='kpt-11'), + 11: + dict( + name='kpt-11', + id=11, + color=[255, 255, 255], + type='', + swap='kpt-10'), + 12: + dict( + name='kpt-12', + id=12, + color=[255, 255, 255], + type='', + swap='kpt-14'), + 13: + dict( + name='kpt-13', + id=13, + color=[255, 255, 255], + type='', + swap='kpt-15'), + 14: + dict( + name='kpt-14', + id=14, + color=[255, 255, 255], + type='', + swap='kpt-12'), + 15: + dict( + name='kpt-15', + id=15, + color=[255, 255, 255], + type='', + swap='kpt-13'), + 16: + dict( + name='kpt-16', + id=16, + color=[255, 255, 255], + type='', + swap='kpt-17'), + 17: + dict( + name='kpt-17', + id=17, + color=[255, 255, 255], + type='', + swap='kpt-16'), + 18: + dict( + name='kpt-18', + id=18, + color=[255, 255, 255], + type='', + swap='kpt-19'), + 19: + dict( + name='kpt-19', + id=19, + color=[255, 255, 255], + type='', + swap='kpt-18'), + 20: + dict(name='kpt-20', id=20, color=[255, 255, 255], type='', swap=''), + 21: + dict(name='kpt-21', id=21, color=[255, 255, 255], type='', swap=''), + 22: + dict( + name='kpt-22', + id=22, + color=[255, 255, 255], + type='', + swap='kpt-23'), + 23: + dict( + name='kpt-23', + id=23, + color=[255, 255, 255], + type='', + swap='kpt-22'), + 24: + dict(name='kpt-24', id=24, color=[255, 255, 255], type='', swap=''), + 25: + dict(name='kpt-25', id=25, color=[255, 255, 255], type='', swap=''), + 26: + dict(name='kpt-26', id=26, color=[255, 255, 255], type='', swap=''), + 27: + dict(name='kpt-27', id=27, color=[255, 255, 255], type='', swap=''), + 28: + dict(name='kpt-28', id=28, color=[255, 255, 255], type='', swap='') + }, + skeleton_info={}, + joint_weights=[1.] * 29, + sigmas=[]) diff --git a/configs/_base_/datasets/crowdpose.py b/configs/_base_/datasets/crowdpose.py new file mode 100644 index 0000000000..45086531a6 --- /dev/null +++ b/configs/_base_/datasets/crowdpose.py @@ -0,0 +1,147 @@ +dataset_info = dict( + dataset_name='crowdpose', + paper_info=dict( + author='Li, Jiefeng and Wang, Can and Zhu, Hao and ' + 'Mao, Yihuan and Fang, Hao-Shu and Lu, Cewu', + title='CrowdPose: Efficient Crowded Scenes Pose Estimation ' + 'and A New Benchmark', + container='Proceedings of IEEE Conference on Computer ' + 'Vision and Pattern Recognition (CVPR)', + year='2019', + homepage='https://github.com/Jeff-sjtu/CrowdPose', + ), + keypoint_info={ + 0: + dict( + name='left_shoulder', + id=0, + color=[51, 153, 255], + type='upper', + swap='right_shoulder'), + 1: + dict( + name='right_shoulder', + id=1, + color=[51, 153, 255], + type='upper', + swap='left_shoulder'), + 2: + dict( + name='left_elbow', + id=2, + color=[51, 153, 255], + type='upper', + swap='right_elbow'), + 3: + dict( + name='right_elbow', + id=3, + color=[51, 153, 255], + type='upper', + swap='left_elbow'), + 4: + dict( + name='left_wrist', + id=4, + color=[51, 153, 255], + type='upper', + swap='right_wrist'), + 5: + dict( + name='right_wrist', + id=5, + color=[0, 255, 0], + type='upper', + swap='left_wrist'), + 6: + dict( + name='left_hip', + id=6, + color=[255, 128, 0], + type='lower', + swap='right_hip'), + 7: + dict( + name='right_hip', + id=7, + color=[0, 255, 0], + type='lower', + swap='left_hip'), + 8: + dict( + name='left_knee', + id=8, + color=[255, 128, 0], + type='lower', + swap='right_knee'), + 9: + dict( + name='right_knee', + id=9, + color=[0, 255, 0], + type='lower', + swap='left_knee'), + 10: + dict( + name='left_ankle', + id=10, + color=[255, 128, 0], + type='lower', + swap='right_ankle'), + 11: + dict( + name='right_ankle', + id=11, + color=[0, 255, 0], + type='lower', + swap='left_ankle'), + 12: + dict( + name='top_head', id=12, color=[255, 128, 0], type='upper', + swap=''), + 13: + dict(name='neck', id=13, color=[0, 255, 0], type='upper', swap='') + }, + skeleton_info={ + 0: + dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), + 2: + dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), + 5: + dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), + 6: + dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), + 7: + dict( + link=('left_shoulder', 'right_shoulder'), + id=7, + color=[51, 153, 255]), + 8: + dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), + 9: + dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('top_head', 'neck'), id=12, color=[51, 153, 255]), + 13: + dict(link=('right_shoulder', 'neck'), id=13, color=[51, 153, 255]), + 14: + dict(link=('left_shoulder', 'neck'), id=14, color=[51, 153, 255]) + }, + joint_weights=[ + 0.2, 0.2, 0.2, 1.3, 1.5, 0.2, 1.3, 1.5, 0.2, 0.2, 0.5, 0.2, 0.2, 0.5 + ], + sigmas=[ + 0.079, 0.079, 0.072, 0.072, 0.062, 0.062, 0.107, 0.107, 0.087, 0.087, + 0.089, 0.089, 0.079, 0.079 + ]) diff --git a/configs/_base_/datasets/deepfashion_full.py b/configs/_base_/datasets/deepfashion_full.py new file mode 100644 index 0000000000..4d989069ee --- /dev/null +++ b/configs/_base_/datasets/deepfashion_full.py @@ -0,0 +1,74 @@ +dataset_info = dict( + dataset_name='deepfashion_full', + paper_info=dict( + author='Liu, Ziwei and Luo, Ping and Qiu, Shi ' + 'and Wang, Xiaogang and Tang, Xiaoou', + title='DeepFashion: Powering Robust Clothes Recognition ' + 'and Retrieval with Rich Annotations', + container='Proceedings of IEEE Conference on Computer ' + 'Vision and Pattern Recognition (CVPR)', + year='2016', + homepage='http://mmlab.ie.cuhk.edu.hk/projects/' + 'DeepFashion/LandmarkDetection.html', + ), + keypoint_info={ + 0: + dict( + name='left collar', + id=0, + color=[255, 255, 255], + type='', + swap='right collar'), + 1: + dict( + name='right collar', + id=1, + color=[255, 255, 255], + type='', + swap='left collar'), + 2: + dict( + name='left sleeve', + id=2, + color=[255, 255, 255], + type='', + swap='right sleeve'), + 3: + dict( + name='right sleeve', + id=3, + color=[255, 255, 255], + type='', + swap='left sleeve'), + 4: + dict( + name='left waistline', + id=0, + color=[255, 255, 255], + type='', + swap='right waistline'), + 5: + dict( + name='right waistline', + id=1, + color=[255, 255, 255], + type='', + swap='left waistline'), + 6: + dict( + name='left hem', + id=2, + color=[255, 255, 255], + type='', + swap='right hem'), + 7: + dict( + name='right hem', + id=3, + color=[255, 255, 255], + type='', + swap='left hem'), + }, + skeleton_info={}, + joint_weights=[1.] * 8, + sigmas=[]) diff --git a/configs/_base_/datasets/deepfashion_lower.py b/configs/_base_/datasets/deepfashion_lower.py new file mode 100644 index 0000000000..db014a1747 --- /dev/null +++ b/configs/_base_/datasets/deepfashion_lower.py @@ -0,0 +1,46 @@ +dataset_info = dict( + dataset_name='deepfashion_lower', + paper_info=dict( + author='Liu, Ziwei and Luo, Ping and Qiu, Shi ' + 'and Wang, Xiaogang and Tang, Xiaoou', + title='DeepFashion: Powering Robust Clothes Recognition ' + 'and Retrieval with Rich Annotations', + container='Proceedings of IEEE Conference on Computer ' + 'Vision and Pattern Recognition (CVPR)', + year='2016', + homepage='http://mmlab.ie.cuhk.edu.hk/projects/' + 'DeepFashion/LandmarkDetection.html', + ), + keypoint_info={ + 0: + dict( + name='left waistline', + id=0, + color=[255, 255, 255], + type='', + swap='right waistline'), + 1: + dict( + name='right waistline', + id=1, + color=[255, 255, 255], + type='', + swap='left waistline'), + 2: + dict( + name='left hem', + id=2, + color=[255, 255, 255], + type='', + swap='right hem'), + 3: + dict( + name='right hem', + id=3, + color=[255, 255, 255], + type='', + swap='left hem'), + }, + skeleton_info={}, + joint_weights=[1.] * 4, + sigmas=[]) diff --git a/configs/_base_/datasets/deepfashion_upper.py b/configs/_base_/datasets/deepfashion_upper.py new file mode 100644 index 0000000000..f0b012fd37 --- /dev/null +++ b/configs/_base_/datasets/deepfashion_upper.py @@ -0,0 +1,60 @@ +dataset_info = dict( + dataset_name='deepfashion_upper', + paper_info=dict( + author='Liu, Ziwei and Luo, Ping and Qiu, Shi ' + 'and Wang, Xiaogang and Tang, Xiaoou', + title='DeepFashion: Powering Robust Clothes Recognition ' + 'and Retrieval with Rich Annotations', + container='Proceedings of IEEE Conference on Computer ' + 'Vision and Pattern Recognition (CVPR)', + year='2016', + homepage='http://mmlab.ie.cuhk.edu.hk/projects/' + 'DeepFashion/LandmarkDetection.html', + ), + keypoint_info={ + 0: + dict( + name='left collar', + id=0, + color=[255, 255, 255], + type='', + swap='right collar'), + 1: + dict( + name='right collar', + id=1, + color=[255, 255, 255], + type='', + swap='left collar'), + 2: + dict( + name='left sleeve', + id=2, + color=[255, 255, 255], + type='', + swap='right sleeve'), + 3: + dict( + name='right sleeve', + id=3, + color=[255, 255, 255], + type='', + swap='left sleeve'), + 4: + dict( + name='left hem', + id=4, + color=[255, 255, 255], + type='', + swap='right hem'), + 5: + dict( + name='right hem', + id=5, + color=[255, 255, 255], + type='', + swap='left hem'), + }, + skeleton_info={}, + joint_weights=[1.] * 6, + sigmas=[]) diff --git a/configs/_base_/datasets/fly.py b/configs/_base_/datasets/fly.py new file mode 100644 index 0000000000..5f94ff57ca --- /dev/null +++ b/configs/_base_/datasets/fly.py @@ -0,0 +1,237 @@ +dataset_info = dict( + dataset_name='fly', + paper_info=dict( + author='Pereira, Talmo D and Aldarondo, Diego E and ' + 'Willmore, Lindsay and Kislin, Mikhail and ' + 'Wang, Samuel S-H and Murthy, Mala and Shaevitz, Joshua W', + title='Fast animal pose estimation using deep neural networks', + container='Nature methods', + year='2019', + homepage='https://github.com/jgraving/DeepPoseKit-Data', + ), + keypoint_info={ + 0: + dict(name='head', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='eyeL', id=1, color=[255, 255, 255], type='', swap='eyeR'), + 2: + dict(name='eyeR', id=2, color=[255, 255, 255], type='', swap='eyeL'), + 3: + dict(name='neck', id=3, color=[255, 255, 255], type='', swap=''), + 4: + dict(name='thorax', id=4, color=[255, 255, 255], type='', swap=''), + 5: + dict(name='abdomen', id=5, color=[255, 255, 255], type='', swap=''), + 6: + dict( + name='forelegR1', + id=6, + color=[255, 255, 255], + type='', + swap='forelegL1'), + 7: + dict( + name='forelegR2', + id=7, + color=[255, 255, 255], + type='', + swap='forelegL2'), + 8: + dict( + name='forelegR3', + id=8, + color=[255, 255, 255], + type='', + swap='forelegL3'), + 9: + dict( + name='forelegR4', + id=9, + color=[255, 255, 255], + type='', + swap='forelegL4'), + 10: + dict( + name='midlegR1', + id=10, + color=[255, 255, 255], + type='', + swap='midlegL1'), + 11: + dict( + name='midlegR2', + id=11, + color=[255, 255, 255], + type='', + swap='midlegL2'), + 12: + dict( + name='midlegR3', + id=12, + color=[255, 255, 255], + type='', + swap='midlegL3'), + 13: + dict( + name='midlegR4', + id=13, + color=[255, 255, 255], + type='', + swap='midlegL4'), + 14: + dict( + name='hindlegR1', + id=14, + color=[255, 255, 255], + type='', + swap='hindlegL1'), + 15: + dict( + name='hindlegR2', + id=15, + color=[255, 255, 255], + type='', + swap='hindlegL2'), + 16: + dict( + name='hindlegR3', + id=16, + color=[255, 255, 255], + type='', + swap='hindlegL3'), + 17: + dict( + name='hindlegR4', + id=17, + color=[255, 255, 255], + type='', + swap='hindlegL4'), + 18: + dict( + name='forelegL1', + id=18, + color=[255, 255, 255], + type='', + swap='forelegR1'), + 19: + dict( + name='forelegL2', + id=19, + color=[255, 255, 255], + type='', + swap='forelegR2'), + 20: + dict( + name='forelegL3', + id=20, + color=[255, 255, 255], + type='', + swap='forelegR3'), + 21: + dict( + name='forelegL4', + id=21, + color=[255, 255, 255], + type='', + swap='forelegR4'), + 22: + dict( + name='midlegL1', + id=22, + color=[255, 255, 255], + type='', + swap='midlegR1'), + 23: + dict( + name='midlegL2', + id=23, + color=[255, 255, 255], + type='', + swap='midlegR2'), + 24: + dict( + name='midlegL3', + id=24, + color=[255, 255, 255], + type='', + swap='midlegR3'), + 25: + dict( + name='midlegL4', + id=25, + color=[255, 255, 255], + type='', + swap='midlegR4'), + 26: + dict( + name='hindlegL1', + id=26, + color=[255, 255, 255], + type='', + swap='hindlegR1'), + 27: + dict( + name='hindlegL2', + id=27, + color=[255, 255, 255], + type='', + swap='hindlegR2'), + 28: + dict( + name='hindlegL3', + id=28, + color=[255, 255, 255], + type='', + swap='hindlegR3'), + 29: + dict( + name='hindlegL4', + id=29, + color=[255, 255, 255], + type='', + swap='hindlegR4'), + 30: + dict( + name='wingL', id=30, color=[255, 255, 255], type='', swap='wingR'), + 31: + dict( + name='wingR', id=31, color=[255, 255, 255], type='', swap='wingL'), + }, + skeleton_info={ + 0: dict(link=('eyeL', 'head'), id=0, color=[255, 255, 255]), + 1: dict(link=('eyeR', 'head'), id=1, color=[255, 255, 255]), + 2: dict(link=('neck', 'head'), id=2, color=[255, 255, 255]), + 3: dict(link=('thorax', 'neck'), id=3, color=[255, 255, 255]), + 4: dict(link=('abdomen', 'thorax'), id=4, color=[255, 255, 255]), + 5: dict(link=('forelegR2', 'forelegR1'), id=5, color=[255, 255, 255]), + 6: dict(link=('forelegR3', 'forelegR2'), id=6, color=[255, 255, 255]), + 7: dict(link=('forelegR4', 'forelegR3'), id=7, color=[255, 255, 255]), + 8: dict(link=('midlegR2', 'midlegR1'), id=8, color=[255, 255, 255]), + 9: dict(link=('midlegR3', 'midlegR2'), id=9, color=[255, 255, 255]), + 10: dict(link=('midlegR4', 'midlegR3'), id=10, color=[255, 255, 255]), + 11: + dict(link=('hindlegR2', 'hindlegR1'), id=11, color=[255, 255, 255]), + 12: + dict(link=('hindlegR3', 'hindlegR2'), id=12, color=[255, 255, 255]), + 13: + dict(link=('hindlegR4', 'hindlegR3'), id=13, color=[255, 255, 255]), + 14: + dict(link=('forelegL2', 'forelegL1'), id=14, color=[255, 255, 255]), + 15: + dict(link=('forelegL3', 'forelegL2'), id=15, color=[255, 255, 255]), + 16: + dict(link=('forelegL4', 'forelegL3'), id=16, color=[255, 255, 255]), + 17: dict(link=('midlegL2', 'midlegL1'), id=17, color=[255, 255, 255]), + 18: dict(link=('midlegL3', 'midlegL2'), id=18, color=[255, 255, 255]), + 19: dict(link=('midlegL4', 'midlegL3'), id=19, color=[255, 255, 255]), + 20: + dict(link=('hindlegL2', 'hindlegL1'), id=20, color=[255, 255, 255]), + 21: + dict(link=('hindlegL3', 'hindlegL2'), id=21, color=[255, 255, 255]), + 22: + dict(link=('hindlegL4', 'hindlegL3'), id=22, color=[255, 255, 255]), + 23: dict(link=('wingL', 'neck'), id=23, color=[255, 255, 255]), + 24: dict(link=('wingR', 'neck'), id=24, color=[255, 255, 255]) + }, + joint_weights=[1.] * 32, + sigmas=[]) diff --git a/configs/_base_/datasets/freihand2d.py b/configs/_base_/datasets/freihand2d.py new file mode 100644 index 0000000000..8b960d10f3 --- /dev/null +++ b/configs/_base_/datasets/freihand2d.py @@ -0,0 +1,144 @@ +dataset_info = dict( + dataset_name='freihand', + paper_info=dict( + author='Zimmermann, Christian and Ceylan, Duygu and ' + 'Yang, Jimei and Russell, Bryan and ' + 'Argus, Max and Brox, Thomas', + title='Freihand: A dataset for markerless capture of hand pose ' + 'and shape from single rgb images', + container='Proceedings of the IEEE International ' + 'Conference on Computer Vision', + year='2019', + homepage='https://lmb.informatik.uni-freiburg.de/projects/freihand/', + ), + keypoint_info={ + 0: + dict(name='wrist', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='thumb1', id=1, color=[255, 128, 0], type='', swap=''), + 2: + dict(name='thumb2', id=2, color=[255, 128, 0], type='', swap=''), + 3: + dict(name='thumb3', id=3, color=[255, 128, 0], type='', swap=''), + 4: + dict(name='thumb4', id=4, color=[255, 128, 0], type='', swap=''), + 5: + dict( + name='forefinger1', id=5, color=[255, 153, 255], type='', swap=''), + 6: + dict( + name='forefinger2', id=6, color=[255, 153, 255], type='', swap=''), + 7: + dict( + name='forefinger3', id=7, color=[255, 153, 255], type='', swap=''), + 8: + dict( + name='forefinger4', id=8, color=[255, 153, 255], type='', swap=''), + 9: + dict( + name='middle_finger1', + id=9, + color=[102, 178, 255], + type='', + swap=''), + 10: + dict( + name='middle_finger2', + id=10, + color=[102, 178, 255], + type='', + swap=''), + 11: + dict( + name='middle_finger3', + id=11, + color=[102, 178, 255], + type='', + swap=''), + 12: + dict( + name='middle_finger4', + id=12, + color=[102, 178, 255], + type='', + swap=''), + 13: + dict( + name='ring_finger1', id=13, color=[255, 51, 51], type='', swap=''), + 14: + dict( + name='ring_finger2', id=14, color=[255, 51, 51], type='', swap=''), + 15: + dict( + name='ring_finger3', id=15, color=[255, 51, 51], type='', swap=''), + 16: + dict( + name='ring_finger4', id=16, color=[255, 51, 51], type='', swap=''), + 17: + dict(name='pinky_finger1', id=17, color=[0, 255, 0], type='', swap=''), + 18: + dict(name='pinky_finger2', id=18, color=[0, 255, 0], type='', swap=''), + 19: + dict(name='pinky_finger3', id=19, color=[0, 255, 0], type='', swap=''), + 20: + dict(name='pinky_finger4', id=20, color=[0, 255, 0], type='', swap='') + }, + skeleton_info={ + 0: + dict(link=('wrist', 'thumb1'), id=0, color=[255, 128, 0]), + 1: + dict(link=('thumb1', 'thumb2'), id=1, color=[255, 128, 0]), + 2: + dict(link=('thumb2', 'thumb3'), id=2, color=[255, 128, 0]), + 3: + dict(link=('thumb3', 'thumb4'), id=3, color=[255, 128, 0]), + 4: + dict(link=('wrist', 'forefinger1'), id=4, color=[255, 153, 255]), + 5: + dict(link=('forefinger1', 'forefinger2'), id=5, color=[255, 153, 255]), + 6: + dict(link=('forefinger2', 'forefinger3'), id=6, color=[255, 153, 255]), + 7: + dict(link=('forefinger3', 'forefinger4'), id=7, color=[255, 153, 255]), + 8: + dict(link=('wrist', 'middle_finger1'), id=8, color=[102, 178, 255]), + 9: + dict( + link=('middle_finger1', 'middle_finger2'), + id=9, + color=[102, 178, 255]), + 10: + dict( + link=('middle_finger2', 'middle_finger3'), + id=10, + color=[102, 178, 255]), + 11: + dict( + link=('middle_finger3', 'middle_finger4'), + id=11, + color=[102, 178, 255]), + 12: + dict(link=('wrist', 'ring_finger1'), id=12, color=[255, 51, 51]), + 13: + dict( + link=('ring_finger1', 'ring_finger2'), id=13, color=[255, 51, 51]), + 14: + dict( + link=('ring_finger2', 'ring_finger3'), id=14, color=[255, 51, 51]), + 15: + dict( + link=('ring_finger3', 'ring_finger4'), id=15, color=[255, 51, 51]), + 16: + dict(link=('wrist', 'pinky_finger1'), id=16, color=[0, 255, 0]), + 17: + dict( + link=('pinky_finger1', 'pinky_finger2'), id=17, color=[0, 255, 0]), + 18: + dict( + link=('pinky_finger2', 'pinky_finger3'), id=18, color=[0, 255, 0]), + 19: + dict( + link=('pinky_finger3', 'pinky_finger4'), id=19, color=[0, 255, 0]) + }, + joint_weights=[1.] * 21, + sigmas=[]) diff --git a/configs/_base_/datasets/h36m.py b/configs/_base_/datasets/h36m.py new file mode 100644 index 0000000000..914258d5b3 --- /dev/null +++ b/configs/_base_/datasets/h36m.py @@ -0,0 +1,152 @@ +dataset_info = dict( + dataset_name='h36m', + paper_info=dict( + author='Ionescu, Catalin and Papava, Dragos and ' + 'Olaru, Vlad and Sminchisescu, Cristian', + title='Human3.6M: Large Scale Datasets and Predictive ' + 'Methods for 3D Human Sensing in Natural Environments', + container='IEEE Transactions on Pattern Analysis and ' + 'Machine Intelligence', + year='2014', + homepage='http://vision.imar.ro/human3.6m/description.php', + ), + keypoint_info={ + 0: + dict(name='root', id=0, color=[255, 128, 0], type='lower', swap=''), + 1: + dict( + name='left_hip', + id=1, + color=[255, 128, 0], + type='lower', + swap='right_hip'), + 2: + dict( + name='left_knee', + id=2, + color=[255, 128, 0], + type='lower', + swap='right_knee'), + 3: + dict( + name='left_foot', + id=3, + color=[0, 255, 0], + type='lower', + swap='right_foot'), + 4: + dict( + name='right_hip', + id=4, + color=[0, 255, 0], + type='lower', + swap='left_hip'), + 5: + dict( + name='right_knee', + id=5, + color=[0, 255, 0], + type='lower', + swap='left_knee'), + 6: + dict( + name='right_foot', + id=6, + color=[51, 153, 255], + type='lower', + swap='left_foot'), + 7: + dict(name='spine', id=7, color=[51, 153, 255], type='upper', swap=''), + 8: + dict(name='thorax', id=8, color=[51, 153, 255], type='upper', swap=''), + 9: + dict( + name='neck_base', + id=9, + color=[51, 153, 255], + type='upper', + swap=''), + 10: + dict(name='head', id=10, color=[51, 153, 255], type='upper', swap=''), + 11: + dict( + name='left_shoulder', + id=11, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 12: + dict( + name='left_elbow', + id=12, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 13: + dict( + name='left_wrist', + id=13, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 14: + dict( + name='right_shoulder', + id=14, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 15: + dict( + name='right_elbow', + id=15, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 16: + dict( + name='right_wrist', + id=16, + color=[255, 128, 0], + type='upper', + swap='left_wrist') + }, + skeleton_info={ + 0: + dict(link=('root', 'left_hip'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_hip', 'left_knee'), id=1, color=[0, 255, 0]), + 2: + dict(link=('left_knee', 'left_foot'), id=2, color=[0, 255, 0]), + 3: + dict(link=('root', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('right_hip', 'right_knee'), id=4, color=[255, 128, 0]), + 5: + dict(link=('right_knee', 'right_foot'), id=5, color=[255, 128, 0]), + 6: + dict(link=('root', 'spine'), id=6, color=[51, 153, 255]), + 7: + dict(link=('spine', 'thorax'), id=7, color=[51, 153, 255]), + 8: + dict(link=('thorax', 'neck_base'), id=8, color=[51, 153, 255]), + 9: + dict(link=('neck_base', 'head'), id=9, color=[51, 153, 255]), + 10: + dict(link=('thorax', 'left_shoulder'), id=10, color=[0, 255, 0]), + 11: + dict(link=('left_shoulder', 'left_elbow'), id=11, color=[0, 255, 0]), + 12: + dict(link=('left_elbow', 'left_wrist'), id=12, color=[0, 255, 0]), + 13: + dict(link=('thorax', 'right_shoulder'), id=13, color=[255, 128, 0]), + 14: + dict( + link=('right_shoulder', 'right_elbow'), id=14, color=[255, 128, + 0]), + 15: + dict(link=('right_elbow', 'right_wrist'), id=15, color=[255, 128, 0]) + }, + joint_weights=[1.] * 17, + sigmas=[], + stats_info=dict(bbox_center=(528., 427.), bbox_scale=400.)) diff --git a/configs/_base_/datasets/horse10.py b/configs/_base_/datasets/horse10.py new file mode 100644 index 0000000000..a485bf191b --- /dev/null +++ b/configs/_base_/datasets/horse10.py @@ -0,0 +1,201 @@ +dataset_info = dict( + dataset_name='horse10', + paper_info=dict( + author='Mathis, Alexander and Biasi, Thomas and ' + 'Schneider, Steffen and ' + 'Yuksekgonul, Mert and Rogers, Byron and ' + 'Bethge, Matthias and ' + 'Mathis, Mackenzie W', + title='Pretraining boosts out-of-domain robustness ' + 'for pose estimation', + container='Proceedings of the IEEE/CVF Winter Conference on ' + 'Applications of Computer Vision', + year='2021', + homepage='http://www.mackenziemathislab.org/horse10', + ), + keypoint_info={ + 0: + dict(name='Nose', id=0, color=[255, 153, 255], type='upper', swap=''), + 1: + dict(name='Eye', id=1, color=[255, 153, 255], type='upper', swap=''), + 2: + dict( + name='Nearknee', + id=2, + color=[255, 102, 255], + type='upper', + swap=''), + 3: + dict( + name='Nearfrontfetlock', + id=3, + color=[255, 102, 255], + type='upper', + swap=''), + 4: + dict( + name='Nearfrontfoot', + id=4, + color=[255, 102, 255], + type='upper', + swap=''), + 5: + dict( + name='Offknee', id=5, color=[255, 102, 255], type='upper', + swap=''), + 6: + dict( + name='Offfrontfetlock', + id=6, + color=[255, 102, 255], + type='upper', + swap=''), + 7: + dict( + name='Offfrontfoot', + id=7, + color=[255, 102, 255], + type='upper', + swap=''), + 8: + dict( + name='Shoulder', + id=8, + color=[255, 153, 255], + type='upper', + swap=''), + 9: + dict( + name='Midshoulder', + id=9, + color=[255, 153, 255], + type='upper', + swap=''), + 10: + dict( + name='Elbow', id=10, color=[255, 153, 255], type='upper', swap=''), + 11: + dict( + name='Girth', id=11, color=[255, 153, 255], type='upper', swap=''), + 12: + dict( + name='Wither', id=12, color=[255, 153, 255], type='upper', + swap=''), + 13: + dict( + name='Nearhindhock', + id=13, + color=[255, 51, 255], + type='lower', + swap=''), + 14: + dict( + name='Nearhindfetlock', + id=14, + color=[255, 51, 255], + type='lower', + swap=''), + 15: + dict( + name='Nearhindfoot', + id=15, + color=[255, 51, 255], + type='lower', + swap=''), + 16: + dict(name='Hip', id=16, color=[255, 153, 255], type='lower', swap=''), + 17: + dict( + name='Stifle', id=17, color=[255, 153, 255], type='lower', + swap=''), + 18: + dict( + name='Offhindhock', + id=18, + color=[255, 51, 255], + type='lower', + swap=''), + 19: + dict( + name='Offhindfetlock', + id=19, + color=[255, 51, 255], + type='lower', + swap=''), + 20: + dict( + name='Offhindfoot', + id=20, + color=[255, 51, 255], + type='lower', + swap=''), + 21: + dict( + name='Ischium', + id=21, + color=[255, 153, 255], + type='lower', + swap='') + }, + skeleton_info={ + 0: + dict(link=('Nose', 'Eye'), id=0, color=[255, 153, 255]), + 1: + dict(link=('Eye', 'Wither'), id=1, color=[255, 153, 255]), + 2: + dict(link=('Wither', 'Hip'), id=2, color=[255, 153, 255]), + 3: + dict(link=('Hip', 'Ischium'), id=3, color=[255, 153, 255]), + 4: + dict(link=('Ischium', 'Stifle'), id=4, color=[255, 153, 255]), + 5: + dict(link=('Stifle', 'Girth'), id=5, color=[255, 153, 255]), + 6: + dict(link=('Girth', 'Elbow'), id=6, color=[255, 153, 255]), + 7: + dict(link=('Elbow', 'Shoulder'), id=7, color=[255, 153, 255]), + 8: + dict(link=('Shoulder', 'Midshoulder'), id=8, color=[255, 153, 255]), + 9: + dict(link=('Midshoulder', 'Wither'), id=9, color=[255, 153, 255]), + 10: + dict( + link=('Nearknee', 'Nearfrontfetlock'), + id=10, + color=[255, 102, 255]), + 11: + dict( + link=('Nearfrontfetlock', 'Nearfrontfoot'), + id=11, + color=[255, 102, 255]), + 12: + dict( + link=('Offknee', 'Offfrontfetlock'), id=12, color=[255, 102, 255]), + 13: + dict( + link=('Offfrontfetlock', 'Offfrontfoot'), + id=13, + color=[255, 102, 255]), + 14: + dict( + link=('Nearhindhock', 'Nearhindfetlock'), + id=14, + color=[255, 51, 255]), + 15: + dict( + link=('Nearhindfetlock', 'Nearhindfoot'), + id=15, + color=[255, 51, 255]), + 16: + dict( + link=('Offhindhock', 'Offhindfetlock'), + id=16, + color=[255, 51, 255]), + 17: + dict( + link=('Offhindfetlock', 'Offhindfoot'), + id=17, + color=[255, 51, 255]) + }, + joint_weights=[1.] * 22, + sigmas=[]) diff --git a/configs/_base_/datasets/interhand2d.py b/configs/_base_/datasets/interhand2d.py new file mode 100644 index 0000000000..0134f07de5 --- /dev/null +++ b/configs/_base_/datasets/interhand2d.py @@ -0,0 +1,142 @@ +dataset_info = dict( + dataset_name='interhand2d', + paper_info=dict( + author='Moon, Gyeongsik and Yu, Shoou-I and Wen, He and ' + 'Shiratori, Takaaki and Lee, Kyoung Mu', + title='InterHand2.6M: A dataset and baseline for 3D ' + 'interacting hand pose estimation from a single RGB image', + container='arXiv', + year='2020', + homepage='https://mks0601.github.io/InterHand2.6M/', + ), + keypoint_info={ + 0: + dict(name='thumb4', id=0, color=[255, 128, 0], type='', swap=''), + 1: + dict(name='thumb3', id=1, color=[255, 128, 0], type='', swap=''), + 2: + dict(name='thumb2', id=2, color=[255, 128, 0], type='', swap=''), + 3: + dict(name='thumb1', id=3, color=[255, 128, 0], type='', swap=''), + 4: + dict( + name='forefinger4', id=4, color=[255, 153, 255], type='', swap=''), + 5: + dict( + name='forefinger3', id=5, color=[255, 153, 255], type='', swap=''), + 6: + dict( + name='forefinger2', id=6, color=[255, 153, 255], type='', swap=''), + 7: + dict( + name='forefinger1', id=7, color=[255, 153, 255], type='', swap=''), + 8: + dict( + name='middle_finger4', + id=8, + color=[102, 178, 255], + type='', + swap=''), + 9: + dict( + name='middle_finger3', + id=9, + color=[102, 178, 255], + type='', + swap=''), + 10: + dict( + name='middle_finger2', + id=10, + color=[102, 178, 255], + type='', + swap=''), + 11: + dict( + name='middle_finger1', + id=11, + color=[102, 178, 255], + type='', + swap=''), + 12: + dict( + name='ring_finger4', id=12, color=[255, 51, 51], type='', swap=''), + 13: + dict( + name='ring_finger3', id=13, color=[255, 51, 51], type='', swap=''), + 14: + dict( + name='ring_finger2', id=14, color=[255, 51, 51], type='', swap=''), + 15: + dict( + name='ring_finger1', id=15, color=[255, 51, 51], type='', swap=''), + 16: + dict(name='pinky_finger4', id=16, color=[0, 255, 0], type='', swap=''), + 17: + dict(name='pinky_finger3', id=17, color=[0, 255, 0], type='', swap=''), + 18: + dict(name='pinky_finger2', id=18, color=[0, 255, 0], type='', swap=''), + 19: + dict(name='pinky_finger1', id=19, color=[0, 255, 0], type='', swap=''), + 20: + dict(name='wrist', id=20, color=[255, 255, 255], type='', swap='') + }, + skeleton_info={ + 0: + dict(link=('wrist', 'thumb1'), id=0, color=[255, 128, 0]), + 1: + dict(link=('thumb1', 'thumb2'), id=1, color=[255, 128, 0]), + 2: + dict(link=('thumb2', 'thumb3'), id=2, color=[255, 128, 0]), + 3: + dict(link=('thumb3', 'thumb4'), id=3, color=[255, 128, 0]), + 4: + dict(link=('wrist', 'forefinger1'), id=4, color=[255, 153, 255]), + 5: + dict(link=('forefinger1', 'forefinger2'), id=5, color=[255, 153, 255]), + 6: + dict(link=('forefinger2', 'forefinger3'), id=6, color=[255, 153, 255]), + 7: + dict(link=('forefinger3', 'forefinger4'), id=7, color=[255, 153, 255]), + 8: + dict(link=('wrist', 'middle_finger1'), id=8, color=[102, 178, 255]), + 9: + dict( + link=('middle_finger1', 'middle_finger2'), + id=9, + color=[102, 178, 255]), + 10: + dict( + link=('middle_finger2', 'middle_finger3'), + id=10, + color=[102, 178, 255]), + 11: + dict( + link=('middle_finger3', 'middle_finger4'), + id=11, + color=[102, 178, 255]), + 12: + dict(link=('wrist', 'ring_finger1'), id=12, color=[255, 51, 51]), + 13: + dict( + link=('ring_finger1', 'ring_finger2'), id=13, color=[255, 51, 51]), + 14: + dict( + link=('ring_finger2', 'ring_finger3'), id=14, color=[255, 51, 51]), + 15: + dict( + link=('ring_finger3', 'ring_finger4'), id=15, color=[255, 51, 51]), + 16: + dict(link=('wrist', 'pinky_finger1'), id=16, color=[0, 255, 0]), + 17: + dict( + link=('pinky_finger1', 'pinky_finger2'), id=17, color=[0, 255, 0]), + 18: + dict( + link=('pinky_finger2', 'pinky_finger3'), id=18, color=[0, 255, 0]), + 19: + dict( + link=('pinky_finger3', 'pinky_finger4'), id=19, color=[0, 255, 0]) + }, + joint_weights=[1.] * 21, + sigmas=[]) diff --git a/configs/_base_/datasets/interhand3d.py b/configs/_base_/datasets/interhand3d.py new file mode 100644 index 0000000000..e2bd8121c2 --- /dev/null +++ b/configs/_base_/datasets/interhand3d.py @@ -0,0 +1,487 @@ +dataset_info = dict( + dataset_name='interhand3d', + paper_info=dict( + author='Moon, Gyeongsik and Yu, Shoou-I and Wen, He and ' + 'Shiratori, Takaaki and Lee, Kyoung Mu', + title='InterHand2.6M: A dataset and baseline for 3D ' + 'interacting hand pose estimation from a single RGB image', + container='arXiv', + year='2020', + homepage='https://mks0601.github.io/InterHand2.6M/', + ), + keypoint_info={ + 0: + dict( + name='right_thumb4', + id=0, + color=[255, 128, 0], + type='', + swap='left_thumb4'), + 1: + dict( + name='right_thumb3', + id=1, + color=[255, 128, 0], + type='', + swap='left_thumb3'), + 2: + dict( + name='right_thumb2', + id=2, + color=[255, 128, 0], + type='', + swap='left_thumb2'), + 3: + dict( + name='right_thumb1', + id=3, + color=[255, 128, 0], + type='', + swap='left_thumb1'), + 4: + dict( + name='right_forefinger4', + id=4, + color=[255, 153, 255], + type='', + swap='left_forefinger4'), + 5: + dict( + name='right_forefinger3', + id=5, + color=[255, 153, 255], + type='', + swap='left_forefinger3'), + 6: + dict( + name='right_forefinger2', + id=6, + color=[255, 153, 255], + type='', + swap='left_forefinger2'), + 7: + dict( + name='right_forefinger1', + id=7, + color=[255, 153, 255], + type='', + swap='left_forefinger1'), + 8: + dict( + name='right_middle_finger4', + id=8, + color=[102, 178, 255], + type='', + swap='left_middle_finger4'), + 9: + dict( + name='right_middle_finger3', + id=9, + color=[102, 178, 255], + type='', + swap='left_middle_finger3'), + 10: + dict( + name='right_middle_finger2', + id=10, + color=[102, 178, 255], + type='', + swap='left_middle_finger2'), + 11: + dict( + name='right_middle_finger1', + id=11, + color=[102, 178, 255], + type='', + swap='left_middle_finger1'), + 12: + dict( + name='right_ring_finger4', + id=12, + color=[255, 51, 51], + type='', + swap='left_ring_finger4'), + 13: + dict( + name='right_ring_finger3', + id=13, + color=[255, 51, 51], + type='', + swap='left_ring_finger3'), + 14: + dict( + name='right_ring_finger2', + id=14, + color=[255, 51, 51], + type='', + swap='left_ring_finger2'), + 15: + dict( + name='right_ring_finger1', + id=15, + color=[255, 51, 51], + type='', + swap='left_ring_finger1'), + 16: + dict( + name='right_pinky_finger4', + id=16, + color=[0, 255, 0], + type='', + swap='left_pinky_finger4'), + 17: + dict( + name='right_pinky_finger3', + id=17, + color=[0, 255, 0], + type='', + swap='left_pinky_finger3'), + 18: + dict( + name='right_pinky_finger2', + id=18, + color=[0, 255, 0], + type='', + swap='left_pinky_finger2'), + 19: + dict( + name='right_pinky_finger1', + id=19, + color=[0, 255, 0], + type='', + swap='left_pinky_finger1'), + 20: + dict( + name='right_wrist', + id=20, + color=[255, 255, 255], + type='', + swap='left_wrist'), + 21: + dict( + name='left_thumb4', + id=21, + color=[255, 128, 0], + type='', + swap='right_thumb4'), + 22: + dict( + name='left_thumb3', + id=22, + color=[255, 128, 0], + type='', + swap='right_thumb3'), + 23: + dict( + name='left_thumb2', + id=23, + color=[255, 128, 0], + type='', + swap='right_thumb2'), + 24: + dict( + name='left_thumb1', + id=24, + color=[255, 128, 0], + type='', + swap='right_thumb1'), + 25: + dict( + name='left_forefinger4', + id=25, + color=[255, 153, 255], + type='', + swap='right_forefinger4'), + 26: + dict( + name='left_forefinger3', + id=26, + color=[255, 153, 255], + type='', + swap='right_forefinger3'), + 27: + dict( + name='left_forefinger2', + id=27, + color=[255, 153, 255], + type='', + swap='right_forefinger2'), + 28: + dict( + name='left_forefinger1', + id=28, + color=[255, 153, 255], + type='', + swap='right_forefinger1'), + 29: + dict( + name='left_middle_finger4', + id=29, + color=[102, 178, 255], + type='', + swap='right_middle_finger4'), + 30: + dict( + name='left_middle_finger3', + id=30, + color=[102, 178, 255], + type='', + swap='right_middle_finger3'), + 31: + dict( + name='left_middle_finger2', + id=31, + color=[102, 178, 255], + type='', + swap='right_middle_finger2'), + 32: + dict( + name='left_middle_finger1', + id=32, + color=[102, 178, 255], + type='', + swap='right_middle_finger1'), + 33: + dict( + name='left_ring_finger4', + id=33, + color=[255, 51, 51], + type='', + swap='right_ring_finger4'), + 34: + dict( + name='left_ring_finger3', + id=34, + color=[255, 51, 51], + type='', + swap='right_ring_finger3'), + 35: + dict( + name='left_ring_finger2', + id=35, + color=[255, 51, 51], + type='', + swap='right_ring_finger2'), + 36: + dict( + name='left_ring_finger1', + id=36, + color=[255, 51, 51], + type='', + swap='right_ring_finger1'), + 37: + dict( + name='left_pinky_finger4', + id=37, + color=[0, 255, 0], + type='', + swap='right_pinky_finger4'), + 38: + dict( + name='left_pinky_finger3', + id=38, + color=[0, 255, 0], + type='', + swap='right_pinky_finger3'), + 39: + dict( + name='left_pinky_finger2', + id=39, + color=[0, 255, 0], + type='', + swap='right_pinky_finger2'), + 40: + dict( + name='left_pinky_finger1', + id=40, + color=[0, 255, 0], + type='', + swap='right_pinky_finger1'), + 41: + dict( + name='left_wrist', + id=41, + color=[255, 255, 255], + type='', + swap='right_wrist'), + }, + skeleton_info={ + 0: + dict(link=('right_wrist', 'right_thumb1'), id=0, color=[255, 128, 0]), + 1: + dict(link=('right_thumb1', 'right_thumb2'), id=1, color=[255, 128, 0]), + 2: + dict(link=('right_thumb2', 'right_thumb3'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_thumb3', 'right_thumb4'), id=3, color=[255, 128, 0]), + 4: + dict( + link=('right_wrist', 'right_forefinger1'), + id=4, + color=[255, 153, 255]), + 5: + dict( + link=('right_forefinger1', 'right_forefinger2'), + id=5, + color=[255, 153, 255]), + 6: + dict( + link=('right_forefinger2', 'right_forefinger3'), + id=6, + color=[255, 153, 255]), + 7: + dict( + link=('right_forefinger3', 'right_forefinger4'), + id=7, + color=[255, 153, 255]), + 8: + dict( + link=('right_wrist', 'right_middle_finger1'), + id=8, + color=[102, 178, 255]), + 9: + dict( + link=('right_middle_finger1', 'right_middle_finger2'), + id=9, + color=[102, 178, 255]), + 10: + dict( + link=('right_middle_finger2', 'right_middle_finger3'), + id=10, + color=[102, 178, 255]), + 11: + dict( + link=('right_middle_finger3', 'right_middle_finger4'), + id=11, + color=[102, 178, 255]), + 12: + dict( + link=('right_wrist', 'right_ring_finger1'), + id=12, + color=[255, 51, 51]), + 13: + dict( + link=('right_ring_finger1', 'right_ring_finger2'), + id=13, + color=[255, 51, 51]), + 14: + dict( + link=('right_ring_finger2', 'right_ring_finger3'), + id=14, + color=[255, 51, 51]), + 15: + dict( + link=('right_ring_finger3', 'right_ring_finger4'), + id=15, + color=[255, 51, 51]), + 16: + dict( + link=('right_wrist', 'right_pinky_finger1'), + id=16, + color=[0, 255, 0]), + 17: + dict( + link=('right_pinky_finger1', 'right_pinky_finger2'), + id=17, + color=[0, 255, 0]), + 18: + dict( + link=('right_pinky_finger2', 'right_pinky_finger3'), + id=18, + color=[0, 255, 0]), + 19: + dict( + link=('right_pinky_finger3', 'right_pinky_finger4'), + id=19, + color=[0, 255, 0]), + 20: + dict(link=('left_wrist', 'left_thumb1'), id=20, color=[255, 128, 0]), + 21: + dict(link=('left_thumb1', 'left_thumb2'), id=21, color=[255, 128, 0]), + 22: + dict(link=('left_thumb2', 'left_thumb3'), id=22, color=[255, 128, 0]), + 23: + dict(link=('left_thumb3', 'left_thumb4'), id=23, color=[255, 128, 0]), + 24: + dict( + link=('left_wrist', 'left_forefinger1'), + id=24, + color=[255, 153, 255]), + 25: + dict( + link=('left_forefinger1', 'left_forefinger2'), + id=25, + color=[255, 153, 255]), + 26: + dict( + link=('left_forefinger2', 'left_forefinger3'), + id=26, + color=[255, 153, 255]), + 27: + dict( + link=('left_forefinger3', 'left_forefinger4'), + id=27, + color=[255, 153, 255]), + 28: + dict( + link=('left_wrist', 'left_middle_finger1'), + id=28, + color=[102, 178, 255]), + 29: + dict( + link=('left_middle_finger1', 'left_middle_finger2'), + id=29, + color=[102, 178, 255]), + 30: + dict( + link=('left_middle_finger2', 'left_middle_finger3'), + id=30, + color=[102, 178, 255]), + 31: + dict( + link=('left_middle_finger3', 'left_middle_finger4'), + id=31, + color=[102, 178, 255]), + 32: + dict( + link=('left_wrist', 'left_ring_finger1'), + id=32, + color=[255, 51, 51]), + 33: + dict( + link=('left_ring_finger1', 'left_ring_finger2'), + id=33, + color=[255, 51, 51]), + 34: + dict( + link=('left_ring_finger2', 'left_ring_finger3'), + id=34, + color=[255, 51, 51]), + 35: + dict( + link=('left_ring_finger3', 'left_ring_finger4'), + id=35, + color=[255, 51, 51]), + 36: + dict( + link=('left_wrist', 'left_pinky_finger1'), + id=36, + color=[0, 255, 0]), + 37: + dict( + link=('left_pinky_finger1', 'left_pinky_finger2'), + id=37, + color=[0, 255, 0]), + 38: + dict( + link=('left_pinky_finger2', 'left_pinky_finger3'), + id=38, + color=[0, 255, 0]), + 39: + dict( + link=('left_pinky_finger3', 'left_pinky_finger4'), + id=39, + color=[0, 255, 0]), + }, + joint_weights=[1.] * 42, + sigmas=[]) diff --git a/configs/_base_/datasets/jhmdb.py b/configs/_base_/datasets/jhmdb.py new file mode 100644 index 0000000000..1b37488498 --- /dev/null +++ b/configs/_base_/datasets/jhmdb.py @@ -0,0 +1,129 @@ +dataset_info = dict( + dataset_name='jhmdb', + paper_info=dict( + author='H. Jhuang and J. Gall and S. Zuffi and ' + 'C. Schmid and M. J. Black', + title='Towards understanding action recognition', + container='International Conf. on Computer Vision (ICCV)', + year='2013', + homepage='http://jhmdb.is.tue.mpg.de/dataset', + ), + keypoint_info={ + 0: + dict(name='neck', id=0, color=[255, 128, 0], type='upper', swap=''), + 1: + dict(name='belly', id=1, color=[255, 128, 0], type='upper', swap=''), + 2: + dict(name='head', id=2, color=[255, 128, 0], type='upper', swap=''), + 3: + dict( + name='right_shoulder', + id=3, + color=[0, 255, 0], + type='upper', + swap='left_shoulder'), + 4: + dict( + name='left_shoulder', + id=4, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 5: + dict( + name='right_hip', + id=5, + color=[0, 255, 0], + type='lower', + swap='left_hip'), + 6: + dict( + name='left_hip', + id=6, + color=[51, 153, 255], + type='lower', + swap='right_hip'), + 7: + dict( + name='right_elbow', + id=7, + color=[51, 153, 255], + type='upper', + swap='left_elbow'), + 8: + dict( + name='left_elbow', + id=8, + color=[51, 153, 255], + type='upper', + swap='right_elbow'), + 9: + dict( + name='right_knee', + id=9, + color=[51, 153, 255], + type='lower', + swap='left_knee'), + 10: + dict( + name='left_knee', + id=10, + color=[255, 128, 0], + type='lower', + swap='right_knee'), + 11: + dict( + name='right_wrist', + id=11, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 12: + dict( + name='left_wrist', + id=12, + color=[255, 128, 0], + type='upper', + swap='right_wrist'), + 13: + dict( + name='right_ankle', + id=13, + color=[0, 255, 0], + type='lower', + swap='left_ankle'), + 14: + dict( + name='left_ankle', + id=14, + color=[0, 255, 0], + type='lower', + swap='right_ankle') + }, + skeleton_info={ + 0: dict(link=('right_ankle', 'right_knee'), id=0, color=[255, 128, 0]), + 1: dict(link=('right_knee', 'right_hip'), id=1, color=[255, 128, 0]), + 2: dict(link=('right_hip', 'belly'), id=2, color=[255, 128, 0]), + 3: dict(link=('belly', 'left_hip'), id=3, color=[0, 255, 0]), + 4: dict(link=('left_hip', 'left_knee'), id=4, color=[0, 255, 0]), + 5: dict(link=('left_knee', 'left_ankle'), id=5, color=[0, 255, 0]), + 6: dict(link=('belly', 'neck'), id=6, color=[51, 153, 255]), + 7: dict(link=('neck', 'head'), id=7, color=[51, 153, 255]), + 8: dict(link=('neck', 'right_shoulder'), id=8, color=[255, 128, 0]), + 9: dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('right_elbow', 'right_wrist'), id=10, color=[255, 128, 0]), + 11: dict(link=('neck', 'left_shoulder'), id=11, color=[0, 255, 0]), + 12: + dict(link=('left_shoulder', 'left_elbow'), id=12, color=[0, 255, 0]), + 13: dict(link=('left_elbow', 'left_wrist'), id=13, color=[0, 255, 0]) + }, + joint_weights=[ + 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.2, 1.2, 1.5, 1.5, 1.5, 1.5 + ], + # Adapted from COCO dataset. + sigmas=[ + 0.025, 0.107, 0.025, 0.079, 0.079, 0.107, 0.107, 0.072, 0.072, 0.087, + 0.087, 0.062, 0.062, 0.089, 0.089 + ]) diff --git a/configs/_base_/datasets/locust.py b/configs/_base_/datasets/locust.py new file mode 100644 index 0000000000..db3fa15aa0 --- /dev/null +++ b/configs/_base_/datasets/locust.py @@ -0,0 +1,263 @@ +dataset_info = dict( + dataset_name='locust', + paper_info=dict( + author='Graving, Jacob M and Chae, Daniel and Naik, Hemal and ' + 'Li, Liang and Koger, Benjamin and Costelloe, Blair R and ' + 'Couzin, Iain D', + title='DeepPoseKit, a software toolkit for fast and robust ' + 'animal pose estimation using deep learning', + container='Elife', + year='2019', + homepage='https://github.com/jgraving/DeepPoseKit-Data', + ), + keypoint_info={ + 0: + dict(name='head', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='neck', id=1, color=[255, 255, 255], type='', swap=''), + 2: + dict(name='thorax', id=2, color=[255, 255, 255], type='', swap=''), + 3: + dict(name='abdomen1', id=3, color=[255, 255, 255], type='', swap=''), + 4: + dict(name='abdomen2', id=4, color=[255, 255, 255], type='', swap=''), + 5: + dict( + name='anttipL', + id=5, + color=[255, 255, 255], + type='', + swap='anttipR'), + 6: + dict( + name='antbaseL', + id=6, + color=[255, 255, 255], + type='', + swap='antbaseR'), + 7: + dict(name='eyeL', id=7, color=[255, 255, 255], type='', swap='eyeR'), + 8: + dict( + name='forelegL1', + id=8, + color=[255, 255, 255], + type='', + swap='forelegR1'), + 9: + dict( + name='forelegL2', + id=9, + color=[255, 255, 255], + type='', + swap='forelegR2'), + 10: + dict( + name='forelegL3', + id=10, + color=[255, 255, 255], + type='', + swap='forelegR3'), + 11: + dict( + name='forelegL4', + id=11, + color=[255, 255, 255], + type='', + swap='forelegR4'), + 12: + dict( + name='midlegL1', + id=12, + color=[255, 255, 255], + type='', + swap='midlegR1'), + 13: + dict( + name='midlegL2', + id=13, + color=[255, 255, 255], + type='', + swap='midlegR2'), + 14: + dict( + name='midlegL3', + id=14, + color=[255, 255, 255], + type='', + swap='midlegR3'), + 15: + dict( + name='midlegL4', + id=15, + color=[255, 255, 255], + type='', + swap='midlegR4'), + 16: + dict( + name='hindlegL1', + id=16, + color=[255, 255, 255], + type='', + swap='hindlegR1'), + 17: + dict( + name='hindlegL2', + id=17, + color=[255, 255, 255], + type='', + swap='hindlegR2'), + 18: + dict( + name='hindlegL3', + id=18, + color=[255, 255, 255], + type='', + swap='hindlegR3'), + 19: + dict( + name='hindlegL4', + id=19, + color=[255, 255, 255], + type='', + swap='hindlegR4'), + 20: + dict( + name='anttipR', + id=20, + color=[255, 255, 255], + type='', + swap='anttipL'), + 21: + dict( + name='antbaseR', + id=21, + color=[255, 255, 255], + type='', + swap='antbaseL'), + 22: + dict(name='eyeR', id=22, color=[255, 255, 255], type='', swap='eyeL'), + 23: + dict( + name='forelegR1', + id=23, + color=[255, 255, 255], + type='', + swap='forelegL1'), + 24: + dict( + name='forelegR2', + id=24, + color=[255, 255, 255], + type='', + swap='forelegL2'), + 25: + dict( + name='forelegR3', + id=25, + color=[255, 255, 255], + type='', + swap='forelegL3'), + 26: + dict( + name='forelegR4', + id=26, + color=[255, 255, 255], + type='', + swap='forelegL4'), + 27: + dict( + name='midlegR1', + id=27, + color=[255, 255, 255], + type='', + swap='midlegL1'), + 28: + dict( + name='midlegR2', + id=28, + color=[255, 255, 255], + type='', + swap='midlegL2'), + 29: + dict( + name='midlegR3', + id=29, + color=[255, 255, 255], + type='', + swap='midlegL3'), + 30: + dict( + name='midlegR4', + id=30, + color=[255, 255, 255], + type='', + swap='midlegL4'), + 31: + dict( + name='hindlegR1', + id=31, + color=[255, 255, 255], + type='', + swap='hindlegL1'), + 32: + dict( + name='hindlegR2', + id=32, + color=[255, 255, 255], + type='', + swap='hindlegL2'), + 33: + dict( + name='hindlegR3', + id=33, + color=[255, 255, 255], + type='', + swap='hindlegL3'), + 34: + dict( + name='hindlegR4', + id=34, + color=[255, 255, 255], + type='', + swap='hindlegL4') + }, + skeleton_info={ + 0: dict(link=('neck', 'head'), id=0, color=[255, 255, 255]), + 1: dict(link=('thorax', 'neck'), id=1, color=[255, 255, 255]), + 2: dict(link=('abdomen1', 'thorax'), id=2, color=[255, 255, 255]), + 3: dict(link=('abdomen2', 'abdomen1'), id=3, color=[255, 255, 255]), + 4: dict(link=('antbaseL', 'anttipL'), id=4, color=[255, 255, 255]), + 5: dict(link=('eyeL', 'antbaseL'), id=5, color=[255, 255, 255]), + 6: dict(link=('forelegL2', 'forelegL1'), id=6, color=[255, 255, 255]), + 7: dict(link=('forelegL3', 'forelegL2'), id=7, color=[255, 255, 255]), + 8: dict(link=('forelegL4', 'forelegL3'), id=8, color=[255, 255, 255]), + 9: dict(link=('midlegL2', 'midlegL1'), id=9, color=[255, 255, 255]), + 10: dict(link=('midlegL3', 'midlegL2'), id=10, color=[255, 255, 255]), + 11: dict(link=('midlegL4', 'midlegL3'), id=11, color=[255, 255, 255]), + 12: + dict(link=('hindlegL2', 'hindlegL1'), id=12, color=[255, 255, 255]), + 13: + dict(link=('hindlegL3', 'hindlegL2'), id=13, color=[255, 255, 255]), + 14: + dict(link=('hindlegL4', 'hindlegL3'), id=14, color=[255, 255, 255]), + 15: dict(link=('antbaseR', 'anttipR'), id=15, color=[255, 255, 255]), + 16: dict(link=('eyeR', 'antbaseR'), id=16, color=[255, 255, 255]), + 17: + dict(link=('forelegR2', 'forelegR1'), id=17, color=[255, 255, 255]), + 18: + dict(link=('forelegR3', 'forelegR2'), id=18, color=[255, 255, 255]), + 19: + dict(link=('forelegR4', 'forelegR3'), id=19, color=[255, 255, 255]), + 20: dict(link=('midlegR2', 'midlegR1'), id=20, color=[255, 255, 255]), + 21: dict(link=('midlegR3', 'midlegR2'), id=21, color=[255, 255, 255]), + 22: dict(link=('midlegR4', 'midlegR3'), id=22, color=[255, 255, 255]), + 23: + dict(link=('hindlegR2', 'hindlegR1'), id=23, color=[255, 255, 255]), + 24: + dict(link=('hindlegR3', 'hindlegR2'), id=24, color=[255, 255, 255]), + 25: + dict(link=('hindlegR4', 'hindlegR3'), id=25, color=[255, 255, 255]) + }, + joint_weights=[1.] * 35, + sigmas=[]) diff --git a/configs/_base_/datasets/macaque.py b/configs/_base_/datasets/macaque.py new file mode 100644 index 0000000000..12d2480fd1 --- /dev/null +++ b/configs/_base_/datasets/macaque.py @@ -0,0 +1,183 @@ +dataset_info = dict( + dataset_name='macaque', + paper_info=dict( + author='Labuguen, Rollyn and Matsumoto, Jumpei and ' + 'Negrete, Salvador and Nishimaru, Hiroshi and ' + 'Nishijo, Hisao and Takada, Masahiko and ' + 'Go, Yasuhiro and Inoue, Ken-ichi and Shibata, Tomohiro', + title='MacaquePose: A novel ‘in the wild’macaque monkey pose dataset ' + 'for markerless motion capture', + container='bioRxiv', + year='2020', + homepage='http://www.pri.kyoto-u.ac.jp/datasets/' + 'macaquepose/index.html', + ), + keypoint_info={ + 0: + dict(name='nose', id=0, color=[51, 153, 255], type='upper', swap=''), + 1: + dict( + name='left_eye', + id=1, + color=[51, 153, 255], + type='upper', + swap='right_eye'), + 2: + dict( + name='right_eye', + id=2, + color=[51, 153, 255], + type='upper', + swap='left_eye'), + 3: + dict( + name='left_ear', + id=3, + color=[51, 153, 255], + type='upper', + swap='right_ear'), + 4: + dict( + name='right_ear', + id=4, + color=[51, 153, 255], + type='upper', + swap='left_ear'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='right_shoulder', + id=6, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 7: + dict( + name='left_elbow', + id=7, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 8: + dict( + name='right_elbow', + id=8, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 9: + dict( + name='left_wrist', + id=9, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='left_hip', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 12: + dict( + name='right_hip', + id=12, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 13: + dict( + name='left_knee', + id=13, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 14: + dict( + name='right_knee', + id=14, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 15: + dict( + name='left_ankle', + id=15, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 16: + dict( + name='right_ankle', + id=16, + color=[255, 128, 0], + type='lower', + swap='left_ankle') + }, + skeleton_info={ + 0: + dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), + 2: + dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), + 5: + dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), + 6: + dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), + 7: + dict( + link=('left_shoulder', 'right_shoulder'), + id=7, + color=[51, 153, 255]), + 8: + dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), + 9: + dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('left_eye', 'right_eye'), id=12, color=[51, 153, 255]), + 13: + dict(link=('nose', 'left_eye'), id=13, color=[51, 153, 255]), + 14: + dict(link=('nose', 'right_eye'), id=14, color=[51, 153, 255]), + 15: + dict(link=('left_eye', 'left_ear'), id=15, color=[51, 153, 255]), + 16: + dict(link=('right_eye', 'right_ear'), id=16, color=[51, 153, 255]), + 17: + dict(link=('left_ear', 'left_shoulder'), id=17, color=[51, 153, 255]), + 18: + dict( + link=('right_ear', 'right_shoulder'), id=18, color=[51, 153, 255]) + }, + joint_weights=[ + 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, 1.2, 1.5, + 1.5 + ], + sigmas=[ + 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, 0.062, + 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 + ]) diff --git a/configs/_base_/datasets/mhp.py b/configs/_base_/datasets/mhp.py new file mode 100644 index 0000000000..e16e37c79c --- /dev/null +++ b/configs/_base_/datasets/mhp.py @@ -0,0 +1,156 @@ +dataset_info = dict( + dataset_name='mhp', + paper_info=dict( + author='Zhao, Jian and Li, Jianshu and Cheng, Yu and ' + 'Sim, Terence and Yan, Shuicheng and Feng, Jiashi', + title='Understanding humans in crowded scenes: ' + 'Deep nested adversarial learning and a ' + 'new benchmark for multi-human parsing', + container='Proceedings of the 26th ACM ' + 'international conference on Multimedia', + year='2018', + homepage='https://lv-mhp.github.io/dataset', + ), + keypoint_info={ + 0: + dict( + name='right_ankle', + id=0, + color=[255, 128, 0], + type='lower', + swap='left_ankle'), + 1: + dict( + name='right_knee', + id=1, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 2: + dict( + name='right_hip', + id=2, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 3: + dict( + name='left_hip', + id=3, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 4: + dict( + name='left_knee', + id=4, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 5: + dict( + name='left_ankle', + id=5, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 6: + dict(name='pelvis', id=6, color=[51, 153, 255], type='lower', swap=''), + 7: + dict(name='thorax', id=7, color=[51, 153, 255], type='upper', swap=''), + 8: + dict( + name='upper_neck', + id=8, + color=[51, 153, 255], + type='upper', + swap=''), + 9: + dict( + name='head_top', id=9, color=[51, 153, 255], type='upper', + swap=''), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='right_elbow', + id=11, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 12: + dict( + name='right_shoulder', + id=12, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 13: + dict( + name='left_shoulder', + id=13, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 14: + dict( + name='left_elbow', + id=14, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 15: + dict( + name='left_wrist', + id=15, + color=[0, 255, 0], + type='upper', + swap='right_wrist') + }, + skeleton_info={ + 0: + dict(link=('right_ankle', 'right_knee'), id=0, color=[255, 128, 0]), + 1: + dict(link=('right_knee', 'right_hip'), id=1, color=[255, 128, 0]), + 2: + dict(link=('right_hip', 'pelvis'), id=2, color=[255, 128, 0]), + 3: + dict(link=('pelvis', 'left_hip'), id=3, color=[0, 255, 0]), + 4: + dict(link=('left_hip', 'left_knee'), id=4, color=[0, 255, 0]), + 5: + dict(link=('left_knee', 'left_ankle'), id=5, color=[0, 255, 0]), + 6: + dict(link=('pelvis', 'thorax'), id=6, color=[51, 153, 255]), + 7: + dict(link=('thorax', 'upper_neck'), id=7, color=[51, 153, 255]), + 8: + dict(link=('upper_neck', 'head_top'), id=8, color=[51, 153, 255]), + 9: + dict(link=('upper_neck', 'right_shoulder'), id=9, color=[255, 128, 0]), + 10: + dict( + link=('right_shoulder', 'right_elbow'), id=10, color=[255, 128, + 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('upper_neck', 'left_shoulder'), id=12, color=[0, 255, 0]), + 13: + dict(link=('left_shoulder', 'left_elbow'), id=13, color=[0, 255, 0]), + 14: + dict(link=('left_elbow', 'left_wrist'), id=14, color=[0, 255, 0]) + }, + joint_weights=[ + 1.5, 1.2, 1., 1., 1.2, 1.5, 1., 1., 1., 1., 1.5, 1.2, 1., 1., 1.2, 1.5 + ], + # Adapted from COCO dataset. + sigmas=[ + 0.089, 0.083, 0.107, 0.107, 0.083, 0.089, 0.026, 0.026, 0.026, 0.026, + 0.062, 0.072, 0.179, 0.179, 0.072, 0.062 + ]) diff --git a/configs/_base_/datasets/mpi_inf_3dhp.py b/configs/_base_/datasets/mpi_inf_3dhp.py new file mode 100644 index 0000000000..ffd0a70297 --- /dev/null +++ b/configs/_base_/datasets/mpi_inf_3dhp.py @@ -0,0 +1,132 @@ +dataset_info = dict( + dataset_name='mpi_inf_3dhp', + paper_info=dict( + author='ehta, Dushyant and Rhodin, Helge and Casas, Dan and ' + 'Fua, Pascal and Sotnychenko, Oleksandr and Xu, Weipeng and ' + 'Theobalt, Christian', + title='Monocular 3D Human Pose Estimation In The Wild Using Improved ' + 'CNN Supervision', + container='2017 international conference on 3D vision (3DV)', + year='2017', + homepage='http://gvv.mpi-inf.mpg.de/3dhp-dataset', + ), + keypoint_info={ + 0: + dict( + name='head_top', id=0, color=[51, 153, 255], type='upper', + swap=''), + 1: + dict(name='neck', id=1, color=[51, 153, 255], type='upper', swap=''), + 2: + dict( + name='right_shoulder', + id=2, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 3: + dict( + name='right_elbow', + id=3, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 4: + dict( + name='right_wrist', + id=4, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='left_elbow', + id=6, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 7: + dict( + name='left_wrist', + id=7, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 8: + dict( + name='right_hip', + id=8, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 9: + dict( + name='right_knee', + id=9, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 10: + dict( + name='right_ankle', + id=10, + color=[255, 128, 0], + type='lower', + swap='left_ankle'), + 11: + dict( + name='left_hip', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 12: + dict( + name='left_knee', + id=12, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 13: + dict( + name='left_ankle', + id=13, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 14: + dict(name='root', id=14, color=[51, 153, 255], type='lower', swap=''), + 15: + dict(name='spine', id=15, color=[51, 153, 255], type='upper', swap=''), + 16: + dict(name='head', id=16, color=[51, 153, 255], type='upper', swap='') + }, + skeleton_info={ + 0: dict(link=('neck', 'right_shoulder'), id=0, color=[255, 128, 0]), + 1: dict( + link=('right_shoulder', 'right_elbow'), id=1, color=[255, 128, 0]), + 2: + dict(link=('right_elbow', 'right_wrist'), id=2, color=[255, 128, 0]), + 3: dict(link=('neck', 'left_shoulder'), id=3, color=[0, 255, 0]), + 4: dict(link=('left_shoulder', 'left_elbow'), id=4, color=[0, 255, 0]), + 5: dict(link=('left_elbow', 'left_wrist'), id=5, color=[0, 255, 0]), + 6: dict(link=('root', 'right_hip'), id=6, color=[255, 128, 0]), + 7: dict(link=('right_hip', 'right_knee'), id=7, color=[255, 128, 0]), + 8: dict(link=('right_knee', 'right_ankle'), id=8, color=[255, 128, 0]), + 9: dict(link=('root', 'left_hip'), id=9, color=[0, 255, 0]), + 10: dict(link=('left_hip', 'left_knee'), id=10, color=[0, 255, 0]), + 11: dict(link=('left_knee', 'left_ankle'), id=11, color=[0, 255, 0]), + 12: dict(link=('head_top', 'head'), id=12, color=[51, 153, 255]), + 13: dict(link=('head', 'neck'), id=13, color=[51, 153, 255]), + 14: dict(link=('neck', 'spine'), id=14, color=[51, 153, 255]), + 15: dict(link=('spine', 'root'), id=15, color=[51, 153, 255]) + }, + joint_weights=[1.] * 17, + sigmas=[]) diff --git a/configs/_base_/datasets/mpii.py b/configs/_base_/datasets/mpii.py new file mode 100644 index 0000000000..6c2a491c7b --- /dev/null +++ b/configs/_base_/datasets/mpii.py @@ -0,0 +1,155 @@ +dataset_info = dict( + dataset_name='mpii', + paper_info=dict( + author='Mykhaylo Andriluka and Leonid Pishchulin and ' + 'Peter Gehler and Schiele, Bernt', + title='2D Human Pose Estimation: New Benchmark and ' + 'State of the Art Analysis', + container='IEEE Conference on Computer Vision and ' + 'Pattern Recognition (CVPR)', + year='2014', + homepage='http://human-pose.mpi-inf.mpg.de/', + ), + keypoint_info={ + 0: + dict( + name='right_ankle', + id=0, + color=[255, 128, 0], + type='lower', + swap='left_ankle'), + 1: + dict( + name='right_knee', + id=1, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 2: + dict( + name='right_hip', + id=2, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 3: + dict( + name='left_hip', + id=3, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 4: + dict( + name='left_knee', + id=4, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 5: + dict( + name='left_ankle', + id=5, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 6: + dict(name='pelvis', id=6, color=[51, 153, 255], type='lower', swap=''), + 7: + dict(name='thorax', id=7, color=[51, 153, 255], type='upper', swap=''), + 8: + dict( + name='upper_neck', + id=8, + color=[51, 153, 255], + type='upper', + swap=''), + 9: + dict( + name='head_top', id=9, color=[51, 153, 255], type='upper', + swap=''), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='right_elbow', + id=11, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 12: + dict( + name='right_shoulder', + id=12, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 13: + dict( + name='left_shoulder', + id=13, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 14: + dict( + name='left_elbow', + id=14, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 15: + dict( + name='left_wrist', + id=15, + color=[0, 255, 0], + type='upper', + swap='right_wrist') + }, + skeleton_info={ + 0: + dict(link=('right_ankle', 'right_knee'), id=0, color=[255, 128, 0]), + 1: + dict(link=('right_knee', 'right_hip'), id=1, color=[255, 128, 0]), + 2: + dict(link=('right_hip', 'pelvis'), id=2, color=[255, 128, 0]), + 3: + dict(link=('pelvis', 'left_hip'), id=3, color=[0, 255, 0]), + 4: + dict(link=('left_hip', 'left_knee'), id=4, color=[0, 255, 0]), + 5: + dict(link=('left_knee', 'left_ankle'), id=5, color=[0, 255, 0]), + 6: + dict(link=('pelvis', 'thorax'), id=6, color=[51, 153, 255]), + 7: + dict(link=('thorax', 'upper_neck'), id=7, color=[51, 153, 255]), + 8: + dict(link=('upper_neck', 'head_top'), id=8, color=[51, 153, 255]), + 9: + dict(link=('upper_neck', 'right_shoulder'), id=9, color=[255, 128, 0]), + 10: + dict( + link=('right_shoulder', 'right_elbow'), id=10, color=[255, 128, + 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('upper_neck', 'left_shoulder'), id=12, color=[0, 255, 0]), + 13: + dict(link=('left_shoulder', 'left_elbow'), id=13, color=[0, 255, 0]), + 14: + dict(link=('left_elbow', 'left_wrist'), id=14, color=[0, 255, 0]) + }, + joint_weights=[ + 1.5, 1.2, 1., 1., 1.2, 1.5, 1., 1., 1., 1., 1.5, 1.2, 1., 1., 1.2, 1.5 + ], + # Adapted from COCO dataset. + sigmas=[ + 0.089, 0.083, 0.107, 0.107, 0.083, 0.089, 0.026, 0.026, 0.026, 0.026, + 0.062, 0.072, 0.179, 0.179, 0.072, 0.062 + ]) diff --git a/configs/_base_/datasets/mpii_trb.py b/configs/_base_/datasets/mpii_trb.py new file mode 100644 index 0000000000..73940d4b48 --- /dev/null +++ b/configs/_base_/datasets/mpii_trb.py @@ -0,0 +1,380 @@ +dataset_info = dict( + dataset_name='mpii_trb', + paper_info=dict( + author='Duan, Haodong and Lin, Kwan-Yee and Jin, Sheng and ' + 'Liu, Wentao and Qian, Chen and Ouyang, Wanli', + title='TRB: A Novel Triplet Representation for ' + 'Understanding 2D Human Body', + container='Proceedings of the IEEE International ' + 'Conference on Computer Vision', + year='2019', + homepage='https://github.com/kennymckormick/' + 'Triplet-Representation-of-human-Body', + ), + keypoint_info={ + 0: + dict( + name='left_shoulder', + id=0, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 1: + dict( + name='right_shoulder', + id=1, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 2: + dict( + name='left_elbow', + id=2, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 3: + dict( + name='right_elbow', + id=3, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 4: + dict( + name='left_wrist', + id=4, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 5: + dict( + name='right_wrist', + id=5, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 6: + dict( + name='left_hip', + id=6, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 7: + dict( + name='right_hip', + id=7, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 8: + dict( + name='left_knee', + id=8, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 9: + dict( + name='right_knee', + id=9, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 10: + dict( + name='left_ankle', + id=10, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 11: + dict( + name='right_ankle', + id=11, + color=[255, 128, 0], + type='lower', + swap='left_ankle'), + 12: + dict(name='head', id=12, color=[51, 153, 255], type='upper', swap=''), + 13: + dict(name='neck', id=13, color=[51, 153, 255], type='upper', swap=''), + 14: + dict( + name='right_neck', + id=14, + color=[255, 255, 255], + type='upper', + swap='left_neck'), + 15: + dict( + name='left_neck', + id=15, + color=[255, 255, 255], + type='upper', + swap='right_neck'), + 16: + dict( + name='medial_right_shoulder', + id=16, + color=[255, 255, 255], + type='upper', + swap='medial_left_shoulder'), + 17: + dict( + name='lateral_right_shoulder', + id=17, + color=[255, 255, 255], + type='upper', + swap='lateral_left_shoulder'), + 18: + dict( + name='medial_right_bow', + id=18, + color=[255, 255, 255], + type='upper', + swap='medial_left_bow'), + 19: + dict( + name='lateral_right_bow', + id=19, + color=[255, 255, 255], + type='upper', + swap='lateral_left_bow'), + 20: + dict( + name='medial_right_wrist', + id=20, + color=[255, 255, 255], + type='upper', + swap='medial_left_wrist'), + 21: + dict( + name='lateral_right_wrist', + id=21, + color=[255, 255, 255], + type='upper', + swap='lateral_left_wrist'), + 22: + dict( + name='medial_left_shoulder', + id=22, + color=[255, 255, 255], + type='upper', + swap='medial_right_shoulder'), + 23: + dict( + name='lateral_left_shoulder', + id=23, + color=[255, 255, 255], + type='upper', + swap='lateral_right_shoulder'), + 24: + dict( + name='medial_left_bow', + id=24, + color=[255, 255, 255], + type='upper', + swap='medial_right_bow'), + 25: + dict( + name='lateral_left_bow', + id=25, + color=[255, 255, 255], + type='upper', + swap='lateral_right_bow'), + 26: + dict( + name='medial_left_wrist', + id=26, + color=[255, 255, 255], + type='upper', + swap='medial_right_wrist'), + 27: + dict( + name='lateral_left_wrist', + id=27, + color=[255, 255, 255], + type='upper', + swap='lateral_right_wrist'), + 28: + dict( + name='medial_right_hip', + id=28, + color=[255, 255, 255], + type='lower', + swap='medial_left_hip'), + 29: + dict( + name='lateral_right_hip', + id=29, + color=[255, 255, 255], + type='lower', + swap='lateral_left_hip'), + 30: + dict( + name='medial_right_knee', + id=30, + color=[255, 255, 255], + type='lower', + swap='medial_left_knee'), + 31: + dict( + name='lateral_right_knee', + id=31, + color=[255, 255, 255], + type='lower', + swap='lateral_left_knee'), + 32: + dict( + name='medial_right_ankle', + id=32, + color=[255, 255, 255], + type='lower', + swap='medial_left_ankle'), + 33: + dict( + name='lateral_right_ankle', + id=33, + color=[255, 255, 255], + type='lower', + swap='lateral_left_ankle'), + 34: + dict( + name='medial_left_hip', + id=34, + color=[255, 255, 255], + type='lower', + swap='medial_right_hip'), + 35: + dict( + name='lateral_left_hip', + id=35, + color=[255, 255, 255], + type='lower', + swap='lateral_right_hip'), + 36: + dict( + name='medial_left_knee', + id=36, + color=[255, 255, 255], + type='lower', + swap='medial_right_knee'), + 37: + dict( + name='lateral_left_knee', + id=37, + color=[255, 255, 255], + type='lower', + swap='lateral_right_knee'), + 38: + dict( + name='medial_left_ankle', + id=38, + color=[255, 255, 255], + type='lower', + swap='medial_right_ankle'), + 39: + dict( + name='lateral_left_ankle', + id=39, + color=[255, 255, 255], + type='lower', + swap='lateral_right_ankle'), + }, + skeleton_info={ + 0: + dict(link=('head', 'neck'), id=0, color=[51, 153, 255]), + 1: + dict(link=('neck', 'left_shoulder'), id=1, color=[51, 153, 255]), + 2: + dict(link=('neck', 'right_shoulder'), id=2, color=[51, 153, 255]), + 3: + dict(link=('left_shoulder', 'left_elbow'), id=3, color=[0, 255, 0]), + 4: + dict( + link=('right_shoulder', 'right_elbow'), id=4, color=[255, 128, 0]), + 5: + dict(link=('left_elbow', 'left_wrist'), id=5, color=[0, 255, 0]), + 6: + dict(link=('right_elbow', 'right_wrist'), id=6, color=[255, 128, 0]), + 7: + dict(link=('left_shoulder', 'left_hip'), id=7, color=[51, 153, 255]), + 8: + dict(link=('right_shoulder', 'right_hip'), id=8, color=[51, 153, 255]), + 9: + dict(link=('left_hip', 'right_hip'), id=9, color=[51, 153, 255]), + 10: + dict(link=('left_hip', 'left_knee'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_hip', 'right_knee'), id=11, color=[255, 128, 0]), + 12: + dict(link=('left_knee', 'left_ankle'), id=12, color=[0, 255, 0]), + 13: + dict(link=('right_knee', 'right_ankle'), id=13, color=[255, 128, 0]), + 14: + dict(link=('right_neck', 'left_neck'), id=14, color=[255, 255, 255]), + 15: + dict( + link=('medial_right_shoulder', 'lateral_right_shoulder'), + id=15, + color=[255, 255, 255]), + 16: + dict( + link=('medial_right_bow', 'lateral_right_bow'), + id=16, + color=[255, 255, 255]), + 17: + dict( + link=('medial_right_wrist', 'lateral_right_wrist'), + id=17, + color=[255, 255, 255]), + 18: + dict( + link=('medial_left_shoulder', 'lateral_left_shoulder'), + id=18, + color=[255, 255, 255]), + 19: + dict( + link=('medial_left_bow', 'lateral_left_bow'), + id=19, + color=[255, 255, 255]), + 20: + dict( + link=('medial_left_wrist', 'lateral_left_wrist'), + id=20, + color=[255, 255, 255]), + 21: + dict( + link=('medial_right_hip', 'lateral_right_hip'), + id=21, + color=[255, 255, 255]), + 22: + dict( + link=('medial_right_knee', 'lateral_right_knee'), + id=22, + color=[255, 255, 255]), + 23: + dict( + link=('medial_right_ankle', 'lateral_right_ankle'), + id=23, + color=[255, 255, 255]), + 24: + dict( + link=('medial_left_hip', 'lateral_left_hip'), + id=24, + color=[255, 255, 255]), + 25: + dict( + link=('medial_left_knee', 'lateral_left_knee'), + id=25, + color=[255, 255, 255]), + 26: + dict( + link=('medial_left_ankle', 'lateral_left_ankle'), + id=26, + color=[255, 255, 255]) + }, + joint_weights=[1.] * 40, + sigmas=[]) diff --git a/configs/_base_/datasets/ochuman.py b/configs/_base_/datasets/ochuman.py new file mode 100644 index 0000000000..2ef20838fe --- /dev/null +++ b/configs/_base_/datasets/ochuman.py @@ -0,0 +1,181 @@ +dataset_info = dict( + dataset_name='ochuman', + paper_info=dict( + author='Zhang, Song-Hai and Li, Ruilong and Dong, Xin and ' + 'Rosin, Paul and Cai, Zixi and Han, Xi and ' + 'Yang, Dingcheng and Huang, Haozhi and Hu, Shi-Min', + title='Pose2seg: Detection free human instance segmentation', + container='Proceedings of the IEEE conference on computer ' + 'vision and pattern recognition', + year='2019', + homepage='https://github.com/liruilong940607/OCHumanApi', + ), + keypoint_info={ + 0: + dict(name='nose', id=0, color=[51, 153, 255], type='upper', swap=''), + 1: + dict( + name='left_eye', + id=1, + color=[51, 153, 255], + type='upper', + swap='right_eye'), + 2: + dict( + name='right_eye', + id=2, + color=[51, 153, 255], + type='upper', + swap='left_eye'), + 3: + dict( + name='left_ear', + id=3, + color=[51, 153, 255], + type='upper', + swap='right_ear'), + 4: + dict( + name='right_ear', + id=4, + color=[51, 153, 255], + type='upper', + swap='left_ear'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='right_shoulder', + id=6, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 7: + dict( + name='left_elbow', + id=7, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 8: + dict( + name='right_elbow', + id=8, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 9: + dict( + name='left_wrist', + id=9, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='left_hip', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 12: + dict( + name='right_hip', + id=12, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 13: + dict( + name='left_knee', + id=13, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 14: + dict( + name='right_knee', + id=14, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 15: + dict( + name='left_ankle', + id=15, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 16: + dict( + name='right_ankle', + id=16, + color=[255, 128, 0], + type='lower', + swap='left_ankle') + }, + skeleton_info={ + 0: + dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), + 2: + dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), + 5: + dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), + 6: + dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), + 7: + dict( + link=('left_shoulder', 'right_shoulder'), + id=7, + color=[51, 153, 255]), + 8: + dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), + 9: + dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('left_eye', 'right_eye'), id=12, color=[51, 153, 255]), + 13: + dict(link=('nose', 'left_eye'), id=13, color=[51, 153, 255]), + 14: + dict(link=('nose', 'right_eye'), id=14, color=[51, 153, 255]), + 15: + dict(link=('left_eye', 'left_ear'), id=15, color=[51, 153, 255]), + 16: + dict(link=('right_eye', 'right_ear'), id=16, color=[51, 153, 255]), + 17: + dict(link=('left_ear', 'left_shoulder'), id=17, color=[51, 153, 255]), + 18: + dict( + link=('right_ear', 'right_shoulder'), id=18, color=[51, 153, 255]) + }, + joint_weights=[ + 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, 1.2, 1.5, + 1.5 + ], + sigmas=[ + 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, 0.062, + 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 + ]) diff --git a/configs/_base_/datasets/onehand10k.py b/configs/_base_/datasets/onehand10k.py new file mode 100644 index 0000000000..016770f14f --- /dev/null +++ b/configs/_base_/datasets/onehand10k.py @@ -0,0 +1,142 @@ +dataset_info = dict( + dataset_name='onehand10k', + paper_info=dict( + author='Wang, Yangang and Peng, Cong and Liu, Yebin', + title='Mask-pose cascaded cnn for 2d hand pose estimation ' + 'from single color image', + container='IEEE Transactions on Circuits and Systems ' + 'for Video Technology', + year='2018', + homepage='https://www.yangangwang.com/papers/WANG-MCC-2018-10.html', + ), + keypoint_info={ + 0: + dict(name='wrist', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='thumb1', id=1, color=[255, 128, 0], type='', swap=''), + 2: + dict(name='thumb2', id=2, color=[255, 128, 0], type='', swap=''), + 3: + dict(name='thumb3', id=3, color=[255, 128, 0], type='', swap=''), + 4: + dict(name='thumb4', id=4, color=[255, 128, 0], type='', swap=''), + 5: + dict( + name='forefinger1', id=5, color=[255, 153, 255], type='', swap=''), + 6: + dict( + name='forefinger2', id=6, color=[255, 153, 255], type='', swap=''), + 7: + dict( + name='forefinger3', id=7, color=[255, 153, 255], type='', swap=''), + 8: + dict( + name='forefinger4', id=8, color=[255, 153, 255], type='', swap=''), + 9: + dict( + name='middle_finger1', + id=9, + color=[102, 178, 255], + type='', + swap=''), + 10: + dict( + name='middle_finger2', + id=10, + color=[102, 178, 255], + type='', + swap=''), + 11: + dict( + name='middle_finger3', + id=11, + color=[102, 178, 255], + type='', + swap=''), + 12: + dict( + name='middle_finger4', + id=12, + color=[102, 178, 255], + type='', + swap=''), + 13: + dict( + name='ring_finger1', id=13, color=[255, 51, 51], type='', swap=''), + 14: + dict( + name='ring_finger2', id=14, color=[255, 51, 51], type='', swap=''), + 15: + dict( + name='ring_finger3', id=15, color=[255, 51, 51], type='', swap=''), + 16: + dict( + name='ring_finger4', id=16, color=[255, 51, 51], type='', swap=''), + 17: + dict(name='pinky_finger1', id=17, color=[0, 255, 0], type='', swap=''), + 18: + dict(name='pinky_finger2', id=18, color=[0, 255, 0], type='', swap=''), + 19: + dict(name='pinky_finger3', id=19, color=[0, 255, 0], type='', swap=''), + 20: + dict(name='pinky_finger4', id=20, color=[0, 255, 0], type='', swap='') + }, + skeleton_info={ + 0: + dict(link=('wrist', 'thumb1'), id=0, color=[255, 128, 0]), + 1: + dict(link=('thumb1', 'thumb2'), id=1, color=[255, 128, 0]), + 2: + dict(link=('thumb2', 'thumb3'), id=2, color=[255, 128, 0]), + 3: + dict(link=('thumb3', 'thumb4'), id=3, color=[255, 128, 0]), + 4: + dict(link=('wrist', 'forefinger1'), id=4, color=[255, 153, 255]), + 5: + dict(link=('forefinger1', 'forefinger2'), id=5, color=[255, 153, 255]), + 6: + dict(link=('forefinger2', 'forefinger3'), id=6, color=[255, 153, 255]), + 7: + dict(link=('forefinger3', 'forefinger4'), id=7, color=[255, 153, 255]), + 8: + dict(link=('wrist', 'middle_finger1'), id=8, color=[102, 178, 255]), + 9: + dict( + link=('middle_finger1', 'middle_finger2'), + id=9, + color=[102, 178, 255]), + 10: + dict( + link=('middle_finger2', 'middle_finger3'), + id=10, + color=[102, 178, 255]), + 11: + dict( + link=('middle_finger3', 'middle_finger4'), + id=11, + color=[102, 178, 255]), + 12: + dict(link=('wrist', 'ring_finger1'), id=12, color=[255, 51, 51]), + 13: + dict( + link=('ring_finger1', 'ring_finger2'), id=13, color=[255, 51, 51]), + 14: + dict( + link=('ring_finger2', 'ring_finger3'), id=14, color=[255, 51, 51]), + 15: + dict( + link=('ring_finger3', 'ring_finger4'), id=15, color=[255, 51, 51]), + 16: + dict(link=('wrist', 'pinky_finger1'), id=16, color=[0, 255, 0]), + 17: + dict( + link=('pinky_finger1', 'pinky_finger2'), id=17, color=[0, 255, 0]), + 18: + dict( + link=('pinky_finger2', 'pinky_finger3'), id=18, color=[0, 255, 0]), + 19: + dict( + link=('pinky_finger3', 'pinky_finger4'), id=19, color=[0, 255, 0]) + }, + joint_weights=[1.] * 21, + sigmas=[]) diff --git a/configs/_base_/datasets/panoptic_hand2d.py b/configs/_base_/datasets/panoptic_hand2d.py new file mode 100644 index 0000000000..7a65731ba8 --- /dev/null +++ b/configs/_base_/datasets/panoptic_hand2d.py @@ -0,0 +1,143 @@ +dataset_info = dict( + dataset_name='panoptic_hand2d', + paper_info=dict( + author='Simon, Tomas and Joo, Hanbyul and ' + 'Matthews, Iain and Sheikh, Yaser', + title='Hand keypoint detection in single images using ' + 'multiview bootstrapping', + container='Proceedings of the IEEE conference on ' + 'Computer Vision and Pattern Recognition', + year='2017', + homepage='http://domedb.perception.cs.cmu.edu/handdb.html', + ), + keypoint_info={ + 0: + dict(name='wrist', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='thumb1', id=1, color=[255, 128, 0], type='', swap=''), + 2: + dict(name='thumb2', id=2, color=[255, 128, 0], type='', swap=''), + 3: + dict(name='thumb3', id=3, color=[255, 128, 0], type='', swap=''), + 4: + dict(name='thumb4', id=4, color=[255, 128, 0], type='', swap=''), + 5: + dict( + name='forefinger1', id=5, color=[255, 153, 255], type='', swap=''), + 6: + dict( + name='forefinger2', id=6, color=[255, 153, 255], type='', swap=''), + 7: + dict( + name='forefinger3', id=7, color=[255, 153, 255], type='', swap=''), + 8: + dict( + name='forefinger4', id=8, color=[255, 153, 255], type='', swap=''), + 9: + dict( + name='middle_finger1', + id=9, + color=[102, 178, 255], + type='', + swap=''), + 10: + dict( + name='middle_finger2', + id=10, + color=[102, 178, 255], + type='', + swap=''), + 11: + dict( + name='middle_finger3', + id=11, + color=[102, 178, 255], + type='', + swap=''), + 12: + dict( + name='middle_finger4', + id=12, + color=[102, 178, 255], + type='', + swap=''), + 13: + dict( + name='ring_finger1', id=13, color=[255, 51, 51], type='', swap=''), + 14: + dict( + name='ring_finger2', id=14, color=[255, 51, 51], type='', swap=''), + 15: + dict( + name='ring_finger3', id=15, color=[255, 51, 51], type='', swap=''), + 16: + dict( + name='ring_finger4', id=16, color=[255, 51, 51], type='', swap=''), + 17: + dict(name='pinky_finger1', id=17, color=[0, 255, 0], type='', swap=''), + 18: + dict(name='pinky_finger2', id=18, color=[0, 255, 0], type='', swap=''), + 19: + dict(name='pinky_finger3', id=19, color=[0, 255, 0], type='', swap=''), + 20: + dict(name='pinky_finger4', id=20, color=[0, 255, 0], type='', swap='') + }, + skeleton_info={ + 0: + dict(link=('wrist', 'thumb1'), id=0, color=[255, 128, 0]), + 1: + dict(link=('thumb1', 'thumb2'), id=1, color=[255, 128, 0]), + 2: + dict(link=('thumb2', 'thumb3'), id=2, color=[255, 128, 0]), + 3: + dict(link=('thumb3', 'thumb4'), id=3, color=[255, 128, 0]), + 4: + dict(link=('wrist', 'forefinger1'), id=4, color=[255, 153, 255]), + 5: + dict(link=('forefinger1', 'forefinger2'), id=5, color=[255, 153, 255]), + 6: + dict(link=('forefinger2', 'forefinger3'), id=6, color=[255, 153, 255]), + 7: + dict(link=('forefinger3', 'forefinger4'), id=7, color=[255, 153, 255]), + 8: + dict(link=('wrist', 'middle_finger1'), id=8, color=[102, 178, 255]), + 9: + dict( + link=('middle_finger1', 'middle_finger2'), + id=9, + color=[102, 178, 255]), + 10: + dict( + link=('middle_finger2', 'middle_finger3'), + id=10, + color=[102, 178, 255]), + 11: + dict( + link=('middle_finger3', 'middle_finger4'), + id=11, + color=[102, 178, 255]), + 12: + dict(link=('wrist', 'ring_finger1'), id=12, color=[255, 51, 51]), + 13: + dict( + link=('ring_finger1', 'ring_finger2'), id=13, color=[255, 51, 51]), + 14: + dict( + link=('ring_finger2', 'ring_finger3'), id=14, color=[255, 51, 51]), + 15: + dict( + link=('ring_finger3', 'ring_finger4'), id=15, color=[255, 51, 51]), + 16: + dict(link=('wrist', 'pinky_finger1'), id=16, color=[0, 255, 0]), + 17: + dict( + link=('pinky_finger1', 'pinky_finger2'), id=17, color=[0, 255, 0]), + 18: + dict( + link=('pinky_finger2', 'pinky_finger3'), id=18, color=[0, 255, 0]), + 19: + dict( + link=('pinky_finger3', 'pinky_finger4'), id=19, color=[0, 255, 0]) + }, + joint_weights=[1.] * 21, + sigmas=[]) diff --git a/configs/_base_/datasets/posetrack18.py b/configs/_base_/datasets/posetrack18.py new file mode 100644 index 0000000000..5aefd1c97f --- /dev/null +++ b/configs/_base_/datasets/posetrack18.py @@ -0,0 +1,176 @@ +dataset_info = dict( + dataset_name='posetrack18', + paper_info=dict( + author='Andriluka, Mykhaylo and Iqbal, Umar and ' + 'Insafutdinov, Eldar and Pishchulin, Leonid and ' + 'Milan, Anton and Gall, Juergen and Schiele, Bernt', + title='Posetrack: A benchmark for human pose estimation and tracking', + container='Proceedings of the IEEE Conference on ' + 'Computer Vision and Pattern Recognition', + year='2018', + homepage='https://posetrack.net/users/download.php', + ), + keypoint_info={ + 0: + dict(name='nose', id=0, color=[51, 153, 255], type='upper', swap=''), + 1: + dict( + name='head_bottom', + id=1, + color=[51, 153, 255], + type='upper', + swap=''), + 2: + dict( + name='head_top', id=2, color=[51, 153, 255], type='upper', + swap=''), + 3: + dict( + name='left_ear', + id=3, + color=[51, 153, 255], + type='upper', + swap='right_ear'), + 4: + dict( + name='right_ear', + id=4, + color=[51, 153, 255], + type='upper', + swap='left_ear'), + 5: + dict( + name='left_shoulder', + id=5, + color=[0, 255, 0], + type='upper', + swap='right_shoulder'), + 6: + dict( + name='right_shoulder', + id=6, + color=[255, 128, 0], + type='upper', + swap='left_shoulder'), + 7: + dict( + name='left_elbow', + id=7, + color=[0, 255, 0], + type='upper', + swap='right_elbow'), + 8: + dict( + name='right_elbow', + id=8, + color=[255, 128, 0], + type='upper', + swap='left_elbow'), + 9: + dict( + name='left_wrist', + id=9, + color=[0, 255, 0], + type='upper', + swap='right_wrist'), + 10: + dict( + name='right_wrist', + id=10, + color=[255, 128, 0], + type='upper', + swap='left_wrist'), + 11: + dict( + name='left_hip', + id=11, + color=[0, 255, 0], + type='lower', + swap='right_hip'), + 12: + dict( + name='right_hip', + id=12, + color=[255, 128, 0], + type='lower', + swap='left_hip'), + 13: + dict( + name='left_knee', + id=13, + color=[0, 255, 0], + type='lower', + swap='right_knee'), + 14: + dict( + name='right_knee', + id=14, + color=[255, 128, 0], + type='lower', + swap='left_knee'), + 15: + dict( + name='left_ankle', + id=15, + color=[0, 255, 0], + type='lower', + swap='right_ankle'), + 16: + dict( + name='right_ankle', + id=16, + color=[255, 128, 0], + type='lower', + swap='left_ankle') + }, + skeleton_info={ + 0: + dict(link=('left_ankle', 'left_knee'), id=0, color=[0, 255, 0]), + 1: + dict(link=('left_knee', 'left_hip'), id=1, color=[0, 255, 0]), + 2: + dict(link=('right_ankle', 'right_knee'), id=2, color=[255, 128, 0]), + 3: + dict(link=('right_knee', 'right_hip'), id=3, color=[255, 128, 0]), + 4: + dict(link=('left_hip', 'right_hip'), id=4, color=[51, 153, 255]), + 5: + dict(link=('left_shoulder', 'left_hip'), id=5, color=[51, 153, 255]), + 6: + dict(link=('right_shoulder', 'right_hip'), id=6, color=[51, 153, 255]), + 7: + dict( + link=('left_shoulder', 'right_shoulder'), + id=7, + color=[51, 153, 255]), + 8: + dict(link=('left_shoulder', 'left_elbow'), id=8, color=[0, 255, 0]), + 9: + dict( + link=('right_shoulder', 'right_elbow'), id=9, color=[255, 128, 0]), + 10: + dict(link=('left_elbow', 'left_wrist'), id=10, color=[0, 255, 0]), + 11: + dict(link=('right_elbow', 'right_wrist'), id=11, color=[255, 128, 0]), + 12: + dict(link=('nose', 'head_bottom'), id=12, color=[51, 153, 255]), + 13: + dict(link=('nose', 'head_top'), id=13, color=[51, 153, 255]), + 14: + dict( + link=('head_bottom', 'left_shoulder'), id=14, color=[51, 153, + 255]), + 15: + dict( + link=('head_bottom', 'right_shoulder'), + id=15, + color=[51, 153, 255]) + }, + joint_weights=[ + 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, 1.2, 1.5, + 1.5 + ], + sigmas=[ + 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, 0.062, + 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 + ]) diff --git a/configs/_base_/datasets/rhd2d.py b/configs/_base_/datasets/rhd2d.py new file mode 100644 index 0000000000..f48e637026 --- /dev/null +++ b/configs/_base_/datasets/rhd2d.py @@ -0,0 +1,141 @@ +dataset_info = dict( + dataset_name='rhd2d', + paper_info=dict( + author='Christian Zimmermann and Thomas Brox', + title='Learning to Estimate 3D Hand Pose from Single RGB Images', + container='arXiv', + year='2017', + homepage='https://lmb.informatik.uni-freiburg.de/resources/' + 'datasets/RenderedHandposeDataset.en.html', + ), + keypoint_info={ + 0: + dict(name='wrist', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='thumb1', id=1, color=[255, 128, 0], type='', swap=''), + 2: + dict(name='thumb2', id=2, color=[255, 128, 0], type='', swap=''), + 3: + dict(name='thumb3', id=3, color=[255, 128, 0], type='', swap=''), + 4: + dict(name='thumb4', id=4, color=[255, 128, 0], type='', swap=''), + 5: + dict( + name='forefinger1', id=5, color=[255, 153, 255], type='', swap=''), + 6: + dict( + name='forefinger2', id=6, color=[255, 153, 255], type='', swap=''), + 7: + dict( + name='forefinger3', id=7, color=[255, 153, 255], type='', swap=''), + 8: + dict( + name='forefinger4', id=8, color=[255, 153, 255], type='', swap=''), + 9: + dict( + name='middle_finger1', + id=9, + color=[102, 178, 255], + type='', + swap=''), + 10: + dict( + name='middle_finger2', + id=10, + color=[102, 178, 255], + type='', + swap=''), + 11: + dict( + name='middle_finger3', + id=11, + color=[102, 178, 255], + type='', + swap=''), + 12: + dict( + name='middle_finger4', + id=12, + color=[102, 178, 255], + type='', + swap=''), + 13: + dict( + name='ring_finger1', id=13, color=[255, 51, 51], type='', swap=''), + 14: + dict( + name='ring_finger2', id=14, color=[255, 51, 51], type='', swap=''), + 15: + dict( + name='ring_finger3', id=15, color=[255, 51, 51], type='', swap=''), + 16: + dict( + name='ring_finger4', id=16, color=[255, 51, 51], type='', swap=''), + 17: + dict(name='pinky_finger1', id=17, color=[0, 255, 0], type='', swap=''), + 18: + dict(name='pinky_finger2', id=18, color=[0, 255, 0], type='', swap=''), + 19: + dict(name='pinky_finger3', id=19, color=[0, 255, 0], type='', swap=''), + 20: + dict(name='pinky_finger4', id=20, color=[0, 255, 0], type='', swap='') + }, + skeleton_info={ + 0: + dict(link=('wrist', 'thumb1'), id=0, color=[255, 128, 0]), + 1: + dict(link=('thumb1', 'thumb2'), id=1, color=[255, 128, 0]), + 2: + dict(link=('thumb2', 'thumb3'), id=2, color=[255, 128, 0]), + 3: + dict(link=('thumb3', 'thumb4'), id=3, color=[255, 128, 0]), + 4: + dict(link=('wrist', 'forefinger1'), id=4, color=[255, 153, 255]), + 5: + dict(link=('forefinger1', 'forefinger2'), id=5, color=[255, 153, 255]), + 6: + dict(link=('forefinger2', 'forefinger3'), id=6, color=[255, 153, 255]), + 7: + dict(link=('forefinger3', 'forefinger4'), id=7, color=[255, 153, 255]), + 8: + dict(link=('wrist', 'middle_finger1'), id=8, color=[102, 178, 255]), + 9: + dict( + link=('middle_finger1', 'middle_finger2'), + id=9, + color=[102, 178, 255]), + 10: + dict( + link=('middle_finger2', 'middle_finger3'), + id=10, + color=[102, 178, 255]), + 11: + dict( + link=('middle_finger3', 'middle_finger4'), + id=11, + color=[102, 178, 255]), + 12: + dict(link=('wrist', 'ring_finger1'), id=12, color=[255, 51, 51]), + 13: + dict( + link=('ring_finger1', 'ring_finger2'), id=13, color=[255, 51, 51]), + 14: + dict( + link=('ring_finger2', 'ring_finger3'), id=14, color=[255, 51, 51]), + 15: + dict( + link=('ring_finger3', 'ring_finger4'), id=15, color=[255, 51, 51]), + 16: + dict(link=('wrist', 'pinky_finger1'), id=16, color=[0, 255, 0]), + 17: + dict( + link=('pinky_finger1', 'pinky_finger2'), id=17, color=[0, 255, 0]), + 18: + dict( + link=('pinky_finger2', 'pinky_finger3'), id=18, color=[0, 255, 0]), + 19: + dict( + link=('pinky_finger3', 'pinky_finger4'), id=19, color=[0, 255, 0]) + }, + joint_weights=[1.] * 21, + sigmas=[]) diff --git a/configs/_base_/datasets/wflw.py b/configs/_base_/datasets/wflw.py new file mode 100644 index 0000000000..bed6f56f30 --- /dev/null +++ b/configs/_base_/datasets/wflw.py @@ -0,0 +1,582 @@ +dataset_info = dict( + dataset_name='wflw', + paper_info=dict( + author='Wu, Wayne and Qian, Chen and Yang, Shuo and Wang, ' + 'Quan and Cai, Yici and Zhou, Qiang', + title='Look at boundary: A boundary-aware face alignment algorithm', + container='Proceedings of the IEEE conference on computer ' + 'vision and pattern recognition', + year='2018', + homepage='https://wywu.github.io/projects/LAB/WFLW.html', + ), + keypoint_info={ + 0: + dict( + name='kpt-0', id=0, color=[255, 255, 255], type='', swap='kpt-32'), + 1: + dict( + name='kpt-1', id=1, color=[255, 255, 255], type='', swap='kpt-31'), + 2: + dict( + name='kpt-2', id=2, color=[255, 255, 255], type='', swap='kpt-30'), + 3: + dict( + name='kpt-3', id=3, color=[255, 255, 255], type='', swap='kpt-29'), + 4: + dict( + name='kpt-4', id=4, color=[255, 255, 255], type='', swap='kpt-28'), + 5: + dict( + name='kpt-5', id=5, color=[255, 255, 255], type='', swap='kpt-27'), + 6: + dict( + name='kpt-6', id=6, color=[255, 255, 255], type='', swap='kpt-26'), + 7: + dict( + name='kpt-7', id=7, color=[255, 255, 255], type='', swap='kpt-25'), + 8: + dict( + name='kpt-8', id=8, color=[255, 255, 255], type='', swap='kpt-24'), + 9: + dict( + name='kpt-9', id=9, color=[255, 255, 255], type='', swap='kpt-23'), + 10: + dict( + name='kpt-10', + id=10, + color=[255, 255, 255], + type='', + swap='kpt-22'), + 11: + dict( + name='kpt-11', + id=11, + color=[255, 255, 255], + type='', + swap='kpt-21'), + 12: + dict( + name='kpt-12', + id=12, + color=[255, 255, 255], + type='', + swap='kpt-20'), + 13: + dict( + name='kpt-13', + id=13, + color=[255, 255, 255], + type='', + swap='kpt-19'), + 14: + dict( + name='kpt-14', + id=14, + color=[255, 255, 255], + type='', + swap='kpt-18'), + 15: + dict( + name='kpt-15', + id=15, + color=[255, 255, 255], + type='', + swap='kpt-17'), + 16: + dict(name='kpt-16', id=16, color=[255, 255, 255], type='', swap=''), + 17: + dict( + name='kpt-17', + id=17, + color=[255, 255, 255], + type='', + swap='kpt-15'), + 18: + dict( + name='kpt-18', + id=18, + color=[255, 255, 255], + type='', + swap='kpt-14'), + 19: + dict( + name='kpt-19', + id=19, + color=[255, 255, 255], + type='', + swap='kpt-13'), + 20: + dict( + name='kpt-20', + id=20, + color=[255, 255, 255], + type='', + swap='kpt-12'), + 21: + dict( + name='kpt-21', + id=21, + color=[255, 255, 255], + type='', + swap='kpt-11'), + 22: + dict( + name='kpt-22', + id=22, + color=[255, 255, 255], + type='', + swap='kpt-10'), + 23: + dict( + name='kpt-23', id=23, color=[255, 255, 255], type='', + swap='kpt-9'), + 24: + dict( + name='kpt-24', id=24, color=[255, 255, 255], type='', + swap='kpt-8'), + 25: + dict( + name='kpt-25', id=25, color=[255, 255, 255], type='', + swap='kpt-7'), + 26: + dict( + name='kpt-26', id=26, color=[255, 255, 255], type='', + swap='kpt-6'), + 27: + dict( + name='kpt-27', id=27, color=[255, 255, 255], type='', + swap='kpt-5'), + 28: + dict( + name='kpt-28', id=28, color=[255, 255, 255], type='', + swap='kpt-4'), + 29: + dict( + name='kpt-29', id=29, color=[255, 255, 255], type='', + swap='kpt-3'), + 30: + dict( + name='kpt-30', id=30, color=[255, 255, 255], type='', + swap='kpt-2'), + 31: + dict( + name='kpt-31', id=31, color=[255, 255, 255], type='', + swap='kpt-1'), + 32: + dict( + name='kpt-32', id=32, color=[255, 255, 255], type='', + swap='kpt-0'), + 33: + dict( + name='kpt-33', + id=33, + color=[255, 255, 255], + type='', + swap='kpt-46'), + 34: + dict( + name='kpt-34', + id=34, + color=[255, 255, 255], + type='', + swap='kpt-45'), + 35: + dict( + name='kpt-35', + id=35, + color=[255, 255, 255], + type='', + swap='kpt-44'), + 36: + dict( + name='kpt-36', + id=36, + color=[255, 255, 255], + type='', + swap='kpt-43'), + 37: + dict( + name='kpt-37', + id=37, + color=[255, 255, 255], + type='', + swap='kpt-42'), + 38: + dict( + name='kpt-38', + id=38, + color=[255, 255, 255], + type='', + swap='kpt-50'), + 39: + dict( + name='kpt-39', + id=39, + color=[255, 255, 255], + type='', + swap='kpt-49'), + 40: + dict( + name='kpt-40', + id=40, + color=[255, 255, 255], + type='', + swap='kpt-48'), + 41: + dict( + name='kpt-41', + id=41, + color=[255, 255, 255], + type='', + swap='kpt-47'), + 42: + dict( + name='kpt-42', + id=42, + color=[255, 255, 255], + type='', + swap='kpt-37'), + 43: + dict( + name='kpt-43', + id=43, + color=[255, 255, 255], + type='', + swap='kpt-36'), + 44: + dict( + name='kpt-44', + id=44, + color=[255, 255, 255], + type='', + swap='kpt-35'), + 45: + dict( + name='kpt-45', + id=45, + color=[255, 255, 255], + type='', + swap='kpt-34'), + 46: + dict( + name='kpt-46', + id=46, + color=[255, 255, 255], + type='', + swap='kpt-33'), + 47: + dict( + name='kpt-47', + id=47, + color=[255, 255, 255], + type='', + swap='kpt-41'), + 48: + dict( + name='kpt-48', + id=48, + color=[255, 255, 255], + type='', + swap='kpt-40'), + 49: + dict( + name='kpt-49', + id=49, + color=[255, 255, 255], + type='', + swap='kpt-39'), + 50: + dict( + name='kpt-50', + id=50, + color=[255, 255, 255], + type='', + swap='kpt-38'), + 51: + dict(name='kpt-51', id=51, color=[255, 255, 255], type='', swap=''), + 52: + dict(name='kpt-52', id=52, color=[255, 255, 255], type='', swap=''), + 53: + dict(name='kpt-53', id=53, color=[255, 255, 255], type='', swap=''), + 54: + dict(name='kpt-54', id=54, color=[255, 255, 255], type='', swap=''), + 55: + dict( + name='kpt-55', + id=55, + color=[255, 255, 255], + type='', + swap='kpt-59'), + 56: + dict( + name='kpt-56', + id=56, + color=[255, 255, 255], + type='', + swap='kpt-58'), + 57: + dict(name='kpt-57', id=57, color=[255, 255, 255], type='', swap=''), + 58: + dict( + name='kpt-58', + id=58, + color=[255, 255, 255], + type='', + swap='kpt-56'), + 59: + dict( + name='kpt-59', + id=59, + color=[255, 255, 255], + type='', + swap='kpt-55'), + 60: + dict( + name='kpt-60', + id=60, + color=[255, 255, 255], + type='', + swap='kpt-72'), + 61: + dict( + name='kpt-61', + id=61, + color=[255, 255, 255], + type='', + swap='kpt-71'), + 62: + dict( + name='kpt-62', + id=62, + color=[255, 255, 255], + type='', + swap='kpt-70'), + 63: + dict( + name='kpt-63', + id=63, + color=[255, 255, 255], + type='', + swap='kpt-69'), + 64: + dict( + name='kpt-64', + id=64, + color=[255, 255, 255], + type='', + swap='kpt-68'), + 65: + dict( + name='kpt-65', + id=65, + color=[255, 255, 255], + type='', + swap='kpt-75'), + 66: + dict( + name='kpt-66', + id=66, + color=[255, 255, 255], + type='', + swap='kpt-74'), + 67: + dict( + name='kpt-67', + id=67, + color=[255, 255, 255], + type='', + swap='kpt-73'), + 68: + dict( + name='kpt-68', + id=68, + color=[255, 255, 255], + type='', + swap='kpt-64'), + 69: + dict( + name='kpt-69', + id=69, + color=[255, 255, 255], + type='', + swap='kpt-63'), + 70: + dict( + name='kpt-70', + id=70, + color=[255, 255, 255], + type='', + swap='kpt-62'), + 71: + dict( + name='kpt-71', + id=71, + color=[255, 255, 255], + type='', + swap='kpt-61'), + 72: + dict( + name='kpt-72', + id=72, + color=[255, 255, 255], + type='', + swap='kpt-60'), + 73: + dict( + name='kpt-73', + id=73, + color=[255, 255, 255], + type='', + swap='kpt-67'), + 74: + dict( + name='kpt-74', + id=74, + color=[255, 255, 255], + type='', + swap='kpt-66'), + 75: + dict( + name='kpt-75', + id=75, + color=[255, 255, 255], + type='', + swap='kpt-65'), + 76: + dict( + name='kpt-76', + id=76, + color=[255, 255, 255], + type='', + swap='kpt-82'), + 77: + dict( + name='kpt-77', + id=77, + color=[255, 255, 255], + type='', + swap='kpt-81'), + 78: + dict( + name='kpt-78', + id=78, + color=[255, 255, 255], + type='', + swap='kpt-80'), + 79: + dict(name='kpt-79', id=79, color=[255, 255, 255], type='', swap=''), + 80: + dict( + name='kpt-80', + id=80, + color=[255, 255, 255], + type='', + swap='kpt-78'), + 81: + dict( + name='kpt-81', + id=81, + color=[255, 255, 255], + type='', + swap='kpt-77'), + 82: + dict( + name='kpt-82', + id=82, + color=[255, 255, 255], + type='', + swap='kpt-76'), + 83: + dict( + name='kpt-83', + id=83, + color=[255, 255, 255], + type='', + swap='kpt-87'), + 84: + dict( + name='kpt-84', + id=84, + color=[255, 255, 255], + type='', + swap='kpt-86'), + 85: + dict(name='kpt-85', id=85, color=[255, 255, 255], type='', swap=''), + 86: + dict( + name='kpt-86', + id=86, + color=[255, 255, 255], + type='', + swap='kpt-84'), + 87: + dict( + name='kpt-87', + id=87, + color=[255, 255, 255], + type='', + swap='kpt-83'), + 88: + dict( + name='kpt-88', + id=88, + color=[255, 255, 255], + type='', + swap='kpt-92'), + 89: + dict( + name='kpt-89', + id=89, + color=[255, 255, 255], + type='', + swap='kpt-91'), + 90: + dict(name='kpt-90', id=90, color=[255, 255, 255], type='', swap=''), + 91: + dict( + name='kpt-91', + id=91, + color=[255, 255, 255], + type='', + swap='kpt-89'), + 92: + dict( + name='kpt-92', + id=92, + color=[255, 255, 255], + type='', + swap='kpt-88'), + 93: + dict( + name='kpt-93', + id=93, + color=[255, 255, 255], + type='', + swap='kpt-95'), + 94: + dict(name='kpt-94', id=94, color=[255, 255, 255], type='', swap=''), + 95: + dict( + name='kpt-95', + id=95, + color=[255, 255, 255], + type='', + swap='kpt-93'), + 96: + dict( + name='kpt-96', + id=96, + color=[255, 255, 255], + type='', + swap='kpt-97'), + 97: + dict( + name='kpt-97', + id=97, + color=[255, 255, 255], + type='', + swap='kpt-96') + }, + skeleton_info={}, + joint_weights=[1.] * 98, + sigmas=[]) diff --git a/configs/_base_/datasets/zebra.py b/configs/_base_/datasets/zebra.py new file mode 100644 index 0000000000..eac71f796a --- /dev/null +++ b/configs/_base_/datasets/zebra.py @@ -0,0 +1,64 @@ +dataset_info = dict( + dataset_name='zebra', + paper_info=dict( + author='Graving, Jacob M and Chae, Daniel and Naik, Hemal and ' + 'Li, Liang and Koger, Benjamin and Costelloe, Blair R and ' + 'Couzin, Iain D', + title='DeepPoseKit, a software toolkit for fast and robust ' + 'animal pose estimation using deep learning', + container='Elife', + year='2019', + homepage='https://github.com/jgraving/DeepPoseKit-Data', + ), + keypoint_info={ + 0: + dict(name='snout', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='head', id=1, color=[255, 255, 255], type='', swap=''), + 2: + dict(name='neck', id=2, color=[255, 255, 255], type='', swap=''), + 3: + dict( + name='forelegL1', + id=3, + color=[255, 255, 255], + type='', + swap='forelegR1'), + 4: + dict( + name='forelegR1', + id=4, + color=[255, 255, 255], + type='', + swap='forelegL1'), + 5: + dict( + name='hindlegL1', + id=5, + color=[255, 255, 255], + type='', + swap='hindlegR1'), + 6: + dict( + name='hindlegR1', + id=6, + color=[255, 255, 255], + type='', + swap='hindlegL1'), + 7: + dict(name='tailbase', id=7, color=[255, 255, 255], type='', swap=''), + 8: + dict(name='tailtip', id=8, color=[255, 255, 255], type='', swap='') + }, + skeleton_info={ + 0: dict(link=('head', 'snout'), id=0, color=[255, 255, 255]), + 1: dict(link=('neck', 'head'), id=1, color=[255, 255, 255]), + 2: dict(link=('forelegL1', 'neck'), id=2, color=[255, 255, 255]), + 3: dict(link=('forelegR1', 'neck'), id=3, color=[255, 255, 255]), + 4: dict(link=('hindlegL1', 'tailbase'), id=4, color=[255, 255, 255]), + 5: dict(link=('hindlegR1', 'tailbase'), id=5, color=[255, 255, 255]), + 6: dict(link=('tailbase', 'neck'), id=6, color=[255, 255, 255]), + 7: dict(link=('tailtip', 'tailbase'), id=7, color=[255, 255, 255]) + }, + joint_weights=[1.] * 9, + sigmas=[]) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w32_animalpose_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w32_animalpose_256x256.py index ab3deee83b..c8c9436966 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w32_animalpose_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w32_animalpose_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/animalpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,17 +156,20 @@ ann_file=f'{data_root}/annotations/animalpose_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w48_animalpose_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w48_animalpose_256x256.py index 4943dcaabc..2e18c14d3e 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w48_animalpose_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/hrnet_w48_animalpose_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/animalpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,17 +156,20 @@ ann_file=f'{data_root}/annotations/animalpose_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res101_animalpose_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res101_animalpose_256x256.py index f32429c3cc..481f54ced8 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res101_animalpose_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res101_animalpose_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/animalpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/animalpose_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res152_animalpose_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res152_animalpose_256x256.py index 87a11fe5fe..7b08480ea1 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res152_animalpose_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res152_animalpose_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/animalpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/animalpose_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res50_animalpose_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res50_animalpose_256x256.py index 0bea6d5c2c..8cdd6d78c7 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res50_animalpose_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/animalpose/res50_animalpose_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/animalpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/animalpose_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalPoseDataset', ann_file=f'{data_root}/annotations/animalpose_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w32_atrw_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w32_atrw_256x256.py index f127c043c6..abafd327c4 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w32_atrw_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w32_atrw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/atrw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -153,17 +154,20 @@ ann_file=f'{data_root}/annotations/keypoint_train.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w48_atrw_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w48_atrw_256x256.py index 8c0ed2e319..5c0e2ed714 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w48_atrw_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/hrnet_w48_atrw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/atrw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -153,17 +154,20 @@ ann_file=f'{data_root}/annotations/keypoint_train.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res101_atrw_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res101_atrw_256x256.py index 3ee70e1617..1d03e9bbd4 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res101_atrw_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res101_atrw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/atrw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -122,17 +123,20 @@ ann_file=f'{data_root}/annotations/keypoint_train.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res152_atrw_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res152_atrw_256x256.py index 5fbc5876ef..8f93665e59 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res152_atrw_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res152_atrw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/atrw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -122,17 +123,20 @@ ann_file=f'{data_root}/annotations/keypoint_train.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res50_atrw_256x256.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res50_atrw_256x256.py index cce387abd7..025c525599 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res50_atrw_256x256.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/atrw/res50_atrw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/atrw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -122,17 +123,20 @@ ann_file=f'{data_root}/annotations/keypoint_train.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalATRWDataset', ann_file=f'{data_root}/annotations/keypoint_val.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res101_fly_192x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res101_fly_192x192.py index ceb502de57..2d71ced8fe 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res101_fly_192x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res101_fly_192x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/fly.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/fly_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalFlyDataset', ann_file=f'{data_root}/annotations/fly_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalFlyDataset', ann_file=f'{data_root}/annotations/fly_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res152_fly_192x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res152_fly_192x192.py index d80ed51584..78cbb47f82 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res152_fly_192x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res152_fly_192x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/fly.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/fly_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalFlyDataset', ann_file=f'{data_root}/annotations/fly_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalFlyDataset', ann_file=f'{data_root}/annotations/fly_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res50_fly_192x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res50_fly_192x192.py index 724683972d..e1b681040c 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res50_fly_192x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/fly/res50_fly_192x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/fly.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/fly_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalFlyDataset', ann_file=f'{data_root}/annotations/fly_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalFlyDataset', ann_file=f'{data_root}/annotations/fly_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split1.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split1.py index 3dbde93f9b..dc0e1dbbbe 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split1.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split1.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split2.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split2.py index fdca57788b..936afd64a2 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split2.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split2.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split3.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split3.py index f798c686a2..66b5ee7245 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split3.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w32_horse10_256x256-split3.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split1.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split1.py index 8f2490169b..3c1c6b1a89 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split1.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split1.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split2.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split2.py index a97a524e63..60de123ecc 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split2.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split2.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split3.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split3.py index 47b5342f5b..f9b4f47600 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split3.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/hrnet_w48_horse10_256x256-split3.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split1.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split1.py index 41731b9141..eb50cce3d4 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split1.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split1.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split2.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split2.py index 6b2bb2e28c..ebc810ca18 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split2.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split2.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split3.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split3.py index bb717c2a4a..aa58699097 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split3.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res101_horse10_256x256-split3.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split1.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split1.py index d96291d2f6..4000f0fe28 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split1.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split1.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split2.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split2.py index a9cee84076..5cec7d9a96 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split2.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split2.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split3.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split3.py index 0dd4790a0a..4904f97af0 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split3.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res152_horse10_256x256-split3.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split1.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split1.py index 5a6c6cb071..46e8c961eb 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split1.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split1.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split1.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split2.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split2.py index 633e2aea5e..a0984bc3ae 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split2.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split2.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split2.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split3.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split3.py index 8e8d3a301d..d12e031540 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split3.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/horse10/res50_horse10_256x256-split3.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/horse10.py'] log_level = 'INFO' load_from = None resume_from = None @@ -116,17 +117,20 @@ ann_file=f'{data_root}/annotations/horse10-train-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalHorse10Dataset', ann_file=f'{data_root}/annotations/horse10-test-split3.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res101_locust_160x160.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res101_locust_160x160.py index dfcc84a849..c6678451fb 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res101_locust_160x160.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res101_locust_160x160.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/locust.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/locust_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalLocustDataset', ann_file=f'{data_root}/annotations/locust_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalLocustDataset', ann_file=f'{data_root}/annotations/locust_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res152_locust_160x160.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res152_locust_160x160.py index 852b851e0a..72b55a5c69 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res152_locust_160x160.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res152_locust_160x160.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/locust.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/locust_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalLocustDataset', ann_file=f'{data_root}/annotations/locust_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalLocustDataset', ann_file=f'{data_root}/annotations/locust_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res50_locust_160x160.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res50_locust_160x160.py index cd74849458..0cccd07d2d 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res50_locust_160x160.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/locust/res50_locust_160x160.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/locust.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/locust_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalLocustDataset', ann_file=f'{data_root}/annotations/locust_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalLocustDataset', ann_file=f'{data_root}/annotations/locust_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w32_macaque_256x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w32_macaque_256x192.py index d65572eb19..ac0c548526 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w32_macaque_256x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w32_macaque_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/macaque.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,17 +156,20 @@ ann_file=f'{data_root}/annotations/macaque_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w48_macaque_256x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w48_macaque_256x192.py index 8800f10163..7f2ba1266a 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w48_macaque_256x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/hrnet_w48_macaque_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/macaque.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,17 +156,20 @@ ann_file=f'{data_root}/annotations/macaque_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res101_macaque_256x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res101_macaque_256x192.py index e9df523a28..e31f0f11cc 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res101_macaque_256x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res101_macaque_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/macaque.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/macaque_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res152_macaque_256x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res152_macaque_256x192.py index c9ce25d548..568892acd9 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res152_macaque_256x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res152_macaque_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/macaque.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/macaque_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res50_macaque_256x192.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res50_macaque_256x192.py index 7d44d88b0e..fb000dc9d8 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res50_macaque_256x192.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/macaque/res50_macaque_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/macaque.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/macaque_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalMacaqueDataset', ann_file=f'{data_root}/annotations/macaque_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res101_zebra_160x160.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res101_zebra_160x160.py index fff21925c1..6944c5b714 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res101_zebra_160x160.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res101_zebra_160x160.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/zebra.py'] log_level = 'INFO' load_from = None resume_from = None @@ -107,17 +108,20 @@ ann_file=f'{data_root}/annotations/zebra_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalZebraDataset', ann_file=f'{data_root}/annotations/zebra_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalZebraDataset', ann_file=f'{data_root}/annotations/zebra_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res152_zebra_160x160.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res152_zebra_160x160.py index 2d5d4d5dd7..52ae4c60af 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res152_zebra_160x160.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res152_zebra_160x160.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/zebra.py'] log_level = 'INFO' load_from = None resume_from = None @@ -107,17 +108,20 @@ ann_file=f'{data_root}/annotations/zebra_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalZebraDataset', ann_file=f'{data_root}/annotations/zebra_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalZebraDataset', ann_file=f'{data_root}/annotations/zebra_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res50_zebra_160x160.py b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res50_zebra_160x160.py index fed6b690de..732de055eb 100644 --- a/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res50_zebra_160x160.py +++ b/configs/animal/2d_kpt_sview_rgb_img/topdown_heatmap/zebra/res50_zebra_160x160.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/zebra.py'] log_level = 'INFO' load_from = None resume_from = None @@ -107,17 +108,20 @@ ann_file=f'{data_root}/annotations/zebra_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='AnimalZebraDataset', ann_file=f'{data_root}/annotations/zebra_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='AnimalZebraDataset', ann_file=f'{data_root}/annotations/zebra_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512.py index 495ae9bff1..1f2bfcb0b1 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,19 +182,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512_udp.py index 1895793f28..d49ae78e05 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/higherhrnet_w32_aic_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -185,19 +186,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/hrnet_w32_aic_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/hrnet_w32_aic_512x512.py index e6b10f09f6..90d000c023 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/hrnet_w32_aic_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/aic/hrnet_w32_aic_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,19 +178,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py index 2b01151dab..f980017874 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512_udp.py index 56913e99cc..908ea59cac 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -185,17 +186,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640.py index 2bb702b6fe..401cf8dfbc 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640_udp.py index 705d4cb923..75f03fc8f4 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w32_coco_640x640_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -185,17 +186,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512.py index b366d0b665..72d94c420d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512_udp.py index dddfbf606f..80c594a27d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/higherhrnet_w48_coco_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -185,17 +186,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py index d259216291..ba4b42424d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512_udp.py index 485bd0ebab..c0644da9ba 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640.py index c73863d80c..73f93c6cd9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640_udp.py index e7e141f6ff..7ed66bd805 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w32_coco_640x640_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512.py index 829e06e4e6..783473c20e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512_udp.py index fe0785f228..abeefb5337 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640.py index c63c7eb01d..4948c255ac 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640_udp.py index d288440396..41833162b1 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/hrnet_w48_coco_640x640_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/mobilenetv2_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/mobilenetv2_coco_512x512.py index 43459dbe8f..5958849ab5 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/mobilenetv2_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/mobilenetv2_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_512x512.py index b3be170515..956fe0beb9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_640x640.py index e71e834a42..9f18f155ef 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res101_coco_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_512x512.py index 285e4afbcc..319f6981f7 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_640x640.py index 7f4c73ba71..81223b3345 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res152_coco_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_512x512.py index 2694f17b9a..b3cd17510d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_640x640.py index 1f257ee7a8..ae85c95e40 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/coco/res50_coco_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512.py index 2c8240f112..0088725dab 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -180,17 +181,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512_udp.py index d3a852f5cc..9ac5220b00 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -184,17 +185,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640.py index be9c334c9b..2f96442298 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -180,17 +181,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640_udp.py index 3b998de93e..985ab8db1e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w32_crowdpose_640x640_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -184,17 +185,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512.py index 0db9210ce3..efbb279f25 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -180,17 +181,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512_udp.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512_udp.py index 14621b354e..5934bb4dda 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/higherhrnet_w48_crowdpose_512x512_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -184,17 +185,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/mobilenetv2_crowdpose_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/mobilenetv2_crowdpose_512x512.py index a4bb482483..b1630dbb5b 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/mobilenetv2_crowdpose_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/mobilenetv2_crowdpose_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -145,17 +146,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res101_crowdpose_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res101_crowdpose_512x512.py index 11876dd46d..1ce0a0b4b1 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res101_crowdpose_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res101_crowdpose_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -145,17 +146,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res152_crowdpose_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res152_crowdpose_512x512.py index db131088f9..ab969959eb 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res152_crowdpose_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res152_crowdpose_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -145,17 +146,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res50_crowdpose_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res50_crowdpose_512x512.py index 632880f134..375f6c05f3 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res50_crowdpose_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/crowdpose/res50_crowdpose_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -146,17 +147,20 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/mhp/hrnet_w48_mhp_512x512.py b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/mhp/hrnet_w48_mhp_512x512.py index 0775a91ec2..dc880d198e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/associative_embedding/mhp/hrnet_w48_mhp_512x512.py +++ b/configs/body/2d_kpt_sview_rgb_img/associative_embedding/mhp/hrnet_w48_mhp_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mhp.py'] log_level = 'INFO' load_from = None resume_from = None @@ -175,17 +176,20 @@ ann_file=f'{data_root}/annotations/mhp_train.json', img_prefix=f'{data_root}/train/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpMhpDataset', ann_file=f'{data_root}/annotations/mhp_val.json', img_prefix=f'{data_root}/val/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpMhpDataset', ann_file=f'{data_root}/annotations/mhp_val.json', img_prefix=f'{data_root}/val/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res101_coco_256x192.py index 00d9cb5f1e..74ce8cd1ec 100644 --- a/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -122,17 +123,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res152_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res152_coco_256x192.py index 7880391a84..18c88eb1f5 100644 --- a/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res152_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res152_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -122,17 +123,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res50_coco_256x192.py index 2d2b20fa49..8bbb1b87a4 100644 --- a/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/deeppose/coco/res50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -122,17 +123,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res101_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res101_mpii_256x256.py index 5aeb513207..4e548395e3 100644 --- a/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res101_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res101_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -103,17 +104,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res152_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res152_mpii_256x256.py index aa023a15f8..224061f54e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res152_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res152_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -103,17 +104,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res50_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res50_mpii_256x256.py index 2408235a2e..991007b3cb 100644 --- a/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res50_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/deeppose/mpii/res50_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -103,17 +104,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_256x192.py index cb20a4efc3..9e4ce8dcc8 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,19 +156,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_384x288.py index 750bb389d2..5740c5b21c 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w32_aic_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,19 +156,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_256x192.py index fa2b96127f..f85a975698 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,19 +156,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_384x288.py index e88fc95422..75e0ea5529 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/hrnet_w48_aic_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,19 +157,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_256x192.py index 05bbc69d00..093fa6a069 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,19 +125,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_384x288.py index 5294323e7c..738d2ab9d4 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res101_aic_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,19 +125,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_256x192.py index cfc5d1fdc6..477281851a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,19 +125,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_384x288.py index 66e1d3bfc3..a3e6bdf80c 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res152_aic_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,19 +125,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_256x192.py index 353c91904a..97b9e53c44 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,19 +124,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_384x288.py index 0933e2ecf2..14c31d7e5d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/aic/res50_aic_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aic.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,19 +125,22 @@ img_prefix=f'{data_root}/ai_challenger_keypoint_train_20170902/' 'keypoint_train_images_20170902/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownAicDataset', ann_file=f'{data_root}/annotations/aic_val.json', img_prefix=f'{data_root}/ai_challenger_keypoint_validation_20170911/' 'keypoint_validation_images_20170911/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xmspn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xmspn50_coco_256x192.py index 42be93d654..35a1f1f230 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xmspn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xmspn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -148,17 +149,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xrsn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xrsn50_coco_256x192.py index 3840fb4525..3ad4fbc682 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xrsn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/2xrsn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -148,17 +149,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xmspn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xmspn50_coco_256x192.py index fa630c4aff..477e83b839 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xmspn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xmspn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -148,17 +149,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xrsn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xrsn50_coco_256x192.py index e48fd6649d..ece37e5c38 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xrsn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/3xrsn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -148,17 +149,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/4xmspn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/4xmspn50_coco_256x192.py index 9e140ec6f9..fc3845d026 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/4xmspn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/4xmspn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -148,17 +149,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/alexnet_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/alexnet_coco_256x192.py index f5f29b58fb..4583c5fb80 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/alexnet_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/alexnet_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_256x192.py index 3c017b3bce..6b6625d176 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -133,17 +134,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_384x288.py index 6646589a82..060fdc1a50 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/cpm_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -133,17 +134,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_256x256.py index e840c519bc..23797d6c57 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -131,17 +132,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_384x384.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_384x384.py index cc698edac5..c0d785f976 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_384x384.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hourglass52_coco_384x384.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -131,17 +132,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192.py index 54e1dba6aa..cacab60c63 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_coarsedropout.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_coarsedropout.py index e8eccd9105..e1a2c144be 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_coarsedropout.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_coarsedropout.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -169,17 +170,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_dark.py index 21cc4612a5..c103a53657 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_gridmask.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_gridmask.py index abb3045786..15ae12132d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_gridmask.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_gridmask.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -166,17 +167,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_photometric.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_photometric.py index 8d4f77dc89..162f26ec11 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_photometric.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_photometric.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -157,17 +158,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp.py index f1f20fa902..fd6d5fa65a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -163,17 +164,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp_regress.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp_regress.py index 71221ddbdf..42bf724cbd 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp_regress.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_256x192_udp_regress.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -161,17 +162,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288.py index 3e3466a11d..0236490a52 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_dark.py index 9ca633d1ad..22a45a867c 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_udp.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_udp.py index bf5fcd97b0..42db24e630 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w32_coco_384x288_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -163,17 +164,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192.py index bf6cd4aa85..39ef9bb702 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_dark.py index b6a1854b88..25c76fc0fe 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_udp.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_udp.py index 180776bf1b..29ae6aa325 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -163,17 +164,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288.py index 6ab94b8f1c..ebb3451e2b 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_dark.py index ec4b758c9f..43b90fc939 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -156,17 +157,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_udp.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_udp.py index d67741353c..acf41acbab 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_384x288_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -163,17 +164,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_256x192.py index c76a6578aa..0acd50567e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_384x288.py index 90336d75e9..b7b54f086f 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mobilenetv2_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mspn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mspn50_coco_256x192.py index 841618de1a..b51bc38e2b 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mspn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/mspn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192.py index 46bf2198d9..42a799216f 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192_dark.py index 739232bee5..b882e64840 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288.py index 5d243bb88f..c5e9724440 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288_dark.py index afc355dabc..58e5764ad1 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res101_coco_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192.py index 92e82d85fc..53f5101b97 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192_dark.py index 1c8dbfdc51..730d4bf732 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288.py index 85db57c707..9bb930b564 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288_dark.py index f346f1395e..471e33b482 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res152_coco_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192.py index 0ae10d05b0..15335311f0 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192_dark.py index 8c70a76ebb..c9f8591fdd 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288.py index ec6e566f69..70cf289858 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288_dark.py index 5c64580f92..8a5462fc74 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/res50_coco_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_256x192.py index 08d811a9f4..2dcff4170a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_384x288.py index 143a2301fb..ce3713481b 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest101_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_256x192.py index 39d33149d3..c225058bb9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_384x288.py index 0c730a42b4..7d98e86898 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest200_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_256x192.py index c123ecbc8a..d46129eb56 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_384x288.py index 15bac1c580..5ad475496d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest269_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_256x192.py index 3cd1c8163b..19a82d6601 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_384x288.py index a7d44c8222..33f04c7037 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnest50_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_256x192.py index 4478981920..910250c30f 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_384x288.py index 2e7e872b3c..292eda3aa2 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d101_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_256x192.py index 4ae859db2d..2e1b538f15 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_384x288.py index 3c1073bb91..f18e27c217 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d152_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_256x192.py index 10f1aad7e0..2015e8df09 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_384x288.py index cec2cac363..f7e3f9bb9a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnetv1d50_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_256x192.py index 4e528e8db5..9e4cb2b1e9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_384x288.py index ec9c4c8f5c..ffcb2856dd 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext101_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_256x192.py index ce3751e91a..0ddbfc784d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_384x288.py index 1a886218d4..b98a26b80e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext152_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_256x192.py index aecd48c248..27dd7e7a4a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_384x288.py index 8c0b0e3ffc..679311e455 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/resnext50_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn18_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn18_coco_256x192.py index dcee242dc2..c63cd97671 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn18_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn18_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn50_coco_256x192.py index eafab7b376..3b44dc9068 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/rsn50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_256x192.py index f7cbc95705..4f68a1da9b 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_384x288.py index bc1f590f1d..7026054367 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet101_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -126,17 +127,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_256x192.py index a5b8d65e2c..562e1b823d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -126,17 +127,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_384x288.py index 6839a6cd7e..094d0e1cf0 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/scnet50_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,17 +125,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_256x192.py index bd610c29ff..8be35283bd 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_384x288.py index de42daf522..874cd6ad04 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet101_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_256x192.py index 279757c366..e8d3d46e2d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_384x288.py index ea8f5df338..47e2e51e6a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet152_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_256x192.py index c517cc4332..61174e8f95 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_384x288.py index c49bce448d..408749f810 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/seresnet50_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_256x192.py index f7f99f1596..cb54862d54 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_384x288.py index 61ff286e1e..dd68c3e60e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv1_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_256x192.py index 383c6da29b..fbcccbb00a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_384x288.py index ece0900376..c38b3b5a8a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/shufflenetv2_coco_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/vgg16_bn_coco_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/vgg16_bn_coco_256x192.py index 9be176dc15..0fdfccc89d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/vgg16_bn_coco_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/vgg16_bn_coco_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,17 +126,20 @@ ann_file=f'{data_root}/annotations/person_keypoints_train2017.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoDataset', ann_file=f'{data_root}/annotations/person_keypoints_val2017.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_256x192.py index 8eed97e06c..b22b2f2aac 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,13 +156,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_384x288.py index 5584a15b7a..be4bffb78d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w32_crowdpose_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,13 +156,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_256x192.py index d07b6f5342..154dac8c34 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,13 +156,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_384x288.py index a1f15ba3e1..3e840fdc87 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/hrnet_w48_crowdpose_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,13 +156,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_256x192.py index ee99364430..3a24fd8ba9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_320x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_320x256.py index 0562d89fd7..0fb7a83884 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_320x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_320x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_384x288.py index cb78fcf24b..6632ef85f5 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res101_crowdpose_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_256x192.py index 433981b681..7be11894ec 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_384x288.py index 7e9e14b8cf..44a5db23c7 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res152_crowdpose_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_256x192.py index de941ad63c..d1674aa3b9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_384x288.py index 4c2ca5c3d9..50fbc32f37 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/crowdpose/res50_crowdpose_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/crowdpose.py'] log_level = 'INFO' load_from = None resume_from = None @@ -124,13 +125,15 @@ ann_file=f'{data_root}/annotations/mmpose_crowdpose_trainval.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCrowdPoseDataset', ann_file=f'{data_root}/annotations/mmpose_crowdpose_test.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w32_h36m_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w32_h36m_256x256.py index 0f4e32be89..70ab83039e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w32_h36m_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w32_h36m_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotation_body2d/h36m_coco_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownH36MDataset', ann_file=f'{data_root}/annotation_body2d/h36m_coco_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownH36MDataset', ann_file=f'{data_root}/annotation_body2d/h36m_coco_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w48_h36m_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w48_h36m_256x256.py index a7c333722e..76f09ece1a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w48_h36m_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/h36m/hrnet_w48_h36m_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotation_body2d/h36m_coco_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownH36MDataset', ann_file=f'{data_root}/annotation_body2d/h36m_coco_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownH36MDataset', ann_file=f'{data_root}/annotation_body2d/h36m_coco_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub1_368x368.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub1_368x368.py index 50c69c28b4..1df25d3acc 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub1_368x368.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub1_368x368.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/cpm/cpm_mpii_368x368-116e62b8_20200822.pth' # noqa: E501 resume_from = None @@ -128,17 +129,20 @@ ann_file=f'{data_root}/annotations/Sub1_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub1_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub1_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub2_368x368.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub2_368x368.py index c56b582883..46056ca69a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub2_368x368.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub2_368x368.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/cpm/cpm_mpii_368x368-116e62b8_20200822.pth' # noqa: E501 resume_from = None @@ -128,17 +129,20 @@ ann_file=f'{data_root}/annotations/Sub2_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub2_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub2_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub3_368x368.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub3_368x368.py index 2ef2f3484f..b966816c86 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub3_368x368.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/cpm_jhmdb_sub3_368x368.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/cpm/cpm_mpii_368x368-116e62b8_20200822.pth' # noqa: E501 resume_from = None @@ -128,17 +129,20 @@ ann_file=f'{data_root}/annotations/Sub3_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub3_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub3_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub1_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub1_256x256.py index 5e2da1283e..306b322a55 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub1_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub1_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/Sub1_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub1_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub1_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub2_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub2_256x256.py index 6a8e2e3ca9..ee7510eb95 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub2_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub2_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/Sub2_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub2_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub2_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub3_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub3_256x256.py index 3c67b83a90..21a41a7c18 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub3_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_2deconv_jhmdb_sub3_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/Sub3_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub3_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub3_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub1_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub1_256x256.py index fce9c42a2b..e193790728 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub1_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub1_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None @@ -120,17 +121,20 @@ ann_file=f'{data_root}/annotations/Sub1_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub1_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub1_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub2_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub2_256x256.py index f44b3b113b..9530a6c8b2 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub2_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub2_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None @@ -120,17 +121,20 @@ ann_file=f'{data_root}/annotations/Sub2_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub2_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub2_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub3_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub3_256x256.py index 3564635c4e..cdef4c576e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub3_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/jhmdb/res50_jhmdb_sub3_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/jhmdb.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_mpii_256x256-418ffc88_20200812.pth' # noqa: E501 resume_from = None @@ -120,17 +121,20 @@ ann_file=f'{data_root}/annotations/Sub3_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub3_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownJhmdbDataset', ann_file=f'{data_root}/annotations/Sub3_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mhp/res50_mhp_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mhp/res50_mhp_256x192.py index efee344b0c..6eb2d6f78d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mhp/res50_mhp_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mhp/res50_mhp_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mhp.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/mhp_train.json', img_prefix=f'{data_root}/train/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMhpDataset', ann_file=f'{data_root}/annotations/mhp_val.json', img_prefix=f'{data_root}/val/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMhpDataset', ann_file=f'{data_root}/annotations/mhp_val.json', img_prefix=f'{data_root}/val/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/cpm_mpii_368x368.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/cpm_mpii_368x368.py index 0997cffa6a..eac8aef24a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/cpm_mpii_368x368.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/cpm_mpii_368x368.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -115,17 +116,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_256x256.py index 956c75c1c7..9ba4eaf773 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -112,17 +113,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_384x384.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_384x384.py index 400074da90..9dee55f044 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_384x384.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hourglass52_mpii_384x384.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -112,17 +113,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256.py index a58a3d5814..bca6157c8e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -137,17 +138,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_dark.py index 9d7bd6082a..50091c6916 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -137,17 +138,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_udp.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_udp.py index 27560113eb..d7432d41e3 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w32_mpii_256x256_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -144,17 +145,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256.py index 9529bc77a6..8d517d2f61 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -137,17 +138,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_dark.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_dark.py index 4f87f56d32..d84814e6f7 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_dark.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -137,17 +138,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_udp.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_udp.py index b66aa84a2a..e247fdd94c 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_udp.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/hrnet_w48_mpii_256x256_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -144,17 +145,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/mobilenetv2_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/mobilenetv2_mpii_256x256.py index d26de07847..779de11501 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/mobilenetv2_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/mobilenetv2_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res101_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res101_mpii_256x256.py index cd9b659b82..785afbbc74 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res101_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res101_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res152_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res152_mpii_256x256.py index 06ea3e0e55..d2a32eb8c2 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res152_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res152_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res50_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res50_mpii_256x256.py index 0d06451ecb..ca6b75b48a 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res50_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/res50_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d101_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d101_mpii_256x256.py index dfcd54cd81..8bf6fd67c5 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d101_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d101_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d152_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d152_mpii_256x256.py index c0e43d7468..057ab405f6 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d152_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d152_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d50_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d50_mpii_256x256.py index 6b2cda721d..ce89f62370 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d50_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnetv1d50_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext101_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext101_mpii_256x256.py index 48bf9d052b..15d3783f09 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext101_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext101_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext152_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext152_mpii_256x256.py index 2f2324dc3a..69edada2f9 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext152_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext152_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext50_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext50_mpii_256x256.py index 7a845bc981..d4be2765b6 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext50_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/resnext50_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet101_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet101_mpii_256x256.py index 7ddb304425..0a2cdd0071 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet101_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet101_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -107,17 +108,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet50_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet50_mpii_256x256.py index e3506681d7..87d80a1bd7 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet50_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/scnet50_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -107,17 +108,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet101_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet101_mpii_256x256.py index a56bd28f23..d4f0573925 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet101_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet101_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet152_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet152_mpii_256x256.py index 41aca92d7f..88230f9702 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet152_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet152_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet50_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet50_mpii_256x256.py index 4589e119a3..e45f3c868f 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet50_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/seresnet50_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv1_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv1_mpii_256x256.py index 646431eb03..fe7bd0967e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv1_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv1_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv2_mpii_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv2_mpii_256x256.py index fa389f3e19..f4bd40976d 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv2_mpii_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii/shufflenetv2_mpii_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,17 +107,20 @@ ann_file=f'{data_root}/annotations/mpii_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiDataset', ann_file=f'{data_root}/annotations/mpii_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res101_mpii_trb_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res101_mpii_trb_256x256.py index 4ef306ab50..c1a6347b9e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res101_mpii_trb_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res101_mpii_trb_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii_trb.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,13 +107,15 @@ ann_file=f'{data_root}/annotations/mpii_trb_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiTrbDataset', ann_file=f'{data_root}/annotations/mpii_trb_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiTrbDataset', ann_file=f'{data_root}/annotations/mpii_trb_val.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res152_mpii_trb_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res152_mpii_trb_256x256.py index 215dcbdf01..4512aa8556 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res152_mpii_trb_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res152_mpii_trb_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii_trb.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,13 +107,15 @@ ann_file=f'{data_root}/annotations/mpii_trb_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiTrbDataset', ann_file=f'{data_root}/annotations/mpii_trb_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiTrbDataset', ann_file=f'{data_root}/annotations/mpii_trb_val.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res50_mpii_trb_256x256.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res50_mpii_trb_256x256.py index 3eb5d55635..ff5748f960 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res50_mpii_trb_256x256.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/mpii_trb/res50_mpii_trb_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/mpii_trb.py'] log_level = 'INFO' load_from = None resume_from = None @@ -106,13 +107,15 @@ ann_file=f'{data_root}/annotations/mpii_trb_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownMpiiTrbDataset', ann_file=f'{data_root}/annotations/mpii_trb_val.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownMpiiTrbDataset', ann_file=f'{data_root}/annotations/mpii_trb_val.json', diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_256x192.py index 0b414dca51..3a9b664d4e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/ochuman.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,19 +126,22 @@ ann_file='data/coco/annotations/person_keypoints_train2017.json', img_prefix='data/coco//train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_val_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_test_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_384x288.py index bd0026b81f..0ba576e9f6 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res101_ochuman_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/ochuman.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,19 +126,22 @@ ann_file='data/coco/annotations/person_keypoints_train2017.json', img_prefix='data/coco//train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_val_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_test_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_256x192.py index a2c36552f8..a42895c1fd 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/ochuman.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,19 +126,22 @@ ann_file='data/coco/annotations/person_keypoints_train2017.json', img_prefix='data/coco//train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_val_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_test_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_384x288.py index 915767ff21..1ac546553e 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res152_ochuman_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/ochuman.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,19 +126,22 @@ ann_file='data/coco/annotations/person_keypoints_train2017.json', img_prefix='data/coco//train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_val_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_test_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_256x192.py index 317daf6069..eadae42911 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/ochuman.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,19 +126,22 @@ ann_file='data/coco/annotations/person_keypoints_train2017.json', img_prefix='data/coco//train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_val_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_test_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_384x288.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_384x288.py index 09169a3a9f..20abcec94c 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_384x288.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/ochuman/res50_ochuman_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/ochuman.py'] log_level = 'INFO' load_from = None resume_from = None @@ -125,19 +126,22 @@ ann_file='data/coco/annotations/person_keypoints_train2017.json', img_prefix='data/coco//train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_val_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownOCHumanDataset', ann_file=f'{data_root}/annotations/' 'ochuman_coco_format_test_range_0.00_1.00.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/hrnet_w32_posetrack18_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/hrnet_w32_posetrack18_256x192.py index 9a6e18187c..258c4d56dd 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/hrnet_w32_posetrack18_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/hrnet_w32_posetrack18_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/posetrack18.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_coco_256x192-c78dce93_20200708.pth' # noqa: E501 resume_from = None @@ -157,17 +158,20 @@ ann_file=f'{data_root}/annotations/posetrack18_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownPoseTrack18Dataset', ann_file=f'{data_root}/annotations/posetrack18_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownPoseTrack18Dataset', ann_file=f'{data_root}/annotations/posetrack18_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/res50_posetrack18_256x192.py b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/res50_posetrack18_256x192.py index ae4a70a99b..2d048fbb12 100644 --- a/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/res50_posetrack18_256x192.py +++ b/configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/posetrack18/res50_posetrack18_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/posetrack18.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/resnet/res50_coco_256x192-ec54d7f3_20200709.pth' # noqa: E501 resume_from = None @@ -127,17 +128,20 @@ ann_file=f'{data_root}/annotations/posetrack18_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownPoseTrack18Dataset', ann_file=f'{data_root}/annotations/posetrack18_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownPoseTrack18Dataset', ann_file=f'{data_root}/annotations/posetrack18_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_img/pose_lift/h36m/simplebaseline3d_h36m.py b/configs/body/3d_kpt_sview_rgb_img/pose_lift/h36m/simplebaseline3d_h36m.py index 86be4a983a..6fbf7fb77c 100644 --- a/configs/body/3d_kpt_sview_rgb_img/pose_lift/h36m/simplebaseline3d_h36m.py +++ b/configs/body/3d_kpt_sview_rgb_img/pose_lift/h36m/simplebaseline3d_h36m.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -170,17 +171,20 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_1frame_fullconv_supervised_cpn_ft.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_1frame_fullconv_supervised_cpn_ft.py index 32ceefe1f5..5497ddedf2 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_1frame_fullconv_supervised_cpn_ft.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_1frame_fullconv_supervised_cpn_ft.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -141,17 +142,20 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=train_data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=test_data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=test_data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised.py index b55ce3ebc7..c3294db992 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -127,17 +128,20 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised_cpn_ft.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised_cpn_ft.py index 7c07669102..8fd8e7e2ec 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised_cpn_ft.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised_cpn_ft.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -141,17 +142,20 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=train_data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=test_data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=test_data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised.py index 0a666a3914..74d1389265 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -197,23 +198,27 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=labeled_data_cfg, - pipeline=train_labeled_pipeline), + pipeline=train_labeled_pipeline, + dataset_info={{_base_.dataset_info}}), unlabeled_dataset=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=unlabeled_data_cfg, - pipeline=train_unlabeled_pipeline)), + pipeline=train_unlabeled_pipeline, + dataset_info={{_base_.dataset_info}})), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=val_data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=test_data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised_cpn_ft.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised_cpn_ft.py index c22226d43a..6cafc7f459 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised_cpn_ft.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_semi-supervised_cpn_ft.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -203,23 +204,27 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=labeled_data_cfg, - pipeline=train_labeled_pipeline), + pipeline=train_labeled_pipeline, + dataset_info={{_base_.dataset_info}}), unlabeled_dataset=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=unlabeled_data_cfg, - pipeline=train_unlabeled_pipeline)), + pipeline=train_unlabeled_pipeline, + dataset_info={{_base_.dataset_info}})), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=val_data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=test_data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_supervised.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_supervised.py index 6e3e8f552d..152b5392fc 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_supervised.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_27frames_fullconv_supervised.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -127,17 +128,20 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_81frames_fullconv_supervised.py b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_81frames_fullconv_supervised.py index 17d028b32c..41e9be633f 100644 --- a/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_81frames_fullconv_supervised.py +++ b/configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_81frames_fullconv_supervised.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/h36m.py'] log_level = 'INFO' load_from = None resume_from = None @@ -127,17 +128,20 @@ ann_file=f'{data_root}/annotation_body3d/fps50/h36m_train.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Body3DH36MDataset', ann_file=f'{data_root}/annotation_body3d/fps50/h36m_test.npz', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=test_pipeline), + pipeline=test_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/body/3d_mesh_sview_rgb_img/hmr/mixed/res50_mixed_224x224.py b/configs/body/3d_mesh_sview_rgb_img/hmr/mixed/res50_mixed_224x224.py index 56f3e95aa5..d17f7d646c 100644 --- a/configs/body/3d_mesh_sview_rgb_img/hmr/mixed/res50_mixed_224x224.py +++ b/configs/body/3d_mesh_sview_rgb_img/hmr/mixed/res50_mixed_224x224.py @@ -144,7 +144,7 @@ ann_file='data/mesh_annotation_files/coco_2014_train.npz', img_prefix='data/coco', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline) ], partition=[0.35, 0.15, 0.1, 0.10, 0.10, 0.2]), adversarial_dataset=dict( diff --git a/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256.py index dbb26e1e84..6690798101 100644 --- a/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/wflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -105,17 +106,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_wflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256_wingloss.py b/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256_wingloss.py index 79ba642fa7..a966253c73 100644 --- a/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256_wingloss.py +++ b/configs/face/2d_kpt_sview_rgb_img/deeppose/wflw/res50_wflw_256x256_wingloss.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/wflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -105,17 +106,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_wflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256.py index 4f285627fa..6e8aa8bc42 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/300w.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_300w_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Face300WDataset', ann_file=f'{data_root}/annotations/face_landmarks_300w_valid.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Face300WDataset', ann_file=f'{data_root}/annotations/face_landmarks_300w_valid.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256_dark.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256_dark.py index 4caef7e4c4..083c7303b4 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256_dark.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/hrnetv2_w18_300w_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/300w.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_300w_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Face300WDataset', ann_file=f'{data_root}/annotations/face_landmarks_300w_valid.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Face300WDataset', ann_file=f'{data_root}/annotations/face_landmarks_300w_valid.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/res50_300w_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/res50_300w_256x256.py index e6f7aede35..a171fbb4ff 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/res50_300w_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/300w/res50_300w_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/300w.py'] log_level = 'INFO' load_from = None resume_from = None @@ -108,17 +109,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_300w_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Face300WDataset', ann_file=f'{data_root}/annotations/face_landmarks_300w_valid.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Face300WDataset', ann_file=f'{data_root}/annotations/face_landmarks_300w_valid.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256.py index 3734178e76..4a6df40b0c 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_aflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceAFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_aflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceAFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_aflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256_dark.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256_dark.py index eee4ec433f..284e3466ca 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256_dark.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/hrnetv2_w18_aflw_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_aflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceAFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_aflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceAFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_aflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/res50_aflw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/res50_aflw_256x256.py index bb974fbf82..e7917f73c9 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/res50_aflw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/aflw/res50_aflw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/aflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -108,17 +109,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_aflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceAFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_aflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceAFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_aflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256.py index 1601b8f163..1d34583ca3 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/cofw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/cofw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceCOFWDataset', ann_file=f'{data_root}/annotations/cofw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceCOFWDataset', ann_file=f'{data_root}/annotations/cofw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256_dark.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256_dark.py index 9d2cdce8d2..a6ddeead14 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256_dark.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/hrnetv2_w18_cofw_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/cofw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/cofw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceCOFWDataset', ann_file=f'{data_root}/annotations/cofw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceCOFWDataset', ann_file=f'{data_root}/annotations/cofw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/res50_cofw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/res50_cofw_256x256.py index 42b3fb43eb..de1c04d413 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/res50_cofw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/cofw/res50_cofw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/cofw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -108,17 +109,20 @@ ann_file=f'{data_root}/annotations/cofw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceCOFWDataset', ann_file=f'{data_root}/annotations/cofw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceCOFWDataset', ann_file=f'{data_root}/annotations/cofw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256.py index 71292fc148..3c415a80fc 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/wflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_wflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256_dark.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256_dark.py index 4cb7fd48aa..9a6991c5f1 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256_dark.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/hrnetv2_w18_wflw_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/wflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -142,17 +143,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_wflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/res50_wflw_256x256.py b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/res50_wflw_256x256.py index 067b5979a8..46d576cb6b 100644 --- a/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/res50_wflw_256x256.py +++ b/configs/face/2d_kpt_sview_rgb_img/topdown_heatmap/wflw/res50_wflw_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/wflw.py'] log_level = 'INFO' load_from = None resume_from = None @@ -108,17 +109,20 @@ ann_file=f'{data_root}/annotations/face_landmarks_wflw_train.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FaceWFLWDataset', ann_file=f'{data_root}/annotations/face_landmarks_wflw_test.json', img_prefix=f'{data_root}/images/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_full_256x192.py index 2c8fe53240..91de37272b 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -117,19 +118,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_lower_256x192.py index e8d3b1ced8..2011865803 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -117,19 +118,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_upper_256x192.py index bc31f8c4b0..587a39470e 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res101_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -117,19 +118,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_full_256x192.py index a2461fdd88..447b6b4da8 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -117,19 +118,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_lower_256x192.py index 689fea132f..6b1776d0e3 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -117,19 +118,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_upper_256x192.py index 0c29882462..a45a555929 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res152_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -117,19 +118,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_full_256x192.py index e623533bea..bc2d37fda7 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -121,19 +122,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_lower_256x192.py index 7cec1d2f26..cf04b9e2d4 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -121,19 +122,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_upper_256x192.py index 5cd37e7ca2..202af6a676 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/deeppose/deepfashion/res50_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -121,19 +122,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192.py index c4983d0c96..8dacb04bdd 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -151,19 +152,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192_udp.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192_udp.py index 0d436e2586..3a3563211d 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192_udp.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_full_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -158,19 +159,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192.py index 2a4fce0144..ed612c4b16 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -150,19 +151,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192_udp.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192_udp.py index 1e0d08a0f1..9834ab3727 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192_udp.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_lower_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -157,19 +158,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192.py index dcd8732dc6..5466112fc0 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -151,19 +152,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192_udp.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192_udp.py index fe706b5aa6..ba5464ad53 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192_udp.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w32_deepfashion_upper_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -158,19 +159,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192.py index 1a64d84f9e..5027a6120b 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -151,19 +152,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192_udp.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192_udp.py index 0adaa29301..0a30ac53bb 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192_udp.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_full_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -158,19 +159,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192.py index b136a5eb34..a61dcb3569 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -151,19 +152,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192_udp.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192_udp.py index a64e3ccc6c..92ca112efb 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192_udp.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_lower_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -158,19 +159,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192.py index 7038ac5836..caaaa6151a 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -151,19 +152,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192_udp.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192_udp.py index d3750655b8..14f4ce06fa 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192_udp.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/hrnet_w48_deepfashion_upper_256x192_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -158,19 +159,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_full_256x192.py index 306f9de239..cccf4455c0 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_lower_256x192.py index 35cd8f0888..64570f636d 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_upper_256x192.py index cef5afba07..b5de3bde3a 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res101_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_full_256x192.py index 0ed65aea09..af47f0c894 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_lower_256x192.py index 5b8e1f0f45..9a648ac41c 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_upper_256x192.py index be94c7bcd8..82ac1b9f29 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res152_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_full_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_full_256x192.py index 4bba927a2f..d8ad5bdf92 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_full_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_full_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_full.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_val.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_full_test.json', img_prefix=f'{data_root}/img/', subset='full', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_lower_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_lower_256x192.py index 0b0d633f53..699d32d70e 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_lower_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_lower_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_lower.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_val.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_lower_test.json', img_prefix=f'{data_root}/img/', subset='lower', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_upper_256x192.py b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_upper_256x192.py index e6d71d3172..1cf0291468 100644 --- a/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_upper_256x192.py +++ b/configs/fashion/2d_kpt_sview_rgb_img/topdown_heatmap/deepfashion/res50_deepfashion_upper_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/deepfashion_upper.py'] log_level = 'INFO' load_from = None resume_from = None @@ -120,19 +121,22 @@ img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_val.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='DeepFashionDataset', ann_file=f'{data_root}/annotations/fld_upper_test.json', img_prefix=f'{data_root}/img/', subset='upper', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/deeppose/onehand10k/res50_onehand10k_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/deeppose/onehand10k/res50_onehand10k_256x256.py index 8b6c446c05..05bb789d1b 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/deeppose/onehand10k/res50_onehand10k_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/deeppose/onehand10k/res50_onehand10k_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/onehand10k.py'] log_level = 'INFO' load_from = None resume_from = None @@ -114,17 +115,20 @@ ann_file=f'{data_root}/annotations/onehand10k_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/deeppose/panoptic2d/res50_panoptic2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/deeppose/panoptic2d/res50_panoptic2d_256x256.py index d0684ff757..03d49a91a9 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/deeppose/panoptic2d/res50_panoptic2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/deeppose/panoptic2d/res50_panoptic2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/panoptic_hand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -114,17 +115,20 @@ ann_file=f'{data_root}/annotations/panoptic_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/deeppose/rhd2d/res50_rhd2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/deeppose/rhd2d/res50_rhd2d_256x256.py index d092c5daad..a5a69ba8c4 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/deeppose/rhd2d/res50_rhd2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/deeppose/rhd2d/res50_rhd2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -114,17 +115,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/freihand2d/res50_freihand2d_224x224.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/freihand2d/res50_freihand2d_224x224.py index afaa328541..9b67055be5 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/freihand2d/res50_freihand2d_224x224.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/freihand2d/res50_freihand2d_224x224.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/freihand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/freihand_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='FreiHandDataset', ann_file=f'{data_root}/annotations/freihand_val.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='FreiHandDataset', ann_file=f'{data_root}/annotations/freihand_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_all_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_all_256x256.py index ec9d687d8b..e1f2787b15 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_all_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_all_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/interhand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -118,7 +119,8 @@ 'InterHand2.6M_train_joint_3d.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='InterHand2DDataset', ann_file=f'{data_root}/annotations/machine_annot/' @@ -129,7 +131,8 @@ 'InterHand2.6M_val_joint_3d.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='InterHand2DDataset', ann_file=f'{data_root}/annotations/all/' @@ -140,5 +143,6 @@ 'InterHand2.6M_test_joint_3d.json', img_prefix=f'{data_root}/images/test/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_human_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_human_256x256.py index 51e485d541..fdd896bbd3 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_human_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_human_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/interhand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -118,7 +119,8 @@ 'InterHand2.6M_train_joint_3d.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='InterHand2DDataset', ann_file=f'{data_root}/annotations/machine_annot/' @@ -129,7 +131,8 @@ 'InterHand2.6M_val_joint_3d.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='InterHand2DDataset', ann_file=f'{data_root}/annotations/human_annot/' @@ -140,5 +143,6 @@ 'InterHand2.6M_test_joint_3d.json', img_prefix=f'{data_root}/images/test/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_machine_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_machine_256x256.py index 4514b63e21..ebdcddd375 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_machine_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/interhand2d/res50_interhand2d_machine_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/interhand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -118,7 +119,8 @@ 'InterHand2.6M_train_joint_3d.json', img_prefix=f'{data_root}/images/train/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='InterHand2DDataset', ann_file=f'{data_root}/annotations/machine_annot/' @@ -129,7 +131,8 @@ 'InterHand2.6M_val_joint_3d.json', img_prefix=f'{data_root}/images/val/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='InterHand2DDataset', ann_file=f'{data_root}/annotations/machine_annot/' @@ -140,5 +143,6 @@ 'InterHand2.6M_test_joint_3d.json', img_prefix=f'{data_root}/images/test/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256.py index 4f414a494c..034accd786 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/onehand10k.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/onehand10k_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_dark.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_dark.py index bb50553e05..9d9a14b5e2 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_dark.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/onehand10k.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/onehand10k_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_udp.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_udp.py index 00706e554d..56c3cc6782 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_udp.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/hrnetv2_w18_onehand10k_256x256_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/onehand10k.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/onehand10k_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/mobilenetv2_onehand10k_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/mobilenetv2_onehand10k_256x256.py index d61caea9b2..f33a0e16e0 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/mobilenetv2_onehand10k_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/mobilenetv2_onehand10k_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/onehand10k.py'] log_level = 'INFO' load_from = None resume_from = None @@ -114,17 +115,20 @@ ann_file=f'{data_root}/annotations/onehand10k_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/res50_onehand10k_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/res50_onehand10k_256x256.py index f5ac1203bb..0737d6cef3 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/res50_onehand10k_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/onehand10k/res50_onehand10k_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/onehand10k.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/onehand10k_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='OneHand10KDataset', ann_file=f'{data_root}/annotations/onehand10k_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256.py index b8e4b881d1..cc50a686e5 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/panoptic_hand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/panoptic_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_dark.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_dark.py index a4436ce350..547a67a2d9 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_dark.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/panoptic_hand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/panoptic_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_udp.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_udp.py index 90f72472a5..44ae3a5eb3 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_udp.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/hrnetv2_w18_panoptic2d_256x256_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/panoptic_hand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/panoptic_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/mobilenetv2_panoptic2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/mobilenetv2_panoptic2d_256x256.py index c9e5af89c2..915f3578ef 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/mobilenetv2_panoptic2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/mobilenetv2_panoptic2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/panoptic_hand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/panoptic_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/res50_panoptic2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/res50_panoptic2d_256x256.py index 12ec07d17c..65c1b27f77 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/res50_panoptic2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/panoptic2d/res50_panoptic2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/panoptic_hand2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/panoptic_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='PanopticDataset', ann_file=f'{data_root}/annotations/panoptic_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256.py index 12c1caf6c2..559fdfb1b0 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_dark.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_dark.py index 44691cf2bb..df9aba8d8f 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_dark.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -147,17 +148,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_udp.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_udp.py index 7eab109684..2f07afe087 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_udp.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/hrnetv2_w18_rhd2d_256x256_udp.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/mobilenetv2_rhd2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/mobilenetv2_rhd2d_256x256.py index 5c65f6fb06..5d8d1b8f34 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/mobilenetv2_rhd2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/mobilenetv2_rhd2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_224x224.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_224x224.py index 14e1a40f57..5ad64b93b5 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_224x224.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_224x224.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_256x256.py b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_256x256.py index cb4a0180b3..c8601f0ec1 100644 --- a/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_256x256.py +++ b/configs/hand/2d_kpt_sview_rgb_img/topdown_heatmap/rhd2d/res50_rhd2d_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/rhd2d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -113,17 +114,20 @@ ann_file=f'{data_root}/annotations/rhd_train.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='Rhd2DDataset', ann_file=f'{data_root}/annotations/rhd_test.json', img_prefix=f'{data_root}/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/hand/3d_kpt_sview_rgb_img/internet/interhand3d/res50_interhand3d_all_256x256.py b/configs/hand/3d_kpt_sview_rgb_img/internet/interhand3d/res50_interhand3d_all_256x256.py index 887ea88220..0b3f57af73 100644 --- a/configs/hand/3d_kpt_sview_rgb_img/internet/interhand3d/res50_interhand3d_all_256x256.py +++ b/configs/hand/3d_kpt_sview_rgb_img/internet/interhand3d/res50_interhand3d_all_256x256.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/interhand3d.py'] log_level = 'INFO' load_from = None resume_from = None @@ -149,7 +150,8 @@ data_cfg=data_cfg, use_gt_root_depth=True, rootnet_result_file=None, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='InterHand3DDataset', ann_file=f'{data_root}/annotations/machine_annot/' @@ -162,7 +164,8 @@ data_cfg=data_cfg, use_gt_root_depth=True, rootnet_result_file=None, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='InterHand3DDataset', ann_file=f'{data_root}/annotations/all/' @@ -175,5 +178,6 @@ data_cfg=data_cfg, use_gt_root_depth=True, rootnet_result_file=None, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_512x512.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_512x512.py index c21b984dfd..03fbd6e772 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_512x512.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_640x640.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_640x640.py index bd93518bbf..18efe463b1 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_640x640.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w32_coco_wholebody_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_512x512.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_512x512.py index ff9df849a5..f5d16e84bc 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_512x512.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_640x640.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_640x640.py index 5026e82764..2f758b5b36 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_640x640.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/higherhrnet_w48_coco_wholebody_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -181,17 +182,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_512x512.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_512x512.py index 7d78753481..79888ee8e9 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_512x512.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_640x640.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_640x640.py index 127017580c..8fc3e7ef97 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_640x640.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w32_coco_wholebody_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_512x512.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_512x512.py index c8554ba4f3..646eed201a 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_512x512.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_512x512.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_640x640.py b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_640x640.py index 74e47ff36d..68be5a3d39 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_640x640.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/associative_embedding/coco-wholebody/hrnet_w48_coco_wholebody_640x640.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -177,17 +178,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='BottomUpCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192.py index ecefef3dfb..2fb53d27c8 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192_dark.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192_dark.py index ff7ad63545..d684564ef8 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192_dark.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288.py index dc0f938c1f..2e26b540b0 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288_dark.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288_dark.py index 4e8b0d64f2..8dc37c1a57 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288_dark.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w32_coco_wholebody_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192.py index 096759cfc0..9422ad5f1f 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192_dark.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192_dark.py index 6d33cdb645..7a5df9f531 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192_dark.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_256x192_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288.py index c96d43e87e..7a32f4d18c 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -155,17 +156,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark.py index 27161cd8d5..04ad898f34 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -154,17 +155,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark_plus.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark_plus.py index 09311278ed..b5de961635 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark_plus.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/hrnet_w48_coco_wholebody_384x288_dark_plus.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = 'https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w48_coco_384x288_dark-741844ba_20200812.pth' # noqa: E501 resume_from = None @@ -153,17 +154,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_256x192.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_256x192.py index 99b161d1de..d62b402346 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_256x192.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_384x288.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_384x288.py index 11982eaf41..625fbe8b6e 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_384x288.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res101_coco_wholebody_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_256x192.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_256x192.py index 21a9d14769..1d1e3b4924 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_256x192.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_384x288.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_384x288.py index 7aeeb8aa9a..af07b1f580 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_384x288.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res152_coco_wholebody_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_256x192.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_256x192.py index d5bbcd04dd..6609984d7b 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_256x192.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_256x192.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_384x288.py b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_384x288.py index dfff72bd7e..fad985c203 100644 --- a/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_384x288.py +++ b/configs/wholebody/2d_kpt_sview_rgb_img/topdown_heatmap/coco-wholebody/res50_coco_wholebody_384x288.py @@ -1,3 +1,4 @@ +_base_ = ['../../../../_base_/datasets/coco_wholebody.py'] log_level = 'INFO' load_from = None resume_from = None @@ -123,17 +124,20 @@ ann_file=f'{data_root}/annotations/coco_wholebody_train_v1.0.json', img_prefix=f'{data_root}/train2017/', data_cfg=data_cfg, - pipeline=train_pipeline), + pipeline=train_pipeline, + dataset_info={{_base_.dataset_info}}), val=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), test=dict( type='TopDownCocoWholeBodyDataset', ann_file=f'{data_root}/annotations/coco_wholebody_val_v1.0.json', img_prefix=f'{data_root}/val2017/', data_cfg=data_cfg, - pipeline=val_pipeline), + pipeline=val_pipeline, + dataset_info={{_base_.dataset_info}}), ) diff --git a/demo/body3d_two_stage_img_demo.py b/demo/body3d_two_stage_img_demo.py index a035bf819c..d66ec8034b 100644 --- a/demo/body3d_two_stage_img_demo.py +++ b/demo/body3d_two_stage_img_demo.py @@ -1,6 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. import os import os.path as osp +import warnings from argparse import ArgumentParser import mmcv @@ -11,6 +12,7 @@ inference_top_down_pose_model, vis_3d_pose_result) from mmpose.apis.inference import init_pose_model from mmpose.core import SimpleCamera +from mmpose.datasets import DatasetInfo def _keypoint_camera_to_world(keypoints, @@ -161,6 +163,16 @@ def main(): 'model is supported for the 1st stage (2D pose detection)' dataset = pose_det_model.cfg.data['test']['type'] + dataset_info = pose_det_model.cfg.data['test'].get( + 'dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) + img_keys = list(coco.imgs.keys()) for i in mmcv.track_iter_progress(range(len(img_keys))): @@ -185,6 +197,7 @@ def main(): bbox_thr=None, format='xywh', dataset=dataset, + dataset_info=dataset_info, return_heatmap=False, outputs=None) @@ -204,6 +217,14 @@ def main(): '"PoseLifter" model is supported for the 2nd stage ' \ '(2D-to-3D lifting)' dataset = pose_lift_model.cfg.data['test']['type'] + dataset_info = pose_lift_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) camera_params = None if args.camera_param_file is not None: @@ -218,6 +239,7 @@ def main(): pose_lift_model, pose_results_2d=[pose_det_results], dataset=dataset, + dataset_info=dataset_info, with_track_id=False) image_name = pose_det_results[0]['image_name'] @@ -266,6 +288,7 @@ def main(): pose_lift_model, result=pose_lift_results_vis, img=image_name, + dataset_info=dataset_info, out_file=out_file) diff --git a/demo/bottom_up_img_demo.py b/demo/bottom_up_img_demo.py index 195ade4180..4ecb16d409 100644 --- a/demo/bottom_up_img_demo.py +++ b/demo/bottom_up_img_demo.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser from xtcocotools.coco import COCO from mmpose.apis import (inference_bottom_up_pose_model, init_pose_model, vis_pose_result) +from mmpose.datasets import DatasetInfo def main(): @@ -60,7 +62,15 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] - assert (dataset == 'BottomUpCocoDataset') + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + assert (dataset == 'BottomUpCocoDataset') + else: + dataset_info = DatasetInfo(dataset_info) img_keys = list(coco.imgs.keys()) @@ -80,6 +90,8 @@ def main(): pose_results, returned_outputs = inference_bottom_up_pose_model( pose_model, image_name, + dataset=dataset, + dataset_info=dataset_info, pose_nms_thr=args.pose_nms_thr, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -98,6 +110,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=args.show, out_file=out_file) diff --git a/demo/bottom_up_pose_tracking_demo.py b/demo/bottom_up_pose_tracking_demo.py index f9cdfb98bd..055ec67e61 100644 --- a/demo/bottom_up_pose_tracking_demo.py +++ b/demo/bottom_up_pose_tracking_demo.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 from mmpose.apis import (get_track_id, inference_bottom_up_pose_model, init_pose_model, vis_pose_tracking_result) +from mmpose.datasets import DatasetInfo def main(): @@ -61,7 +63,15 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] - assert (dataset == 'BottomUpCocoDataset') + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + assert (dataset == 'BottomUpCocoDataset') + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) fps = None @@ -100,6 +110,8 @@ def main(): pose_results, returned_outputs = inference_bottom_up_pose_model( pose_model, img, + dataset=dataset, + dataset_info=dataset_info, pose_nms_thr=args.pose_nms_thr, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -122,6 +134,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=False) diff --git a/demo/bottom_up_video_demo.py b/demo/bottom_up_video_demo.py index f877d2246a..392d95927e 100644 --- a/demo/bottom_up_video_demo.py +++ b/demo/bottom_up_video_demo.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 from mmpose.apis import (inference_bottom_up_pose_model, init_pose_model, vis_pose_result) +from mmpose.datasets import DatasetInfo def main(): @@ -53,7 +55,15 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] - assert (dataset == 'BottomUpCocoDataset') + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + assert (dataset == 'BottomUpCocoDataset') + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) @@ -87,6 +97,8 @@ def main(): pose_results, returned_outputs = inference_bottom_up_pose_model( pose_model, img, + dataset=dataset, + dataset_info=dataset_info, pose_nms_thr=args.pose_nms_thr, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -99,6 +111,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=False) diff --git a/demo/face_img_demo.py b/demo/face_img_demo.py index ff22a83ee6..e94eb08cdb 100644 --- a/demo/face_img_demo.py +++ b/demo/face_img_demo.py @@ -1,9 +1,11 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser from mmpose.apis import (inference_top_down_pose_model, init_pose_model, vis_pose_result) +from mmpose.datasets import DatasetInfo try: import face_recognition @@ -79,6 +81,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) image_name = os.path.join(args.img_root, args.img) @@ -102,6 +112,7 @@ def main(): bbox_thr=None, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -119,6 +130,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=args.show, out_file=out_file) diff --git a/demo/face_video_demo.py b/demo/face_video_demo.py index 543280196f..7135cc7ae9 100644 --- a/demo/face_video_demo.py +++ b/demo/face_video_demo.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 from mmpose.apis import (inference_top_down_pose_model, init_pose_model, vis_pose_result) +from mmpose.datasets import DatasetInfo try: import face_recognition @@ -78,6 +80,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) assert cap.isOpened(), f'Faild to load video file {args.video_path}' @@ -121,6 +131,7 @@ def main(): bbox_thr=None, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -132,6 +143,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=False) diff --git a/demo/top_down_img_demo.py b/demo/top_down_img_demo.py index 3aa87d96a2..da1697814f 100644 --- a/demo/top_down_img_demo.py +++ b/demo/top_down_img_demo.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser from xtcocotools.coco import COCO from mmpose.apis import (inference_top_down_pose_model, init_pose_model, vis_pose_result) +from mmpose.datasets import DatasetInfo def main(): @@ -58,6 +60,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) img_keys = list(coco.imgs.keys()) @@ -92,6 +102,7 @@ def main(): bbox_thr=None, format='xywh', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -106,6 +117,7 @@ def main(): image_name, pose_results, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, radius=args.radius, thickness=args.thickness, diff --git a/demo/top_down_img_demo_with_mmdet.py b/demo/top_down_img_demo_with_mmdet.py index 0ff74f8abf..227f44b2cf 100644 --- a/demo/top_down_img_demo_with_mmdet.py +++ b/demo/top_down_img_demo_with_mmdet.py @@ -1,9 +1,11 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser from mmpose.apis import (inference_top_down_pose_model, init_pose_model, process_mmdet_results, vis_pose_result) +from mmpose.datasets import DatasetInfo try: from mmdet.apis import inference_detector, init_detector @@ -76,6 +78,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) image_name = os.path.join(args.img_root, args.img) @@ -100,6 +110,7 @@ def main(): bbox_thr=args.bbox_thr, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -115,6 +126,7 @@ def main(): image_name, pose_results, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, radius=args.radius, thickness=args.thickness, diff --git a/demo/top_down_pose_tracking_demo_with_mmdet.py b/demo/top_down_pose_tracking_demo_with_mmdet.py index d2ff1c48a3..9bc2fab63b 100644 --- a/demo/top_down_pose_tracking_demo_with_mmdet.py +++ b/demo/top_down_pose_tracking_demo_with_mmdet.py @@ -1,5 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 @@ -7,6 +8,7 @@ from mmpose.apis import (get_track_id, inference_top_down_pose_model, init_pose_model, process_mmdet_results, vis_pose_tracking_result) +from mmpose.datasets import DatasetInfo try: from mmdet.apis import inference_detector, init_detector @@ -84,6 +86,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) fps = None @@ -134,6 +144,7 @@ def main(): bbox_thr=args.bbox_thr, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -155,6 +166,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=False) diff --git a/demo/top_down_pose_tracking_demo_with_mmtracking.py b/demo/top_down_pose_tracking_demo_with_mmtracking.py index c400f94f69..0a1b3f577f 100644 --- a/demo/top_down_pose_tracking_demo_with_mmtracking.py +++ b/demo/top_down_pose_tracking_demo_with_mmtracking.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 from mmpose.apis import (inference_top_down_pose_model, init_pose_model, vis_pose_tracking_result) +from mmpose.datasets import DatasetInfo try: from mmtrack.apis import inference_mot @@ -84,6 +86,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) assert cap.isOpened(), f'Faild to load video file {args.video_path}' @@ -130,6 +140,7 @@ def main(): bbox_thr=args.bbox_thr, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -141,6 +152,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=False) diff --git a/demo/top_down_video_demo_full_frame_without_det.py b/demo/top_down_video_demo_full_frame_without_det.py index ec60499e95..fdadbff14b 100644 --- a/demo/top_down_video_demo_full_frame_without_det.py +++ b/demo/top_down_video_demo_full_frame_without_det.py @@ -1,5 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 @@ -7,6 +8,7 @@ from mmpose.apis import (inference_top_down_pose_model, init_pose_model, vis_pose_result) +from mmpose.datasets import DatasetInfo def main(): @@ -51,6 +53,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) assert cap.isOpened(), f'Faild to load video file {args.video_path}' @@ -93,6 +103,7 @@ def main(): person_results, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -104,6 +115,7 @@ def main(): radius=args.radius, thickness=args.thickness, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, show=False) diff --git a/demo/top_down_video_demo_with_mmdet.py b/demo/top_down_video_demo_with_mmdet.py index ac1949b140..2491a36628 100644 --- a/demo/top_down_video_demo_with_mmdet.py +++ b/demo/top_down_video_demo_with_mmdet.py @@ -1,11 +1,13 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from argparse import ArgumentParser import cv2 from mmpose.apis import (inference_top_down_pose_model, init_pose_model, process_mmdet_results, vis_pose_result) +from mmpose.datasets import DatasetInfo try: from mmdet.apis import inference_detector, init_detector @@ -75,6 +77,14 @@ def main(): args.pose_config, args.pose_checkpoint, device=args.device.lower()) dataset = pose_model.cfg.data['test']['type'] + dataset_info = pose_model.cfg.data['test'].get('dataset_info', None) + if dataset_info is None: + warnings.warn( + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + else: + dataset_info = DatasetInfo(dataset_info) cap = cv2.VideoCapture(args.video_path) assert cap.isOpened(), f'Faild to load video file {args.video_path}' @@ -119,6 +129,7 @@ def main(): bbox_thr=args.bbox_thr, format='xyxy', dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap, outputs=output_layer_names) @@ -128,6 +139,7 @@ def main(): img, pose_results, dataset=dataset, + dataset_info=dataset_info, kpt_score_thr=args.kpt_thr, radius=args.radius, thickness=args.thickness, diff --git a/mmpose/apis/inference.py b/mmpose/apis/inference.py index f8a68d6f31..827087824a 100644 --- a/mmpose/apis/inference.py +++ b/mmpose/apis/inference.py @@ -1,5 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings import cv2 import mmcv @@ -146,7 +147,8 @@ def __call__(self, results): def _inference_single_pose_model(model, img_or_path, bboxes, - dataset, + dataset='TopDownCocoDataset', + dataset_info=None, return_heatmap=False): """Inference human bounding boxes. @@ -159,7 +161,8 @@ def _inference_single_pose_model(model, bboxes (list | np.ndarray): All bounding boxes (with scores), shaped (N, 4) or (N, 5). (left, top, width, height, [score]) where N is number of bounding boxes. - dataset (str): Dataset name. + dataset (str): Dataset name. Deprecated. + dataset_info (DatasetInfo): A class containing all dataset info. outputs (list[str] | tuple[str]): Names of layers whose output is to be returned, default: None @@ -179,94 +182,97 @@ def _inference_single_pose_model(model, assert len(bboxes[0]) in [4, 5] - flip_pairs = None - if dataset in ('TopDownCocoDataset', 'TopDownOCHumanDataset', - 'AnimalMacaqueDataset'): - flip_pairs = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], - [13, 14], [15, 16]] - elif dataset == 'TopDownCocoWholeBodyDataset': - body = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], - [15, 16]] - foot = [[17, 20], [18, 21], [19, 22]] - - face = [[23, 39], [24, 38], [25, 37], [26, 36], [27, 35], [28, 34], - [29, 33], [30, 32], [40, 49], [41, 48], [42, 47], [43, 46], - [44, 45], [54, 58], [55, 57], [59, 68], [60, 67], [61, 66], - [62, 65], [63, 70], [64, 69], [71, 77], [72, 76], [73, 75], - [78, 82], [79, 81], [83, 87], [84, 86], [88, 90]] - - hand = [[91, 112], [92, 113], [93, 114], [94, 115], [95, 116], - [96, 117], [97, 118], [98, 119], [99, 120], [100, 121], - [101, 122], [102, 123], [103, 124], [104, 125], [105, 126], - [106, 127], [107, 128], [108, 129], [109, 130], [110, 131], - [111, 132]] - flip_pairs = body + foot + face + hand - elif dataset == 'TopDownAicDataset': - flip_pairs = [[0, 3], [1, 4], [2, 5], [6, 9], [7, 10], [8, 11]] - elif dataset == 'TopDownMpiiDataset': - flip_pairs = [[0, 5], [1, 4], [2, 3], [10, 15], [11, 14], [12, 13]] - elif dataset == 'TopDownMpiiTrbDataset': - flip_pairs = [[0, 1], [2, 3], [4, 5], [6, 7], - [8, 9], [10, 11], [14, 15], [16, 22], [28, 34], [17, 23], - [29, 35], [18, 24], [30, 36], [19, 25], [31, - 37], [20, 26], - [32, 38], [21, 27], [33, 39]] - elif dataset == 'TopDownH36MDataset': - flip_pairs = [[1, 4], [2, 5], [3, 6], [11, 14], [12, 15], [13, 16]] - elif dataset in ('OneHand10KDataset', 'FreiHandDataset', 'PanopticDataset', - 'InterHand2DDataset'): - flip_pairs = [] - elif dataset in 'Face300WDataset': - flip_pairs = [[0, 16], [1, 15], [2, 14], [3, 13], [4, 12], [5, 11], - [6, 10], [7, 9], [17, 26], [18, 25], [19, 24], [20, 23], - [21, 22], [31, 35], [32, 34], [36, 45], [37, - 44], [38, 43], - [39, 42], [40, 47], [41, 46], [48, 54], [49, - 53], [50, 52], - [61, 63], [60, 64], [67, 65], [58, 56], [59, 55]] - - elif dataset in 'FaceAFLWDataset': - flip_pairs = [[0, 5], [1, 4], [2, 3], [6, 11], [7, 10], [8, 9], - [12, 14], [15, 17]] - - elif dataset in 'FaceCOFWDataset': - flip_pairs = [[0, 1], [4, 6], [2, 3], [5, 7], [8, 9], [10, 11], - [12, 14], [16, 17], [13, 15], [18, 19], [22, 23]] - - elif dataset in 'FaceWFLWDataset': - flip_pairs = [[0, 32], [1, 31], [2, 30], [3, 29], [4, 28], [5, 27], - [6, 26], [7, 25], [8, 24], [9, 23], [10, 22], [11, 21], - [12, 20], [13, 19], [14, 18], [15, 17], [33, - 46], [34, 45], - [35, 44], [36, 43], [37, 42], [38, 50], [39, - 49], [40, 48], - [41, 47], [60, 72], [61, 71], [62, 70], [63, - 69], [64, 68], - [65, 75], [66, 74], [67, 73], [55, 59], [56, - 58], [76, 82], - [77, 81], [78, 80], [87, 83], [86, 84], [88, 92], - [89, 91], [95, 93], [96, 97]] - - elif dataset in 'AnimalFlyDataset': - flip_pairs = [[1, 2], [6, 18], [7, 19], [8, 20], [9, 21], [10, 22], - [11, 23], [12, 24], [13, 25], [14, 26], [15, 27], - [16, 28], [17, 29], [30, 31]] - elif dataset in 'AnimalHorse10Dataset': - flip_pairs = [] - - elif dataset in 'AnimalLocustDataset': - flip_pairs = [[5, 20], [6, 21], [7, 22], [8, 23], [9, 24], [10, 25], - [11, 26], [12, 27], [13, 28], [14, 29], [15, 30], - [16, 31], [17, 32], [18, 33], [19, 34]] - - elif dataset in 'AnimalZebraDataset': - flip_pairs = [[3, 4], [5, 6]] - - elif dataset in 'AnimalPoseDataset': - flip_pairs = [[0, 1], [2, 3], [8, 9], [10, 11], [12, 13], [14, 15], - [16, 17], [18, 19]] + if dataset_info is not None: + dataset_name = dataset_info.dataset_name + flip_pairs = dataset_info.flip_pairs else: - raise NotImplementedError() + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + # TODO: These will be removed in the later versions. + if dataset in ('TopDownCocoDataset', 'TopDownOCHumanDataset', + 'AnimalMacaqueDataset'): + flip_pairs = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], + [13, 14], [15, 16]] + elif dataset == 'TopDownCocoWholeBodyDataset': + body = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], + [13, 14], [15, 16]] + foot = [[17, 20], [18, 21], [19, 22]] + + face = [[23, 39], [24, 38], [25, 37], [26, 36], [27, 35], [28, 34], + [29, 33], [30, 32], [40, 49], [41, 48], [42, 47], [43, 46], + [44, 45], [54, 58], [55, 57], [59, 68], [60, 67], [61, 66], + [62, 65], [63, 70], [64, 69], [71, 77], [72, 76], [73, 75], + [78, 82], [79, 81], [83, 87], [84, 86], [88, 90]] + + hand = [[91, 112], [92, 113], [93, 114], [94, 115], [95, 116], + [96, 117], [97, 118], [98, 119], [99, 120], [100, 121], + [101, 122], [102, 123], [103, 124], [104, 125], [105, 126], + [106, 127], [107, 128], [108, 129], [109, 130], [110, 131], + [111, 132]] + flip_pairs = body + foot + face + hand + elif dataset == 'TopDownAicDataset': + flip_pairs = [[0, 3], [1, 4], [2, 5], [6, 9], [7, 10], [8, 11]] + elif dataset == 'TopDownMpiiDataset': + flip_pairs = [[0, 5], [1, 4], [2, 3], [10, 15], [11, 14], [12, 13]] + elif dataset == 'TopDownMpiiTrbDataset': + flip_pairs = [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9], [10, 11], + [14, 15], [16, 22], [28, 34], [17, 23], [29, 35], + [18, 24], [30, 36], [19, 25], [31, 37], [20, 26], + [32, 38], [21, 27], [33, 39]] + elif dataset in ('OneHand10KDataset', 'FreiHandDataset', + 'PanopticDataset', 'InterHand2DDataset'): + flip_pairs = [] + elif dataset in 'Face300WDataset': + flip_pairs = [[0, 16], [1, 15], [2, 14], [3, 13], [4, 12], [5, 11], + [6, 10], [7, 9], [17, 26], [18, 25], [19, 24], + [20, 23], [21, 22], [31, 35], [32, 34], [36, 45], + [37, 44], [38, 43], [39, 42], [40, 47], [41, 46], + [48, 54], [49, 53], [50, 52], [61, 63], [60, 64], + [67, 65], [58, 56], [59, 55]] + + elif dataset in 'FaceAFLWDataset': + flip_pairs = [[0, 5], [1, 4], [2, 3], [6, 11], [7, 10], [8, 9], + [12, 14], [15, 17]] + + elif dataset in 'FaceCOFWDataset': + flip_pairs = [[0, 1], [4, 6], [2, 3], [5, 7], [8, 9], [10, 11], + [12, 14], [16, 17], [13, 15], [18, 19], [22, 23]] + + elif dataset in 'FaceWFLWDataset': + flip_pairs = [[0, 32], [1, 31], [2, 30], [3, 29], [4, 28], [5, 27], + [6, 26], [7, 25], [8, 24], [9, 23], [10, 22], + [11, 21], [12, 20], [13, 19], [14, 18], [15, 17], + [33, 46], [34, 45], [35, 44], [36, 43], [37, 42], + [38, 50], [39, 49], [40, 48], [41, 47], [60, 72], + [61, 71], [62, 70], [63, 69], [64, 68], [65, 75], + [66, 74], [67, 73], [55, 59], [56, 58], [76, 82], + [77, 81], [78, 80], [87, 83], [86, 84], [88, 92], + [89, 91], [95, 93], [96, 97]] + + elif dataset in 'AnimalFlyDataset': + flip_pairs = [[1, 2], [6, 18], [7, 19], [8, 20], [9, 21], [10, 22], + [11, 23], [12, 24], [13, 25], [14, 26], [15, 27], + [16, 28], [17, 29], [30, 31]] + elif dataset in 'AnimalHorse10Dataset': + flip_pairs = [] + + elif dataset in 'AnimalLocustDataset': + flip_pairs = [[5, 20], [6, 21], [7, 22], [8, 23], [9, 24], + [10, 25], [11, 26], [12, 27], [13, 28], [14, 29], + [15, 30], [16, 31], [17, 32], [18, 33], [19, 34]] + + elif dataset in 'AnimalZebraDataset': + flip_pairs = [[3, 4], [5, 6]] + + elif dataset in 'AnimalPoseDataset': + flip_pairs = [[0, 1], [2, 3], [8, 9], [10, 11], [12, 13], [14, 15], + [16, 17], [18, 19]] + else: + raise NotImplementedError() + dataset_name = dataset batch_data = [] for bbox in bboxes: @@ -285,7 +291,7 @@ def _inference_single_pose_model(model, 'bbox_id': 0, # need to be assigned if batch_size > 1 'dataset': - dataset, + dataset_name, 'joints_3d': np.zeros((cfg.data_cfg.num_joints, 3), dtype=np.float32), 'joints_3d_visible': @@ -328,6 +334,7 @@ def inference_top_down_pose_model(model, bbox_thr=None, format='xywh', dataset='TopDownCocoDataset', + dataset_info=None, return_heatmap=False, outputs=None): """Inference a single image with a list of person bounding boxes. @@ -351,6 +358,8 @@ def inference_top_down_pose_model(model, 'xyxy' means (left, top, right, bottom), 'xywh' means (left, top, width, height). dataset (str): Dataset name, e.g. 'TopDownCocoDataset'. + It is deprecated. Please use dataset_info instead. + dataset_info (DatasetInfo): A class containing all dataset info. return_heatmap (bool) : Flag to return heatmap, default: False outputs (list(str) | tuple(str)) : Names of layers whose outputs need to be returned, default: None @@ -364,6 +373,13 @@ def inference_top_down_pose_model(model, Output feature maps from layers specified in `outputs`. Includes 'heatmap' if `return_heatmap` is True. """ + if dataset_info is None: + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + # only two kinds of bbox format is supported. assert format in ['xyxy', 'xywh'] @@ -401,7 +417,8 @@ def inference_top_down_pose_model(model, model, img_or_path, bboxes_xywh, - dataset, + dataset=dataset, + dataset_info=dataset_info, return_heatmap=return_heatmap) if return_heatmap: @@ -423,6 +440,8 @@ def inference_top_down_pose_model(model, def inference_bottom_up_pose_model(model, img_or_path, + dataset='BottomUpCocoDataset', + dataset_info=None, pose_nms_thr=0.9, return_heatmap=False, outputs=None): @@ -436,6 +455,9 @@ def inference_bottom_up_pose_model(model, Args: model (nn.Module): The loaded pose model. img_or_path (str| np.ndarray): Image filename or loaded image. + dataset (str): Dataset name, e.g. 'BottomUpCocoDataset'. + It is deprecated. Please use dataset_info instead. + dataset_info (DatasetInfo): A class containing all dataset info. pose_nms_thr (float): retain oks overlap < pose_nms_thr, default: 0.9. return_heatmap (bool) : Flag to return heatmap, default: False. outputs (list(str) | tuple(str)) : Names of layers whose outputs @@ -462,17 +484,27 @@ def inference_bottom_up_pose_model(model, ] + cfg.test_pipeline[1:] test_pipeline = Compose(test_pipeline) + if dataset_info is not None: + dataset_name = dataset_info.dataset_name + flip_index = dataset_info.flip_index + else: + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + assert (dataset == 'BottomUpCocoDataset') + dataset_name = dataset + flip_index = [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15] + # prepare data data = { 'img_or_path': img_or_path, - 'dataset': 'coco', + 'dataset': dataset_name, 'ann_info': { - 'image_size': - cfg.data_cfg['image_size'], - 'num_joints': - cfg.data_cfg['num_joints'], - 'flip_index': - [0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15], + 'image_size': cfg.data_cfg['image_size'], + 'num_joints': cfg.data_cfg['num_joints'], + 'flip_index': flip_index, } } @@ -523,6 +555,7 @@ def vis_pose_result(model, kpt_score_thr=0.3, bbox_color='green', dataset='TopDownCocoDataset', + dataset_info=None, show=False, out_file=None): """Visualize the detection results on the image. @@ -539,214 +572,222 @@ def vis_pose_result(model, show (bool): Whether to show the image. Default True. out_file (str|None): The filename of the output visualization image. """ - if hasattr(model, 'module'): - model = model.module + if dataset_info is not None: + skeleton = dataset_info.skeleton + pose_kpt_color = dataset_info.pose_kpt_color + pose_link_color = dataset_info.pose_link_color + else: + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + # TODO: These will be removed in the later versions. + palette = np.array([[255, 128, 0], [255, 153, 51], [255, 178, 102], + [230, 230, 0], [255, 153, 255], [153, 204, 255], + [255, 102, 255], [255, 51, 255], [102, 178, 255], + [51, 153, 255], [255, 153, 153], [255, 102, 102], + [255, 51, 51], [153, 255, 153], [102, 255, 102], + [51, 255, 51], [0, 255, 0], [0, 0, 255], + [255, 0, 0], [255, 255, 255]]) + + if dataset in ('TopDownCocoDataset', 'BottomUpCocoDataset', + 'TopDownOCHumanDataset', 'AnimalMacaqueDataset'): + # show the results + skeleton = [[15, 13], [13, 11], [16, 14], [14, 12], [11, 12], + [5, 11], [6, 12], [5, 6], [5, 7], [6, 8], [7, 9], + [8, 10], [1, 2], [0, 1], [0, 2], [1, 3], [2, 4], + [3, 5], [4, 6]] + + pose_link_color = palette[[ + 0, 0, 0, 0, 7, 7, 7, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16 + ]] + pose_kpt_color = palette[[ + 16, 16, 16, 16, 16, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0 + ]] - palette = np.array([[255, 128, 0], [255, 153, 51], [255, 178, 102], - [230, 230, 0], [255, 153, 255], [153, 204, 255], - [255, 102, 255], [255, 51, 255], [102, 178, 255], - [51, 153, 255], [255, 153, 153], [255, 102, 102], - [255, 51, 51], [153, 255, 153], [102, 255, 102], - [51, 255, 51], [0, 255, 0], [0, 0, 255], [255, 0, 0], - [255, 255, 255]]) - - if dataset in ('TopDownCocoDataset', 'BottomUpCocoDataset', - 'TopDownOCHumanDataset', 'AnimalMacaqueDataset'): - # show the results - 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]] - - pose_limb_color = palette[[ - 0, 0, 0, 0, 7, 7, 7, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16 - ]] - pose_kpt_color = palette[[ - 16, 16, 16, 16, 16, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0 - ]] - - elif dataset == 'TopDownCocoWholeBodyDataset': - # show the results - 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], [16, 18], - [16, 19], [16, 20], [17, 21], [17, 22], [17, 23], [92, 93], - [93, 94], [94, 95], [95, 96], [92, 97], [97, 98], [98, 99], - [99, 100], [92, 101], [101, 102], [102, 103], [103, 104], - [92, 105], [105, 106], [106, 107], [107, 108], [92, 109], - [109, 110], [110, 111], [111, 112], [113, 114], [114, 115], - [115, 116], [116, 117], [113, 118], [118, 119], [119, 120], - [120, 121], [113, 122], [122, 123], [123, 124], [124, 125], - [113, 126], [126, 127], [127, 128], [128, 129], [113, 130], - [130, 131], [131, 132], [132, 133]] - - pose_limb_color = palette[ - [0, 0, 0, 0, 7, 7, 7, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16] + - [16, 16, 16, 16, 16, 16] + [ + elif dataset == 'TopDownCocoWholeBodyDataset': + # show the results + skeleton = [[15, 13], [13, 11], [16, 14], [14, 12], [11, 12], + [5, 11], [6, 12], [5, 6], [5, 7], [6, 8], [7, 9], + [8, 10], [1, 2], [0, 1], [0, 2], + [1, 3], [2, 4], [3, 5], [4, 6], [15, 17], [15, 18], + [15, 19], [16, 20], [16, 21], [16, 22], [91, 92], + [92, 93], [93, 94], [94, 95], [91, 96], [96, 97], + [97, 98], [98, 99], [91, 100], [100, 101], [101, 102], + [102, 103], [91, 104], [104, 105], [105, 106], + [106, 107], [91, 108], [108, 109], [109, 110], + [110, 111], [112, 113], [113, 114], [114, 115], + [115, 116], [112, 117], [117, 118], [118, 119], + [119, 120], [112, 121], [121, 122], [122, 123], + [123, 124], [112, 125], [125, 126], [126, 127], + [127, 128], [112, 129], [129, 130], [130, 131], + [131, 132]] + + pose_link_color = palette[[ + 0, 0, 0, 0, 7, 7, 7, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 16 + ] + [16, 16, 16, 16, 16, 16] + [ 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, 16 ] + [ 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, 16 ]] - pose_kpt_color = palette[ - [16, 16, 16, 16, 16, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0] + - [0, 0, 0, 0, 0, 0] + [19] * (68 + 42)] - - elif dataset == 'TopDownAicDataset': - skeleton = [[3, 2], [2, 1], [1, 14], [14, 4], [4, 5], [5, 6], [9, 8], - [8, 7], [7, 10], [10, 11], [11, 12], [13, 14], [1, 7], - [4, 10]] - - pose_limb_color = palette[[ - 9, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 0, 7, 7 - ]] - pose_kpt_color = palette[[ - 9, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 0, 0 - ]] - - elif dataset == 'TopDownMpiiDataset': - skeleton = [[1, 2], [2, 3], [3, 7], [7, 4], [4, 5], [5, 6], [7, 8], - [8, 9], [9, 10], [9, 13], [13, 12], [12, 11], [9, 14], - [14, 15], [15, 16]] - - pose_limb_color = palette[[ - 16, 16, 16, 16, 16, 16, 7, 7, 0, 9, 9, 9, 9, 9, 9 - ]] - pose_kpt_color = palette[[ - 16, 16, 16, 16, 16, 16, 7, 7, 0, 0, 9, 9, 9, 9, 9, 9 - ]] - - elif dataset == 'TopDownMpiiTrbDataset': - skeleton = [[13, 14], [14, 1], [14, 2], [1, 3], [2, 4], [3, 5], [4, 6], - [1, 7], [2, 8], [7, 8], [7, 9], [8, 10], [9, 11], [10, 12], - [15, 16], [17, 18], [19, 20], [21, 22], [23, 24], [25, 26], - [27, 28], [29, 30], [31, 32], [33, 34], [35, 36], [37, 38], - [39, 40]] - - pose_limb_color = palette[[16] * 14 + [19] * 13] - pose_kpt_color = palette[[16] * 14 + [0] * 26] - - elif dataset == 'TopDownH36MDataset': - skeleton = [[1, 2], [2, 3], [3, 4], [1, 5], [5, 6], [6, 7], [1, 8], - [8, 9], [9, 10], [10, 11], [9, 12], [12, 13], [13, 14], - [9, 15], [15, 16], [16, 17]] - - pose_kpt_color = palette[[ - 9, 0, 0, 0, 16, 16, 16, 9, 9, 9, 9, 16, 16, 16, 0, 0, 0 - ]] - pose_limb_color = palette[[ - 0, 0, 0, 16, 16, 16, 9, 9, 9, 9, 16, 16, 16, 0, 0, 0 - ]] - - elif dataset in ('OneHand10KDataset', 'FreiHandDataset', - 'PanopticDataset'): - skeleton = [[1, 2], [2, 3], [3, 4], [4, 5], [1, 6], [6, 7], [7, 8], - [8, 9], [1, 10], [10, 11], [11, 12], [12, 13], [1, 14], - [14, 15], [15, 16], [16, 17], [1, 18], [18, 19], [19, 20], - [20, 21]] - - pose_limb_color = palette[[ - 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, 16 - ]] - pose_kpt_color = palette[[ - 0, 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, - 16 - ]] - - elif dataset == 'InterHand2DDataset': - skeleton = [[1, 2], [2, 3], [3, 4], [5, 6], [6, 7], [7, 8], [9, 10], - [10, 11], [11, 12], [13, 14], [14, 15], [15, 16], [17, 18], - [18, 19], [19, 20], [4, 21], [8, 21], [12, 21], [16, 21], - [20, 21]] - - pose_limb_color = palette[[ - 0, 0, 0, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16, 0, 4, 8, 12, 16 - ]] - pose_kpt_color = palette[[ - 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, 16, - 0 - ]] - - elif dataset == 'Face300WDataset': - # show the results - skeleton = [] - - pose_limb_color = palette[[]] - pose_kpt_color = palette[[19] * 68] - kpt_score_thr = 0 - - elif dataset == 'FaceAFLWDataset': - # show the results - skeleton = [] - - pose_limb_color = palette[[]] - pose_kpt_color = palette[[19] * 19] - kpt_score_thr = 0 - - elif dataset == 'FaceCOFWDataset': - # show the results - skeleton = [] - - pose_limb_color = palette[[]] - pose_kpt_color = palette[[19] * 29] - kpt_score_thr = 0 - - elif dataset == 'FaceWFLWDataset': - # show the results - skeleton = [] - - pose_limb_color = palette[[]] - pose_kpt_color = palette[[19] * 98] - kpt_score_thr = 0 - - elif dataset == 'AnimalHorse10Dataset': - skeleton = [[1, 2], [2, 13], [13, 17], [17, 22], [22, 18], [18, 12], - [12, 11], [11, 9], [9, 10], [10, 13], [3, 4], [4, 5], - [6, 7], [7, 8], [14, 15], [15, 16], [19, 20], [20, 21]] - - pose_limb_color = palette[[4] * 10 + [6] * 2 + [6] * 2 + [7] * 2 + - [7] * 2] - pose_kpt_color = palette[[ - 4, 4, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 7, 7, 7, 4, 4, 7, 7, 7, 4 - ]] - - elif dataset == 'AnimalFlyDataset': - skeleton = [[2, 1], [3, 1], [4, 1], [5, 4], [6, 5], [8, 7], [9, 8], - [10, 9], [12, 11], [13, 12], [14, 13], [16, 15], [17, 16], - [18, 17], [20, 19], [21, 20], [22, 21], [24, 23], [25, 24], - [26, 25], [28, 27], [29, 28], [30, 29], [31, 4], [32, 4]] - - pose_limb_color = palette[[0] * 25] - pose_kpt_color = palette[[0] * 32] - - elif dataset == 'AnimalLocustDataset': - skeleton = [[2, 1], [3, 2], [4, 3], [5, 4], [7, 6], [8, 7], [10, 9], - [11, 10], [12, 11], [14, 13], [15, 14], [16, 15], [18, 17], - [19, 18], [20, 19], [22, 21], [23, 22], [25, 24], [26, 25], - [27, 26], [29, 28], [30, 29], [31, 30], [33, 32], [34, 33], - [35, 34]] - - pose_limb_color = palette[[0] * 26] - pose_kpt_color = palette[[0] * 35] - - elif dataset == 'AnimalZebraDataset': - skeleton = [[2, 1], [3, 2], [4, 3], [5, 3], [6, 8], [7, 8], [8, 3], - [9, 8]] - - pose_limb_color = palette[[0] * 8] - pose_kpt_color = palette[[0] * 9] - - elif dataset in 'AnimalPoseDataset': - skeleton = [[1, 2], [1, 3], [2, 4], [1, 5], [2, 5], [5, 6], [6, 8], - [7, 8], [6, 9], [9, 13], [13, 17], [6, 10], [10, 14], - [14, 18], [7, 11], [11, 15], [15, 19], [7, 12], [12, 16], - [16, 20]] - - pose_kpt_color = palette[[15] * 5 + [0] * 7 + [9] * 8] - pose_limb_color = palette[[15] * 5 + [0] * 3 + [0, 9, 9] * 4] + pose_kpt_color = palette[ + [16, 16, 16, 16, 16, 9, 9, 9, 9, 9, 9, 0, 0, 0, 0, 0, 0] + + [0, 0, 0, 0, 0, 0] + [19] * (68 + 42)] - else: - raise NotImplementedError() + elif dataset == 'TopDownAicDataset': + skeleton = [[2, 1], [1, 0], [0, 13], [13, 3], [3, 4], [4, 5], + [8, 7], [7, 6], [6, 9], [9, 10], [10, 11], [12, 13], + [0, 6], [3, 9]] + + pose_link_color = palette[[ + 9, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 0, 7, 7 + ]] + pose_kpt_color = palette[[ + 9, 9, 9, 9, 9, 9, 16, 16, 16, 16, 16, 16, 0, 0 + ]] + + elif dataset == 'TopDownMpiiDataset': + skeleton = [[0, 1], [1, 2], [2, 6], [6, 3], [3, 4], [4, 5], [6, 7], + [7, 8], [8, 9], [8, 12], [12, 11], [11, 10], [8, 13], + [13, 14], [14, 15]] + + pose_link_color = palette[[ + 16, 16, 16, 16, 16, 16, 7, 7, 0, 9, 9, 9, 9, 9, 9 + ]] + pose_kpt_color = palette[[ + 16, 16, 16, 16, 16, 16, 7, 7, 0, 0, 9, 9, 9, 9, 9, 9 + ]] + + elif dataset == 'TopDownMpiiTrbDataset': + skeleton = [[12, 13], [13, 0], [13, 1], [0, 2], [1, 3], [2, 4], + [3, 5], [0, 6], [1, 7], [6, 7], [6, 8], [7, + 9], [8, 10], + [9, 11], [14, 15], [16, 17], [18, 19], [20, 21], + [22, 23], [24, 25], [26, 27], [28, 29], [30, 31], + [32, 33], [34, 35], [36, 37], [38, 39]] + + pose_link_color = palette[[16] * 14 + [19] * 13] + pose_kpt_color = palette[[16] * 14 + [0] * 26] + + elif dataset in ('OneHand10KDataset', 'FreiHandDataset', + 'PanopticDataset'): + skeleton = [[0, 1], [1, 2], [2, 3], [3, 4], [0, 5], [5, 6], [6, 7], + [7, 8], [0, 9], [9, 10], [10, 11], [11, 12], [0, 13], + [13, 14], [14, 15], [15, 16], [0, 17], [17, 18], + [18, 19], [19, 20]] + + pose_link_color = palette[[ + 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, + 16 + ]] + pose_kpt_color = palette[[ + 0, 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, + 16, 16 + ]] + + elif dataset == 'InterHand2DDataset': + skeleton = [[0, 1], [1, 2], [2, 3], [4, 5], [5, 6], [6, 7], [8, 9], + [9, 10], [10, 11], [12, 13], [13, 14], [14, 15], + [16, 17], [17, 18], [18, 19], [3, 20], [7, 20], + [11, 20], [15, 20], [19, 20]] + + pose_link_color = palette[[ + 0, 0, 0, 4, 4, 4, 8, 8, 8, 12, 12, 12, 16, 16, 16, 0, 4, 8, 12, + 16 + ]] + pose_kpt_color = palette[[ + 0, 0, 0, 0, 4, 4, 4, 4, 8, 8, 8, 8, 12, 12, 12, 12, 16, 16, 16, + 16, 0 + ]] + + elif dataset == 'Face300WDataset': + # show the results + skeleton = [] + + pose_link_color = palette[[]] + pose_kpt_color = palette[[19] * 68] + kpt_score_thr = 0 + + elif dataset == 'FaceAFLWDataset': + # show the results + skeleton = [] + + pose_link_color = palette[[]] + pose_kpt_color = palette[[19] * 19] + kpt_score_thr = 0 + + elif dataset == 'FaceCOFWDataset': + # show the results + skeleton = [] + + pose_link_color = palette[[]] + pose_kpt_color = palette[[19] * 29] + kpt_score_thr = 0 + + elif dataset == 'FaceWFLWDataset': + # show the results + skeleton = [] + + pose_link_color = palette[[]] + pose_kpt_color = palette[[19] * 98] + kpt_score_thr = 0 + + elif dataset == 'AnimalHorse10Dataset': + skeleton = [[0, 1], [1, 12], [12, 16], [16, 21], [21, 17], + [17, 11], [11, 10], [10, 8], [8, 9], [9, 12], [2, 3], + [3, 4], [5, 6], [6, 7], [13, 14], [14, 15], [18, 19], + [19, 20]] + + pose_link_color = palette[[4] * 10 + [6] * 2 + [6] * 2 + [7] * 2 + + [7] * 2] + pose_kpt_color = palette[[ + 4, 4, 6, 6, 6, 6, 6, 6, 4, 4, 4, 4, 4, 7, 7, 7, 4, 4, 7, 7, 7, + 4 + ]] + + elif dataset == 'AnimalFlyDataset': + skeleton = [[1, 0], [2, 0], [3, 0], [4, 3], [5, 4], [7, 6], [8, 7], + [9, 8], [11, 10], [12, 11], [13, 12], [15, 14], + [16, 15], [17, 16], [19, 18], [20, 19], [21, 20], + [23, 22], [24, 23], [25, 24], [27, 26], [28, 27], + [29, 28], [30, 3], [31, 3]] + + pose_link_color = palette[[0] * 25] + pose_kpt_color = palette[[0] * 32] + + elif dataset == 'AnimalLocustDataset': + skeleton = [[1, 0], [2, 1], [3, 2], [4, 3], [6, 5], [7, 6], [9, 8], + [10, 9], [11, 10], [13, 12], [14, 13], [15, 14], + [17, 16], [18, 17], [19, 18], [21, 20], [22, 21], + [24, 23], [25, 24], [26, 25], [28, 27], [29, 28], + [30, 29], [32, 31], [33, 32], [34, 33]] + + pose_link_color = palette[[0] * 26] + pose_kpt_color = palette[[0] * 35] + + elif dataset == 'AnimalZebraDataset': + skeleton = [[1, 0], [2, 1], [3, 2], [4, 2], [5, 7], [6, 7], [7, 2], + [8, 7]] + + pose_link_color = palette[[0] * 8] + pose_kpt_color = palette[[0] * 9] + + elif dataset in 'AnimalPoseDataset': + skeleton = [[0, 1], [0, 2], [1, 3], [0, 4], [1, 4], [4, 5], [5, 7], + [6, 7], [5, 8], [8, 12], [12, 16], [5, 9], [9, 13], + [13, 17], [6, 10], [10, 14], [14, 18], [6, 11], + [11, 15], [15, 19]] + + pose_link_color = palette[[0] * 20] + pose_kpt_color = palette[[0] * 20] + else: + NotImplementedError() + + if hasattr(model, 'module'): + model = model.module img = model.show_result( img, @@ -755,7 +796,7 @@ def vis_pose_result(model, radius=radius, thickness=thickness, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, kpt_score_thr=kpt_score_thr, bbox_color=bbox_color, show=show, @@ -770,7 +811,6 @@ def process_mmdet_results(mmdet_results, cat_id=1): Args: mmdet_results (list|tuple): mmdet results. cat_id (int): category id (default: 1 for human) - Returns: person_results (list): a list of detected bounding boxes """ diff --git a/mmpose/apis/inference_3d.py b/mmpose/apis/inference_3d.py index f4a828e9fc..c670a1fd6b 100644 --- a/mmpose/apis/inference_3d.py +++ b/mmpose/apis/inference_3d.py @@ -1,4 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. +import warnings + import numpy as np import torch from mmcv.parallel import collate, scatter @@ -203,7 +205,8 @@ def _collate_pose_sequence(pose_results, with_track_id=True, target_frame=-1): def inference_pose_lifter_model(model, pose_results_2d, - dataset, + dataset=None, + dataset_info=None, with_track_id=True, image_size=None, norm_pose_2d=False): @@ -241,13 +244,24 @@ def inference_pose_lifter_model(model, cfg = model.cfg test_pipeline = Compose(cfg.test_pipeline) - flip_pairs = None - if dataset == 'Body3DH36MDataset': - flip_pairs = [[1, 4], [2, 5], [3, 6], [11, 14], [12, 15], [13, 16]] - bbox_center = np.array([[528, 427]], dtype=np.float32) - bbox_scale = 400 + if dataset_info is not None: + flip_pairs = dataset_info.flip_pairs + assert 'stats_info' in dataset_info._dataset_info + bbox_center = dataset_info._dataset_info['stats_info']['bbox_center'] + bbox_scale = dataset_info._dataset_info['stats_info']['bbox_scale'] else: - raise NotImplementedError() + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + # TODO: These will be removed in the later versions. + if dataset == 'Body3DH36MDataset': + flip_pairs = [[1, 4], [2, 5], [3, 6], [11, 14], [12, 15], [13, 16]] + bbox_center = np.array([[528, 427]], dtype=np.float32) + bbox_scale = 400 + else: + raise NotImplementedError() target_idx = -1 if model.causal else len(pose_results_2d) // 2 pose_lifter_inputs = _gather_pose_lifter_inputs(pose_results_2d, @@ -271,6 +285,7 @@ def inference_pose_lifter_model(model, else: input_2d_visible = np.ones((T, K, 1), dtype=np.float32) + # TODO: Will be removed in the later versions # Dummy 3D input # This is for compatibility with configs in mmpose<=v0.14.0, where a # 3D input is required to generate denormalization parameters. This @@ -336,6 +351,7 @@ def vis_3d_pose_result(model, result, img=None, dataset='Body3DH36MDataset', + dataset_info=None, kpt_score_thr=0.3, radius=8, thickness=2, @@ -348,68 +364,83 @@ def vis_3d_pose_result(model, model (nn.Module): The loaded model. result (list[dict]) """ - if hasattr(model, 'module'): - model = model.module - - palette = np.array([[255, 128, 0], [255, 153, 51], [255, 178, 102], - [230, 230, 0], [255, 153, 255], [153, 204, 255], - [255, 102, 255], [255, 51, 255], [102, 178, 255], - [51, 153, 255], [255, 153, 153], [255, 102, 102], - [255, 51, 51], [153, 255, 153], [102, 255, 102], - [51, 255, 51], [0, 255, 0], [0, 0, 255], [255, 0, 0], - [255, 255, 255]]) - - if dataset == 'Body3DH36MDataset': - skeleton = [[1, 2], [2, 3], [3, 4], [1, 5], [5, 6], [6, 7], [1, 8], - [8, 9], [9, 10], [10, 11], [9, 12], [12, 13], [13, 14], - [9, 15], [15, 16], [16, 17]] - - pose_kpt_color = palette[[ - 9, 0, 0, 0, 16, 16, 16, 9, 9, 9, 9, 16, 16, 16, 0, 0, 0 - ]] - pose_limb_color = palette[[ - 0, 0, 0, 16, 16, 16, 9, 9, 9, 9, 16, 16, 16, 0, 0, 0 - ]] - elif dataset == 'InterHand3DDataset': - skeleton = [[1, 2], [2, 3], [3, 4], [4, 21], [5, 6], [6, 7], [7, 8], - [8, 21], [9, 10], [10, 11], [11, 12], [12, 21], [13, 14], - [14, 15], [15, 16], [16, 21], [17, 18], [18, 19], [19, 20], - [20, 21], [22, 23], [23, 24], [24, 25], [25, 42], [26, 27], - [27, 28], [28, 29], [29, 42], [30, 31], [31, 32], [32, 33], - [33, 42], [34, 35], [35, 36], [36, 37], [37, 42], [38, 39], - [39, 40], [40, 41], [41, 42]] - - pose_kpt_color = [[14, 128, 250], [14, 128, 250], [14, 128, 250], - [14, 128, 250], [80, 127, 255], [80, 127, 255], - [80, 127, 255], [80, 127, 255], [71, 99, 255], - [71, 99, 255], [71, 99, 255], [71, 99, 255], - [0, 36, 255], [0, 36, 255], [0, 36, 255], - [0, 36, 255], [0, 0, 230], [0, 0, 230], [0, 0, 230], - [0, 0, 230], [0, 0, 139], [237, 149, 100], - [237, 149, 100], [237, 149, 100], [237, 149, 100], - [230, 128, 77], [230, 128, 77], [230, 128, 77], - [230, 128, 77], [255, 144, 30], [255, 144, 30], - [255, 144, 30], [255, 144, 30], [153, 51, 0], - [153, 51, 0], [153, 51, 0], [153, 51, 0], - [255, 51, 13], [255, 51, 13], [255, 51, 13], - [255, 51, 13], [103, 37, 8]] - - pose_limb_color = [[14, 128, 250], [14, 128, 250], [14, 128, 250], - [14, 128, 250], [80, 127, 255], [80, 127, 255], - [80, 127, 255], [80, 127, 255], [71, 99, 255], - [71, 99, 255], [71, 99, 255], [71, 99, 255], - [0, 36, 255], [0, 36, 255], [0, 36, 255], - [0, 36, 255], [0, 0, 230], [0, 0, 230], [0, 0, 230], - [0, 0, 230], [237, 149, 100], [237, 149, 100], - [237, 149, 100], [237, 149, 100], [230, 128, 77], - [230, 128, 77], [230, 128, 77], [230, 128, 77], - [255, 144, 30], [255, 144, 30], [255, 144, 30], - [255, 144, 30], [153, 51, 0], [153, 51, 0], - [153, 51, 0], [153, 51, 0], [255, 51, 13], - [255, 51, 13], [255, 51, 13], [255, 51, 13]] + if dataset_info is not None: + skeleton = dataset_info.skeleton + pose_kpt_color = dataset_info.pose_kpt_color + pose_link_color = dataset_info.pose_link_color else: - raise NotImplementedError + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + # TODO: These will be removed in the later versions. + palette = np.array([[255, 128, 0], [255, 153, 51], [255, 178, 102], + [230, 230, 0], [255, 153, 255], [153, 204, 255], + [255, 102, 255], [255, 51, 255], [102, 178, 255], + [51, 153, 255], [255, 153, 153], [255, 102, 102], + [255, 51, 51], [153, 255, 153], [102, 255, 102], + [51, 255, 51], [0, 255, 0], [0, 0, 255], + [255, 0, 0], [255, 255, 255]]) + + if dataset == 'Body3DH36MDataset': + skeleton = [[0, 1], [1, 2], [2, 3], [0, 4], [4, 5], [5, 6], [0, 7], + [7, 8], [8, 9], [9, 10], [8, 11], [11, 12], [12, 13], + [8, 14], [14, 15], [15, 16]] + + pose_kpt_color = palette[[ + 9, 0, 0, 0, 16, 16, 16, 9, 9, 9, 9, 16, 16, 16, 0, 0, 0 + ]] + pose_link_color = palette[[ + 0, 0, 0, 16, 16, 16, 9, 9, 9, 9, 16, 16, 16, 0, 0, 0 + ]] + + elif dataset == 'InterHand3DDataset': + skeleton = [[0, 1], [1, 2], [2, 3], [3, 20], [4, 5], [5, 6], + [6, 7], [7, 20], [8, 9], [9, 10], [10, 11], [11, 20], + [12, 13], [13, 14], [14, 15], [15, 20], [16, 17], + [17, 18], [18, 19], [19, 20], [21, 22], [22, 23], + [23, 24], [24, 41], [25, 26], [26, 27], [27, 28], + [28, 41], [29, 30], [30, 31], [31, 32], [32, 41], + [33, 34], [34, 35], [35, 36], [36, 41], [37, 38], + [38, 39], [39, 40], [40, 41]] + + pose_kpt_color = [[14, 128, 250], [14, 128, 250], [14, 128, 250], + [14, 128, 250], [80, 127, 255], [80, 127, 255], + [80, 127, 255], [80, 127, 255], [71, 99, 255], + [71, 99, 255], [71, 99, 255], [71, 99, 255], + [0, 36, 255], [0, 36, 255], [0, 36, 255], + [0, 36, 255], [0, 0, 230], [0, 0, 230], + [0, 0, 230], [0, 0, 230], [0, 0, 139], + [237, 149, 100], [237, 149, 100], + [237, 149, 100], [237, 149, 100], [230, 128, 77], + [230, 128, 77], [230, 128, 77], [230, 128, 77], + [255, 144, 30], [255, 144, 30], [255, 144, 30], + [255, 144, 30], [153, 51, 0], [153, 51, 0], + [153, 51, 0], [153, 51, 0], [255, 51, 13], + [255, 51, 13], [255, 51, 13], [255, 51, 13], + [103, 37, 8]] + + pose_link_color = [[14, 128, 250], [14, 128, 250], [14, 128, 250], + [14, 128, 250], [80, 127, 255], [80, 127, 255], + [80, 127, 255], [80, 127, 255], [71, 99, 255], + [71, 99, 255], [71, 99, 255], [71, 99, 255], + [0, 36, 255], [0, 36, 255], [0, 36, 255], + [0, 36, 255], [0, 0, 230], [0, 0, 230], + [0, 0, 230], [0, 0, 230], [237, 149, 100], + [237, 149, 100], [237, 149, 100], + [237, 149, 100], [230, 128, 77], [230, 128, 77], + [230, 128, 77], [230, 128, 77], [255, 144, 30], + [255, 144, 30], [255, 144, 30], [255, 144, 30], + [153, 51, 0], [153, 51, 0], [153, 51, 0], + [153, 51, 0], [255, 51, 13], [255, 51, 13], + [255, 51, 13], [255, 51, 13]] + else: + raise NotImplementedError + + if hasattr(model, 'module'): + model = model.module img = model.show_result( result, @@ -418,7 +449,7 @@ def vis_3d_pose_result(model, radius=radius, thickness=thickness, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, num_instances=num_instances, show=show, out_file=out_file) @@ -590,12 +621,10 @@ def inference_mesh_model(model, format='xywh', dataset='MeshH36MDataset'): """Inference a single image with a list of bounding boxes. - num_bboxes: N num_keypoints: K num_vertices: V num_faces: F - Args: model (nn.Module): The loaded pose model. img_or_path (str | np.ndarray): Image filename or loaded image. @@ -610,7 +639,6 @@ def inference_mesh_model(model, 'xyxy' means (left, top, right, bottom), 'xywh' means (left, top, width, height). dataset (str): Dataset name. - Returns: List[dict]: 3D pose inference results. Each element is the result of an instance, which contains: @@ -621,7 +649,6 @@ def inference_mesh_model(model, - "camera" (ndarray[3]): camera parameters - "vertices" (ndarray[V, 3]): predicted 3D vertices - "faces" (ndarray[F, 3]): mesh faces - If there is no valid instance, an empty list will be returned. """ diff --git a/mmpose/apis/inference_tracking.py b/mmpose/apis/inference_tracking.py index e0441ca787..ab340415e5 100644 --- a/mmpose/apis/inference_tracking.py +++ b/mmpose/apis/inference_tracking.py @@ -230,6 +230,7 @@ def vis_pose_tracking_result(model, thickness=1, kpt_score_thr=0.3, dataset='TopDownCocoDataset', + dataset_info=None, show=False, out_file=None): """Visualize the pose tracking results on the image. @@ -239,6 +240,8 @@ def vis_pose_tracking_result(model, img (str | np.ndarray): Image filename or loaded image. result (list[dict]): The results to draw over `img` (bbox_result, pose_result). + radius (int): Radius of circles. + thickness (int): Thickness of lines. kpt_score_thr (float): The threshold to visualize the keypoints. skeleton (list[tuple()]): Default None. show (bool): Whether to show the image. Default True. @@ -255,70 +258,86 @@ def vis_pose_tracking_result(model, [51, 255, 51], [0, 255, 0], [0, 0, 255], [255, 0, 0], [255, 255, 255]]) - if dataset in ('TopDownCocoDataset', 'BottomUpCocoDataset', - 'TopDownOCHumanDataset'): - kpt_num = 17 - 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]] - - elif dataset == 'TopDownCocoWholeBodyDataset': - kpt_num = 133 - 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], [16, 18], - [16, 19], [16, 20], [17, 21], [17, 22], [17, 23], [92, 93], - [93, 94], [94, 95], [95, 96], [92, 97], [97, 98], [98, 99], - [99, 100], [92, 101], [101, 102], [102, 103], [103, 104], - [92, 105], [105, 106], [106, 107], [107, 108], [92, 109], - [109, 110], [110, 111], [111, 112], [113, 114], [114, 115], - [115, 116], [116, 117], [113, 118], [118, 119], [119, 120], - [120, 121], [113, 122], [122, 123], [123, 124], [124, 125], - [113, 126], [126, 127], [127, 128], [128, 129], [113, 130], - [130, 131], [131, 132], [132, 133]] - - elif dataset == 'TopDownAicDataset': - kpt_num = 14 - skeleton = [[3, 2], [2, 1], [1, 14], [14, 4], [4, 5], [5, 6], [9, 8], - [8, 7], [7, 10], [10, 11], [11, 12], [13, 14], [1, 7], - [4, 10]] - - elif dataset == 'TopDownMpiiDataset': - kpt_num = 16 - skeleton = [[1, 2], [2, 3], [3, 7], [7, 4], [4, 5], [5, 6], [7, 8], - [8, 9], [9, 10], [9, 13], [13, 12], [12, 11], [9, 14], - [14, 15], [15, 16]] - - elif dataset in ('OneHand10KDataset', 'FreiHandDataset', - 'PanopticDataset'): - kpt_num = 21 - skeleton = [[1, 2], [2, 3], [3, 4], [4, 5], [1, 6], [6, 7], [7, 8], - [8, 9], [1, 10], [10, 11], [11, 12], [12, 13], [1, 14], - [14, 15], [15, 16], [16, 17], [1, 18], [18, 19], [19, 20], - [20, 21]] - - elif dataset == 'InterHand2DDataset': - kpt_num = 21 - skeleton = [[1, 2], [2, 3], [3, 4], [5, 6], [6, 7], [7, 8], [9, 10], - [10, 11], [11, 12], [13, 14], [14, 15], [15, 16], [17, 18], - [18, 19], [19, 20], [4, 21], [8, 21], [12, 21], [16, 21], - [20, 21]] + if dataset_info is None and dataset is not None: + warnings.warn( + 'dataset is deprecated.' + 'Please set `dataset_info` in the config.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 for details.', + DeprecationWarning) + # TODO: These will be removed in the later versions. + if dataset in ('TopDownCocoDataset', 'BottomUpCocoDataset', + 'TopDownOCHumanDataset'): + kpt_num = 17 + skeleton = [[15, 13], [13, 11], [16, 14], [14, 12], [11, 12], + [5, 11], [6, 12], [5, 6], [5, 7], [6, 8], [7, 9], + [8, 10], [1, 2], [0, 1], [0, 2], [1, 3], [2, 4], + [3, 5], [4, 6]] + + elif dataset == 'TopDownCocoWholeBodyDataset': + kpt_num = 133 + skeleton = [[15, 13], [13, 11], [16, 14], [14, 12], [11, 12], + [5, 11], [6, 12], [5, 6], [5, 7], [6, 8], [7, 9], + [8, 10], [1, 2], [0, 1], [0, 2], + [1, 3], [2, 4], [3, 5], [4, 6], [15, 17], [15, 18], + [15, 19], [16, 20], [16, 21], [16, 22], [91, 92], + [92, 93], [93, 94], [94, 95], [91, 96], [96, 97], + [97, 98], [98, 99], [91, 100], [100, 101], [101, 102], + [102, 103], [91, 104], [104, 105], [105, 106], + [106, 107], [91, 108], [108, 109], [109, 110], + [110, 111], [112, 113], [113, 114], [114, 115], + [115, 116], [112, 117], [117, 118], [118, 119], + [119, 120], [112, 121], [121, 122], [122, 123], + [123, 124], [112, 125], [125, 126], [126, 127], + [127, 128], [112, 129], [129, 130], [130, 131], + [131, 132]] + radius = 1 + + elif dataset == 'TopDownAicDataset': + kpt_num = 14 + skeleton = [[2, 1], [1, 0], [0, 13], [13, 3], [3, 4], [4, 5], + [8, 7], [7, 6], [6, 9], [9, 10], [10, 11], [12, 13], + [0, 6], [3, 9]] + + elif dataset == 'TopDownMpiiDataset': + kpt_num = 16 + skeleton = [[0, 1], [1, 2], [2, 6], [6, 3], [3, 4], [4, 5], [6, 7], + [7, 8], [8, 9], [8, 12], [12, 11], [11, 10], [8, 13], + [13, 14], [14, 15]] + + elif dataset in ('OneHand10KDataset', 'FreiHandDataset', + 'PanopticDataset'): + kpt_num = 21 + skeleton = [[0, 1], [1, 2], [2, 3], [3, 4], [0, 5], [5, 6], [6, 7], + [7, 8], [0, 9], [9, 10], [10, 11], [11, 12], [0, 13], + [13, 14], [14, 15], [15, 16], [0, 17], [17, 18], + [18, 19], [19, 20]] + + elif dataset == 'InterHand2DDataset': + kpt_num = 21 + skeleton = [[0, 1], [1, 2], [2, 3], [4, 5], [5, 6], [6, 7], [8, 9], + [9, 10], [10, 11], [12, 13], [13, 14], [14, 15], + [16, 17], [17, 18], [18, 19], [3, 20], [7, 20], + [11, 20], [15, 20], [19, 20]] - else: - raise NotImplementedError() + else: + raise NotImplementedError() + + elif dataset_info is not None: + kpt_num = dataset_info.keypoint_num + skeleton = dataset_info.skeleton for res in result: track_id = res['track_id'] bbox_color = palette[track_id % len(palette)] pose_kpt_color = palette[[track_id % len(palette)] * kpt_num] - pose_limb_color = palette[[track_id % len(palette)] * len(skeleton)] + pose_link_color = palette[[track_id % len(palette)] * len(skeleton)] img = model.show_result( img, [res], skeleton, radius=radius, thickness=thickness, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, bbox_color=tuple(bbox_color.tolist()), kpt_score_thr=kpt_score_thr, show=show, diff --git a/mmpose/apis/train.py b/mmpose/apis/train.py index cd22fb0f4b..c191e0bfce 100644 --- a/mmpose/apis/train.py +++ b/mmpose/apis/train.py @@ -13,8 +13,9 @@ try: from mmcv.runner import Fp16OptimizerHook except ImportError: - warnings.warn('Fp16OptimizerHook from mmpose will be deprecated from ' - 'v0.15.0. Please install mmcv>=1.1.4') + warnings.warn( + 'Fp16OptimizerHook from mmpose will be deprecated from ' + 'v0.15.0. Please install mmcv>=1.1.4', DeprecationWarning) from mmpose.core import Fp16OptimizerHook diff --git a/mmpose/core/post_processing/one_euro_filter.py b/mmpose/core/post_processing/one_euro_filter.py index 614516f2ee..ab69c243b1 100644 --- a/mmpose/core/post_processing/one_euro_filter.py +++ b/mmpose/core/post_processing/one_euro_filter.py @@ -42,7 +42,7 @@ def __init__(self, self.beta = np.full(x0.shape, beta) self.d_cutoff = np.full(x0.shape, d_cutoff) # Previous values. - self.x_prev = x0.astype(float) + self.x_prev = x0.astype(np.float32) self.dx_prev = np.full(x0.shape, dx0) self.mask_prev = np.ma.masked_where(x0 <= 0, x0) self.realtime = True diff --git a/mmpose/core/visualization/image.py b/mmpose/core/visualization/image.py index a68839397d..3a957928ce 100644 --- a/mmpose/core/visualization/image.py +++ b/mmpose/core/visualization/image.py @@ -8,6 +8,7 @@ import numpy as np import trimesh from matplotlib import pyplot as plt +from mmcv.utils.misc import deprecated_api_warning from mmcv.visualization.color import color_val try: @@ -95,16 +96,17 @@ def imshow_bboxes(img, return img +@deprecated_api_warning({'pose_limb_color': 'pose_link_color'}) def imshow_keypoints(img, pose_result, skeleton=None, kpt_score_thr=0.3, pose_kpt_color=None, - pose_limb_color=None, + pose_link_color=None, radius=4, thickness=1, show_keypoint_weight=False): - """Draw keypoints and limbs on an image. + """Draw keypoints and links on an image. Args: img (str or Tensor): The image to draw poses on. If an image array @@ -116,8 +118,8 @@ def imshow_keypoints(img, to be shown. Default: 0.3. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, the keypoint will not be drawn. - pose_limb_color (np.array[Mx3]): Color of M limbs. If None, the - limbs will not be drawn. + pose_link_color (np.array[Mx3]): Color of M links. If None, the + links will not be drawn. thickness (int): Thickness of lines. """ @@ -149,18 +151,18 @@ def imshow_keypoints(img, cv2.circle(img, (int(x_coord), int(y_coord)), radius, (int(r), int(g), int(b)), -1) - # draw limbs - if skeleton is not None and pose_limb_color is not None: - assert len(pose_limb_color) == len(skeleton) + # draw links + if skeleton is not None and pose_link_color is not None: + assert len(pose_link_color) == len(skeleton) for sk_id, sk in enumerate(skeleton): - pos1 = (int(kpts[sk[0] - 1, 0]), int(kpts[sk[0] - 1, 1])) - pos2 = (int(kpts[sk[1] - 1, 0]), int(kpts[sk[1] - 1, 1])) + pos1 = (int(kpts[sk[0], 0]), int(kpts[sk[0], 1])) + pos2 = (int(kpts[sk[1], 0]), int(kpts[sk[1], 1])) if (pos1[0] > 0 and pos1[0] < img_w and pos1[1] > 0 and pos1[1] < img_h and pos2[0] > 0 and pos2[0] < img_w and pos2[1] > 0 and pos2[1] < img_h - and kpts[sk[0] - 1, 2] > kpt_score_thr - and kpts[sk[1] - 1, 2] > kpt_score_thr): - r, g, b = pose_limb_color[sk_id] + and kpts[sk[0], 2] > kpt_score_thr + and kpts[sk[1], 2] > kpt_score_thr): + r, g, b = pose_link_color[sk_id] if show_keypoint_weight: img_copy = img.copy() X = (pos1[0], pos2[0]) @@ -178,10 +180,7 @@ def imshow_keypoints(img, cv2.fillConvexPoly(img_copy, polygon, (int(r), int(g), int(b))) transparency = max( - 0, - min( - 1, 0.5 * - (kpts[sk[0] - 1, 2] + kpts[sk[1] - 1, 2]))) + 0, min(1, 0.5 * (kpts[sk[0], 2] + kpts[sk[1], 2]))) cv2.addWeighted( img_copy, transparency, @@ -204,7 +203,7 @@ def imshow_keypoints_3d( img=None, skeleton=None, pose_kpt_color=None, - pose_limb_color=None, + pose_link_color=None, vis_height=400, kpt_score_thr=0.3, num_instances=-1, @@ -214,7 +213,7 @@ def imshow_keypoints_3d( axis_dist=10.0, axis_elev=15.0, ): - """Draw 3D keypoints and limbs in 3D coordinates. + """Draw 3D keypoints and links in 3D coordinates. Args: pose_result (list[dict]): 3D pose results containing: @@ -225,11 +224,11 @@ def imshow_keypoints_3d( image and/or 2D pose. Note that the image should be given in BGR channel order. skeleton (list of [idx_i,idx_j]): Skeleton described by a list of - limbs, each is a pair of joint indices. + links, each is a pair of joint indices. pose_kpt_color (np.ndarray[Nx3]`): Color of N keypoints. If None, do not nddraw keypoints. - pose_limb_color (np.array[Mx3]): Color of M limbs. If None, do not - draw limbs. + pose_link_color (np.array[Mx3]): Color of M links. If None, do not + draw links. vis_height (int): The image hight of the visualization. The width will be N*vis_height depending on the number of visualized items. @@ -317,18 +316,18 @@ def imshow_keypoints_3d( color=_color[valid], ) - if not dummy and skeleton is not None and pose_limb_color is not None: - pose_limb_color = np.array(pose_limb_color) - assert len(pose_limb_color) == len(skeleton) - for limb, limb_color in zip(skeleton, pose_limb_color): - limb_indices = [_i - 1 for _i in limb] - xs_3d = kpts[limb_indices, 0] - ys_3d = kpts[limb_indices, 1] - zs_3d = kpts[limb_indices, 2] - kpt_score = kpts[limb_indices, 3] + if not dummy and skeleton is not None and pose_link_color is not None: + pose_link_color = np.array(pose_link_color) + assert len(pose_link_color) == len(skeleton) + for link, link_color in zip(skeleton, pose_link_color): + link_indices = [_i for _i in link] + xs_3d = kpts[link_indices, 0] + ys_3d = kpts[link_indices, 1] + zs_3d = kpts[link_indices, 2] + kpt_score = kpts[link_indices, 3] if kpt_score.min() > kpt_score_thr: # matplotlib uses RGB color in [0, 1] value range - _color = limb_color[::-1] / 255. + _color = link_color[::-1] / 255. ax.plot(xs_3d, ys_3d, zs_3d, color=_color, zdir='z') if 'title' in res: diff --git a/mmpose/datasets/__init__.py b/mmpose/datasets/__init__.py index 7e1d274632..f940aff5c4 100644 --- a/mmpose/datasets/__init__.py +++ b/mmpose/datasets/__init__.py @@ -1,5 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. from .builder import DATASETS, PIPELINES, build_dataloader, build_dataset +from .dataset_info import DatasetInfo from .pipelines import Compose from .samplers import DistributedSampler @@ -31,5 +32,5 @@ 'Face300WDataset', 'AnimalHorse10Dataset', 'AnimalMacaqueDataset', 'AnimalFlyDataset', 'AnimalLocustDataset', 'AnimalZebraDataset', 'AnimalPoseDataset', 'build_dataloader', 'build_dataset', 'Compose', - 'DistributedSampler', 'DATASETS', 'PIPELINES' + 'DistributedSampler', 'DATASETS', 'PIPELINES', 'DatasetInfo' ] diff --git a/mmpose/datasets/dataset_info.py b/mmpose/datasets/dataset_info.py new file mode 100644 index 0000000000..ef0d62e430 --- /dev/null +++ b/mmpose/datasets/dataset_info.py @@ -0,0 +1,104 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import numpy as np + + +class DatasetInfo: + + def __init__(self, dataset_info): + self._dataset_info = dataset_info + self.dataset_name = self._dataset_info['dataset_name'] + self.paper_info = self._dataset_info['paper_info'] + self.keypoint_info = self._dataset_info['keypoint_info'] + self.skeleton_info = self._dataset_info['skeleton_info'] + self.joint_weights = np.array( + self._dataset_info['joint_weights'], dtype=np.float32)[:, None] + + self.sigmas = np.array(self._dataset_info['sigmas']) + + self._parse_keypoint_info() + self._parse_skeleton_info() + + def _parse_skeleton_info(self): + """Parse skeleton information. + + - link_num (int): number of links. + - skeleton (list((2,))): list of links (id). + - skeleton_name (list((2,))): list of links (name). + - pose_link_color (np.ndarray): the color of the link for + visualization. + """ + self.link_num = len(self.skeleton_info.keys()) + self.pose_link_color = [] + + self.skeleton_name = [] + self.skeleton = [] + for skid in self.skeleton_info.keys(): + link = self.skeleton_info[skid]['link'] + self.skeleton_name.append(link) + self.skeleton.append([ + self.keypoint_name2id[link[0]], self.keypoint_name2id[link[1]] + ]) + self.pose_link_color.append(self.skeleton_info[skid].get( + 'color', [255, 128, 0])) + self.pose_link_color = np.array(self.pose_link_color) + + def _parse_keypoint_info(self): + """Parse keypoint information. + + - keypoint_num (int): number of keypoints. + - keypoint_id2name (dict): mapping keypoint id to keypoint name. + - keypoint_name2id (dict): mapping keypoint name to keypoint id. + - upper_body_ids (list): a list of keypoints that belong to the + upper body. + - lower_body_ids (list): a list of keypoints that belong to the + lower body. + - flip_index (list): list of flip index (id) + - flip_pairs (list((2,))): list of flip pairs (id) + - flip_index_name (list): list of flip index (name) + - flip_pairs_name (list((2,))): list of flip pairs (name) + - pose_kpt_color (np.ndarray): the color of the keypoint for + visualization. + """ + + self.keypoint_num = len(self.keypoint_info.keys()) + self.keypoint_id2name = {} + self.keypoint_name2id = {} + + self.pose_kpt_color = [] + self.upper_body_ids = [] + self.lower_body_ids = [] + + self.flip_index_name = [] + self.flip_pairs_name = [] + + for kid in self.keypoint_info.keys(): + + keypoint_name = self.keypoint_info[kid]['name'] + self.keypoint_id2name[kid] = keypoint_name + self.keypoint_name2id[keypoint_name] = kid + self.pose_kpt_color.append(self.keypoint_info[kid].get( + 'color', [255, 128, 0])) + + type = self.keypoint_info[kid].get('type', '') + if type == 'upper': + self.upper_body_ids.append(kid) + elif type == 'lower': + self.lower_body_ids.append(kid) + else: + pass + + swap_keypoint = self.keypoint_info[kid].get('swap', '') + if swap_keypoint == keypoint_name or swap_keypoint == '': + self.flip_index_name.append(keypoint_name) + else: + self.flip_index_name.append(swap_keypoint) + if [swap_keypoint, keypoint_name] not in self.flip_pairs_name: + self.flip_pairs_name.append([keypoint_name, swap_keypoint]) + + self.flip_pairs = [[ + self.keypoint_name2id[pair[0]], self.keypoint_name2id[pair[1]] + ] for pair in self.flip_pairs_name] + self.flip_index = [ + self.keypoint_name2id[name] for name in self.flip_index_name + ] + self.pose_kpt_color = np.array(self.pose_kpt_color) diff --git a/mmpose/datasets/datasets/animal/animal_atrw_dataset.py b/mmpose/datasets/datasets/animal/animal_atrw_dataset.py index 066b907470..a4f3e1cc1f 100644 --- a/mmpose/datasets/datasets/animal/animal_atrw_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_atrw_dataset.py @@ -5,16 +5,16 @@ import json_tricks as json import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalATRWDataset(AnimalBaseDataset): +class AnimalATRWDataset(Kpt2dSviewRgbImgTopDownDataset): """ATRW dataset for animal pose estimation. `ATRW: A Benchmark for Amur Tiger Re-identification in the Wild' @@ -49,6 +49,7 @@ class AnimalATRWDataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -58,58 +59,35 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/atrw.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.use_gt_bbox = data_cfg['use_gt_bbox'] self.bbox_file = data_cfg['bbox_file'] self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] self.use_nms = data_cfg.get('use_nms', True) self.soft_nms = data_cfg['soft_nms'] self.nms_thr = data_cfg['nms_thr'] self.oks_thr = data_cfg['oks_thr'] self.vis_thr = data_cfg['vis_thr'] - self.ann_info['flip_pairs'] = [[0, 1], [3, 5], [4, 6], [7, 10], - [8, 11], [9, 12]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6) - self.ann_info['lower_body_ids'] = (7, 8, 9, 10, 11, 12, 13, 14) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # `ATRW: A Benchmark for Amur Tiger Re-identification in the Wild' - self.sigmas = np.array([ - 2.77, 8.23, 8.31, 2.02, 7.16, 2.63, 6.46, 3.02, 4.40, 3.16, 3.33, - 5.47, 2.63, 6.83, 5.39 - ]) / 100.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'atrw' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/animal/animal_base_dataset.py b/mmpose/datasets/datasets/animal/animal_base_dataset.py index 2ece2432ee..e191882f34 100644 --- a/mmpose/datasets/datasets/animal/animal_base_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_base_dataset.py @@ -1,149 +1,16 @@ # Copyright (c) OpenMMLab. All rights reserved. -import copy -from abc import ABCMeta, abstractmethod +from abc import ABCMeta -import json_tricks as json -import numpy as np from torch.utils.data import Dataset -from xtcocotools.coco import COCO - -from mmpose.datasets.pipelines import Compose class AnimalBaseDataset(Dataset, metaclass=ABCMeta): - """Base class for animal datasets. - - All top-down datasets should subclass it. - All subclasses should overwrite: - Methods:`_get_db` - - Args: - ann_file (str): Path to the annotation file. - img_prefix (str): Path to a directory where images are held. - Default: None. - data_cfg (dict): config - pipeline (list[dict | callable]): A sequence of data transforms. - test_mode (bool): Store True when building test or - validation dataset. Default: False. - """ - - def __init__(self, - ann_file, - img_prefix, - data_cfg, - pipeline, - test_mode=False): - - self.image_info = {} - self.ann_info = {} - - self.annotations_path = ann_file - self.img_prefix = img_prefix - self.pipeline = pipeline - self.test_mode = test_mode - - self.ann_info['image_size'] = np.array(data_cfg['image_size']) - self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) - self.ann_info['num_joints'] = data_cfg['num_joints'] - - self.ann_info['flip_pairs'] = [] - - self.ann_info['inference_channel'] = data_cfg['inference_channel'] - self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] - self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] - - self.coco = COCO(ann_file) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - - self.db = [] - - self.pipeline = Compose(self.pipeline) - - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - - def _xywh2cs(self, x, y, w, h, padding=1.25): - """This encodes bbox(x,y,w,h) into (center, scale) - - Args: - x, y, w, h - - Returns: - center (np.ndarray[float32](2,)): center of the bbox (x, y). - scale (np.ndarray[float32](2,)): scale of the bbox w & h. - """ - aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ - 'image_size'][1] - center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) - - if (not self.test_mode) and np.random.rand() < 0.3: - center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] - - if w > aspect_ratio * h: - h = w * 1.0 / aspect_ratio - elif w < aspect_ratio * h: - w = h * aspect_ratio - - # pixel std is 200.0 - scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) - # padding to include proper amount of context - scale = scale * padding - - return center, scale - - @abstractmethod - def _get_db(self): - """Load dataset.""" - raise NotImplementedError - - @abstractmethod - def evaluate(self, cfg, preds, output_dir, *args, **kwargs): - """Evaluate keypoint results.""" - raise NotImplementedError - - @staticmethod - def _write_keypoint_results(keypoints, res_file): - """Write results into a json file.""" - - with open(res_file, 'w') as f: - json.dump(keypoints, f, sort_keys=True, indent=4) - - def __len__(self): - """Get the size of the dataset.""" - return len(self.db) - - def __getitem__(self, idx): - """Get the sample given index.""" - results = copy.deepcopy(self.db[idx]) - results['ann_info'] = self.ann_info - return self.pipeline(results) - - def _sort_and_unique_bboxes(self, kpts, key='bbox_id'): - """sort kpts and remove the repeated ones.""" - kpts = sorted(kpts, key=lambda x: x[key]) - num = len(kpts) - for i in range(num - 1, 0, -1): - if kpts[i][key] == kpts[i - 1][key]: - del kpts[i] - - return kpts + """This class has been deprecated and replaced by + Kpt2dSviewRgbImgTopDownDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'AnimalBaseDataset has been replaced by ' + 'Kpt2dSviewRgbImgTopDownDataset,' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/animal/animal_fly_dataset.py b/mmpose/datasets/datasets/animal/animal_fly_dataset.py index 5e3a91781d..6a08ed91e5 100644 --- a/mmpose/datasets/datasets/animal/animal_fly_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_fly_dataset.py @@ -1,18 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe, - keypoint_pck_accuracy) from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalFlyDataset(AnimalBaseDataset): +class AnimalFlyDataset(Kpt2dSviewRgbImgTopDownDataset): """AnimalFlyDataset for animal pose estimation. `Fast animal pose estimation using deep neural networks' @@ -64,6 +63,7 @@ class AnimalFlyDataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -73,22 +73,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/fly.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 32 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[1, 2], [6, 18], [7, 19], [8, 20], - [9, 21], [10, 22], [11, 23], [12, 24], - [13, 25], [14, 26], [15, 27], [16, 28], - [17, 29], [30, 31]] - - self.dataset_name = 'fly' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -137,59 +141,6 @@ def _get_db(self): return gt_db - def _report_metric(self, res_file, metrics, pck_thr=0.2, auc_nor=30): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'PCKh', 'AUC', 'EPE'. - pck_thr (float): PCK threshold, default as 0.2. - pckh_thr (float): PCKh threshold, default as 0.7. - auc_nor (float): AUC normalization factor, default as 30 pixel. - - Returns: - List: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - threshold_bbox = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - if 'PCK' in metrics: - bbox = np.array(item['bbox']) - bbox_thr = np.max(bbox[2:]) - threshold_bbox.append(np.array([bbox_thr, bbox_thr])) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - threshold_bbox = np.array(threshold_bbox) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - threshold_bbox) - info_str.append(('PCK', pck)) - - if 'AUC' in metrics: - info_str.append(('AUC', keypoint_auc(outputs, gts, masks, - auc_nor))) - - if 'EPE' in metrics: - info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) - - return info_str - def evaluate(self, outputs, res_folder, metric='PCK', **kwargs): """Evaluate Fly keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/animal/animal_horse10_dataset.py b/mmpose/datasets/datasets/animal/animal_horse10_dataset.py index d5cd227044..2c8b8ddd22 100644 --- a/mmpose/datasets/datasets/animal/animal_horse10_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_horse10_dataset.py @@ -1,18 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import (keypoint_nme, - keypoint_pck_accuracy) from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalHorse10Dataset(AnimalBaseDataset): +class AnimalHorse10Dataset(Kpt2dSviewRgbImgTopDownDataset): """AnimalHorse10Dataset for animal pose estimation. `Pretraining boosts out-of-domain robustness for pose estimation' @@ -53,6 +52,7 @@ class AnimalHorse10Dataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -62,17 +62,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/horse10.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 22 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'horse10' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -136,50 +145,6 @@ def _get_normalize_factor(self, gts): gts[:, 0, :] - gts[:, 1, :], axis=1, keepdims=True) return np.tile(interocular, [1, 2]) - def _report_metric(self, res_file, metrics, pck_thr=0.3): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'NME'. - pck_thr (float): PCK threshold, default: 0.3. - - Returns: - dict: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - - normalize_factor = self._get_normalize_factor(gts) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - normalize_factor) - info_str.append(('PCK', pck)) - - if 'NME' in metrics: - info_str.append( - ('NME', keypoint_nme(outputs, gts, masks, normalize_factor))) - - return info_str - def evaluate(self, outputs, res_folder, metric='PCK', **kwargs): """Evaluate horse-10 keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/animal/animal_locust_dataset.py b/mmpose/datasets/datasets/animal/animal_locust_dataset.py index 779416ddf6..c0aacb3636 100644 --- a/mmpose/datasets/datasets/animal/animal_locust_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_locust_dataset.py @@ -1,18 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe, - keypoint_pck_accuracy) from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalLocustDataset(AnimalBaseDataset): +class AnimalLocustDataset(Kpt2dSviewRgbImgTopDownDataset): """AnimalLocustDataset for animal pose estimation. `DeepPoseKit, a software toolkit for fast and robust animal @@ -66,6 +65,7 @@ class AnimalLocustDataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -75,22 +75,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/locust.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 35 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[5, 20], [6, 21], [7, 22], [8, 23], - [9, 24], [10, 25], [11, 26], [12, 27], - [13, 28], [14, 29], [15, 30], [16, 31], - [17, 32], [18, 33], [19, 34]] - - self.dataset_name = 'locust' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -139,59 +143,6 @@ def _get_db(self): return gt_db - def _report_metric(self, res_file, metrics, pck_thr=0.2, auc_nor=30): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'PCKh', 'AUC', 'EPE'. - pck_thr (float): PCK threshold, default as 0.2. - pckh_thr (float): PCKh threshold, default as 0.7. - auc_nor (float): AUC normalization factor, default as 30 pixel. - - Returns: - List: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - threshold_bbox = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - if 'PCK' in metrics: - bbox = np.array(item['bbox']) - bbox_thr = np.max(bbox[2:]) - threshold_bbox.append(np.array([bbox_thr, bbox_thr])) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - threshold_bbox = np.array(threshold_bbox) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - threshold_bbox) - info_str.append(('PCK', pck)) - - if 'AUC' in metrics: - info_str.append(('AUC', keypoint_auc(outputs, gts, masks, - auc_nor))) - - if 'EPE' in metrics: - info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) - - return info_str - def evaluate(self, outputs, res_folder, metric='PCK', **kwargs): """Evaluate Fly keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/animal/animal_macaque_dataset.py b/mmpose/datasets/datasets/animal/animal_macaque_dataset.py index 7666d88561..abe5f21872 100644 --- a/mmpose/datasets/datasets/animal/animal_macaque_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_macaque_dataset.py @@ -5,16 +5,16 @@ import json_tricks as json import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalMacaqueDataset(AnimalBaseDataset): +class AnimalMacaqueDataset(Kpt2dSviewRgbImgTopDownDataset): """MacaquePose dataset for animal pose estimation. `MacaquePose: A novel ‘in the wild’ macaque monkey pose dataset @@ -51,6 +51,7 @@ class AnimalMacaqueDataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -60,62 +61,35 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/macaque.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.use_gt_bbox = data_cfg['use_gt_bbox'] self.bbox_file = data_cfg['bbox_file'] self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] self.use_nms = data_cfg.get('use_nms', True) self.soft_nms = data_cfg['soft_nms'] self.nms_thr = data_cfg['nms_thr'] self.oks_thr = data_cfg['oks_thr'] self.vis_thr = data_cfg['vis_thr'] - self.ann_info['flip_pairs'] = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], - [11, 12], [13, 14], [15, 16]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) - self.ann_info['lower_body_ids'] = (11, 12, 13, 14, 15, 16) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, - 1.2, 1.5, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # 'https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/' - # 'pycocotools/cocoeval.py#L523' - self.sigmas = np.array([ - .26, .25, .25, .35, .35, .79, .79, .72, .72, .62, .62, 1.07, 1.07, - .87, .87, .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'macaque' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/animal/animal_pose_dataset.py b/mmpose/datasets/datasets/animal/animal_pose_dataset.py index dd025fc0ac..2765365ede 100644 --- a/mmpose/datasets/datasets/animal/animal_pose_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_pose_dataset.py @@ -5,16 +5,16 @@ import json_tricks as json import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalPoseDataset(AnimalBaseDataset): +class AnimalPoseDataset(Kpt2dSviewRgbImgTopDownDataset): """Animal-Pose dataset for animal pose estimation. `Cross-domain Adaptation For Animal Pose Estimation’ ICCV'2019 @@ -53,6 +53,7 @@ class AnimalPoseDataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -62,64 +63,35 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/animalpose.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.use_gt_bbox = data_cfg['use_gt_bbox'] self.bbox_file = data_cfg['bbox_file'] self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] self.use_nms = data_cfg.get('use_nms', True) self.soft_nms = data_cfg['soft_nms'] self.nms_thr = data_cfg['nms_thr'] self.oks_thr = data_cfg['oks_thr'] self.vis_thr = data_cfg['vis_thr'] - self.ann_info['flip_pairs'] = [[0, 1], [2, 3], [8, 9], [10, 11], - [12, 13], [14, 15], [16, 17], [18, 19]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 7, 8, 9, 12, 13, - 16, 17) - self.ann_info['lower_body_ids'] = (6, 10, 11, 14, 15, 18, 19) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.2, - 1.2, 1.5, 1.5, 1.5, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # Note: The original paper did not provide enough information about - # the sigmas. We modified from 'https://github.com/cocodataset/' - # 'cocoapi/blob/master/PythonAPI/pycocotools/cocoeval.py#L523' - self.sigmas = np.array([ - .25, .25, .26, .35, .35, 1.0, 1.0, 1.0, 1.07, 1.07, 1.07, 1.07, - .87, .87, .87, .87, .89, .89, .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'animalpose' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/animal/animal_zebra_dataset.py b/mmpose/datasets/datasets/animal/animal_zebra_dataset.py index 4efb646643..75619f6b14 100644 --- a/mmpose/datasets/datasets/animal/animal_zebra_dataset.py +++ b/mmpose/datasets/datasets/animal/animal_zebra_dataset.py @@ -1,18 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe, - keypoint_pck_accuracy) from ...builder import DATASETS -from .animal_base_dataset import AnimalBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class AnimalZebraDataset(AnimalBaseDataset): +class AnimalZebraDataset(Kpt2dSviewRgbImgTopDownDataset): """AnimalZebraDataset for animal pose estimation. `DeepPoseKit, a software toolkit for fast and robust animal @@ -40,6 +39,7 @@ class AnimalZebraDataset(AnimalBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -49,19 +49,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/zebra.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 9 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[3, 4], [5, 6]] - - self.dataset_name = 'zebra' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -110,59 +117,6 @@ def _get_db(self): return gt_db - def _report_metric(self, res_file, metrics, pck_thr=0.2, auc_nor=30): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'PCKh', 'AUC', 'EPE'. - pck_thr (float): PCK threshold, default as 0.2. - pckh_thr (float): PCKh threshold, default as 0.7. - auc_nor (float): AUC normalization factor, default as 30 pixel. - - Returns: - List: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - threshold_bbox = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - if 'PCK' in metrics: - bbox = np.array(item['bbox']) - bbox_thr = np.max(bbox[2:]) - threshold_bbox.append(np.array([bbox_thr, bbox_thr])) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - threshold_bbox = np.array(threshold_bbox) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - threshold_bbox) - info_str.append(('PCK', pck)) - - if 'AUC' in metrics: - info_str.append(('AUC', keypoint_auc(outputs, gts, masks, - auc_nor))) - - if 'EPE' in metrics: - info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) - - return info_str - def evaluate(self, outputs, res_folder, metric='PCK', **kwargs): """Evaluate Fly keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/base/__init__.py b/mmpose/datasets/datasets/base/__init__.py new file mode 100644 index 0000000000..dfa6c98ad6 --- /dev/null +++ b/mmpose/datasets/datasets/base/__init__.py @@ -0,0 +1,13 @@ +# Copyright (c) OpenMMLab. All rights reserved. +from .kpt_2d_sview_rgb_img_bottom_up_dataset import \ + Kpt2dSviewRgbImgBottomUpDataset +from .kpt_2d_sview_rgb_img_top_down_dataset import \ + Kpt2dSviewRgbImgTopDownDataset +from .kpt_3d_sview_kpt_2d_dataset import Kpt3dSviewKpt2dDataset +from .kpt_3d_sview_rgb_img_top_down_dataset import \ + Kpt3dSviewRgbImgTopDownDataset + +__all__ = [ + 'Kpt2dSviewRgbImgTopDownDataset', 'Kpt3dSviewRgbImgTopDownDataset', + 'Kpt2dSviewRgbImgBottomUpDataset', 'Kpt3dSviewKpt2dDataset' +] diff --git a/mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_bottom_up_dataset.py b/mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_bottom_up_dataset.py new file mode 100644 index 0000000000..65a05ad853 --- /dev/null +++ b/mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_bottom_up_dataset.py @@ -0,0 +1,189 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import copy +from abc import ABCMeta, abstractmethod + +import numpy as np +import xtcocotools +from torch.utils.data import Dataset +from xtcocotools.coco import COCO + +from mmpose.datasets import DatasetInfo +from mmpose.datasets.pipelines import Compose + + +class Kpt2dSviewRgbImgBottomUpDataset(Dataset, metaclass=ABCMeta): + """Base class for bottom-up datasets. + + All datasets should subclass it. + All subclasses should overwrite: + Methods:`_get_single` + + Args: + ann_file (str): Path to the annotation file. + img_prefix (str): Path to a directory where images are held. + Default: None. + data_cfg (dict): config + pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. + coco_style (bool): Whether the annotation json is coco-style. + Default: True + test_mode (bool): Store True when building test or + validation dataset. Default: False. + """ + + def __init__(self, + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=None, + coco_style=True, + test_mode=False): + + self.image_info = {} + self.ann_info = {} + + self.ann_file = ann_file + self.img_prefix = img_prefix + self.pipeline = pipeline + self.test_mode = test_mode + + # bottom-up + self.base_size = data_cfg['base_size'] + self.base_sigma = data_cfg['base_sigma'] + self.int_sigma = False + + self.ann_info['image_size'] = np.array(data_cfg['image_size']) + self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) + self.ann_info['num_joints'] = data_cfg['num_joints'] + self.ann_info['num_scales'] = data_cfg['num_scales'] + self.ann_info['scale_aware_sigma'] = data_cfg['scale_aware_sigma'] + + self.ann_info['inference_channel'] = data_cfg['inference_channel'] + self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] + + self.use_nms = data_cfg.get('use_nms', False) + self.soft_nms = data_cfg.get('soft_nms', True) + self.oks_thr = data_cfg.get('oks_thr', 0.9) + + if dataset_info is None: + raise ValueError( + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.') + + dataset_info = DatasetInfo(dataset_info) + + assert self.ann_info['num_joints'] == dataset_info.keypoint_num + self.ann_info['flip_pairs'] = dataset_info.flip_pairs + self.ann_info['flip_index'] = dataset_info.flip_index + self.ann_info['upper_body_ids'] = dataset_info.upper_body_ids + self.ann_info['lower_body_ids'] = dataset_info.lower_body_ids + self.ann_info['joint_weights'] = dataset_info.joint_weights + self.ann_info['skeleton'] = dataset_info.skeleton + self.sigmas = dataset_info.sigmas + self.dataset_name = dataset_info.dataset_name + + if coco_style: + self.coco = COCO(ann_file) + if 'categories' in self.coco.dataset: + cats = [ + cat['name'] + for cat in self.coco.loadCats(self.coco.getCatIds()) + ] + self.classes = ['__background__'] + cats + self.num_classes = len(self.classes) + self._class_to_ind = dict( + zip(self.classes, range(self.num_classes))) + self._class_to_coco_ind = dict( + zip(cats, self.coco.getCatIds())) + self._coco_ind_to_class_ind = dict( + (self._class_to_coco_ind[cls], self._class_to_ind[cls]) + for cls in self.classes[1:]) + self.img_ids = self.coco.getImgIds() + if not test_mode: + self.img_ids = [ + img_id for img_id in self.img_ids if + len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0 + ] + self.num_images = len(self.img_ids) + self.id2name, self.name2id = self._get_mapping_id_name( + self.coco.imgs) + + self.pipeline = Compose(self.pipeline) + + @staticmethod + def _get_mapping_id_name(imgs): + """ + Args: + imgs (dict): dict of image info. + + Returns: + tuple: Image name & id mapping dicts. + + - id2name (dict): Mapping image id to name. + - name2id (dict): Mapping image name to id. + """ + id2name = {} + name2id = {} + for image_id, image in imgs.items(): + file_name = image['file_name'] + id2name[image_id] = file_name + name2id[file_name] = image_id + + return id2name, name2id + + def _get_mask(self, anno, idx): + """Get ignore masks to mask out losses.""" + coco = self.coco + img_info = coco.loadImgs(self.img_ids[idx])[0] + + m = np.zeros((img_info['height'], img_info['width']), dtype=np.float32) + + for obj in anno: + if 'segmentation' in obj: + if obj['iscrowd']: + rle = xtcocotools.mask.frPyObjects(obj['segmentation'], + img_info['height'], + img_info['width']) + m += xtcocotools.mask.decode(rle) + elif obj['num_keypoints'] == 0: + rles = xtcocotools.mask.frPyObjects( + obj['segmentation'], img_info['height'], + img_info['width']) + for rle in rles: + m += xtcocotools.mask.decode(rle) + + return m < 0.5 + + @abstractmethod + def _get_single(self, idx): + """Get anno for a single image.""" + raise NotImplementedError + + @abstractmethod + def evaluate(self, cfg, outputs, res_folder, metric, *args, **kwargs): + """Evaluate keypoint results.""" + raise NotImplementedError + + def prepare_train_img(self, idx): + """Prepare image for training given the index.""" + results = copy.deepcopy(self._get_single(idx)) + results['ann_info'] = self.ann_info + return self.pipeline(results) + + def prepare_test_img(self, idx): + """Prepare image for testing given the index.""" + results = copy.deepcopy(self._get_single(idx)) + results['ann_info'] = self.ann_info + return self.pipeline(results) + + def __len__(self): + """Get dataset length.""" + return len(self.img_ids) + + def __getitem__(self, idx): + """Get the sample for either training or testing given index.""" + if self.test_mode: + return self.prepare_test_img(idx) + + return self.prepare_train_img(idx) diff --git a/mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_top_down_dataset.py b/mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_top_down_dataset.py new file mode 100644 index 0000000000..77769b465f --- /dev/null +++ b/mmpose/datasets/datasets/base/kpt_2d_sview_rgb_img_top_down_dataset.py @@ -0,0 +1,282 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import copy +from abc import ABCMeta, abstractmethod + +import json_tricks as json +import numpy as np +from torch.utils.data import Dataset +from xtcocotools.coco import COCO + +from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe, + keypoint_nme, + keypoint_pck_accuracy) +from mmpose.datasets import DatasetInfo +from mmpose.datasets.pipelines import Compose + + +class Kpt2dSviewRgbImgTopDownDataset(Dataset, metaclass=ABCMeta): + """Base class for keypoint 2D top-down pose estimation with single-view RGB + image as the input. + + All fashion datasets should subclass it. + All subclasses should overwrite: + Methods:`_get_db`, 'evaluate' + + Args: + ann_file (str): Path to the annotation file. + img_prefix (str): Path to a directory where images are held. + Default: None. + data_cfg (dict): config + pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. + coco_style (bool): Whether the annotation json is coco-style. + Default: True + test_mode (bool): Store True when building test or + validation dataset. Default: False. + """ + + def __init__(self, + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=None, + coco_style=True, + test_mode=False): + + self.image_info = {} + self.ann_info = {} + + self.ann_file = ann_file + self.img_prefix = img_prefix + self.pipeline = pipeline + self.test_mode = test_mode + + self.ann_info['image_size'] = np.array(data_cfg['image_size']) + self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) + self.ann_info['num_joints'] = data_cfg['num_joints'] + + self.ann_info['inference_channel'] = data_cfg['inference_channel'] + self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] + self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] + + if dataset_info is None: + raise ValueError( + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.') + + dataset_info = DatasetInfo(dataset_info) + + assert self.ann_info['num_joints'] == dataset_info.keypoint_num + self.ann_info['flip_pairs'] = dataset_info.flip_pairs + self.ann_info['flip_index'] = dataset_info.flip_index + self.ann_info['upper_body_ids'] = dataset_info.upper_body_ids + self.ann_info['lower_body_ids'] = dataset_info.lower_body_ids + self.ann_info['joint_weights'] = dataset_info.joint_weights + self.ann_info['skeleton'] = dataset_info.skeleton + self.sigmas = dataset_info.sigmas + self.dataset_name = dataset_info.dataset_name + + if coco_style: + self.coco = COCO(ann_file) + if 'categories' in self.coco.dataset: + cats = [ + cat['name'] + for cat in self.coco.loadCats(self.coco.getCatIds()) + ] + self.classes = ['__background__'] + cats + self.num_classes = len(self.classes) + self._class_to_ind = dict( + zip(self.classes, range(self.num_classes))) + self._class_to_coco_ind = dict( + zip(cats, self.coco.getCatIds())) + self._coco_ind_to_class_ind = dict( + (self._class_to_coco_ind[cls], self._class_to_ind[cls]) + for cls in self.classes[1:]) + self.img_ids = self.coco.getImgIds() + self.num_images = len(self.img_ids) + self.id2name, self.name2id = self._get_mapping_id_name( + self.coco.imgs) + + self.db = [] + + self.pipeline = Compose(self.pipeline) + + @staticmethod + def _get_mapping_id_name(imgs): + """ + Args: + imgs (dict): dict of image info. + + Returns: + tuple: Image name & id mapping dicts. + + - id2name (dict): Mapping image id to name. + - name2id (dict): Mapping image name to id. + """ + id2name = {} + name2id = {} + for image_id, image in imgs.items(): + file_name = image['file_name'] + id2name[image_id] = file_name + name2id[file_name] = image_id + + return id2name, name2id + + def _xywh2cs(self, x, y, w, h, padding=1.25): + """This encodes bbox(x,y,w,h) into (center, scale) + + Args: + x, y, w, h (float): left, top, width and height + padding (float): bounding box padding factor + + Returns: + center (np.ndarray[float32](2,)): center of the bbox (x, y). + scale (np.ndarray[float32](2,)): scale of the bbox w & h. + """ + aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ + 'image_size'][1] + center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) + + if (not self.test_mode) and np.random.rand() < 0.3: + center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] + + if w > aspect_ratio * h: + h = w * 1.0 / aspect_ratio + elif w < aspect_ratio * h: + w = h * aspect_ratio + + # pixel std is 200.0 + scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) + # padding to include proper amount of context + scale = scale * padding + + return center, scale + + def _get_normalize_factor(self, gts, *args, **kwargs): + """Get the normalize factor. generally inter-ocular distance measured + as the Euclidean distance between the outer corners of the eyes is + used. This function should be overrided to measure NME. + + Args: + gts (np.ndarray[N, K, 2]): Groundtruth keypoint location. + + Return: + np.ndarray[N, 2]: normalized factor + """ + return np.ones([gts.shape[0], 2], dtype=np.float32) + + @abstractmethod + def _get_db(self): + """Load dataset.""" + raise NotImplementedError + + @abstractmethod + def evaluate(self, cfg, outputs, res_folder, metric, *args, **kwargs): + """Evaluate keypoint results.""" + raise NotImplementedError + + @staticmethod + def _write_keypoint_results(keypoints, res_file): + """Write results into a json file.""" + + with open(res_file, 'w') as f: + json.dump(keypoints, f, sort_keys=True, indent=4) + + def _report_metric(self, + res_file, + metrics, + pck_thr=0.2, + pckh_thr=0.7, + auc_nor=30): + """Keypoint evaluation. + + Args: + res_file (str): Json file stored prediction results. + metrics (str | list[str]): Metric to be performed. + Options: 'PCK', 'PCKh', 'AUC', 'EPE', 'NME'. + pck_thr (float): PCK threshold, default as 0.2. + pckh_thr (float): PCKh threshold, default as 0.7. + auc_nor (float): AUC normalization factor, default as 30 pixel. + + Returns: + List: Evaluation results for evaluation metric. + """ + info_str = [] + + with open(res_file, 'r') as fin: + preds = json.load(fin) + assert len(preds) == len(self.db) + + outputs = [] + gts = [] + masks = [] + box_sizes = [] + threshold_bbox = [] + threshold_head_box = [] + + for pred, item in zip(preds, self.db): + outputs.append(np.array(pred['keypoints'])[:, :-1]) + gts.append(np.array(item['joints_3d'])[:, :-1]) + masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) + if 'PCK' in metrics: + bbox = np.array(item['bbox']) + bbox_thr = np.max(bbox[2:]) + threshold_bbox.append(np.array([bbox_thr, bbox_thr])) + if 'PCKh' in metrics: + head_box_thr = item['head_size'] + threshold_head_box.append( + np.array([head_box_thr, head_box_thr])) + box_sizes.append(item.get('box_size', 1)) + + outputs = np.array(outputs) + gts = np.array(gts) + masks = np.array(masks) + threshold_bbox = np.array(threshold_bbox) + threshold_head_box = np.array(threshold_head_box) + box_sizes = np.array(box_sizes).reshape([-1, 1]) + + if 'PCK' in metrics: + _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, + threshold_bbox) + info_str.append(('PCK', pck)) + + if 'PCKh' in metrics: + _, pckh, _ = keypoint_pck_accuracy(outputs, gts, masks, pckh_thr, + threshold_head_box) + info_str.append(('PCKh', pckh)) + + if 'AUC' in metrics: + info_str.append(('AUC', keypoint_auc(outputs, gts, masks, + auc_nor))) + + if 'EPE' in metrics: + info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) + + if 'NME' in metrics: + normalize_factor = self._get_normalize_factor( + gts=gts, box_sizes=box_sizes) + info_str.append( + ('NME', keypoint_nme(outputs, gts, masks, normalize_factor))) + + return info_str + + def __len__(self): + """Get the size of the dataset.""" + return len(self.db) + + def __getitem__(self, idx): + """Get the sample given index.""" + results = copy.deepcopy(self.db[idx]) + results['ann_info'] = self.ann_info + return self.pipeline(results) + + def _sort_and_unique_bboxes(self, kpts, key='bbox_id'): + """sort kpts and remove the repeated ones.""" + kpts = sorted(kpts, key=lambda x: x[key]) + num = len(kpts) + for i in range(num - 1, 0, -1): + if kpts[i][key] == kpts[i - 1][key]: + del kpts[i] + + return kpts diff --git a/mmpose/datasets/datasets/base/kpt_3d_sview_kpt_2d_dataset.py b/mmpose/datasets/datasets/base/kpt_3d_sview_kpt_2d_dataset.py new file mode 100644 index 0000000000..f3e33975a5 --- /dev/null +++ b/mmpose/datasets/datasets/base/kpt_3d_sview_kpt_2d_dataset.py @@ -0,0 +1,226 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import copy +from abc import ABCMeta, abstractmethod + +import numpy as np +from torch.utils.data import Dataset + +from mmpose.datasets import DatasetInfo +from mmpose.datasets.pipelines import Compose + + +class Kpt3dSviewKpt2dDataset(Dataset, metaclass=ABCMeta): + """Base class for 3D human pose datasets. + + Subclasses should consider overwriting following methods: + - load_config + - load_annotations + - build_sample_indices + - evaluate + + Args: + ann_file (str): Path to the annotation file. + img_prefix (str): Path to a directory where images are held. + Default: None. + data_cfg (dict): config + - num_joints: Number of joints. + - seq_len: Number of frames in a sequence. Default: 1. + - seq_frame_interval: Extract frames from the video at certain + intervals. Default: 1. + - causal: If set to True, the rightmost input frame will be the + target frame. Otherwise, the middle input frame will be the + target frame. Default: True. + - temporal_padding: Whether to pad the video so that poses will be + predicted for every frame in the video. Default: False + - subset: Reduce dataset size by fraction. Default: 1. + - need_2d_label: Whether need 2D joint labels or not. + Default: False. + + pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. + test_mode (bool): Store True when building test or + validation dataset. Default: False. + """ + + def __init__(self, + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=None, + test_mode=False): + + self.ann_file = ann_file + self.img_prefix = img_prefix + self.data_cfg = copy.deepcopy(data_cfg) + self.pipeline = pipeline + self.test_mode = test_mode + self.ann_info = {} + + if dataset_info is None: + raise ValueError( + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.') + + dataset_info = DatasetInfo(dataset_info) + + self.load_config(self.data_cfg) + + self.ann_info['num_joints'] = data_cfg['num_joints'] + assert self.ann_info['num_joints'] == dataset_info.keypoint_num + self.ann_info['flip_pairs'] = dataset_info.flip_pairs + self.ann_info['upper_body_ids'] = dataset_info.upper_body_ids + self.ann_info['lower_body_ids'] = dataset_info.lower_body_ids + self.ann_info['joint_weights'] = dataset_info.joint_weights + self.ann_info['skeleton'] = dataset_info.skeleton + self.sigmas = dataset_info.sigmas + self.dataset_name = dataset_info.dataset_name + + self.data_info = self.load_annotations() + self.sample_indices = self.build_sample_indices() + self.pipeline = Compose(pipeline) + + self.name2id = { + name: i + for i, name in enumerate(self.data_info['imgnames']) + } + + def load_config(self, data_cfg): + """Initialize dataset attributes according to the config. + + Override this method to set dataset specific attributes. + """ + + self.num_joints = data_cfg['num_joints'] + self.seq_len = data_cfg.get('seq_len', 1) + self.seq_frame_interval = data_cfg.get('seq_frame_interval', 1) + self.causal = data_cfg.get('causal', True) + self.temporal_padding = data_cfg.get('temporal_padding', False) + self.subset = data_cfg.get('subset', 1) + self.need_2d_label = data_cfg.get('need_2d_label', False) + self.need_camera_param = False + + def load_annotations(self): + """Load data annotation.""" + data = np.load(self.ann_file) + + # get image info + _imgnames = data['imgname'] + num_imgs = len(_imgnames) + num_joints = self.ann_info['num_joints'] + + if 'scale' in data: + _scales = data['scale'].astype(np.float32) + else: + _scales = np.zeros(num_imgs, dtype=np.float32) + + if 'center' in data: + _centers = data['center'].astype(np.float32) + else: + _centers = np.zeros((num_imgs, 2), dtype=np.float32) + + # get 3D pose + if 'S' in data.keys(): + _joints_3d = data['S'].astype(np.float32) + else: + _joints_3d = np.zeros((num_imgs, num_joints, 4), dtype=np.float32) + + # get 2D pose + if 'part' in data.keys(): + _joints_2d = data['part'].astype(np.float32) + else: + _joints_2d = np.zeros((num_imgs, num_joints, 3), dtype=np.float32) + + data_info = { + 'imgnames': _imgnames, + 'joints_3d': _joints_3d, + 'joints_2d': _joints_2d, + 'scales': _scales, + 'centers': _centers, + } + + return data_info + + def build_sample_indices(self): + """Build sample indices. + + The default method creates sample indices that each sample is a single + frame (i.e. seq_len=1). Override this method in the subclass to define + how frames are sampled to form data samples. + + Outputs: + sample_indices [list(tuple)]: the frame indices of each sample. + For a sample, all frames will be treated as an input sequence, + and the ground-truth pose of the last frame will be the target. + """ + sample_indices = [] + if self.seq_len == 1: + num_imgs = len(self.ann_info['imgnames']) + sample_indices = [(idx, ) for idx in range(num_imgs)] + else: + raise NotImplementedError('Multi-frame data sample unsupported!') + return sample_indices + + @abstractmethod + def evaluate(self, outputs, res_folder, metric, **kwargs): + """Evaluate results.""" + + def prepare_data(self, idx): + """Get data sample.""" + data = self.data_info + + frame_ids = self.sample_indices[idx] + assert len(frame_ids) == self.seq_len + + # get the 3D/2D pose sequence + _joints_3d = data['joints_3d'][frame_ids] + _joints_2d = data['joints_2d'][frame_ids] + + # get the image info + _imgnames = data['imgnames'][frame_ids] + _centers = data['centers'][frame_ids] + _scales = data['scales'][frame_ids] + if _scales.ndim == 1: + _scales = np.stack([_scales, _scales], axis=1) + + target_idx = -1 if self.causal else int(self.seq_len) // 2 + + results = { + 'input_2d': _joints_2d[:, :, :2], + 'input_2d_visible': _joints_2d[:, :, -1:], + 'input_3d': _joints_3d[:, :, :3], + 'input_3d_visible': _joints_3d[:, :, -1:], + 'target': _joints_3d[target_idx, :, :3], + 'target_visible': _joints_3d[target_idx, :, -1:], + 'image_paths': _imgnames, + 'target_image_path': _imgnames[target_idx], + 'scales': _scales, + 'centers': _centers, + } + + if self.need_2d_label: + results['target_2d'] = _joints_2d[target_idx, :, :2] + + if self.need_camera_param: + _cam_param = self.get_camera_param(_imgnames[0]) + results['camera_param'] = _cam_param + # get image size from camera parameters + if 'w' in _cam_param and 'h' in _cam_param: + results['image_width'] = _cam_param['w'] + results['image_height'] = _cam_param['h'] + + return results + + def __len__(self): + """Get the size of the dataset.""" + return len(self.sample_indices) + + def __getitem__(self, idx): + """Get a sample with given index.""" + results = copy.deepcopy(self.prepare_data(idx)) + results['ann_info'] = self.ann_info + return self.pipeline(results) + + def get_camera_param(self, imgname): + """Get camera parameters of a frame by its image name.""" + raise NotImplementedError diff --git a/mmpose/datasets/datasets/base/kpt_3d_sview_rgb_img_top_down_dataset.py b/mmpose/datasets/datasets/base/kpt_3d_sview_rgb_img_top_down_dataset.py new file mode 100644 index 0000000000..ad067131ec --- /dev/null +++ b/mmpose/datasets/datasets/base/kpt_3d_sview_rgb_img_top_down_dataset.py @@ -0,0 +1,257 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import copy +from abc import ABCMeta, abstractmethod + +import json_tricks as json +import numpy as np +from torch.utils.data import Dataset +from xtcocotools.coco import COCO + +from mmpose.datasets import DatasetInfo +from mmpose.datasets.pipelines import Compose + + +class Kpt3dSviewRgbImgTopDownDataset(Dataset, metaclass=ABCMeta): + """Base class for keypoint 3D top-down pose estimation with single-view RGB + image as the input. + + All fashion datasets should subclass it. + All subclasses should overwrite: + Methods:`_get_db`, 'evaluate' + + Args: + ann_file (str): Path to the annotation file. + img_prefix (str): Path to a directory where images are held. + Default: None. + data_cfg (dict): config + pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. + coco_style (bool): Whether the annotation json is coco-style. + Default: True + test_mode (bool): Store True when building test or + validation dataset. Default: False. + """ + + def __init__(self, + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=None, + coco_style=True, + test_mode=False): + + self.image_info = {} + self.ann_info = {} + + self.ann_file = ann_file + self.img_prefix = img_prefix + self.pipeline = pipeline + self.test_mode = test_mode + + self.ann_info['image_size'] = np.array(data_cfg['image_size']) + self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) + self.ann_info['num_joints'] = data_cfg['num_joints'] + + self.ann_info['inference_channel'] = data_cfg['inference_channel'] + self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] + self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] + + if dataset_info is None: + raise ValueError( + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.') + + dataset_info = DatasetInfo(dataset_info) + + assert self.ann_info['num_joints'] == dataset_info.keypoint_num + self.ann_info['flip_pairs'] = dataset_info.flip_pairs + self.ann_info['flip_index'] = dataset_info.flip_index + self.ann_info['upper_body_ids'] = dataset_info.upper_body_ids + self.ann_info['lower_body_ids'] = dataset_info.lower_body_ids + self.ann_info['joint_weights'] = dataset_info.joint_weights + self.ann_info['skeleton'] = dataset_info.skeleton + self.sigmas = dataset_info.sigmas + self.dataset_name = dataset_info.dataset_name + + if coco_style: + self.coco = COCO(ann_file) + if 'categories' in self.coco.dataset: + cats = [ + cat['name'] + for cat in self.coco.loadCats(self.coco.getCatIds()) + ] + self.classes = ['__background__'] + cats + self.num_classes = len(self.classes) + self._class_to_ind = dict( + zip(self.classes, range(self.num_classes))) + self._class_to_coco_ind = dict( + zip(cats, self.coco.getCatIds())) + self._coco_ind_to_class_ind = dict( + (self._class_to_coco_ind[cls], self._class_to_ind[cls]) + for cls in self.classes[1:]) + self.img_ids = self.coco.getImgIds() + self.num_images = len(self.img_ids) + self.id2name, self.name2id = self._get_mapping_id_name( + self.coco.imgs) + + self.db = [] + + self.pipeline = Compose(self.pipeline) + + @staticmethod + def _cam2pixel(cam_coord, f, c): + """Transform the joints from their camera coordinates to their pixel + coordinates. + + Note: + N: number of joints + + Args: + cam_coord (ndarray[N, 3]): 3D joints coordinates + in the camera coordinate system + f (ndarray[2]): focal length of x and y axis + c (ndarray[2]): principal point of x and y axis + + Returns: + img_coord (ndarray[N, 3]): the coordinates (x, y, 0) + in the image plane. + """ + x = cam_coord[:, 0] / (cam_coord[:, 2] + 1e-8) * f[0] + c[0] + y = cam_coord[:, 1] / (cam_coord[:, 2] + 1e-8) * f[1] + c[1] + z = np.zeros_like(x) + img_coord = np.concatenate((x[:, None], y[:, None], z[:, None]), 1) + return img_coord + + @staticmethod + def _world2cam(world_coord, R, T): + """Transform the joints from their world coordinates to their camera + coordinates. + + Note: + N: number of joints + + Args: + world_coord (ndarray[3, N]): 3D joints coordinates + in the world coordinate system + R (ndarray[3, 3]): camera rotation matrix + T (ndarray[3, 1]): camera position (x, y, z) + + Returns: + cam_coord (ndarray[3, N]): 3D joints coordinates + in the camera coordinate system + """ + cam_coord = np.dot(R, world_coord - T) + return cam_coord + + @staticmethod + def _pixel2cam(pixel_coord, f, c): + """Transform the joints from their pixel coordinates to their camera + coordinates. + + Note: + N: number of joints + + Args: + pixel_coord (ndarray[N, 3]): 3D joints coordinates + in the pixel coordinate system + f (ndarray[2]): focal length of x and y axis + c (ndarray[2]): principal point of x and y axis + + Returns: + cam_coord (ndarray[N, 3]): 3D joints coordinates + in the camera coordinate system + """ + x = (pixel_coord[:, 0] - c[0]) / f[0] * pixel_coord[:, 2] + y = (pixel_coord[:, 1] - c[1]) / f[1] * pixel_coord[:, 2] + z = pixel_coord[:, 2] + cam_coord = np.concatenate((x[:, None], y[:, None], z[:, None]), 1) + return cam_coord + + @staticmethod + def _get_mapping_id_name(imgs): + """ + Args: + imgs (dict): dict of image info. + + Returns: + tuple: Image name & id mapping dicts. + + - id2name (dict): Mapping image id to name. + - name2id (dict): Mapping image name to id. + """ + id2name = {} + name2id = {} + for image_id, image in imgs.items(): + file_name = image['file_name'] + id2name[image_id] = file_name + name2id[file_name] = image_id + + return id2name, name2id + + def _xywh2cs(self, x, y, w, h, padding=1.25): + """This encodes bbox(x,y,w,h) into (center, scale) + + Args: + x, y, w, h (float): left, top, width and height + padding (float): bounding box padding factor + + Returns: + center (np.ndarray[float32](2,)): center of the bbox (x, y). + scale (np.ndarray[float32](2,)): scale of the bbox w & h. + """ + aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ + 'image_size'][1] + center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) + + if (not self.test_mode) and np.random.rand() < 0.3: + center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] + + if w > aspect_ratio * h: + h = w * 1.0 / aspect_ratio + elif w < aspect_ratio * h: + w = h * aspect_ratio + + # pixel std is 200.0 + scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) + # padding to include proper amount of context + scale = scale * padding + + return center, scale + + @abstractmethod + def _get_db(self): + """Load dataset.""" + raise NotImplementedError + + @abstractmethod + def evaluate(self, cfg, outputs, res_folder, metric, *args, **kwargs): + """Evaluate keypoint results.""" + raise NotImplementedError + + @staticmethod + def _write_keypoint_results(keypoints, res_file): + """Write results into a json file.""" + + with open(res_file, 'w') as f: + json.dump(keypoints, f, sort_keys=True, indent=4) + + def __len__(self): + """Get the size of the dataset.""" + return len(self.db) + + def __getitem__(self, idx): + """Get the sample given index.""" + results = copy.deepcopy(self.db[idx]) + results['ann_info'] = self.ann_info + return self.pipeline(results) + + def _sort_and_unique_bboxes(self, kpts, key='bbox_id'): + """sort kpts and remove the repeated ones.""" + kpts = sorted(kpts, key=lambda x: x[key]) + num = len(kpts) + for i in range(num - 1, 0, -1): + if kpts[i][key] == kpts[i - 1][key]: + del kpts[i] + + return kpts diff --git a/mmpose/datasets/datasets/body3d/body3d_base_dataset.py b/mmpose/datasets/datasets/body3d/body3d_base_dataset.py index edce69937e..10c29232cf 100644 --- a/mmpose/datasets/datasets/body3d/body3d_base_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_base_dataset.py @@ -1,217 +1,16 @@ # Copyright (c) OpenMMLab. All rights reserved. -import copy -from abc import ABCMeta, abstractmethod +from abc import ABCMeta -import numpy as np from torch.utils.data import Dataset -from mmpose.datasets.pipelines import Compose - class Body3DBaseDataset(Dataset, metaclass=ABCMeta): - """Base class for 3D human pose datasets. - - Subclasses should consider overwriting following methods: - - load_config - - load_annotations - - build_sample_indices - - evaluate - - Args: - ann_file (str): Path to the annotation file. - img_prefix (str): Path to a directory where images are held. - Default: None. - data_cfg (dict): config - - num_joints: Number of joints. - - seq_len: Number of frames in a sequence. Default: 1. - - seq_frame_interval: Extract frames from the video at certain - intervals. Default: 1. - - causal: If set to True, the rightmost input frame will be the - target frame. Otherwise, the middle input frame will be the - target frame. Default: True. - - temporal_padding: Whether to pad the video so that poses will be - predicted for every frame in the video. Default: False - - subset: Reduce dataset size by fraction. Default: 1. - - need_2d_label: Whether need 2D joint labels or not. - Default: False. - - pipeline (list[dict | callable]): A sequence of data transforms. - test_mode (bool): Store True when building test or - validation dataset. Default: False. - """ - - def __init__(self, - ann_file, - img_prefix, - data_cfg, - pipeline, - test_mode=False): - - self.ann_file = ann_file - self.img_prefix = img_prefix - self.data_cfg = copy.deepcopy(data_cfg) - self.pipeline = pipeline - self.test_mode = test_mode - self.ann_info = {} - - self.load_config(self.data_cfg) - self.data_info = self.load_annotations() - self.sample_indices = self.build_sample_indices() - self.pipeline = Compose(pipeline) - - self.name2id = { - name: i - for i, name in enumerate(self.data_info['imgnames']) - } - - def load_config(self, data_cfg): - """Initialize dataset attributes according to the config. - - Override this method to set dataset specific attributes. - """ - - self.num_joints = data_cfg['num_joints'] - self.seq_len = data_cfg.get('seq_len', 1) - self.seq_frame_interval = data_cfg.get('seq_frame_interval', 1) - self.causal = data_cfg.get('causal', True) - self.temporal_padding = data_cfg.get('temporal_padding', False) - self.subset = data_cfg.get('subset', 1) - self.need_2d_label = data_cfg.get('need_2d_label', False) - - self.need_camera_param = False - - # create annotation information - ann_info = {} - ann_info['num_joints'] = self.num_joints - ann_info['flip_pairs'] = None - ann_info['upper_body_ids'] = None - ann_info['lower_body_ids'] = None - ann_info['joint_weights'] = np.full( - self.num_joints, 1.0, dtype=np.float32) - - self.ann_info.update(ann_info) - - def load_annotations(self): - """Load data annotation.""" - data = np.load(self.ann_file) - - # get image info - _imgnames = data['imgname'] - num_imgs = len(_imgnames) - num_joints = self.ann_info['num_joints'] - - if 'scale' in data: - _scales = data['scale'].astype(np.float32) - else: - _scales = np.zeros(num_imgs, dtype=np.float32) - - if 'center' in data: - _centers = data['center'].astype(np.float32) - else: - _centers = np.zeros((num_imgs, 2), dtype=np.float32) - - # get 3D pose - if 'S' in data.keys(): - _joints_3d = data['S'].astype(np.float32) - else: - _joints_3d = np.zeros((num_imgs, num_joints, 4), dtype=np.float32) - - # get 2D pose - if 'part' in data.keys(): - _joints_2d = data['part'].astype(np.float32) - else: - _joints_2d = np.zeros((num_imgs, num_joints, 3), dtype=np.float32) - - data_info = { - 'imgnames': _imgnames, - 'joints_3d': _joints_3d, - 'joints_2d': _joints_2d, - 'scales': _scales, - 'centers': _centers, - } - - return data_info - - def build_sample_indices(self): - """Build sample indices. - - The default method creates sample indices that each sample is a single - frame (i.e. seq_len=1). Override this method in the subclass to define - how frames are sampled to form data samples. - - Outputs: - sample_indices [list(tuple)]: the frame indices of each sample. - For a sample, all frames will be treated as an input sequence, - and the ground-truth pose of the last frame will be the target. - """ - sample_indices = [] - if self.seq_len == 1: - num_imgs = len(self.ann_info['imgnames']) - sample_indices = [(idx, ) for idx in range(num_imgs)] - else: - raise NotImplementedError('Multi-frame data sample unsupported!') - return sample_indices - - @abstractmethod - def evaluate(self, outputs, res_folder, metric, **kwargs): - """Evaluate results.""" - - def prepare_data(self, idx): - """Get data sample.""" - data = self.data_info - - frame_ids = self.sample_indices[idx] - assert len(frame_ids) == self.seq_len - - # get the 3D/2D pose sequence - _joints_3d = data['joints_3d'][frame_ids] - _joints_2d = data['joints_2d'][frame_ids] - - # get the image info - _imgnames = data['imgnames'][frame_ids] - _centers = data['centers'][frame_ids] - _scales = data['scales'][frame_ids] - if _scales.ndim == 1: - _scales = np.stack([_scales, _scales], axis=1) - - target_idx = -1 if self.causal else int(self.seq_len) // 2 - - results = { - 'input_2d': _joints_2d[:, :, :2], - 'input_2d_visible': _joints_2d[:, :, -1:], - 'input_3d': _joints_3d[:, :, :3], - 'input_3d_visible': _joints_3d[:, :, -1:], - 'target': _joints_3d[target_idx, :, :3], - 'target_visible': _joints_3d[target_idx, :, -1:], - 'image_paths': _imgnames, - 'target_image_path': _imgnames[target_idx], - 'scales': _scales, - 'centers': _centers, - } - - if self.need_2d_label: - results['target_2d'] = _joints_2d[target_idx, :, :2] - - if self.need_camera_param: - _cam_param = self.get_camera_param(_imgnames[0]) - results['camera_param'] = _cam_param - # get image size from camera parameters - if 'w' in _cam_param and 'h' in _cam_param: - results['image_width'] = _cam_param['w'] - results['image_height'] = _cam_param['h'] - - return results - - def __len__(self): - """Get the size of the dataset.""" - return len(self.sample_indices) - - def __getitem__(self, idx): - """Get a sample with given index.""" - results = copy.deepcopy(self.prepare_data(idx)) - results['ann_info'] = self.ann_info - return self.pipeline(results) - - def get_camera_param(self, imgname): - """Get camera parameters of a frame by its image name.""" - raise NotImplementedError + """This class has been deprecated and replaced by + Kpt3dSviewKpt2dDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'Body3DBaseDataset has been replaced by ' + 'Kpt3dSviewKpt2dDataset' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py b/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py index 2882518608..9e2e01bee4 100644 --- a/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_h36m_dataset.py @@ -1,17 +1,19 @@ # Copyright (c) OpenMMLab. All rights reserved. import os.path as osp +import warnings from collections import OrderedDict, defaultdict import mmcv import numpy as np +from mmcv import Config from mmpose.core.evaluation import keypoint_mpjpe +from mmpose.datasets.datasets.base import Kpt3dSviewKpt2dDataset from ...builder import DATASETS -from .body3d_base_dataset import Body3DBaseDataset @DATASETS.register_module() -class Body3DH36MDataset(Body3DBaseDataset): +class Body3DH36MDataset(Kpt3dSviewKpt2dDataset): """Human3.6M dataset for 3D human pose estimation. `Human3.6M: Large Scale Datasets and Predictive Methods for 3D Human @@ -45,6 +47,7 @@ class Body3DH36MDataset(Body3DBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -64,6 +67,30 @@ class Body3DH36MDataset(Body3DBaseDataset): # metric ALLOWED_METRICS = {'mpjpe', 'p-mpjpe', 'n-mpjpe'} + def __init__(self, + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=None, + test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/h36m.py') + dataset_info = cfg._cfg_dict['dataset_info'] + + super().__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) + def load_config(self, data_cfg): super().load_config(data_cfg) # h36m specific attributes @@ -83,12 +110,7 @@ def load_config(self, data_cfg): # h36m specific annotation info ann_info = {} - ann_info['flip_pairs'] = [[1, 4], [2, 5], [3, 6], [11, 14], [12, 15], - [13, 16]] - ann_info['upper_body_ids'] = (0, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) - ann_info['lower_body_ids'] = (1, 2, 3, 4, 5, 6) ann_info['use_different_joint_weights'] = False - # action filter actions = data_cfg.get('actions', '_all_') self.actions = set( diff --git a/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py b/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py index 8a513e489d..97cb757621 100644 --- a/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py +++ b/mmpose/datasets/datasets/body3d/body3d_mpi_inf_3dhp_dataset.py @@ -1,18 +1,20 @@ # Copyright (c) OpenMMLab. All rights reserved. import os.path as osp +import warnings from collections import OrderedDict, defaultdict import mmcv import numpy as np +from mmcv import Config from mmpose.core.evaluation import (keypoint_3d_auc, keypoint_3d_pck, keypoint_mpjpe) +from mmpose.datasets.datasets.base import Kpt3dSviewKpt2dDataset from ...builder import DATASETS -from .body3d_base_dataset import Body3DBaseDataset @DATASETS.register_module() -class Body3DMpiInf3dhpDataset(Body3DBaseDataset): +class Body3DMpiInf3dhpDataset(Kpt3dSviewKpt2dDataset): """MPI-INF-3DHP dataset for 3D human pose estimation. `Monocular 3D Human Pose Estimation In The Wild Using Improved CNN @@ -56,6 +58,7 @@ class Body3DMpiInf3dhpDataset(Body3DBaseDataset): - need_camera_param: Whether need camera parameters or not. Default: False. pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -77,6 +80,30 @@ class Body3DMpiInf3dhpDataset(Body3DBaseDataset): 'mpjpe', 'p-mpjpe', '3dpck', 'p-3dpck', '3dauc', 'p-3dauc' } + def __init__(self, + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=None, + test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/mpi_inf_3dhp.py') + dataset_info = cfg._cfg_dict['dataset_info'] + + super().__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) + def load_config(self, data_cfg): super().load_config(data_cfg) # mpi-inf-3dhp specific attributes @@ -96,10 +123,6 @@ def load_config(self, data_cfg): # mpi-inf-3dhp specific annotation info ann_info = {} - ann_info['flip_pairs'] = [[2, 5], [3, 6], [4, 7], [8, 11], [9, 12], - [10, 13]] - ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6, 7, 14, 15, 16) - ann_info['lower_body_ids'] = (8, 9, 10, 11, 12, 13) ann_info['use_different_joint_weights'] = False self.ann_info.update(ann_info) diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_aic.py b/mmpose/datasets/datasets/bottom_up/bottom_up_aic.py index ee99dcd260..f3cbd246e4 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_aic.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_aic.py @@ -1,7 +1,8 @@ # Copyright (c) OpenMMLab. All rights reserved. +import warnings + import json_tricks as json -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from mmpose.datasets.builder import DATASETS @@ -40,6 +41,7 @@ class BottomUpAicDataset(BottomUpCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -49,45 +51,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/aic.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(BottomUpCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) - self.ann_info['flip_index'] = [ - 3, 4, 5, 0, 1, 2, 9, 10, 11, 6, 7, 8, 12, 13 - ] self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - self.sigmas = np.array([ - 0.01388152, 0.01515228, 0.01057665, 0.01417709, 0.01497891, - 0.01402144, 0.03909642, 0.03686941, 0.01981803, 0.03843971, - 0.03412318, 0.02415081, 0.01291456, 0.01236173 - ]) - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - if not test_mode: - self.img_ids = [ - img_id for img_id in self.img_ids - if len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0 - ] - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'aic' - print(f'=> num_images: {self.num_images}') def _do_python_keypoint_eval(self, res_file): diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py b/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py index f47400d6ac..6a2fea5d34 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_base_dataset.py @@ -1,96 +1,14 @@ # Copyright (c) OpenMMLab. All rights reserved. -import copy - -import numpy as np from torch.utils.data import Dataset -from mmpose.datasets.pipelines import Compose - class BottomUpBaseDataset(Dataset): - """Base class for bottom-up datasets. - - All datasets should subclass it. - All subclasses should overwrite: - Methods:`_get_single` - - Args: - ann_file (str): Path to the annotation file. - img_prefix (str): Path to a directory where images are held. - Default: None. - data_cfg (dict): config - pipeline (list[dict | callable]): A sequence of data transforms. - - test_mode (bool): Store True when building test or - validation dataset. Default: False. - """ - - def __init__(self, - ann_file, - img_prefix, - data_cfg, - pipeline, - test_mode=False): - - self.image_info = {} - self.ann_info = {} - - self.annotations_path = ann_file - self.img_prefix = img_prefix - self.pipeline = pipeline - self.test_mode = test_mode - - # bottom-up - self.base_size = data_cfg['base_size'] - self.base_sigma = data_cfg['base_sigma'] - self.int_sigma = False - - self.ann_info['image_size'] = np.array(data_cfg['image_size']) - self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) - self.ann_info['num_joints'] = data_cfg['num_joints'] - self.ann_info['num_scales'] = data_cfg['num_scales'] - self.ann_info['scale_aware_sigma'] = data_cfg['scale_aware_sigma'] - - self.ann_info['inference_channel'] = data_cfg['inference_channel'] - self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] - - self.use_nms = data_cfg.get('use_nms', False) - self.soft_nms = data_cfg.get('soft_nms', True) - self.oks_thr = data_cfg.get('oks_thr', 0.9) - - self.img_ids = [] - self.pipeline = Compose(self.pipeline) - - def __len__(self): - """Get dataset length.""" - return len(self.img_ids) - - def _get_single(self, idx): - """Get anno for a single image.""" - raise NotImplementedError - - def prepare_train_img(self, idx): - """Prepare image for training given the index.""" - results = copy.deepcopy(self._get_single(idx)) - results['ann_info'] = self.ann_info - return self.pipeline(results) - - def prepare_test_img(self, idx): - """Prepare image for testing given the index.""" - results = copy.deepcopy(self._get_single(idx)) - results['ann_info'] = self.ann_info - return self.pipeline(results) - - def get_flip_index_from_flip_pairs(self, flip_pairs): - flip_index = list(range(self.ann_info['num_joints'])) - for pair in flip_pairs: - flip_index[pair[1]], flip_index[pair[0]] = flip_index[ - pair[0]], flip_index[pair[1]] - return flip_index - - def __getitem__(self, idx): - """Get the sample for either training or testing given index.""" - if self.test_mode: - return self.prepare_test_img(idx) - - return self.prepare_train_img(idx) + """This class has been deprecated and replaced by + Kpt2dSviewRgbImgBottomUpDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'BottomUpBaseDataset has been replaced by ' + 'Kpt2dSviewRgbImgBottomUpDataset,' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py b/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py index 6275402851..a33c983a49 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_coco.py @@ -1,20 +1,20 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict, defaultdict import json_tricks as json import numpy as np -import xtcocotools -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from mmpose.core.post_processing import oks_nms, soft_oks_nms from mmpose.datasets.builder import DATASETS -from .bottom_up_base_dataset import BottomUpBaseDataset +from mmpose.datasets.datasets.base import Kpt2dSviewRgbImgBottomUpDataset @DATASETS.register_module() -class BottomUpCocoDataset(BottomUpBaseDataset): +class BottomUpCocoDataset(Kpt2dSviewRgbImgBottomUpDataset): """COCO dataset for bottom-up pose estimation. The dataset loads raw features and apply specified transforms @@ -46,6 +46,7 @@ class BottomUpCocoDataset(BottomUpBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -55,80 +56,28 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super().__init__(ann_file, img_prefix, data_cfg, pipeline, test_mode) - self.ann_info['flip_index'] = [ - 0, 2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 12, 11, 14, 13, 16, 15 - ] + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/coco.py') + dataset_info = cfg._cfg_dict['dataset_info'] + + super().__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, - 1.2, 1.5, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # joint index starts from 1 - self.ann_info['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]] - - # 'https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/' - # 'pycocotools/cocoeval.py#L523' - self.sigmas = np.array([ - .26, .25, .25, .35, .35, .79, .79, .72, .72, .62, .62, 1.07, 1.07, - .87, .87, .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - if not test_mode: - self.img_ids = [ - img_id for img_id in self.img_ids - if len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0 - ] - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'coco' - print(f'=> num_images: {self.num_images}') - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - def _get_single(self, idx): """Get anno for a single image. @@ -190,29 +139,6 @@ def _get_joints(self, anno): return joints - def _get_mask(self, anno, idx): - """Get ignore masks to mask out losses.""" - coco = self.coco - img_info = coco.loadImgs(self.img_ids[idx])[0] - - m = np.zeros((img_info['height'], img_info['width']), dtype=np.float32) - - for obj in anno: - if 'segmentation' in obj: - if obj['iscrowd']: - rle = xtcocotools.mask.frPyObjects(obj['segmentation'], - img_info['height'], - img_info['width']) - m += xtcocotools.mask.decode(rle) - elif obj['num_keypoints'] == 0: - rles = xtcocotools.mask.frPyObjects( - obj['segmentation'], img_info['height'], - img_info['width']) - for rle in rles: - m += xtcocotools.mask.decode(rle) - - return m < 0.5 - def evaluate(self, outputs, res_folder, metric='mAP', **kwargs): """Evaluate coco keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_coco_wholebody.py b/mmpose/datasets/datasets/bottom_up/bottom_up_coco_wholebody.py index 3a7f0dbfca..5be8f6bf06 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_coco_wholebody.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_coco_wholebody.py @@ -1,6 +1,8 @@ # Copyright (c) OpenMMLab. All rights reserved. +import warnings + import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from mmpose.datasets.builder import DATASETS @@ -32,6 +34,7 @@ class BottomUpCocoWholeBodyDataset(BottomUpCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -41,18 +44,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super(BottomUpCocoDataset, - self).__init__(ann_file, img_prefix, data_cfg, pipeline, - test_mode) - self.ann_info['flip_pairs'] = self._make_flip_pairs() - self.ann_info['flip_index'] = self.get_flip_index_from_flip_pairs( - self.ann_info['flip_pairs']) + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/coco_wholebody.py') + dataset_info = cfg._cfg_dict['dataset_info'] + + super(BottomUpCocoDataset, self).__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) self.body_num = 17 self.foot_num = 6 @@ -60,84 +71,8 @@ def __init__(self, self.left_hand_num = 21 self.right_hand_num = 21 - # 'https://github.com/jin-s13/COCO-WholeBody/blob/master/' - # 'evaluation/myeval_wholebody.py#L170' - self.sigmas_body = [ - 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, - 0.062, 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 - ] - self.sigmas_foot = [0.068, 0.066, 0.066, 0.092, 0.094, 0.094] - self.sigmas_face = [ - 0.042, 0.043, 0.044, 0.043, 0.040, 0.035, 0.031, 0.025, 0.020, - 0.023, 0.029, 0.032, 0.037, 0.038, 0.043, 0.041, 0.045, 0.013, - 0.012, 0.011, 0.011, 0.012, 0.012, 0.011, 0.011, 0.013, 0.015, - 0.009, 0.007, 0.007, 0.007, 0.012, 0.009, 0.008, 0.016, 0.010, - 0.017, 0.011, 0.009, 0.011, 0.009, 0.007, 0.013, 0.008, 0.011, - 0.012, 0.010, 0.034, 0.008, 0.008, 0.009, 0.008, 0.008, 0.007, - 0.010, 0.008, 0.009, 0.009, 0.009, 0.007, 0.007, 0.008, 0.011, - 0.008, 0.008, 0.008, 0.01, 0.008 - ] - self.sigmas_lefthand = [ - 0.029, 0.022, 0.035, 0.037, 0.047, 0.026, 0.025, 0.024, 0.035, - 0.018, 0.024, 0.022, 0.026, 0.017, 0.021, 0.021, 0.032, 0.02, - 0.019, 0.022, 0.031 - ] - self.sigmas_righthand = [ - 0.029, 0.022, 0.035, 0.037, 0.047, 0.026, 0.025, 0.024, 0.035, - 0.018, 0.024, 0.022, 0.026, 0.017, 0.021, 0.021, 0.032, 0.02, - 0.019, 0.022, 0.031 - ] - - self.sigmas_wholebody = ( - self.sigmas_body + self.sigmas_foot + self.sigmas_face + - self.sigmas_lefthand + self.sigmas_righthand) - - self.sigmas = np.array(self.sigmas_wholebody) - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - if not test_mode: - self.img_ids = [ - img_id for img_id in self.img_ids - if len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0 - ] - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'coco_wholebody' - print(f'=> num_images: {self.num_images}') - @staticmethod - def _make_flip_pairs(): - body = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], - [15, 16]] - foot = [[17, 20], [18, 21], [19, 22]] - - face = [[23, 39], [24, 38], [25, 37], [26, 36], [27, 35], [28, 34], - [29, 33], [30, 32], [40, 49], [41, 48], [42, 47], [43, 46], - [44, 45], [54, 58], [55, 57], [59, 68], [60, 67], [61, 66], - [62, 65], [63, 70], [64, 69], [71, 77], [72, 76], [73, 75], - [78, 82], [79, 81], [83, 87], [84, 86], [88, 90]] - - hand = [[91, 112], [92, 113], [93, 114], [94, 115], [95, 116], - [96, 117], [97, 118], [98, 119], [99, 120], [100, 121], - [101, 122], [102, 123], [103, 124], [104, 125], [105, 126], - [106, 127], [107, 128], [108, 129], [109, 130], [110, 131], - [111, 132]] - - return body + foot + face + hand - def _get_joints(self, anno): """Get joints for all people in an image.""" num_people = len(anno) @@ -221,11 +156,16 @@ def _do_python_keypoint_eval(self, res_file): """Keypoint evaluation using COCOAPI.""" coco_det = self.coco.loadRes(res_file) + cuts = np.cumsum([ + 0, self.body_num, self.foot_num, self.face_num, self.left_hand_num, + self.right_hand_num + ]) + coco_eval = COCOeval( self.coco, coco_det, 'keypoints_body', - np.array(self.sigmas_body), + self.sigmas[cuts[0]:cuts[1]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -236,7 +176,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_foot', - np.array(self.sigmas_foot), + self.sigmas[cuts[1]:cuts[2]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -247,7 +187,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_face', - np.array(self.sigmas_face), + self.sigmas[cuts[2]:cuts[3]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -258,7 +198,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_lefthand', - np.array(self.sigmas_lefthand), + self.sigmas[cuts[3]:cuts[4]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -269,7 +209,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_righthand', - np.array(self.sigmas_righthand), + self.sigmas[cuts[4]:cuts[5]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -280,7 +220,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_wholebody', - np.array(self.sigmas_wholebody), + self.sigmas, use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py b/mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py index fb4390ecea..acff96e70f 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_crowdpose.py @@ -1,7 +1,8 @@ # Copyright (c) OpenMMLab. All rights reserved. +import warnings + import json_tricks as json -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from mmpose.datasets.builder import DATASETS @@ -38,6 +39,7 @@ class BottomUpCrowdPoseDataset(BottomUpCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -47,51 +49,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super(BottomUpCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - self.ann_info['flip_index'] = [ - 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 12, 13 - ] + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/crowdpose.py') + dataset_info = cfg._cfg_dict['dataset_info'] - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 0.2, 0.2, 0.2, 1.3, 1.5, 0.2, 1.3, 1.5, 0.2, 0.2, 0.5, 0.2, - 0.2, 0.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # 'https://github.com/Jeff-sjtu/CrowdPose/blob/master/crowdpose-api/' - # 'PythonAPI/crowdposetools/cocoeval.py#L224' - self.sigmas = np.array([ - .79, .79, .72, .72, .62, .62, 1.07, 1.07, .87, .87, .89, .89, .79, - .79 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - if not test_mode: - self.img_ids = [ - img_id for img_id in self.img_ids - if len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0 - ] - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'crowdpose' + super(BottomUpCocoDataset, self).__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) + self.ann_info['use_different_joint_weights'] = False print(f'=> num_images: {self.num_images}') def _do_python_keypoint_eval(self, res_file): diff --git a/mmpose/datasets/datasets/bottom_up/bottom_up_mhp.py b/mmpose/datasets/datasets/bottom_up/bottom_up_mhp.py index 33e1a64391..2b09870867 100644 --- a/mmpose/datasets/datasets/bottom_up/bottom_up_mhp.py +++ b/mmpose/datasets/datasets/bottom_up/bottom_up_mhp.py @@ -1,7 +1,8 @@ # Copyright (c) OpenMMLab. All rights reserved. +import warnings + import json_tricks as json -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from mmpose.datasets.builder import DATASETS @@ -46,6 +47,7 @@ class BottomUpMhpDataset(BottomUpCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -55,50 +57,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super(BottomUpCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - self.ann_info['flip_index'] = [ - 5, 4, 3, 2, 1, 0, 6, 7, 8, 9, 15, 14, 13, 12, 11, 10 - ] + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/mhp.py') + dataset_info = cfg._cfg_dict['dataset_info'] - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1.5, 1.2, 1., 1., 1.2, 1.5, 1., 1., 1., 1., 1.5, 1.2, 1., 1., - 1.2, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # Adapted from COCO dataset - self.sigmas = np.array([ - .89, .83, 1.07, 1.07, .83, .89, .26, .26, .26, .26, .62, .72, 1.79, - 1.79, .72, .62 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - if not test_mode: - self.img_ids = [ - img_id for img_id in self.img_ids - if len(self.coco.getAnnIds(imgIds=img_id, iscrowd=None)) > 0 - ] - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'mhp' + super(BottomUpCocoDataset, self).__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) + self.ann_info['use_different_joint_weights'] = False print(f'=> num_images: {self.num_images}') def _do_python_keypoint_eval(self, res_file): diff --git a/mmpose/datasets/datasets/face/face_300w_dataset.py b/mmpose/datasets/datasets/face/face_300w_dataset.py index ece58a3c9d..0b06fa723f 100644 --- a/mmpose/datasets/datasets/face/face_300w_dataset.py +++ b/mmpose/datasets/datasets/face/face_300w_dataset.py @@ -1,17 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import keypoint_nme from mmpose.datasets.builder import DATASETS -from .face_base_dataset import FaceBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class Face300WDataset(FaceBaseDataset): +class Face300WDataset(Kpt2dSviewRgbImgTopDownDataset): """Face300W dataset for top-down face keypoint localization. `300 faces In-the-wild challenge: Database and results. @@ -29,6 +29,7 @@ class Face300WDataset(FaceBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -38,28 +39,27 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/300w.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 68 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[0, 16], [1, 15], [2, 14], [3, 13], - [4, 12], [5, 11], [6, 10], [7, 9], - [17, 26], [18, 25], [19, 24], [20, 23], - [21, 22], [31, 35], [32, 34], [36, 45], - [37, 44], [38, 43], [39, 42], [40, 47], - [41, 46], [48, 54], [49, 53], [50, 52], - [61, 63], [60, 64], [67, 65], [58, 56], - [59, 55]] - - self.dataset_name = '300w' self.db = self._get_db() - print(f'=> num_images: {self.num_images}') print(f'=> load {len(self.db)} samples') @@ -108,7 +108,7 @@ def _get_db(self): return gt_db - def _get_normalize_factor(self, gts): + def _get_normalize_factor(self, gts, *args, **kwargs): """Get inter-ocular distance as the normalize factor, measured as the Euclidean distance between the outer corners of the eyes. @@ -123,43 +123,6 @@ def _get_normalize_factor(self, gts): gts[:, 36, :] - gts[:, 45, :], axis=1, keepdims=True) return np.tile(interocular, [1, 2]) - def _report_metric(self, res_file, metrics): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'NME'. - - Returns: - dict: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - - if 'NME' in metrics: - normalize_factor = self._get_normalize_factor(gts) - info_str.append( - ('NME', keypoint_nme(outputs, gts, masks, normalize_factor))) - - return info_str - def evaluate(self, outputs, res_folder, metric='NME', **kwargs): """Evaluate freihand keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/face/face_aflw_dataset.py b/mmpose/datasets/datasets/face/face_aflw_dataset.py index 53c6dd8dd2..6e9834aba4 100644 --- a/mmpose/datasets/datasets/face/face_aflw_dataset.py +++ b/mmpose/datasets/datasets/face/face_aflw_dataset.py @@ -1,17 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import keypoint_nme from mmpose.datasets.builder import DATASETS -from .face_base_dataset import FaceBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class FaceAFLWDataset(FaceBaseDataset): +class FaceAFLWDataset(Kpt2dSviewRgbImgTopDownDataset): """Face AFLW dataset for top-down face keypoint localization. `Annotated Facial Landmarks in the Wild: A Large-scale, @@ -32,6 +32,7 @@ class FaceAFLWDataset(FaceBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -41,20 +42,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/aflw.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 19 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[0, 5], [1, 4], [2, 3], [6, 11], - [7, 10], [8, 9], [12, 14], [15, 17]] - - self.dataset_name = 'aflw' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -110,7 +117,7 @@ def _get_db(self): return gt_db - def _get_normalize_factor(self, box_sizes): + def _get_normalize_factor(self, box_sizes, *args, **kwargs): """Get normalize factor for evaluation. Args: @@ -122,46 +129,6 @@ def _get_normalize_factor(self, box_sizes): return np.tile(box_sizes, [1, 2]) - def _report_metric(self, res_file, metrics): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'NME'. - - Returns: - dict: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - box_sizes = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - box_sizes.append(item['box_size']) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - box_sizes = np.array(box_sizes).reshape([-1, 1]) - - if 'NME' in metrics: - normalize_factor = self._get_normalize_factor(box_sizes) - info_str.append( - ('NME', keypoint_nme(outputs, gts, masks, normalize_factor))) - - return info_str - def evaluate(self, outputs, res_folder, metric='NME', **kwargs): """Evaluate freihand keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/face/face_base_dataset.py b/mmpose/datasets/datasets/face/face_base_dataset.py index e5304a65b4..466fabbfcb 100644 --- a/mmpose/datasets/datasets/face/face_base_dataset.py +++ b/mmpose/datasets/datasets/face/face_base_dataset.py @@ -1,149 +1,16 @@ # Copyright (c) OpenMMLab. All rights reserved. -import copy -from abc import ABCMeta, abstractmethod +from abc import ABCMeta -import json_tricks as json -import numpy as np from torch.utils.data import Dataset -from xtcocotools.coco import COCO - -from mmpose.datasets.pipelines import Compose class FaceBaseDataset(Dataset, metaclass=ABCMeta): - """Base class for face datasets. - - All face datasets should subclass it. - All subclasses should overwrite: - Methods:`_get_db`, 'evaluate' - - Args: - ann_file (str): Path to the annotation file. - img_prefix (str): Path to a directory where images are held. - Default: None. - data_cfg (dict): config - pipeline (list[dict | callable]): A sequence of data transforms. - test_mode (bool): Store True when building test or - validation dataset. Default: False. - """ - - def __init__(self, - ann_file, - img_prefix, - data_cfg, - pipeline, - test_mode=False): - - self.image_info = {} - self.ann_info = {} - - self.annotations_path = ann_file - self.img_prefix = img_prefix - self.pipeline = pipeline - self.test_mode = test_mode - - self.ann_info['image_size'] = np.array(data_cfg['image_size']) - self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) - self.ann_info['num_joints'] = data_cfg['num_joints'] - - self.ann_info['flip_pairs'] = None - - self.ann_info['inference_channel'] = data_cfg['inference_channel'] - self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] - self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] - - self.coco = COCO(ann_file) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - - self.db = [] - - self.pipeline = Compose(self.pipeline) - - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - - def _xywh2cs(self, x, y, w, h, padding=1.25): - """This encodes bbox(x,y,w,h) into (center, scale) - - Args: - x, y, w, h - - Returns: - center (np.ndarray[float32](2,)): center of the bbox (x, y). - scale (np.ndarray[float32](2,)): scale of the bbox w & h. - """ - aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ - 'image_size'][1] - center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) - - if (not self.test_mode) and np.random.rand() < 0.3: - center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] - - if w > aspect_ratio * h: - h = w * 1.0 / aspect_ratio - elif w < aspect_ratio * h: - w = h * aspect_ratio - - # pixel std is 200.0 - scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) - # padding to include proper amount of context - scale = scale * padding - - return center, scale - - @abstractmethod - def _get_db(self): - """Load dataset.""" - raise NotImplementedError - - @abstractmethod - def evaluate(self, cfg, preds, output_dir, *args, **kwargs): - """Evaluate keypoint results.""" - raise NotImplementedError - - @staticmethod - def _write_keypoint_results(keypoints, res_file): - """Write results into a json file.""" - - with open(res_file, 'w') as f: - json.dump(keypoints, f, sort_keys=True, indent=4) - - def __len__(self): - """Get the size of the dataset.""" - return len(self.db) - - def __getitem__(self, idx): - """Get the sample given index.""" - results = copy.deepcopy(self.db[idx]) - results['ann_info'] = self.ann_info - return self.pipeline(results) - - def _sort_and_unique_bboxes(self, kpts, key='bbox_id'): - """sort kpts and remove the repeated ones.""" - kpts = sorted(kpts, key=lambda x: x[key]) - num = len(kpts) - for i in range(num - 1, 0, -1): - if kpts[i][key] == kpts[i - 1][key]: - del kpts[i] - - return kpts + """This class has been deprecated and replaced by + Kpt2dSviewRgbImgTopDownDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'FaceBaseDataset has been replaced by ' + 'Kpt2dSviewRgbImgTopDownDataset,' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/face/face_cofw_dataset.py b/mmpose/datasets/datasets/face/face_cofw_dataset.py index 27a785d1a9..e8f1120265 100644 --- a/mmpose/datasets/datasets/face/face_cofw_dataset.py +++ b/mmpose/datasets/datasets/face/face_cofw_dataset.py @@ -1,17 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import keypoint_nme from mmpose.datasets.builder import DATASETS -from .face_base_dataset import FaceBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class FaceCOFWDataset(FaceBaseDataset): +class FaceCOFWDataset(Kpt2dSviewRgbImgTopDownDataset): """Face COFW dataset for top-down face keypoint localization. `Robust face landmark estimation under occlusion. (ICCV) 2013`. @@ -28,6 +28,7 @@ class FaceCOFWDataset(FaceBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -37,21 +38,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/cofw.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 29 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[0, 1], [4, 6], [2, 3], [5, 7], [8, 9], - [10, 11], [12, 14], [16, 17], [13, 15], - [18, 19], [22, 23]] - - self.dataset_name = 'cofw' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -103,7 +109,7 @@ def _get_db(self): return gt_db - def _get_normalize_factor(self, gts): + def _get_normalize_factor(self, gts, *args, **kwargs): """Get normalize factor for evaluation. Args: @@ -117,43 +123,6 @@ def _get_normalize_factor(self, gts): gts[:, 8, :] - gts[:, 9, :], axis=1, keepdims=True) return np.tile(interocular, [1, 2]) - def _report_metric(self, res_file, metrics): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'NME'. - - Returns: - dict: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - - if 'NME' in metrics: - normalize_factor = self._get_normalize_factor(gts) - info_str.append( - ('NME', keypoint_nme(outputs, gts, masks, normalize_factor))) - - return info_str - def evaluate(self, outputs, res_folder, metric='NME', **kwargs): """Evaluate freihand keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/face/face_wflw_dataset.py b/mmpose/datasets/datasets/face/face_wflw_dataset.py index 5138d0ba52..ac03a24760 100644 --- a/mmpose/datasets/datasets/face/face_wflw_dataset.py +++ b/mmpose/datasets/datasets/face/face_wflw_dataset.py @@ -1,17 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict -import json_tricks as json import numpy as np +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import keypoint_nme from mmpose.datasets.builder import DATASETS -from .face_base_dataset import FaceBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class FaceWFLWDataset(FaceBaseDataset): +class FaceWFLWDataset(Kpt2dSviewRgbImgTopDownDataset): """Face WFLW dataset for top-down face keypoint localization. `Look at Boundary: A Boundary-Aware Face Alignment Algorithm. @@ -29,6 +29,7 @@ class FaceWFLWDataset(FaceBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -38,29 +39,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/wflw.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 98 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.ann_info['flip_pairs'] = [[0, 32], [1, 31], [2, 30], [3, 29], - [4, 28], [5, 27], [6, 26], [7, 25], - [8, 24], [9, 23], [10, 22], [11, 21], - [12, 20], [13, 19], [14, 18], [15, 17], - [33, 46], [34, 45], [35, 44], [36, 43], - [37, 42], [38, 50], [39, 49], [40, 48], - [41, 47], [60, 72], [61, 71], [62, 70], - [63, 69], [64, 68], [65, 75], [66, 74], - [67, 73], [55, 59], [56, 58], [76, 82], - [77, 81], [78, 80], [87, 83], [86, 84], - [88, 92], [89, 91], [95, 93], [96, 97]] - - self.dataset_name = 'wflw' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -111,7 +109,7 @@ def _get_db(self): return gt_db - def _get_normalize_factor(self, gts): + def _get_normalize_factor(self, gts, *args, **kwargs): """Get normalize factor for evaluation. Args: @@ -125,43 +123,6 @@ def _get_normalize_factor(self, gts): gts[:, 60, :] - gts[:, 72, :], axis=1, keepdims=True) return np.tile(interocular, [1, 2]) - def _report_metric(self, res_file, metrics): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'NME'. - - Returns: - dict: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - - if 'NME' in metrics: - normalize_factor = self._get_normalize_factor(gts) - info_str.append( - ('NME', keypoint_nme(outputs, gts, masks, normalize_factor))) - - return info_str - def evaluate(self, outputs, res_folder, metric='NME', **kwargs): """Evaluate freihand keypoint results. The pose prediction results will be saved in `${res_folder}/result_keypoints.json`. diff --git a/mmpose/datasets/datasets/fashion/deepfashion_dataset.py b/mmpose/datasets/datasets/fashion/deepfashion_dataset.py index 5d1533c3eb..63433287e8 100644 --- a/mmpose/datasets/datasets/fashion/deepfashion_dataset.py +++ b/mmpose/datasets/datasets/fashion/deepfashion_dataset.py @@ -1,15 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .fashion_base_dataset import FashionBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class DeepFashionDataset(FashionBaseDataset): +class DeepFashionDataset(Kpt2dSviewRgbImgTopDownDataset): """DeepFashion dataset (full-body clothes) for fashion landmark detection. `DeepFashion: Powering Robust Clothes Recognition @@ -52,10 +54,9 @@ class DeepFashionDataset(FashionBaseDataset): ann_file (str): Path to the annotation file. img_prefix (str): Path to a directory where images are held. Default: None. - subset (str): The FLD dataset has 3 subsets, 'upper', 'lower', - and 'full', denoting different types of clothes. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -63,34 +64,45 @@ class DeepFashionDataset(FashionBaseDataset): def __init__(self, ann_file, img_prefix, - subset, data_cfg, pipeline, + subset='', + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + if subset != '': + warnings.warn( + 'subset is deprecated.' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + if subset == 'upper': + cfg = Config.fromfile( + 'configs/_base_/datasets/deepfashion_upper.py') + dataset_info = cfg._cfg_dict['dataset_info'] + elif subset == 'lower': + cfg = Config.fromfile( + 'configs/_base_/datasets/deepfashion_lower.py') + dataset_info = cfg._cfg_dict['dataset_info'] + elif subset == 'full': + cfg = Config.fromfile( + 'configs/_base_/datasets/deepfashion_full.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - - if subset == 'upper': - assert self.ann_info['num_joints'] == 6 - self.ann_info['flip_pairs'] = [[0, 1], [2, 3], [4, 5]] - self.dataset_name = 'deepfashion_upper' - elif subset == 'lower': - assert self.ann_info['num_joints'] == 4 - self.ann_info['flip_pairs'] = [[0, 1], [2, 3]] - self.dataset_name = 'deepfashion_lower' - elif subset == 'full': - assert self.ann_info['num_joints'] == 8 - self.ann_info['flip_pairs'] = [[0, 1], [2, 3], [4, 5], [6, 7]] - self.dataset_name = 'deepfashion_full' - else: - NotImplementedError() + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - self.dataset_name = 'deepfashion_' + subset self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/fashion/fashion_base_dataset.py b/mmpose/datasets/datasets/fashion/fashion_base_dataset.py index fffd8040c3..d4e5860a47 100644 --- a/mmpose/datasets/datasets/fashion/fashion_base_dataset.py +++ b/mmpose/datasets/datasets/fashion/fashion_base_dataset.py @@ -1,221 +1,16 @@ # Copyright (c) OpenMMLab. All rights reserved. -import copy -from abc import ABCMeta, abstractmethod +from abc import ABCMeta -import json_tricks as json -import numpy as np from torch.utils.data import Dataset -from xtcocotools.coco import COCO - -from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe, - keypoint_pck_accuracy) -from mmpose.datasets.pipelines import Compose class FashionBaseDataset(Dataset, metaclass=ABCMeta): - """Base class for fashion landmark datasets. - - All fashion datasets should subclass it. - All subclasses should overwrite: - Methods:`_get_db`, 'evaluate' - - Args: - ann_file (str): Path to the annotation file. - img_prefix (str): Path to a directory where images are held. - Default: None. - data_cfg (dict): config - pipeline (list[dict | callable]): A sequence of data transforms. - test_mode (bool): Store True when building test or - validation dataset. Default: False. - """ - - def __init__(self, - ann_file, - img_prefix, - data_cfg, - pipeline, - test_mode=False): - - self.image_info = {} - self.ann_info = {} - - self.annotations_path = ann_file - self.img_prefix = img_prefix - self.pipeline = pipeline - self.test_mode = test_mode - - self.ann_info['image_size'] = np.array(data_cfg['image_size']) - self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) - self.ann_info['num_joints'] = data_cfg['num_joints'] - - self.ann_info['flip_pairs'] = [] - - self.ann_info['inference_channel'] = data_cfg['inference_channel'] - self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] - self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] - - self.coco = COCO(ann_file) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - - self.db = [] - - self.pipeline = Compose(self.pipeline) - - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - - def _xywh2cs(self, x, y, w, h, padding=1.25): - """This encodes bbox(x,y,w,h) into (center, scale) - - Args: - x, y, w, h (float): left, top, width and height - padding (float): bounding box padding factor - - Returns: - center (np.ndarray[float32](2,)): center of the bbox (x, y). - scale (np.ndarray[float32](2,)): scale of the bbox w & h. - """ - aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ - 'image_size'][1] - center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) - - if (not self.test_mode) and np.random.rand() < 0.3: - center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] - - if w > aspect_ratio * h: - h = w * 1.0 / aspect_ratio - elif w < aspect_ratio * h: - w = h * aspect_ratio - - # pixel std is 200.0 - scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) - # padding to include proper amount of context - scale = scale * padding - - return center, scale - - @abstractmethod - def _get_db(self): - """Load dataset.""" - raise NotImplementedError - - @abstractmethod - def evaluate(self, cfg, preds, output_dir, *args, **kwargs): - """Evaluate keypoint results.""" - raise NotImplementedError - - @staticmethod - def _write_keypoint_results(keypoints, res_file): - """Write results into a json file.""" - - with open(res_file, 'w') as f: - json.dump(keypoints, f, sort_keys=True, indent=4) - - def _report_metric(self, - res_file, - metrics, - pck_thr=0.2, - pckh_thr=0.7, - auc_nor=30): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'PCKh', 'AUC', 'EPE'. - pck_thr (float): PCK threshold, default as 0.2. - pckh_thr (float): PCKh threshold, default as 0.7. - auc_nor (float): AUC normalization factor, default as 30 pixel. - - Returns: - List: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - threshold_bbox = [] - threshold_head_box = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - if 'PCK' in metrics: - bbox = np.array(item['bbox']) - bbox_thr = np.max(bbox[2:]) - threshold_bbox.append(np.array([bbox_thr, bbox_thr])) - if 'PCKh' in metrics: - head_box_thr = item['head_size'] - threshold_head_box.append( - np.array([head_box_thr, head_box_thr])) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - threshold_bbox = np.array(threshold_bbox) - threshold_head_box = np.array(threshold_head_box) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - threshold_bbox) - info_str.append(('PCK', pck)) - - if 'PCKh' in metrics: - _, pckh, _ = keypoint_pck_accuracy(outputs, gts, masks, pckh_thr, - threshold_head_box) - info_str.append(('PCKh', pckh)) - - if 'AUC' in metrics: - info_str.append(('AUC', keypoint_auc(outputs, gts, masks, - auc_nor))) - - if 'EPE' in metrics: - info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) - - return info_str - - def __len__(self): - """Get the size of the dataset.""" - return len(self.db) - - def __getitem__(self, idx): - """Get the sample given index.""" - results = copy.deepcopy(self.db[idx]) - results['ann_info'] = self.ann_info - return self.pipeline(results) - - def _sort_and_unique_bboxes(self, kpts, key='bbox_id'): - """sort kpts and remove the repeated ones.""" - kpts = sorted(kpts, key=lambda x: x[key]) - num = len(kpts) - for i in range(num - 1, 0, -1): - if kpts[i][key] == kpts[i - 1][key]: - del kpts[i] - - return kpts + """This class has been deprecated and replaced by + Kpt2dSviewRgbImgTopDownDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'FashionBaseDataset has been replaced by ' + 'Kpt2dSviewRgbImgTopDownDataset,' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/hand/__init__.py b/mmpose/datasets/datasets/hand/__init__.py index 5d4d7ebef2..62c4e906d4 100644 --- a/mmpose/datasets/datasets/hand/__init__.py +++ b/mmpose/datasets/datasets/hand/__init__.py @@ -3,7 +3,7 @@ from .interhand2d_dataset import InterHand2DDataset from .interhand3d_dataset import InterHand3DDataset from .onehand10k_dataset import OneHand10KDataset -from .panoptic_dataset import PanopticDataset +from .panoptic_hand2d_dataset import PanopticDataset from .rhd2d_dataset import Rhd2DDataset __all__ = [ diff --git a/mmpose/datasets/datasets/hand/freihand_dataset.py b/mmpose/datasets/datasets/hand/freihand_dataset.py index f73e272407..781db91ea3 100644 --- a/mmpose/datasets/datasets/hand/freihand_dataset.py +++ b/mmpose/datasets/datasets/hand/freihand_dataset.py @@ -1,15 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .hand_base_dataset import HandBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class FreiHandDataset(HandBaseDataset): +class FreiHandDataset(Kpt2dSviewRgbImgTopDownDataset): """FreiHand dataset for top-down hand pose estimation. `FreiHAND: A Dataset for Markerless Capture of Hand Pose @@ -50,6 +52,7 @@ class FreiHandDataset(HandBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -59,17 +62,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/freihand2d.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 21 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'freihand' self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/hand/hand_base_dataset.py b/mmpose/datasets/datasets/hand/hand_base_dataset.py index 2adc413b1b..fd20846d40 100644 --- a/mmpose/datasets/datasets/hand/hand_base_dataset.py +++ b/mmpose/datasets/datasets/hand/hand_base_dataset.py @@ -1,220 +1,16 @@ # Copyright (c) OpenMMLab. All rights reserved. -import copy -from abc import ABCMeta, abstractmethod +from abc import ABCMeta -import json_tricks as json -import numpy as np from torch.utils.data import Dataset -from xtcocotools.coco import COCO - -from mmpose.core.evaluation.top_down_eval import (keypoint_auc, keypoint_epe, - keypoint_pck_accuracy) -from mmpose.datasets.pipelines import Compose class HandBaseDataset(Dataset, metaclass=ABCMeta): - """Base class for hand datasets. - - All hand datasets should subclass it. - All subclasses should overwrite: - Methods:`_get_db`, 'evaluate' - - Args: - ann_file (str): Path to the annotation file. - img_prefix (str): Path to a directory where images are held. - Default: None. - data_cfg (dict): config - pipeline (list[dict | callable]): A sequence of data transforms. - test_mode (bool): Store True when building test or - validation dataset. Default: False. - """ - - def __init__(self, - ann_file, - img_prefix, - data_cfg, - pipeline, - test_mode=False): - - self.image_info = {} - self.ann_info = {} - - self.annotations_path = ann_file - self.img_prefix = img_prefix - self.pipeline = pipeline - self.test_mode = test_mode - - self.ann_info['image_size'] = np.array(data_cfg['image_size']) - self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) - self.ann_info['num_joints'] = data_cfg['num_joints'] - - self.ann_info['flip_pairs'] = [] - - self.ann_info['inference_channel'] = data_cfg['inference_channel'] - self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] - self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] - - self.coco = COCO(ann_file) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - - self.db = [] - - self.pipeline = Compose(self.pipeline) - - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - - def _xywh2cs(self, x, y, w, h, padding=1.25): - """This encodes bbox(x,y,w,h) into (center, scale) - - Args: - x, y, w, h - - Returns: - center (np.ndarray[float32](2,)): center of the bbox (x, y). - scale (np.ndarray[float32](2,)): scale of the bbox w & h. - """ - aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ - 'image_size'][1] - center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) - - if (not self.test_mode) and np.random.rand() < 0.3: - center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] - - if w > aspect_ratio * h: - h = w * 1.0 / aspect_ratio - elif w < aspect_ratio * h: - w = h * aspect_ratio - - # pixel std is 200.0 - scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) - # padding to include proper amount of context - scale = scale * padding - - return center, scale - - @abstractmethod - def _get_db(self): - """Load dataset.""" - raise NotImplementedError - - @abstractmethod - def evaluate(self, cfg, preds, output_dir, *args, **kwargs): - """Evaluate keypoint results.""" - raise NotImplementedError - - @staticmethod - def _write_keypoint_results(keypoints, res_file): - """Write results into a json file.""" - - with open(res_file, 'w') as f: - json.dump(keypoints, f, sort_keys=True, indent=4) - - def _report_metric(self, - res_file, - metrics, - pck_thr=0.2, - pckh_thr=0.7, - auc_nor=30): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'PCKh', 'AUC', 'EPE'. - pck_thr (float): PCK threshold, default as 0.2. - pckh_thr (float): PCKh threshold, default as 0.7. - auc_nor (float): AUC normalization factor, default as 30 pixel. - - Returns: - List: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - threshold_bbox = [] - threshold_head_box = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - if 'PCK' in metrics: - bbox = np.array(item['bbox']) - bbox_thr = np.max(bbox[2:]) - threshold_bbox.append(np.array([bbox_thr, bbox_thr])) - if 'PCKh' in metrics: - head_box_thr = item['head_size'] - threshold_head_box.append( - np.array([head_box_thr, head_box_thr])) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - threshold_bbox = np.array(threshold_bbox) - threshold_head_box = np.array(threshold_head_box) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - threshold_bbox) - info_str.append(('PCK', pck)) - - if 'PCKh' in metrics: - _, pckh, _ = keypoint_pck_accuracy(outputs, gts, masks, pckh_thr, - threshold_head_box) - info_str.append(('PCKh', pckh)) - - if 'AUC' in metrics: - info_str.append(('AUC', keypoint_auc(outputs, gts, masks, - auc_nor))) - - if 'EPE' in metrics: - info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) - - return info_str - - def __len__(self): - """Get the size of the dataset.""" - return len(self.db) - - def __getitem__(self, idx): - """Get the sample given index.""" - results = copy.deepcopy(self.db[idx]) - results['ann_info'] = self.ann_info - return self.pipeline(results) - - def _sort_and_unique_bboxes(self, kpts, key='bbox_id'): - """sort kpts and remove the repeated ones.""" - kpts = sorted(kpts, key=lambda x: x[key]) - num = len(kpts) - for i in range(num - 1, 0, -1): - if kpts[i][key] == kpts[i - 1][key]: - del kpts[i] - - return kpts + """This class has been deprecated and replaced by + Kpt2dSviewRgbImgTopDownDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'HandBaseDataset has been replaced by ' + 'Kpt2dSviewRgbImgTopDownDataset,' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/hand/interhand2d_dataset.py b/mmpose/datasets/datasets/hand/interhand2d_dataset.py index e3f45223cd..208dd73980 100644 --- a/mmpose/datasets/datasets/hand/interhand2d_dataset.py +++ b/mmpose/datasets/datasets/hand/interhand2d_dataset.py @@ -1,16 +1,18 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import json_tricks as json import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .hand_base_dataset import HandBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class InterHand2DDataset(HandBaseDataset): +class InterHand2DDataset(Kpt2dSviewRgbImgTopDownDataset): """InterHand2.6M 2D dataset for top-down hand pose estimation. `InterHand2.6M: A Dataset and Baseline for 3D Interacting Hand Pose @@ -47,10 +49,13 @@ class InterHand2DDataset(HandBaseDataset): Args: ann_file (str): Path to the annotation file. + camera_file (str): Path to the camera file. + joint_file (str): Path to the joint file. img_prefix (str): Path to a directory where images are held. Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (str): Store True when building test or validation dataset. Default: False. """ @@ -62,16 +67,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/interhand2d.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 21 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'interhand2d' self.camera_file = camera_file self.joint_file = joint_file self.db = self._get_db() diff --git a/mmpose/datasets/datasets/hand/interhand3d_dataset.py b/mmpose/datasets/datasets/hand/interhand3d_dataset.py index fe73ea7880..2f506a600d 100644 --- a/mmpose/datasets/datasets/hand/interhand3d_dataset.py +++ b/mmpose/datasets/datasets/hand/interhand3d_dataset.py @@ -1,17 +1,19 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import json_tricks as json import numpy as np +from mmcv import Config from mmpose.core.evaluation.top_down_eval import keypoint_epe from mmpose.datasets.builder import DATASETS -from .hand_base_dataset import HandBaseDataset +from ..base import Kpt3dSviewRgbImgTopDownDataset @DATASETS.register_module() -class InterHand3DDataset(HandBaseDataset): +class InterHand3DDataset(Kpt3dSviewRgbImgTopDownDataset): """InterHand2.6M 3D dataset for top-down hand pose estimation. `InterHand2.6M: A Dataset and Baseline for 3D Interacting Hand Pose @@ -69,6 +71,8 @@ class InterHand3DDataset(HandBaseDataset): Args: ann_file (str): Path to the annotation file. + camera_file (str): Path to the camera file. + joint_file (str): Path to the joint file. img_prefix (str): Path to a directory where images are held. Default: None. data_cfg (dict): config @@ -76,6 +80,7 @@ class InterHand3DDataset(HandBaseDataset): use_gt_root_depth (bool): Using the ground truth depth of the wrist or given depth from rootnet_result_file. rootnet_result_file (str): Path to the wrist depth file. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (str): Store True when building test or validation dataset. Default: False. """ @@ -89,21 +94,31 @@ def __init__(self, pipeline, use_gt_root_depth=True, rootnet_result_file=None, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/interhand3d.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - self.ann_info['flip_pairs'] = [[i, 21 + i] for i in range(21)] + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) - self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 42 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) self.ann_info['heatmap3d_depth_bound'] = data_cfg[ 'heatmap3d_depth_bound'] self.ann_info['heatmap_size_root'] = data_cfg['heatmap_size_root'] self.ann_info['root_depth_bound'] = data_cfg['root_depth_bound'] + self.ann_info['use_different_joint_weights'] = False - self.dataset_name = 'interhand3d' self.camera_file = camera_file self.joint_file = joint_file @@ -117,75 +132,6 @@ def __init__(self, print(f'=> num_images: {self.num_images}') print(f'=> load {len(self.db)} samples') - @staticmethod - def _cam2pixel(cam_coord, f, c): - """Transform the joints from their camera coordinates to their pixel - coordinates. - - Note: - N: number of joints - - Args: - cam_coord (ndarray[N, 3]): 3D joints coordinates - in the camera coordinate system - f (ndarray[2]): focal length of x and y axis - c (ndarray[2]): principal point of x and y axis - - Returns: - img_coord (ndarray[N, 3]): the coordinates (x, y, 0) - in the image plane. - """ - x = cam_coord[:, 0] / (cam_coord[:, 2] + 1e-8) * f[0] + c[0] - y = cam_coord[:, 1] / (cam_coord[:, 2] + 1e-8) * f[1] + c[1] - z = np.zeros_like(x) - img_coord = np.concatenate((x[:, None], y[:, None], z[:, None]), 1) - return img_coord - - @staticmethod - def _world2cam(world_coord, R, T): - """Transform the joints from their world coordinates to their camera - coordinates. - - Note: - N: number of joints - - Args: - world_coord (ndarray[3, N]): 3D joints coordinates - in the world coordinate system - R (ndarray[3, 3]): camera rotation matrix - T (ndarray[3, 1]): camera position (x, y, z) - - Returns: - cam_coord (ndarray[3, N]): 3D joints coordinates - in the camera coordinate system - """ - cam_coord = np.dot(R, world_coord - T) - return cam_coord - - @staticmethod - def _pixel2cam(pixel_coord, f, c): - """Transform the joints from their pixel coordinates to their camera - coordinates. - - Note: - N: number of joints - - Args: - pixel_coord (ndarray[N, 3]): 3D joints coordinates - in the pixel coordinate system - f (ndarray[2]): focal length of x and y axis - c (ndarray[2]): principal point of x and y axis - - Returns: - cam_coord (ndarray[N, 3]): 3D joints coordinates - in the camera coordinate system - """ - x = (pixel_coord[:, 0] - c[0]) / f[0] * pixel_coord[:, 2] - y = (pixel_coord[:, 1] - c[1]) / f[1] * pixel_coord[:, 2] - z = pixel_coord[:, 2] - cam_coord = np.concatenate((x[:, None], y[:, None], z[:, None]), 1) - return cam_coord - @staticmethod def _encode_handtype(hand_type): if hand_type == 'right': diff --git a/mmpose/datasets/datasets/hand/onehand10k_dataset.py b/mmpose/datasets/datasets/hand/onehand10k_dataset.py index 8bd703a269..19a3cefe89 100644 --- a/mmpose/datasets/datasets/hand/onehand10k_dataset.py +++ b/mmpose/datasets/datasets/hand/onehand10k_dataset.py @@ -1,15 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .hand_base_dataset import HandBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class OneHand10KDataset(HandBaseDataset): +class OneHand10KDataset(Kpt2dSviewRgbImgTopDownDataset): """OneHand10K dataset for top-down hand pose estimation. `Mask-pose Cascaded CNN for 2D Hand Pose Estimation from @@ -50,6 +52,7 @@ class OneHand10KDataset(HandBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -59,17 +62,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/onehand10k.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 21 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'onehand10k' self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/hand/panoptic_dataset.py b/mmpose/datasets/datasets/hand/panoptic_hand2d_dataset.py similarity index 86% rename from mmpose/datasets/datasets/hand/panoptic_dataset.py rename to mmpose/datasets/datasets/hand/panoptic_hand2d_dataset.py index dbbee41f42..2c3e1922b6 100644 --- a/mmpose/datasets/datasets/hand/panoptic_dataset.py +++ b/mmpose/datasets/datasets/hand/panoptic_hand2d_dataset.py @@ -1,15 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .hand_base_dataset import HandBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class PanopticDataset(HandBaseDataset): +class PanopticDataset(Kpt2dSviewRgbImgTopDownDataset): """Panoptic dataset for top-down hand pose estimation. `Hand Keypoint Detection in Single Images using Multiview @@ -50,6 +52,7 @@ class PanopticDataset(HandBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -59,17 +62,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/panoptic_hand2d.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 21 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'panoptic' self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -95,9 +107,9 @@ def _get_db(self): joints_3d[:, :2] = keypoints[:, :2] joints_3d_visible[:, :2] = np.minimum(1, keypoints[:, 2:3]) - # the bbox is the tightest bbox enclosing keypoints - # the paper use 2.2bbox as input - # we use 1.76bbox(2.2 * 0.8) as input + # The bbox is the tightest bbox enclosing keypoints. + # The paper uses 2.2 bbox as the input, while + # we use 1.76 (2.2 * 0.8) bbox as the input. center, scale = self._xywh2cs(*obj['bbox'][:4], 1.76) image_file = os.path.join(self.img_prefix, diff --git a/mmpose/datasets/datasets/hand/rhd2d_dataset.py b/mmpose/datasets/datasets/hand/rhd2d_dataset.py index 314445c6a6..a887acc603 100644 --- a/mmpose/datasets/datasets/hand/rhd2d_dataset.py +++ b/mmpose/datasets/datasets/hand/rhd2d_dataset.py @@ -1,15 +1,17 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .hand_base_dataset import HandBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class Rhd2DDataset(HandBaseDataset): +class Rhd2DDataset(Kpt2dSviewRgbImgTopDownDataset): """Rendered Handpose Dataset for top-down hand pose estimation. `Learning to Estimate 3D Hand Pose from Single RGB Images' ICCV'2017 @@ -49,6 +51,7 @@ class Rhd2DDataset(HandBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -58,17 +61,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/rhd2d.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - assert self.ann_info['num_joints'] == 21 - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'rhd2d' self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/mesh/mesh_base_dataset.py b/mmpose/datasets/datasets/mesh/mesh_base_dataset.py index 06756eaed9..79c8a8ac90 100644 --- a/mmpose/datasets/datasets/mesh/mesh_base_dataset.py +++ b/mmpose/datasets/datasets/mesh/mesh_base_dataset.py @@ -38,7 +38,7 @@ def __init__(self, self.image_info = {} self.ann_info = {} - self.annotations_path = ann_file + self.ann_file = ann_file self.img_prefix = img_prefix self.pipeline = pipeline self.test_mode = test_mode diff --git a/mmpose/datasets/datasets/mesh/mosh_dataset.py b/mmpose/datasets/datasets/mesh/mosh_dataset.py index 5dce0793b1..3185265e7d 100644 --- a/mmpose/datasets/datasets/mesh/mosh_dataset.py +++ b/mmpose/datasets/datasets/mesh/mosh_dataset.py @@ -25,7 +25,7 @@ class MoshDataset(Dataset, metaclass=ABCMeta): def __init__(self, ann_file, pipeline, test_mode=False): - self.annotations_path = ann_file + self.ann_file = ann_file self.pipeline = pipeline self.test_mode = test_mode diff --git a/mmpose/datasets/datasets/top_down/topdown_aic_dataset.py b/mmpose/datasets/datasets/top_down/topdown_aic_dataset.py index 245f6a93ba..a0df5c0912 100644 --- a/mmpose/datasets/datasets/top_down/topdown_aic_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_aic_dataset.py @@ -1,8 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. import warnings -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ...builder import DATASETS @@ -41,6 +40,7 @@ class TopDownAicDataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -50,61 +50,35 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/aic.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.use_gt_bbox = data_cfg['use_gt_bbox'] self.bbox_file = data_cfg['bbox_file'] self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] self.use_nms = data_cfg.get('use_nms', True) self.soft_nms = data_cfg['soft_nms'] self.nms_thr = data_cfg['nms_thr'] self.oks_thr = data_cfg['oks_thr'] self.vis_thr = data_cfg['vis_thr'] - self.ann_info['flip_pairs'] = [[0, 3], [1, 4], [2, 5], [6, 9], [7, 10], - [8, 11]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 12, 13) - self.ann_info['lower_body_ids'] = (6, 7, 8, 9, 10, 11) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.2, 1.5, 1., 1.], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # 'https://github.com/AIChallenger/AI_Challenger_2017/blob/master/' - # 'Evaluation/keypoint_eval/keypoint_eval.py#L50' - # delta = 2 x sigma - self.sigmas = np.array([ - 0.01388152, 0.01515228, 0.01057665, 0.01417709, 0.01497891, - 0.01402144, 0.03909642, 0.03686941, 0.01981803, 0.03843971, - 0.03412318, 0.02415081, 0.01291456, 0.01236173 - ]) - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'aic' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/top_down/topdown_base_dataset.py b/mmpose/datasets/datasets/top_down/topdown_base_dataset.py index edc008c5b6..dc99576716 100644 --- a/mmpose/datasets/datasets/top_down/topdown_base_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_base_dataset.py @@ -1,74 +1,16 @@ # Copyright (c) OpenMMLab. All rights reserved. -import copy -from abc import ABCMeta, abstractmethod +from abc import ABCMeta -import numpy as np from torch.utils.data import Dataset -from mmpose.datasets.pipelines import Compose - class TopDownBaseDataset(Dataset, metaclass=ABCMeta): - """Base class for top-down datasets. - - All top-down datasets should subclass it. - All subclasses should overwrite: - Methods:`_get_db` - - Args: - ann_file (str): Path to the annotation file. - img_prefix (str): Path to a directory where images are held. - Default: None. - data_cfg (dict): config - pipeline (list[dict | callable]): A sequence of data transforms. - test_mode (bool): Store True when building test or - validation dataset. Default: False. - """ - - def __init__(self, - ann_file, - img_prefix, - data_cfg, - pipeline, - test_mode=False): - - self.image_info = {} - self.ann_info = {} - - self.annotations_path = ann_file - self.img_prefix = img_prefix - self.pipeline = pipeline - self.test_mode = test_mode - - self.ann_info['image_size'] = np.array(data_cfg['image_size']) - self.ann_info['heatmap_size'] = np.array(data_cfg['heatmap_size']) - self.ann_info['num_joints'] = data_cfg['num_joints'] - - self.ann_info['flip_pairs'] = None - - self.ann_info['inference_channel'] = data_cfg['inference_channel'] - self.ann_info['num_output_channels'] = data_cfg['num_output_channels'] - self.ann_info['dataset_channel'] = data_cfg['dataset_channel'] - - self.db = [] - self.pipeline = Compose(self.pipeline) - - @abstractmethod - def _get_db(self): - """Load dataset.""" - raise NotImplementedError - - @abstractmethod - def evaluate(self, cfg, preds, output_dir, *args, **kwargs): - """Evaluate keypoint results.""" - raise NotImplementedError - - def __len__(self): - """Get the size of the dataset.""" - return len(self.db) - - def __getitem__(self, idx): - """Get the sample given index.""" - results = copy.deepcopy(self.db[idx]) - results['ann_info'] = self.ann_info - return self.pipeline(results) + """This class has been deprecated and replaced by + Kpt2dSviewRgbImgTopDownDataset.""" + + def __init__(self, *args, **kwargs): + raise (ImportError( + 'TopDownBaseDataset has been replaced by ' + 'Kpt2dSviewRgbImgTopDownDataset,' + 'check https://github.com/open-mmlab/mmpose/pull/663 for details.') + ) diff --git a/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py b/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py index 92b51340fa..a285258709 100644 --- a/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_coco_dataset.py @@ -5,16 +5,16 @@ import json_tricks as json import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS -from .topdown_base_dataset import TopDownBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class TopDownCocoDataset(TopDownBaseDataset): +class TopDownCocoDataset(Kpt2dSviewRgbImgTopDownDataset): """CocoDataset dataset for top-down pose estimation. `Microsoft COCO: Common Objects in Context' ECCV'2014 @@ -50,6 +50,7 @@ class TopDownCocoDataset(TopDownBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -59,88 +60,40 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/coco.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.use_gt_bbox = data_cfg['use_gt_bbox'] self.bbox_file = data_cfg['bbox_file'] self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] self.use_nms = data_cfg.get('use_nms', True) self.soft_nms = data_cfg['soft_nms'] self.nms_thr = data_cfg['nms_thr'] self.oks_thr = data_cfg['oks_thr'] self.vis_thr = data_cfg['vis_thr'] - self.ann_info['flip_pairs'] = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], - [11, 12], [13, 14], [15, 16]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) - self.ann_info['lower_body_ids'] = (11, 12, 13, 14, 15, 16) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, - 1.2, 1.5, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # 'https://github.com/cocodataset/cocoapi/blob/master/PythonAPI/' - # 'pycocotools/cocoeval.py#L523' - self.sigmas = np.array([ - .26, .25, .25, .35, .35, .79, .79, .72, .72, .62, .62, 1.07, 1.07, - .87, .87, .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'coco' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') print(f'=> load {len(self.db)} samples') - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - def _get_db(self): """Load dataset.""" if (not self.test_mode) or self.use_gt_bbox: @@ -226,37 +179,6 @@ def _load_coco_keypoint_annotation_kernel(self, img_id): return rec - def _xywh2cs(self, x, y, w, h): - """This encodes bbox(x,y,w,h) into (center, scale) - - Args: - x, y, w, h - - Returns: - tuple: A tuple containing center and scale. - - - center (np.ndarray[float32](2,)): center of the bbox (x, y). - - scale (np.ndarray[float32](2,)): scale of the bbox w & h. - """ - aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ - 'image_size'][1] - center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) - - if (not self.test_mode) and np.random.rand() < 0.3: - center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] - - if w > aspect_ratio * h: - h = w * 1.0 / aspect_ratio - elif w < aspect_ratio * h: - w = h * aspect_ratio - - # pixel std is 200.0 - scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) - # padding to include proper amount of context - scale = scale * 1.25 - - return center, scale - def _load_coco_person_detection_results(self): """Load coco person detection results.""" num_joints = self.ann_info['num_joints'] diff --git a/mmpose/datasets/datasets/top_down/topdown_coco_wholebody_dataset.py b/mmpose/datasets/datasets/top_down/topdown_coco_wholebody_dataset.py index 29eb8311de..6910279f3a 100644 --- a/mmpose/datasets/datasets/top_down/topdown_coco_wholebody_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_coco_wholebody_dataset.py @@ -3,7 +3,7 @@ import warnings import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ...builder import DATASETS @@ -35,6 +35,7 @@ class TopDownCocoWholeBodyDataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -44,32 +45,35 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/coco_wholebody.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.use_gt_bbox = data_cfg['use_gt_bbox'] self.bbox_file = data_cfg['bbox_file'] self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] self.use_nms = data_cfg.get('use_nms', True) self.soft_nms = data_cfg['soft_nms'] self.nms_thr = data_cfg['nms_thr'] self.oks_thr = data_cfg['oks_thr'] self.vis_thr = data_cfg['vis_thr'] - self.ann_info['flip_pairs'] = self._make_flip_pairs() - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) - self.ann_info['lower_body_ids'] = (11, 12, 13, 14, 15, 16) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = \ - np.ones((self.ann_info['num_joints'], 1), dtype=np.float32) self.body_num = 17 self.foot_num = 6 @@ -77,82 +81,11 @@ def __init__(self, self.left_hand_num = 21 self.right_hand_num = 21 - # 'https://github.com/jin-s13/COCO-WholeBody/blob/master/' - # 'evaluation/myeval_wholebody.py#L170' - self.sigmas_body = [ - 0.026, 0.025, 0.025, 0.035, 0.035, 0.079, 0.079, 0.072, 0.072, - 0.062, 0.062, 0.107, 0.107, 0.087, 0.087, 0.089, 0.089 - ] - self.sigmas_foot = [0.068, 0.066, 0.066, 0.092, 0.094, 0.094] - self.sigmas_face = [ - 0.042, 0.043, 0.044, 0.043, 0.040, 0.035, 0.031, 0.025, 0.020, - 0.023, 0.029, 0.032, 0.037, 0.038, 0.043, 0.041, 0.045, 0.013, - 0.012, 0.011, 0.011, 0.012, 0.012, 0.011, 0.011, 0.013, 0.015, - 0.009, 0.007, 0.007, 0.007, 0.012, 0.009, 0.008, 0.016, 0.010, - 0.017, 0.011, 0.009, 0.011, 0.009, 0.007, 0.013, 0.008, 0.011, - 0.012, 0.010, 0.034, 0.008, 0.008, 0.009, 0.008, 0.008, 0.007, - 0.010, 0.008, 0.009, 0.009, 0.009, 0.007, 0.007, 0.008, 0.011, - 0.008, 0.008, 0.008, 0.01, 0.008 - ] - self.sigmas_lefthand = [ - 0.029, 0.022, 0.035, 0.037, 0.047, 0.026, 0.025, 0.024, 0.035, - 0.018, 0.024, 0.022, 0.026, 0.017, 0.021, 0.021, 0.032, 0.02, - 0.019, 0.022, 0.031 - ] - self.sigmas_righthand = [ - 0.029, 0.022, 0.035, 0.037, 0.047, 0.026, 0.025, 0.024, 0.035, - 0.018, 0.024, 0.022, 0.026, 0.017, 0.021, 0.021, 0.032, 0.02, - 0.019, 0.022, 0.031 - ] - - self.sigmas_wholebody = ( - self.sigmas_body + self.sigmas_foot + self.sigmas_face + - self.sigmas_lefthand + self.sigmas_righthand) - - self.sigmas = np.array(self.sigmas_wholebody) - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'coco_wholebody' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') print(f'=> load {len(self.db)} samples') - @staticmethod - def _make_flip_pairs(): - body = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12], [13, 14], - [15, 16]] - foot = [[17, 20], [18, 21], [19, 22]] - - face = [[23, 39], [24, 38], [25, 37], [26, 36], [27, 35], [28, 34], - [29, 33], [30, 32], [40, 49], [41, 48], [42, 47], [43, 46], - [44, 45], [54, 58], [55, 57], [59, 68], [60, 67], [61, 66], - [62, 65], [63, 70], [64, 69], [71, 77], [72, 76], [73, 75], - [78, 82], [79, 81], [83, 87], [84, 86], [88, 90]] - - hand = [[91, 112], [92, 113], [93, 114], [94, 115], [95, 116], - [96, 117], [97, 118], [98, 119], [99, 120], [100, 121], - [101, 122], [102, 123], [103, 124], [104, 125], [105, 126], - [106, 127], [107, 128], [108, 129], [109, 130], [110, 131], - [111, 132]] - - return body + foot + face + hand - def _load_coco_keypoint_annotation_kernel(self, img_id): """load annotation from COCOAPI. @@ -257,11 +190,16 @@ def _do_python_keypoint_eval(self, res_file): """Keypoint evaluation using COCOAPI.""" coco_det = self.coco.loadRes(res_file) + cuts = np.cumsum([ + 0, self.body_num, self.foot_num, self.face_num, self.left_hand_num, + self.right_hand_num + ]) + coco_eval = COCOeval( self.coco, coco_det, 'keypoints_body', - np.array(self.sigmas_body), + self.sigmas[cuts[0]:cuts[1]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -272,7 +210,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_foot', - np.array(self.sigmas_foot), + self.sigmas[cuts[1]:cuts[2]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -283,7 +221,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_face', - np.array(self.sigmas_face), + self.sigmas[cuts[2]:cuts[3]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -294,7 +232,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_lefthand', - np.array(self.sigmas_lefthand), + self.sigmas[cuts[3]:cuts[4]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -305,7 +243,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_righthand', - np.array(self.sigmas_righthand), + self.sigmas[cuts[4]:cuts[5]], use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() @@ -316,7 +254,7 @@ def _do_python_keypoint_eval(self, res_file): self.coco, coco_det, 'keypoints_wholebody', - np.array(self.sigmas_wholebody), + self.sigmas, use_area=True) coco_eval.params.useSegm = None coco_eval.evaluate() diff --git a/mmpose/datasets/datasets/top_down/topdown_crowdpose_dataset.py b/mmpose/datasets/datasets/top_down/topdown_crowdpose_dataset.py index 0c8134fb35..200a08ecf1 100644 --- a/mmpose/datasets/datasets/top_down/topdown_crowdpose_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_crowdpose_dataset.py @@ -1,8 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. import warnings -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ...builder import DATASETS @@ -39,6 +38,7 @@ class TopDownCrowdPoseDataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -48,67 +48,35 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/crowdpose.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.use_gt_bbox = data_cfg['use_gt_bbox'] self.bbox_file = data_cfg['bbox_file'] self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] self.use_nms = data_cfg.get('use_nms', True) self.soft_nms = data_cfg['soft_nms'] self.nms_thr = data_cfg['nms_thr'] self.oks_thr = data_cfg['oks_thr'] self.vis_thr = data_cfg['vis_thr'] - self.ann_info['flip_pairs'] = [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9], - [10, 11]] - - self.ann_info['joint_to_joint'] = {} - for pair in self.ann_info['flip_pairs']: - self.ann_info['joint_to_joint'][pair[0]] = pair[1] - self.ann_info['joint_to_joint'][pair[1]] = pair[0] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 12, 13) - self.ann_info['lower_body_ids'] = (6, 7, 8, 9, 10, 11) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 0.2, 0.2, 0.2, 1.3, 1.5, 0.2, 1.3, 1.5, 0.2, 0.2, 0.5, 0.2, - 0.2, 0.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # 'https://github.com/Jeff-sjtu/CrowdPose/blob/master/crowdpose-api/' - # 'PythonAPI/crowdposetools/cocoeval.py#L224' - self.sigmas = np.array([ - .79, .79, .72, .72, .62, .62, 1.07, 1.07, .87, .87, .89, .89, .79, - .79 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'crowdpose' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py b/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py index d167c5113d..0e652e323e 100644 --- a/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_h36m_dataset.py @@ -1,19 +1,18 @@ # Copyright (c) OpenMMLab. All rights reserved. import os +import warnings from collections import OrderedDict import json_tricks as json import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config -from mmpose.core.evaluation.top_down_eval import (keypoint_epe, - keypoint_pck_accuracy) from ...builder import DATASETS -from .topdown_base_dataset import TopDownBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class TopDownH36MDataset(TopDownBaseDataset): +class TopDownH36MDataset(Kpt2dSviewRgbImgTopDownDataset): """Human3.6M dataset for top-down 2D pose estimation. `Human3.6M: Large Scale Datasets and Predictive Methods for 3D Human @@ -46,6 +45,7 @@ class TopDownH36MDataset(TopDownBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -55,83 +55,31 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super(TopDownH36MDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - assert self.ann_info['num_joints'] == 17 + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/h36m.py') + dataset_info = cfg._cfg_dict['dataset_info'] + + super().__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) - self.ann_info['flip_pairs'] = [[1, 4], [2, 5], [3, 6], [11, 14], - [12, 15], [13, 16]] - self.ann_info['upper_body_ids'] = (0, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16) - self.ann_info['lower_body_ids'] = (1, 2, 3, 4, 5, 6) self.ann_info['use_different_joint_weights'] = False - - self.ann_info['joint_weights'] = np.ones( - (self.ann_info['num_joints'], 1), dtype=np.float32) - - self.coco = COCO(ann_file) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - - self.dataset_name = 'h36m' self.db = self._get_db() print(f'=> num_images: {self.num_images}') print(f'=> load {len(self.db)} samples') - @staticmethod - def _get_mapping_id_name(imgs): - """ - Args: - imgs (dict): dict of image info. - - Returns: - tuple: Image name & id mapping dicts. - - - id2name (dict): Mapping image id to name. - - name2id (dict): Mapping image name to id. - """ - id2name = {} - name2id = {} - for image_id, image in imgs.items(): - file_name = image['file_name'] - id2name[image_id] = file_name - name2id[file_name] = image_id - - return id2name, name2id - - def _xywh2cs(self, x, y, w, h, padding=1.): - """This encodes bbox(x,y,w,h) into (center, scale) - - Args: - x, y, w, h - - Returns: - center (np.ndarray[float32](2,)): center of the bbox (x, y). - scale (np.ndarray[float32](2,)): scale of the bbox w & h. - """ - aspect_ratio = self.ann_info['image_size'][0] / self.ann_info[ - 'image_size'][1] - center = np.array([x + w * 0.5, y + h * 0.5], dtype=np.float32) - - if (not self.test_mode) and np.random.rand() < 0.3: - center += 0.4 * (np.random.rand(2) - 0.5) * [w, h] - - if w > aspect_ratio * h: - h = w * 1.0 / aspect_ratio - elif w < aspect_ratio * h: - w = h * aspect_ratio - - # pixel std is 200.0 - scale = np.array([w / 200.0, h / 200.0], dtype=np.float32) - # padding to include proper amount of context - scale = scale * padding - - return center, scale - def _get_db(self): """Load dataset.""" gt_db = [] @@ -237,64 +185,6 @@ def evaluate(self, outputs, res_folder, metric, **kwargs): return name_value - def _report_metric(self, res_file, metrics, pck_thr=0.05): - """Keypoint evaluation. - - Args: - res_file (str): Json file stored prediction results. - metrics (str | list[str]): Metric to be performed. - Options: 'PCK', 'PCKh', 'AUC', 'EPE'. - pck_thr (float): PCK threshold, default as 0.05. - auc_nor (float): AUC normalization factor, default as 30 pixel. - - Returns: - List: Evaluation results for evaluation metric. - """ - info_str = [] - - with open(res_file, 'r') as fin: - preds = json.load(fin) - assert len(preds) == len(self.db) - - outputs = [] - gts = [] - masks = [] - threshold_bbox = [] - - for pred, item in zip(preds, self.db): - outputs.append(np.array(pred['keypoints'])[:, :-1]) - gts.append(np.array(item['joints_3d'])[:, :-1]) - masks.append((np.array(item['joints_3d_visible'])[:, 0]) > 0) - if 'PCK' in metrics: - bbox = np.array(item['bbox']) - bbox_thr = np.max(bbox[2:]) - threshold_bbox.append(np.array([bbox_thr, bbox_thr])) - - outputs = np.array(outputs) - gts = np.array(gts) - masks = np.array(masks) - threshold_bbox = np.array(threshold_bbox) - - if 'PCK' in metrics: - _, pck, _ = keypoint_pck_accuracy(outputs, gts, masks, pck_thr, - threshold_bbox) - info_str.append(('PCK', pck)) - - if 'EPE' in metrics: - info_str.append(('EPE', keypoint_epe(outputs, gts, masks))) - - return info_str - - def _sort_and_unique_bboxes(self, kpts, key='bbox_id'): - """sort kpts and remove the repeated ones.""" - kpts = sorted(kpts, key=lambda x: x[key]) - num = len(kpts) - for i in range(num - 1, 0, -1): - if kpts[i][key] == kpts[i - 1][key]: - del kpts[i] - - return kpts - @staticmethod def _write_keypoint_results(keypoints, res_file): """Write results into a json file.""" diff --git a/mmpose/datasets/datasets/top_down/topdown_jhmdb_dataset.py b/mmpose/datasets/datasets/top_down/topdown_jhmdb_dataset.py index a38fa33e94..7db086b246 100644 --- a/mmpose/datasets/datasets/top_down/topdown_jhmdb_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_jhmdb_dataset.py @@ -5,7 +5,7 @@ import json_tricks as json import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from mmpose.core.evaluation.top_down_eval import keypoint_pck_accuracy from ...builder import DATASETS @@ -46,6 +46,7 @@ class TopDownJhmdbDataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -55,60 +56,34 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/jhmdb.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.use_gt_bbox = data_cfg['use_gt_bbox'] self.bbox_file = data_cfg['bbox_file'] self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] self.soft_nms = data_cfg['soft_nms'] self.nms_thr = data_cfg['nms_thr'] self.oks_thr = data_cfg['oks_thr'] self.vis_thr = data_cfg['vis_thr'] - self.ann_info['flip_pairs'] = [[3, 4], [5, 6], [7, 8], [9, 10], - [9, 10], [11, 12], [13, 14]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 7, 8, 11, 12) - self.ann_info['lower_body_ids'] = (5, 6, 9, 10, 13, 14) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.2, 1.2, 1.5, 1.5, 1.5, - 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # Adapted from COCO dataset - self.sigmas = np.array([ - .25, 1.07, .25, .79, .79, 1.07, 1.07, .72, .72, .87, .87, .62, .62, - .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'jhmdb' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py index cd6d5ada16..148963768b 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mhp_dataset.py @@ -1,8 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. import warnings -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from xtcocotools.cocoeval import COCOeval from ...builder import DATASETS @@ -52,6 +51,7 @@ class TopDownMhpDataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -61,9 +61,24 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/mhp.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.use_gt_bbox = data_cfg['use_gt_bbox'] self.bbox_file = data_cfg['bbox_file'] @@ -78,45 +93,8 @@ def __init__(self, self.nms_thr = data_cfg['nms_thr'] self.oks_thr = data_cfg['oks_thr'] self.vis_thr = data_cfg['vis_thr'] - self.bbox_thr = data_cfg['bbox_thr'] - - self.ann_info['flip_pairs'] = [[0, 5], [1, 4], [2, 3], [10, 15], - [11, 14], [12, 13]] - - self.ann_info['upper_body_ids'] = (7, 8, 9, 10, 11, 12, 13, 14, 15) - self.ann_info['lower_body_ids'] = (0, 1, 2, 3, 4, 5, 6) self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1.5, 1.2, 1., 1., 1.2, 1.5, 1., 1., 1., 1., 1.5, 1.2, 1., 1., - 1.2, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # Adapted from COCO dataset. - self.sigmas = np.array([ - .89, .83, 1.07, 1.07, .83, .89, .26, .26, .26, .26, .62, .72, 1.79, - 1.79, .72, .62 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'mhp' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py index e1fbfcc6bf..a5e6f6bf39 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mpii_dataset.py @@ -1,17 +1,19 @@ # Copyright (c) OpenMMLab. All rights reserved. import json import os +import warnings from collections import OrderedDict import numpy as np +from mmcv import Config from scipy.io import loadmat, savemat from ...builder import DATASETS -from .topdown_base_dataset import TopDownBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class TopDownMpiiDataset(TopDownBaseDataset): +class TopDownMpiiDataset(Kpt2dSviewRgbImgTopDownDataset): """MPII Dataset for top-down pose estimation. `2D Human Pose Estimation: New Benchmark and State of the Art Analysis' @@ -46,6 +48,7 @@ class TopDownMpiiDataset(TopDownBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -55,23 +58,25 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - - self.ann_file = ann_file - self.ann_info['flip_pairs'] = [[0, 5], [1, 4], [2, 3], [10, 15], - [11, 14], [12, 13]] - self.ann_info['upper_body_ids'] = (7, 8, 9, 10, 11, 12, 13, 14, 15) - self.ann_info['lower_body_ids'] = (0, 1, 2, 3, 4, 5, 6) - self.ann_info['use_different_joint_weights'] = False + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/mpii.py') + dataset_info = cfg._cfg_dict['dataset_info'] - assert self.ann_info['num_joints'] == 16 - self.ann_info['joint_weights'] = np.ones( - (self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'mpii' + super().__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + coco_style=False, + test_mode=test_mode) self.db = self._get_db() self.image_set = set(x['image_file'] for x in self.db) @@ -90,8 +95,8 @@ def _get_db(self): for a in anno: image_name = a['image'] - center = np.array(a['center'], dtype=float) - scale = np.array([a['scale'], a['scale']], dtype=float) + center = np.array(a['center'], dtype=np.float32) + scale = np.array([a['scale'], a['scale']], dtype=np.float32) # Adjust center/scale slightly to avoid cropping limbs if center[0] != -1: diff --git a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py index c8e79da08d..978f12b787 100644 --- a/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_mpii_trb_dataset.py @@ -2,17 +2,19 @@ import copy as cp import os import os.path as osp +import warnings from collections import OrderedDict import json_tricks as json import numpy as np +from mmcv import Config from mmpose.datasets.builder import DATASETS -from .topdown_base_dataset import TopDownBaseDataset +from ..base import Kpt2dSviewRgbImgTopDownDataset @DATASETS.register_module() -class TopDownMpiiTrbDataset(TopDownBaseDataset): +class TopDownMpiiTrbDataset(Kpt2dSviewRgbImgTopDownDataset): """MPII-TRB Dataset dataset for top-down pose estimation. `TRB: A Novel Triplet Representation for Understanding 2D Human Body` @@ -72,6 +74,7 @@ class TopDownMpiiTrbDataset(TopDownBaseDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -81,30 +84,26 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): - super().__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) - - # flip_pairs in MPII-TRB - self.ann_info['flip_pairs'] = [[0, 1], [2, 3], [4, 5], [6, 7], [8, 9], - [10, 11], [14, 15], [16, 22], [28, 34], - [17, 23], [29, 35], [18, 24], [30, 36], - [19, 25], [31, 37], [20, 26], [32, 38], - [21, 27], [33, 39]] + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/mpii_trb.py') + dataset_info = cfg._cfg_dict['dataset_info'] - self.ann_info['upper_body_ids'] = [0, 1, 2, 3, 4, 5, 12, 13] - self.ann_info['lower_body_ids'] = [6, 7, 8, 9, 10, 11] - self.ann_info['upper_body_ids'].extend(list(range(14, 28))) - self.ann_info['lower_body_ids'].extend(list(range(28, 40))) + super().__init__( + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.ann_info['use_different_joint_weights'] = False - - assert self.ann_info['num_joints'] == 40 - self.ann_info['joint_weights'] = np.ones( - (self.ann_info['num_joints'], 1), dtype=np.float32) - - self.dataset_name = 'mpii_trb' self.db = self._get_db(ann_file) self.image_set = set(x['image_file'] for x in self.db) self.num_images = len(self.image_set) diff --git a/mmpose/datasets/datasets/top_down/topdown_ochuman_dataset.py b/mmpose/datasets/datasets/top_down/topdown_ochuman_dataset.py index 5c66447ef1..0392f67415 100644 --- a/mmpose/datasets/datasets/top_down/topdown_ochuman_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_ochuman_dataset.py @@ -1,8 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. import warnings -import numpy as np -from xtcocotools.coco import COCO +from mmcv import Config from ...builder import DATASETS from .topdown_coco_dataset import TopDownCocoDataset @@ -48,6 +47,7 @@ class TopDownOCHumanDataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -57,62 +57,35 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/ochuman.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.use_gt_bbox = data_cfg['use_gt_bbox'] self.bbox_file = data_cfg['bbox_file'] self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] self.use_nms = data_cfg.get('use_nms', True) self.soft_nms = data_cfg['soft_nms'] self.nms_thr = data_cfg['nms_thr'] self.oks_thr = data_cfg['oks_thr'] self.vis_thr = data_cfg['vis_thr'] - self.ann_info['flip_pairs'] = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], - [11, 12], [13, 14], [15, 16]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) - self.ann_info['lower_body_ids'] = (11, 12, 13, 14, 15, 16) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, - 1.2, 1.5, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # 'https://github.com/liruilong940607/Pose2Seg/blob/' - # '64fcc5e0ee7b85c32f4be2771ce810a41b9fcb38/test.py#L50' - self.sigmas = np.array([ - .26, .25, .25, .35, .35, .79, .79, .72, .72, .62, .62, 1.07, 1.07, - .87, .87, .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'ochuman' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') diff --git a/mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py b/mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py index 13ad86e782..c2b7af6271 100644 --- a/mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py +++ b/mmpose/datasets/datasets/top_down/topdown_posetrack18_dataset.py @@ -6,9 +6,9 @@ import json_tricks as json import numpy as np +from mmcv import Config from poseval import eval_helpers from poseval.evaluateAP import evaluateAP -from xtcocotools.coco import COCO from ....core.post_processing import oks_nms, soft_oks_nms from ...builder import DATASETS @@ -51,6 +51,7 @@ class TopDownPoseTrack18Dataset(TopDownCocoDataset): Default: None. data_cfg (dict): config pipeline (list[dict | callable]): A sequence of data transforms. + dataset_info (DatasetInfo): A class containing all dataset info. test_mode (bool): Store True when building test or validation dataset. Default: False. """ @@ -60,61 +61,35 @@ def __init__(self, img_prefix, data_cfg, pipeline, + dataset_info=None, test_mode=False): + + if dataset_info is None: + warnings.warn( + 'dataset_info is missing. ' + 'Check https://github.com/open-mmlab/mmpose/pull/663 ' + 'for details.', DeprecationWarning) + cfg = Config.fromfile('configs/_base_/datasets/posetrack18.py') + dataset_info = cfg._cfg_dict['dataset_info'] + super(TopDownCocoDataset, self).__init__( - ann_file, img_prefix, data_cfg, pipeline, test_mode=test_mode) + ann_file, + img_prefix, + data_cfg, + pipeline, + dataset_info=dataset_info, + test_mode=test_mode) self.use_gt_bbox = data_cfg['use_gt_bbox'] self.bbox_file = data_cfg['bbox_file'] self.det_bbox_thr = data_cfg.get('det_bbox_thr', 0.0) - if 'image_thr' in data_cfg: - warnings.warn( - 'image_thr is deprecated, ' - 'please use det_bbox_thr instead', DeprecationWarning) - self.det_bbox_thr = data_cfg['image_thr'] self.use_nms = data_cfg.get('use_nms', True) self.soft_nms = data_cfg['soft_nms'] self.nms_thr = data_cfg['nms_thr'] self.oks_thr = data_cfg['oks_thr'] self.vis_thr = data_cfg['vis_thr'] - self.ann_info['flip_pairs'] = [[3, 4], [5, 6], [7, 8], [9, 10], - [11, 12], [13, 14], [15, 16]] - - self.ann_info['upper_body_ids'] = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10) - self.ann_info['lower_body_ids'] = (11, 12, 13, 14, 15, 16) - self.ann_info['use_different_joint_weights'] = False - self.ann_info['joint_weights'] = np.array( - [ - 1., 1., 1., 1., 1., 1., 1., 1.2, 1.2, 1.5, 1.5, 1., 1., 1.2, - 1.2, 1.5, 1.5 - ], - dtype=np.float32).reshape((self.ann_info['num_joints'], 1)) - - # Adapted from COCO dataset - self.sigmas = np.array([ - .26, .25, .25, .35, .35, .79, .79, .72, .72, .62, .62, 1.07, 1.07, - .87, .87, .89, .89 - ]) / 10.0 - - self.coco = COCO(ann_file) - - cats = [ - cat['name'] for cat in self.coco.loadCats(self.coco.getCatIds()) - ] - self.classes = ['__background__'] + cats - self.num_classes = len(self.classes) - self._class_to_ind = dict(zip(self.classes, range(self.num_classes))) - self._class_to_coco_ind = dict(zip(cats, self.coco.getCatIds())) - self._coco_ind_to_class_ind = dict( - (self._class_to_coco_ind[cls], self._class_to_ind[cls]) - for cls in self.classes[1:]) - self.img_ids = self.coco.getImgIds() - self.num_images = len(self.img_ids) - self.id2name, self.name2id = self._get_mapping_id_name(self.coco.imgs) - self.dataset_name = 'posetrack18' - self.db = self._get_db() print(f'=> num_images: {self.num_images}') @@ -152,8 +127,8 @@ def evaluate(self, outputs, res_folder, metric='mAP', **kwargs): pred_folder = osp.join(res_folder, 'preds') os.makedirs(pred_folder, exist_ok=True) gt_folder = osp.join( - osp.dirname(self.annotations_path), - osp.splitext(self.annotations_path.split('_')[-1])[0]) + osp.dirname(self.ann_file), + osp.splitext(self.ann_file.split('_')[-1])[0]) kpts = defaultdict(list) diff --git a/mmpose/datasets/pipelines/bottom_up_transform.py b/mmpose/datasets/pipelines/bottom_up_transform.py index f556bd866c..2a8e4fd797 100644 --- a/mmpose/datasets/pipelines/bottom_up_transform.py +++ b/mmpose/datasets/pipelines/bottom_up_transform.py @@ -118,9 +118,9 @@ def _resize_align_multi_scale_udp(image, input_size, current_scale, min_scale): trans = get_warp_matrix( theta=0, - size_input=np.array(scale, dtype=float), - size_dst=np.array(size_resized, dtype=float) - 1.0, - size_target=np.array(scale, dtype=float)) + size_input=np.array(scale, dtype=np.float32), + size_dst=np.array(size_resized, dtype=np.float32) - 1.0, + size_target=np.array(scale, dtype=np.float32)) image_resized = cv2.warpAffine( image.copy(), trans, size_resized, flags=cv2.INTER_LINEAR) @@ -458,8 +458,8 @@ def __call__(self, results): theta=aug_rot, size_input=center * 2.0, size_dst=np.array( - (_output_size, _output_size), dtype=float) - 1.0, - size_target=np.array((scale, scale), dtype=float)) + (_output_size, _output_size), dtype=np.float32) - 1.0, + size_target=np.array((scale, scale), dtype=np.float32)) mask[i] = cv2.warpAffine( (mask[i] * 255).astype(np.uint8), trans, (int(_output_size), int(_output_size)), @@ -473,8 +473,9 @@ def __call__(self, results): theta=aug_rot, size_input=center * 2.0, size_dst=np.array( - (self.input_size, self.input_size), dtype=float) - 1.0, - size_target=np.array((scale, scale), dtype=float)) + (self.input_size, self.input_size), dtype=np.float32) - + 1.0, + size_target=np.array((scale, scale), dtype=np.float32)) image = cv2.warpAffine( image, mat_input, (int(self.input_size), int(self.input_size)), diff --git a/mmpose/deprecated.py b/mmpose/deprecated.py index 11937b2a34..b930901722 100644 --- a/mmpose/deprecated.py +++ b/mmpose/deprecated.py @@ -2,7 +2,7 @@ import warnings from .datasets.builder import DATASETS -from .datasets.datasets.top_down.topdown_base_dataset import TopDownBaseDataset +from .datasets.datasets.base import Kpt2dSviewRgbImgTopDownDataset from .models.builder import HEADS, POSENETS from .models.detectors import AssociativeEmbedding from .models.heads import (AEHigherResolutionHead, AESimpleHead, @@ -13,7 +13,7 @@ @DATASETS.register_module() -class TopDownFreiHandDataset(TopDownBaseDataset): +class TopDownFreiHandDataset(Kpt2dSviewRgbImgTopDownDataset): """Deprecated TopDownFreiHandDataset.""" def __init__(self, *args, **kwargs): @@ -30,7 +30,7 @@ def evaluate(self, cfg, preds, output_dir, *args, **kwargs): @DATASETS.register_module() -class TopDownOneHand10KDataset(TopDownBaseDataset): +class TopDownOneHand10KDataset(Kpt2dSviewRgbImgTopDownDataset): """Deprecated TopDownOneHand10KDataset.""" def __init__(self, *args, **kwargs): @@ -47,7 +47,7 @@ def evaluate(self, cfg, preds, output_dir, *args, **kwargs): @DATASETS.register_module() -class TopDownPanopticDataset(TopDownBaseDataset): +class TopDownPanopticDataset(Kpt2dSviewRgbImgTopDownDataset): """Deprecated TopDownPanopticDataset.""" def __init__(self, *args, **kwargs): diff --git a/mmpose/models/detectors/associative_embedding.py b/mmpose/models/detectors/associative_embedding.py index a3bbec98e2..19a6c09c15 100644 --- a/mmpose/models/detectors/associative_embedding.py +++ b/mmpose/models/detectors/associative_embedding.py @@ -4,6 +4,7 @@ import mmcv import torch from mmcv.image import imwrite +from mmcv.utils.misc import deprecated_api_warning from mmcv.visualization.image import imshow from mmpose.core.evaluation import (aggregate_results, get_group_preds, @@ -299,6 +300,8 @@ def forward_test(self, img, img_metas, return_heatmap=False, **kwargs): return result + @deprecated_api_warning({'pose_limb_color': 'pose_link_color'}, + cls_name='AssociativeEmbedding') def show_result(self, img, result, @@ -306,7 +309,7 @@ def show_result(self, kpt_score_thr=0.3, bbox_color=None, pose_kpt_color=None, - pose_limb_color=None, + pose_link_color=None, radius=4, thickness=1, font_scale=0.5, @@ -322,12 +325,13 @@ def show_result(self, result (list[dict]): The results to draw over `img` (bbox_result, pose_result). skeleton (list[list]): The connection of keypoints. + skeleton is 0-based indexing. kpt_score_thr (float, optional): Minimum score of keypoints to be shown. Default: 0.3. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. - pose_limb_color (np.array[Mx3]): Color of M limbs. - If None, do not draw limbs. + pose_link_color (np.array[Mx3]): Color of M links. + If None, do not draw links. radius (int): Radius of circles. thickness (int): Thickness of lines. font_scale (float): Font scales of texts. @@ -343,7 +347,6 @@ def show_result(self, Returns: Tensor: Visualized image only if not `show` or `out_file` """ - img = mmcv.imread(img) img = img.copy() img_h, img_w, _ = img.shape @@ -353,7 +356,7 @@ def show_result(self, pose_result.append(res['keypoints']) imshow_keypoints(img, pose_result, skeleton, kpt_score_thr, - pose_kpt_color, pose_limb_color, radius, thickness) + pose_kpt_color, pose_link_color, radius, thickness) if show: imshow(img, win_name, wait_time) diff --git a/mmpose/models/detectors/interhand_3d.py b/mmpose/models/detectors/interhand_3d.py index 444cb3c6b1..fab393c9b4 100644 --- a/mmpose/models/detectors/interhand_3d.py +++ b/mmpose/models/detectors/interhand_3d.py @@ -1,6 +1,7 @@ # Copyright (c) OpenMMLab. All rights reserved. import mmcv import numpy as np +from mmcv.utils.misc import deprecated_api_warning from mmpose.core import imshow_keypoints, imshow_keypoints_3d from ..builder import POSENETS @@ -100,6 +101,8 @@ def forward_test(self, img, img_metas, **kwargs): result = {} return result + @deprecated_api_warning({'pose_limb_color': 'pose_link_color'}, + cls_name='Interhand3D') def show_result(self, result, img=None, @@ -109,7 +112,7 @@ def show_result(self, bbox_color='green', thickness=2, pose_kpt_color=None, - pose_limb_color=None, + pose_link_color=None, vis_height=400, num_instances=-1, win_name='', @@ -128,7 +131,7 @@ def show_result(self, - "title" (str): title for the subplot img (str or Tensor): Optional. The image to visualize 2D inputs on. skeleton (list of [idx_i,idx_j]): Skeleton described by a list of - limbs, each is a pair of joint indices. + links, each is a pair of joint indices. kpt_score_thr (float, optional): Minimum score of keypoints to be shown. Default: 0.3. radius (int): Radius of circles. @@ -136,7 +139,7 @@ def show_result(self, thickness (int): Thickness of lines. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. - pose_limb_color (np.array[Mx3]): Color of M limbs. + pose_link_color (np.array[Mx3]): Color of M limbs. If None, do not draw limbs. vis_height (int): The image hight of the visualization. The width will be N*vis_height depending on the number of visualized @@ -155,7 +158,6 @@ def show_result(self, Returns: Tensor: Visualized img, only if not `show` or `out_file`. """ - if num_instances < 0: assert len(result) > 0 result = sorted(result, key=lambda x: x.get('track_id', 0)) @@ -196,7 +198,7 @@ def show_result(self, skeleton, kpt_score_thr=kpt_score_thr, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, radius=radius, thickness=thickness) img = mmcv.imrescale(img, scale=vis_height / img.shape[0]) @@ -206,7 +208,7 @@ def show_result(self, img, skeleton, pose_kpt_color, - pose_limb_color, + pose_link_color, vis_height, axis_limit=300, axis_azimuth=-115, diff --git a/mmpose/models/detectors/pose_lifter.py b/mmpose/models/detectors/pose_lifter.py index 141cf5a3db..49c1a5a05c 100644 --- a/mmpose/models/detectors/pose_lifter.py +++ b/mmpose/models/detectors/pose_lifter.py @@ -3,6 +3,7 @@ import mmcv import numpy as np +from mmcv.utils.misc import deprecated_api_warning from mmpose.core import imshow_bboxes, imshow_keypoints, imshow_keypoints_3d from .. import builder @@ -260,9 +261,7 @@ def forward_test(self, input, metas, **kwargs): return results def forward_dummy(self, input): - """Used for computing network FLOPs. - - See ``tools/get_flops.py``. + """Used for computing network FLOPs. See ``tools/get_flops.py``. Args: input (torch.Tensor): Input pose @@ -285,12 +284,14 @@ def forward_dummy(self, input): return output + @deprecated_api_warning({'pose_limb_color': 'pose_link_color'}, + cls_name='PoseLifter') def show_result(self, result, img=None, skeleton=None, pose_kpt_color=None, - pose_limb_color=None, + pose_link_color=None, radius=8, thickness=2, vis_height=400, @@ -311,20 +312,16 @@ def show_result(self, - "title" (str): title for the subplot img (str or Tensor): Optional. The image to visualize 2D inputs on. skeleton (list of [idx_i,idx_j]): Skeleton described by a list of - limbs, each is a pair of joint indices. + links, each is a pair of joint indices. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. - pose_limb_color (np.array[Mx3]): Color of M limbs. - If None, do not draw limbs. + pose_link_color (np.array[Mx3]): Color of M links. + If None, do not draw links. radius (int): Radius of circles. thickness (int): Thickness of lines. vis_height (int): The image hight of the visualization. The width will be N*vis_height depending on the number of visualized items. - num_instances (int): Number of instances to be shown in 3D. If - smaller than 0, all the instances in the pose_result will be - shown. Otherwise, pad or truncate the pose_result to a length - of num_instances. win_name (str): The window name. wait_time (int): Value of waitKey param. Default: 0. @@ -334,7 +331,6 @@ def show_result(self, Returns: Tensor: Visualized img, only if not `show` or `out_file`. """ - if num_instances < 0: assert len(result) > 0 result = sorted(result, key=lambda x: x.get('track_id', 1e4)) @@ -374,7 +370,7 @@ def show_result(self, skeleton, kpt_score_thr=0.3, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, radius=radius, thickness=thickness) img = mmcv.imrescale(img, scale=vis_height / img.shape[0]) @@ -384,7 +380,7 @@ def show_result(self, img, skeleton, pose_kpt_color, - pose_limb_color, + pose_link_color, vis_height, num_instances=num_instances) diff --git a/mmpose/models/detectors/top_down.py b/mmpose/models/detectors/top_down.py index a037288bed..6f1dc39a48 100644 --- a/mmpose/models/detectors/top_down.py +++ b/mmpose/models/detectors/top_down.py @@ -4,6 +4,7 @@ import mmcv import numpy as np from mmcv.image import imwrite +from mmcv.utils.misc import deprecated_api_warning from mmcv.visualization.image import imshow from mmpose.core import imshow_bboxes, imshow_keypoints @@ -215,6 +216,8 @@ def forward_dummy(self, img): output = self.keypoint_head(output) return output + @deprecated_api_warning({'pose_limb_color': 'pose_link_color'}, + cls_name='TopDown') def show_result(self, img, result, @@ -222,7 +225,7 @@ def show_result(self, kpt_score_thr=0.3, bbox_color='green', pose_kpt_color=None, - pose_limb_color=None, + pose_link_color=None, text_color='white', radius=4, thickness=1, @@ -240,13 +243,14 @@ def show_result(self, result (list[dict]): The results to draw over `img` (bbox_result, pose_result). skeleton (list[list]): The connection of keypoints. + skeleton is 0-based indexing. kpt_score_thr (float, optional): Minimum score of keypoints to be shown. Default: 0.3. bbox_color (str or tuple or :obj:`Color`): Color of bbox lines. pose_kpt_color (np.array[Nx3]`): Color of N keypoints. If None, do not draw keypoints. - pose_limb_color (np.array[Mx3]): Color of M limbs. - If None, do not draw limbs. + pose_link_color (np.array[Mx3]): Color of M links. + If None, do not draw links. text_color (str or tuple or :obj:`Color`): Color of texts. radius (int): Radius of circles. thickness (int): Thickness of lines. @@ -263,7 +267,6 @@ def show_result(self, Returns: Tensor: Visualized img, only if not `show` or `out_file`. """ - img = mmcv.imread(img) img = img.copy() @@ -290,7 +293,7 @@ def show_result(self, show=False) imshow_keypoints(img, pose_result, skeleton, kpt_score_thr, - pose_kpt_color, pose_limb_color, radius, + pose_kpt_color, pose_link_color, radius, thickness) if show: diff --git a/tests/test_apis/test_inference.py b/tests/test_apis/test_inference.py index 9754a15cf1..17d1c7b8bc 100644 --- a/tests/test_apis/test_inference.py +++ b/tests/test_apis/test_inference.py @@ -1,10 +1,10 @@ # Copyright (c) OpenMMLab. All rights reserved. import numpy as np -import pytest from mmpose.apis import (inference_bottom_up_pose_model, inference_top_down_pose_model, init_pose_model, process_mmdet_results, vis_pose_result) +from mmpose.datasets import DatasetInfo def test_top_down_demo(): @@ -16,14 +16,21 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/coco/000000000785.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) person_result = [] person_result.append({'bbox': [50, 50, 50, 100]}) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( - pose_model, image_name, person_result, format='xywh') + pose_model, + image_name, + person_result, + format='xywh', + dataset_info=dataset_info) # show the results - vis_pose_result(pose_model, image_name, pose_results) + vis_pose_result( + pose_model, image_name, pose_results, dataset_info=dataset_info) # AIC demo pose_model = init_pose_model( @@ -32,16 +39,18 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/aic/054d9ce9201beffc76e5ff2169d2af2f027002ca.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='TopDownAicDataset') + dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='TopDownAicDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # OneHand10K demo # build the pose model from a config file and a checkpoint file @@ -51,16 +60,18 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/onehand10k/9.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='OneHand10KDataset') + dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='OneHand10KDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # InterHand2DDataset demo # build the pose model from a config file and a checkpoint file @@ -70,16 +81,18 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/interhand2.6m/image2017.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='InterHand2DDataset') + dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='InterHand2DDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # Face300WDataset demo # build the pose model from a config file and a checkpoint file @@ -89,16 +102,18 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/300w/indoor_020.png' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='Face300WDataset') + dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='Face300WDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # FaceAFLWDataset demo # build the pose model from a config file and a checkpoint file @@ -108,16 +123,18 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/aflw/image04476.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='FaceAFLWDataset') + dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='FaceAFLWDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # FaceCOFWDataset demo # build the pose model from a config file and a checkpoint file @@ -127,24 +144,18 @@ def test_top_down_demo(): None, device='cpu') image_name = 'tests/data/cofw/001766.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='FaceCOFWDataset') + dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='FaceCOFWDataset') - - with pytest.raises(NotImplementedError): - pose_results, _ = inference_top_down_pose_model( - pose_model, - image_name, - person_result, - format='xywh', - dataset='test') + pose_model, image_name, pose_results, dataset_info=dataset_info) def test_bottom_up_demo(): @@ -157,12 +168,15 @@ def test_bottom_up_demo(): device='cpu') image_name = 'tests/data/coco/000000000785.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test'].get( + 'dataset_info', None)) - pose_results, _ = inference_bottom_up_pose_model(pose_model, image_name) + pose_results, _ = inference_bottom_up_pose_model( + pose_model, image_name, dataset_info=dataset_info) # show the results vis_pose_result( - pose_model, image_name, pose_results, dataset='BottomUpCocoDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) def test_process_mmdet_results(): diff --git a/tests/test_apis/test_inference_3d.py b/tests/test_apis/test_inference_3d.py index 02928f91c9..1265b2a840 100644 --- a/tests/test_apis/test_inference_3d.py +++ b/tests/test_apis/test_inference_3d.py @@ -12,7 +12,7 @@ inference_mesh_model, inference_pose_lifter_model, init_pose_model, vis_3d_mesh_result, vis_3d_pose_result) -from mmpose.models import build_posenet +from mmpose.datasets.dataset_info import DatasetInfo def test_pose_lifter_demo(): @@ -32,16 +32,22 @@ def test_pose_lifter_demo(): pose_results_2d = [[pose_det_result]] - dataset = pose_model.cfg.data['test']['type'] + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) pose_results_2d = extract_pose_sequence( pose_results_2d, frame_idx=0, causal=False, seq_len=1, step=1) _ = inference_pose_lifter_model( - pose_model, pose_results_2d, dataset, with_track_id=False) + pose_model, + pose_results_2d, + dataset_info=dataset_info, + with_track_id=False) pose_lift_results = inference_pose_lifter_model( - pose_model, pose_results_2d, dataset, with_track_id=True) + pose_model, + pose_results_2d, + dataset_info=dataset_info, + with_track_id=True) for res in pose_lift_results: res['title'] = 'title' @@ -49,20 +55,19 @@ def test_pose_lifter_demo(): pose_model, pose_lift_results, img=pose_results_2d[0][0]['image_name'], - dataset=dataset) + dataset_info=dataset_info) # test special cases # Empty 2D results _ = inference_pose_lifter_model( - pose_model, [[]], dataset, with_track_id=False) + pose_model, [[]], dataset_info=dataset_info, with_track_id=False) if torch.cuda.is_available(): _ = inference_pose_lifter_model( - pose_model.cuda(), pose_results_2d, dataset, with_track_id=False) - - with pytest.raises(NotImplementedError): - _ = inference_pose_lifter_model( - pose_model, pose_results_2d, dataset='test') + pose_model.cuda(), + pose_results_2d, + dataset_info=dataset_info, + with_track_id=False) # test videopose3d pose_model = init_pose_model( @@ -93,7 +98,7 @@ def test_pose_lifter_demo(): pose_results_2d = [[pose_det_result_0], [pose_det_result_1], [pose_det_result_2]] - dataset = pose_model.cfg.data['test']['type'] + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) seq_len = pose_model.cfg.test_data_cfg.seq_len pose_results_2d_seq = extract_pose_sequence( @@ -102,7 +107,7 @@ def test_pose_lifter_demo(): pose_lift_results = inference_pose_lifter_model( pose_model, pose_results_2d_seq, - dataset, + dataset_info=dataset_info, with_track_id=True, image_size=[1000, 1000], norm_pose_2d=True) @@ -113,7 +118,8 @@ def test_pose_lifter_demo(): pose_model, pose_lift_results, img=pose_results_2d[0][0]['image_name'], - dataset=dataset) + dataset_info=dataset_info, + ) def test_interhand3d_demo(): @@ -133,6 +139,7 @@ def test_interhand3d_demo(): } det_results = [det_result] dataset = pose_model.cfg.data['test']['type'] + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) pose_results = inference_interhand_3d_model( pose_model, image_name, det_results, dataset=dataset) @@ -144,7 +151,7 @@ def test_interhand3d_demo(): pose_model, result=pose_results, img=det_results[0]['image_name'], - dataset=dataset, + dataset_info=dataset_info, ) # test special cases @@ -163,7 +170,6 @@ def test_interhand3d_demo(): def test_body_mesh_demo(): # H36M demo - device = 'cpu' config = 'configs/body/3d_mesh_sview_rgb_img/hmr' \ '/mixed/res50_mixed_224x224.py' config = mmcv.Config.fromfile(config) @@ -177,12 +183,9 @@ def test_body_mesh_demo(): tmpdir, 'test_joint_regressor.npy') # generate weight file for SMPL model. generate_smpl_weight_file(tmpdir) - pose_model = build_posenet(config.model) + pose_model = init_pose_model(config, device='cpu') assert pose_model is not None, 'Fail to build pose model' - pose_model.cfg = config - pose_model.to(device) - pose_model.eval() image_name = 'tests/data/h36m/S1_Directions_1.54138969_000001.jpg' det_result = { diff --git a/tests/test_apis/test_inference_tracking.py b/tests/test_apis/test_inference_tracking.py index 080f2bdf6e..1ef62b771a 100644 --- a/tests/test_apis/test_inference_tracking.py +++ b/tests/test_apis/test_inference_tracking.py @@ -1,9 +1,8 @@ # Copyright (c) OpenMMLab. All rights reserved. -import pytest - from mmpose.apis import (get_track_id, inference_bottom_up_pose_model, inference_top_down_pose_model, init_pose_model, vis_pose_tracking_result) +from mmpose.datasets.dataset_info import DatasetInfo def test_top_down_pose_tracking_demo(): @@ -15,15 +14,20 @@ def test_top_down_pose_tracking_demo(): None, device='cpu') image_name = 'tests/data/coco/000000000785.jpg' - + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) person_result = [{'bbox': [50, 50, 50, 100]}] # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( - pose_model, image_name, person_result, format='xywh') + pose_model, + image_name, + person_result, + format='xywh', + dataset_info=dataset_info) pose_results, next_id = get_track_id(pose_results, [], next_id=0) # show the results - vis_pose_tracking_result(pose_model, image_name, pose_results) + vis_pose_tracking_result( + pose_model, image_name, pose_results, dataset_info=dataset_info) pose_results_last = pose_results # AIC demo @@ -33,13 +37,14 @@ def test_top_down_pose_tracking_demo(): None, device='cpu') image_name = 'tests/data/aic/054d9ce9201beffc76e5ff2169d2af2f027002ca.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, image_name, person_result, format='xywh', - dataset='TopDownAicDataset') + dataset_info=dataset_info) pose_results, next_id = get_track_id(pose_results, pose_results_last, next_id) for pose_result in pose_results: @@ -49,7 +54,7 @@ def test_top_down_pose_tracking_demo(): # show the results vis_pose_tracking_result( - pose_model, image_name, pose_results, dataset='TopDownAicDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # OneHand10K demo # build the pose model from a config file and a checkpoint file @@ -59,6 +64,7 @@ def test_top_down_pose_tracking_demo(): None, device='cpu') image_name = 'tests/data/onehand10k/9.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, @@ -66,12 +72,12 @@ def test_top_down_pose_tracking_demo(): 'bbox': [10, 10, 30, 30] }], format='xywh', - dataset='OneHand10KDataset') + dataset_info=dataset_info) pose_results, next_id = get_track_id(pose_results, pose_results_last, next_id) # show the results vis_pose_tracking_result( - pose_model, image_name, pose_results, dataset='OneHand10KDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) # InterHand2D demo pose_model = init_pose_model( @@ -80,6 +86,7 @@ def test_top_down_pose_tracking_demo(): None, device='cpu') image_name = 'tests/data/interhand2.6m/image2017.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, @@ -87,11 +94,11 @@ def test_top_down_pose_tracking_demo(): 'bbox': [50, 50, 0, 0] }], format='xywh', - dataset='InterHand2DDataset') + dataset_info=dataset_info) pose_results, next_id = get_track_id(pose_results, [], next_id=0) # show the results vis_pose_tracking_result( - pose_model, image_name, pose_results, dataset='InterHand2DDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) pose_results_last = pose_results # MPII demo @@ -101,6 +108,7 @@ def test_top_down_pose_tracking_demo(): None, device='cpu') image_name = 'tests/data/mpii/004645041.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) # test a single image, with a list of bboxes. pose_results, _ = inference_top_down_pose_model( pose_model, @@ -108,16 +116,12 @@ def test_top_down_pose_tracking_demo(): 'bbox': [50, 50, 0, 0] }], format='xywh', - dataset='TopDownMpiiDataset') + dataset_info=dataset_info) pose_results, next_id = get_track_id(pose_results, pose_results_last, next_id) # show the results vis_pose_tracking_result( - pose_model, image_name, pose_results, dataset='TopDownMpiiDataset') - - with pytest.raises(NotImplementedError): - vis_pose_tracking_result( - pose_model, image_name, pose_results, dataset='test') + pose_model, image_name, pose_results, dataset_info=dataset_info) def test_bottom_up_pose_tracking_demo(): @@ -130,14 +134,16 @@ def test_bottom_up_pose_tracking_demo(): device='cpu') image_name = 'tests/data/coco/000000000785.jpg' + dataset_info = DatasetInfo(pose_model.cfg.data['test']['dataset_info']) - pose_results, _ = inference_bottom_up_pose_model(pose_model, image_name) + pose_results, _ = inference_bottom_up_pose_model( + pose_model, image_name, dataset_info=dataset_info) pose_results, next_id = get_track_id(pose_results, [], next_id=0) # show the results vis_pose_tracking_result( - pose_model, image_name, pose_results, dataset='BottomUpCocoDataset') + pose_model, image_name, pose_results, dataset_info=dataset_info) pose_results_last = pose_results diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset_compatibility.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset_compatibility.py new file mode 100644 index 0000000000..c4479f0219 --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_animal_dataset_compatibility.py @@ -0,0 +1,415 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import copy +import tempfile + +import pytest +from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output + +from mmpose.datasets import DATASETS + + +def test_animal_horse10_dataset_compatibility(): + dataset = 'AnimalHorse10Dataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=22, + dataset_joints=22, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 21 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 21 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/horse10/test_horse10.json', + img_prefix='tests/data/horse10/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/horse10/test_horse10.json', + img_prefix='tests/data/horse10/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 3 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + assert_almost_equal(infos['PCK'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_animal_fly_dataset_compatibility(): + dataset = 'AnimalFlyDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=32, + dataset_joints=32, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 + ]) + + data_cfg = dict( + image_size=[192, 192], + heatmap_size=[48, 48], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/fly/test_fly.json', + img_prefix='tests/data/fly/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/fly/test_fly.json', + img_prefix='tests/data/fly/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + assert_almost_equal(infos['PCK'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_animal_locust_dataset_compatibility(): + dataset = 'AnimalLocustDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=35, + dataset_joints=35, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34 + ]) + + data_cfg = dict( + image_size=[160, 160], + heatmap_size=[40, 40], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/locust/test_locust.json', + img_prefix='tests/data/locust/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/locust/test_locust.json', + img_prefix='tests/data/locust/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + assert_almost_equal(infos['PCK'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_animal_zebra_dataset_compatibility(): + dataset = 'AnimalZebraDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=9, + dataset_joints=9, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8]) + + data_cfg = dict( + image_size=[160, 160], + heatmap_size=[40, 40], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/zebra/test_zebra.json', + img_prefix='tests/data/zebra/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/zebra/test_zebra.json', + img_prefix='tests/data/zebra/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + assert_almost_equal(infos['PCK'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_animal_ATRW_dataset_compatibility(): + dataset = 'AnimalATRWDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=15, + dataset_joints=15, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='', + ) + + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/atrw/test_atrw.json', + img_prefix='tests/data/atrw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/atrw/test_atrw.json', + img_prefix='tests/data/atrw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + + +def test_animal_Macaque_dataset_compatibility(): + dataset = 'AnimalMacaqueDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=17, + dataset_joints=17, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 + ]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='', + ) + + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/macaque/test_macaque.json', + img_prefix='tests/data/macaque/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/macaque/test_macaque.json', + img_prefix='tests/data/macaque/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + + +def test_animalpose_dataset_compatibility(): + dataset = 'AnimalPoseDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=20, + dataset_joints=20, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='', + ) + + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/animalpose/test_animalpose.json', + img_prefix='tests/data/animalpose/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/animalpose/test_animalpose.json', + img_prefix='tests/data/animalpose/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset_compatibility.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset_compatibility.py new file mode 100644 index 0000000000..a7e4b71067 --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_body3d_dataset_compatibility.py @@ -0,0 +1,266 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import tempfile + +import numpy as np +import pytest + +from mmpose.datasets import DATASETS +from mmpose.datasets.builder import build_dataset + + +def test_body3d_h36m_dataset_compatibility(): + # Test Human3.6M dataset + dataset = 'Body3DH36MDataset' + dataset_class = DATASETS.get(dataset) + + # test single-frame input + data_cfg = dict( + num_joints=17, + seq_len=1, + seq_frame_interval=1, + joint_2d_src='pipeline', + joint_2d_det_file=None, + causal=False, + need_camera_param=True, + camera_param_file='tests/data/h36m/cameras.pkl') + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/h36m/test_h36m_body3d.npz', + img_prefix='tests/data/h36m', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/h36m/test_h36m_body3d.npz', + img_prefix='tests/data/h36m', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + _ = custom_dataset[0] + + with tempfile.TemporaryDirectory() as tmpdir: + outputs = [] + for result in custom_dataset: + outputs.append({ + 'preds': result['target'][None, ...], + 'target_image_paths': [result['target_image_path']], + }) + + metrics = ['mpjpe', 'p-mpjpe', 'n-mpjpe'] + infos = custom_dataset.evaluate(outputs, tmpdir, metrics) + + np.testing.assert_almost_equal(infos['MPJPE'], 0.0) + np.testing.assert_almost_equal(infos['P-MPJPE'], 0.0) + np.testing.assert_almost_equal(infos['N-MPJPE'], 0.0) + + # test multi-frame input with joint_2d_src = 'detection' + data_cfg = dict( + num_joints=17, + seq_len=27, + seq_frame_interval=1, + causal=True, + temporal_padding=True, + joint_2d_src='detection', + joint_2d_det_file='tests/data/h36m/test_h36m_2d_detection.npy', + need_camera_param=True, + camera_param_file='tests/data/h36m/cameras.pkl') + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/h36m/test_h36m_body3d.npz', + img_prefix='tests/data/h36m', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/h36m/test_h36m_body3d.npz', + img_prefix='tests/data/h36m', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + _ = custom_dataset[0] + + with tempfile.TemporaryDirectory() as tmpdir: + outputs = [] + for result in custom_dataset: + outputs.append({ + 'preds': result['target'][None, ...], + 'target_image_paths': [result['target_image_path']], + }) + + metrics = ['mpjpe', 'p-mpjpe', 'n-mpjpe'] + infos = custom_dataset.evaluate(outputs, tmpdir, metrics) + + np.testing.assert_almost_equal(infos['MPJPE'], 0.0) + np.testing.assert_almost_equal(infos['P-MPJPE'], 0.0) + np.testing.assert_almost_equal(infos['N-MPJPE'], 0.0) + + +def test_body3d_semi_supervision_dataset_compatibility(): + # Test Body3d Semi-supervision Dataset + + # load labeled dataset + labeled_data_cfg = dict( + num_joints=17, + seq_len=27, + seq_frame_interval=1, + causall=False, + temporal_padding=True, + joint_2d_src='gt', + subset=1, + subjects=['S1'], + need_camera_param=True, + camera_param_file='tests/data/h36m/cameras.pkl') + labeled_dataset = dict( + type='Body3DH36MDataset', + ann_file='tests/data/h36m/test_h36m_body3d.npz', + img_prefix='tests/data/h36m', + data_cfg=labeled_data_cfg, + pipeline=[]) + + # load unlabled data + unlabeled_data_cfg = dict( + num_joints=17, + seq_len=27, + seq_frame_interval=1, + causal=False, + temporal_padding=True, + joint_2d_src='gt', + subjects=['S5', 'S7', 'S8'], + need_camera_param=True, + camera_param_file='tests/data/h36m/cameras.pkl', + need_2d_label=True) + unlabeled_dataset = dict( + type='Body3DH36MDataset', + ann_file='tests/data/h36m/test_h36m_body3d.npz', + img_prefix='tests/data/h36m', + data_cfg=unlabeled_data_cfg, + pipeline=[ + dict( + type='Collect', + keys=[('input_2d', 'unlabeled_input')], + meta_name='metas', + meta_keys=[]) + ]) + + # combine labeled and unlabeled dataset to form a new dataset + dataset = 'Body3DSemiSupervisionDataset' + dataset_class = DATASETS.get(dataset) + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class(labeled_dataset, unlabeled_dataset) + item = custom_dataset[0] + assert 'unlabeled_input' in item.keys() + + unlabeled_dataset = build_dataset(unlabeled_dataset) + assert len(unlabeled_dataset) == len(custom_dataset) + + +def test_body3d_mpi_inf_3dhp_dataset_compatibility(): + # Test MPI-INF-3DHP dataset + dataset = 'Body3DMpiInf3dhpDataset' + dataset_class = DATASETS.get(dataset) + + # Test single-frame input on trainset + single_frame_train_data_cfg = dict( + num_joints=17, + seq_len=1, + seq_frame_interval=1, + joint_2d_src='pipeline', + joint_2d_det_file=None, + causal=False, + need_camera_param=True, + camera_param_file='tests/data/mpi_inf_3dhp/cameras_train.pkl') + + # Test single-frame input on testset + single_frame_test_data_cfg = dict( + num_joints=17, + seq_len=1, + seq_frame_interval=1, + joint_2d_src='gt', + joint_2d_det_file=None, + causal=False, + need_camera_param=True, + camera_param_file='tests/data/mpi_inf_3dhp/cameras_test.pkl') + + # Test multi-frame input on trainset + multi_frame_train_data_cfg = dict( + num_joints=17, + seq_len=27, + seq_frame_interval=1, + joint_2d_src='gt', + joint_2d_det_file=None, + causal=True, + temporal_padding=True, + need_camera_param=True, + camera_param_file='tests/data/mpi_inf_3dhp/cameras_train.pkl') + + # Test multi-frame input on testset + multi_frame_test_data_cfg = dict( + num_joints=17, + seq_len=27, + seq_frame_interval=1, + joint_2d_src='pipeline', + joint_2d_det_file=None, + causal=False, + temporal_padding=True, + need_camera_param=True, + camera_param_file='tests/data/mpi_inf_3dhp/cameras_test.pkl') + + ann_files = [ + 'tests/data/mpi_inf_3dhp/test_3dhp_train.npz', + 'tests/data/mpi_inf_3dhp/test_3dhp_test.npz' + ] * 2 + data_cfgs = [ + single_frame_train_data_cfg, single_frame_test_data_cfg, + multi_frame_train_data_cfg, multi_frame_test_data_cfg + ] + + for ann_file, data_cfg in zip(ann_files, data_cfgs): + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file=ann_file, + img_prefix='tests/data/mpi_inf_3dhp', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file=ann_file, + img_prefix='tests/data/mpi_inf_3dhp', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + _ = custom_dataset[0] + + with tempfile.TemporaryDirectory() as tmpdir: + outputs = [] + for result in custom_dataset: + outputs.append({ + 'preds': + result['target'][None, ...], + 'target_image_paths': [result['target_image_path']], + }) + + metrics = [ + 'mpjpe', 'p-mpjpe', '3dpck', 'p-3dpck', '3dauc', 'p-3dauc' + ] + infos = custom_dataset.evaluate(outputs, tmpdir, metrics) + + np.testing.assert_almost_equal(infos['MPJPE'], 0.0) + np.testing.assert_almost_equal(infos['P-MPJPE'], 0.0) + np.testing.assert_almost_equal(infos['3DPCK'], 100.) + np.testing.assert_almost_equal(infos['P-3DPCK'], 100.) + np.testing.assert_almost_equal(infos['3DAUC'], 30 / 31 * 100) + np.testing.assert_almost_equal(infos['P-3DAUC'], 30 / 31 * 100) diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset_compatibility.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset_compatibility.py new file mode 100644 index 0000000000..366fcfe82a --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_bottom_up_dataset_compatibility.py @@ -0,0 +1,325 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import tempfile + +import numpy as np +import pytest +from numpy.testing import assert_almost_equal + +from mmpose.datasets import DATASETS + + +def convert_coco_to_output(coco, is_wholebody=False): + outputs = [] + for img_id in coco.getImgIds(): + preds = [] + scores = [] + image = coco.imgs[img_id] + ann_ids = coco.getAnnIds(img_id) + for ann_id in ann_ids: + obj = coco.anns[ann_id] + if is_wholebody: + keypoints = np.array(obj['keypoints'] + obj['foot_kpts'] + + obj['face_kpts'] + obj['lefthand_kpts'] + + obj['righthand_kpts']).reshape(-1, 3) + else: + keypoints = np.array(obj['keypoints']).reshape((-1, 3)) + K = keypoints.shape[0] + if sum(keypoints[:, 2]) == 0: + continue + preds.append( + np.concatenate((keypoints[:, :2], np.ones( + [K, 1]), np.ones([K, 1]) * ann_id), + axis=1)) + scores.append(1) + image_paths = [] + image_paths.append(image['file_name']) + + output = {} + output['preds'] = np.stack(preds) + output['scores'] = scores + output['image_paths'] = image_paths + output['output_heatmap'] = None + + outputs.append(output) + + return outputs + + +def test_bottom_up_COCO_dataset_compatibility(): + dataset = 'BottomUpCocoDataset' + # test COCO datasets + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + dataset_joints=17, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 + ]) + + data_cfg = dict( + image_size=512, + base_size=256, + base_sigma=2, + heatmap_size=[128, 256], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + num_scales=2, + scale_aware_sigma=False, + use_nms=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/coco/test_coco.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/coco/test_coco.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.num_images == 4 + _ = custom_dataset[0] + assert custom_dataset.dataset_name == 'coco' + + outputs = convert_coco_to_output(custom_dataset.coco) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_bottom_up_CrowdPose_dataset_compatibility(): + dataset = 'BottomUpCrowdPoseDataset' + # test CrowdPose datasets + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=14, + dataset_joints=14, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) + + data_cfg = dict( + image_size=512, + base_size=256, + base_sigma=2, + heatmap_size=[128, 256], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + num_scales=2, + scale_aware_sigma=False) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/crowdpose/test_crowdpose.json', + img_prefix='tests/data/crowdpose/', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/crowdpose/test_crowdpose.json', + img_prefix='tests/data/crowdpose/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + image_id = 103319 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 2 + _ = custom_dataset[0] + assert custom_dataset.dataset_name == 'crowdpose' + + outputs = convert_coco_to_output(custom_dataset.coco) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_bottom_up_MHP_dataset_compatibility(): + dataset = 'BottomUpMhpDataset' + # test MHP datasets + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + dataset_joints=16, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 + ]) + + data_cfg = dict( + image_size=512, + base_size=256, + base_sigma=2, + heatmap_size=[128], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + num_scales=1, + scale_aware_sigma=False, + ) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/mhp/test_mhp.json', + img_prefix='tests/data/mhp/', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/mhp/test_mhp.json', + img_prefix='tests/data/mhp/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + image_id = 2889 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 2 + _ = custom_dataset[0] + assert custom_dataset.dataset_name == 'mhp' + + outputs = convert_coco_to_output(custom_dataset.coco) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_bottom_up_AIC_dataset_compatibility(): + dataset = 'BottomUpAicDataset' + # test MHP datasets + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=14, + dataset_joints=14, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) + + data_cfg = dict( + image_size=512, + base_size=256, + base_sigma=2, + heatmap_size=[128], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + num_scales=1, + scale_aware_sigma=False, + ) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/aic/test_aic.json', + img_prefix='tests/data/aic/', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/aic/test_aic.json', + img_prefix='tests/data/aic/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + image_id = 1 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 3 + _ = custom_dataset[0] + + outputs = convert_coco_to_output(custom_dataset.coco) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_bottom_up_COCO_wholebody_dataset_compatibility(): + dataset = 'BottomUpCocoWholeBodyDataset' + # test COCO-wholebody datasets + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=133, + dataset_joints=133, + dataset_channel=[ + list(range(133)), + ], + inference_channel=list(range(133))) + + data_cfg = dict( + image_size=512, + base_size=256, + base_sigma=2, + heatmap_size=[128, 256], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + num_scales=2, + scale_aware_sigma=False, + ) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/coco/test_coco_wholebody.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/coco/test_coco_wholebody.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'coco_wholebody' + + image_id = 785 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 4 + _ = custom_dataset[0] + + outputs = convert_coco_to_output(custom_dataset.coco, is_wholebody=True) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_deprecated_dataset_base.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_deprecated_dataset_base.py new file mode 100644 index 0000000000..c5aad98b15 --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_deprecated_dataset_base.py @@ -0,0 +1,28 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import pytest + +from mmpose.datasets.datasets.animal.animal_base_dataset import \ + AnimalBaseDataset +from mmpose.datasets.datasets.body3d.body3d_base_dataset import \ + Body3DBaseDataset +from mmpose.datasets.datasets.bottom_up.bottom_up_base_dataset import \ + BottomUpBaseDataset +from mmpose.datasets.datasets.face.face_base_dataset import FaceBaseDataset +from mmpose.datasets.datasets.fashion.fashion_base_dataset import \ + FashionBaseDataset +from mmpose.datasets.datasets.hand.hand_base_dataset import HandBaseDataset +from mmpose.datasets.datasets.top_down.topdown_base_dataset import \ + TopDownBaseDataset + + +@pytest.mark.parametrize('BaseDataset', + (AnimalBaseDataset, BottomUpBaseDataset, + FaceBaseDataset, FashionBaseDataset, HandBaseDataset, + TopDownBaseDataset, Body3DBaseDataset)) +def test_dataset_base_class(BaseDataset): + with pytest.raises(ImportError): + + class Dataset(BaseDataset): + pass + + _ = Dataset() diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset_compatibility.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset_compatibility.py new file mode 100644 index 0000000000..7fd6a6452f --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_face_dataset_compatibility.py @@ -0,0 +1,170 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import copy +import tempfile +from unittest.mock import MagicMock + +import pytest +from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output + +from mmpose.datasets import DATASETS + + +def test_face_300W_dataset_compatibility(): + dataset = 'Face300WDataset' + # test Face 300W datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=68, + dataset_joints=68, + dataset_channel=[ + list(range(68)), + ], + inference_channel=list(range(68))) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/300w/test_300w.json', + img_prefix='tests/data/300w/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/300w/test_300w.json', + img_prefix='tests/data/300w/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['NME']) + assert_almost_equal(infos['NME'], 0.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_face_AFLW_dataset_compatibility(): + dataset = 'FaceAFLWDataset' + # test Face AFLW datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=19, + dataset_joints=19, + dataset_channel=[ + list(range(19)), + ], + inference_channel=list(range(19))) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/aflw/test_aflw.json', + img_prefix='tests/data/aflw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/aflw/test_aflw.json', + img_prefix='tests/data/aflw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['NME']) + assert_almost_equal(infos['NME'], 0.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_face_WFLW_dataset_compatibility(): + dataset = 'FaceWFLWDataset' + # test Face WFLW datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=98, + dataset_joints=98, + dataset_channel=[ + list(range(98)), + ], + inference_channel=list(range(98))) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/wflw/test_wflw.json', + img_prefix='tests/data/wflw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/wflw/test_wflw.json', + img_prefix='tests/data/wflw/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['NME']) + assert_almost_equal(infos['NME'], 0.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset_compatibility.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset_compatibility.py new file mode 100644 index 0000000000..ee8cc0782c --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_fashion_dataset_compatibility.py @@ -0,0 +1,69 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import tempfile +from unittest.mock import MagicMock + +import pytest +from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output + +from mmpose.datasets import DATASETS + + +def test_deepfashion_dataset_compatibility(): + dataset = 'DeepFashionDataset' + # test JHMDB datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=8, + dataset_joints=8, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + image_thr=0.0, + bbox_file='') + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/fld/test_fld.json', + img_prefix='tests/data/fld/', + subset='full', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'deepfashion_full' + + image_id = 128 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK', 'EPE', 'AUC']) + assert_almost_equal(infos['PCK'], 1.0) + assert_almost_equal(infos['AUC'], 0.95) + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset_compatibility.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset_compatibility.py new file mode 100644 index 0000000000..daecb3f7c0 --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_hand_dataset_compatibility.py @@ -0,0 +1,388 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import copy +import tempfile + +import pytest +from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output + +from mmpose.datasets import DATASETS + + +def test_top_down_OneHand10K_dataset_compatibility(): + dataset = 'OneHand10KDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=21, + dataset_joints=21, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/onehand10k/test_onehand10k.json', + img_prefix='tests/data/onehand10k/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/onehand10k/test_onehand10k.json', + img_prefix='tests/data/onehand10k/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 4 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK', 'EPE', 'AUC']) + assert_almost_equal(infos['PCK'], 1.0) + assert_almost_equal(infos['AUC'], 0.95) + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_top_down_FreiHand_dataset_compatibility(): + dataset = 'FreiHandDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=21, + dataset_joints=21, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20 + ]) + + data_cfg = dict( + image_size=[224, 224], + heatmap_size=[56, 56], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/freihand/test_freihand.json', + img_prefix='tests/data/freihand/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/freihand/test_freihand.json', + img_prefix='tests/data/freihand/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 8 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK', 'EPE', 'AUC']) + assert_almost_equal(infos['PCK'], 1.0) + assert_almost_equal(infos['AUC'], 0.95) + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_top_down_RHD_dataset_compatibility(): + dataset = 'Rhd2DDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=21, + dataset_joints=21, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/rhd/test_rhd.json', + img_prefix='tests/data/rhd/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/rhd/test_rhd.json', + img_prefix='tests/data/rhd/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 3 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK', 'EPE', 'AUC']) + assert_almost_equal(infos['PCK'], 1.0) + assert_almost_equal(infos['AUC'], 0.95) + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_top_down_Panoptic_dataset_compatibility(): + dataset = 'PanopticDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=21, + dataset_joints=21, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/panoptic/test_panoptic.json', + img_prefix='tests/data/panoptic/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/panoptic/test_panoptic.json', + img_prefix='tests/data/panoptic/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 4 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, + ['PCKh', 'EPE', 'AUC']) + assert_almost_equal(infos['PCKh'], 1.0) + assert_almost_equal(infos['AUC'], 0.95) + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_top_down_InterHand2D_dataset_compatibility(): + dataset = 'InterHand2DDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=21, + dataset_joints=21, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/interhand2.6m/test_interhand2.6m_data.json', + camera_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_camera.json', + joint_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_joint_3d.json', + img_prefix='tests/data/interhand2.6m/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/interhand2.6m/test_interhand2.6m_data.json', + camera_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_camera.json', + joint_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_joint_3d.json', + img_prefix='tests/data/interhand2.6m/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 4 + assert len(custom_dataset.db) == 6 + + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK', 'EPE', 'AUC']) + print(infos, flush=True) + assert_almost_equal(infos['PCK'], 1.0) + assert_almost_equal(infos['AUC'], 0.95) + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_top_down_InterHand3D_dataset_compatibility(): + dataset = 'InterHand3DDataset' + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=42, + dataset_joints=42, + dataset_channel=[ + [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, + 34, 35, 36, 37, 38, 39, 40, 41 + ], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, 37, 38, 39, 40, 41 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64, 64], + heatmap3d_depth_bound=400.0, + heatmap_size_root=64, + root_depth_bound=400.0, + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/interhand2.6m/test_interhand2.6m_data.json', + camera_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_camera.json', + joint_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_joint_3d.json', + img_prefix='tests/data/interhand2.6m/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/interhand2.6m/test_interhand2.6m_data.json', + camera_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_camera.json', + joint_file='tests/data/interhand2.6m/' + 'test_interhand2.6m_joint_3d.json', + img_prefix='tests/data/interhand2.6m/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 4 + assert len(custom_dataset.db) == 4 + + _ = custom_dataset[0] + + outputs = convert_db_to_output( + custom_dataset.db, keys=['rel_root_depth', 'hand_type'], is_3d=True) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, + ['MRRPE', 'MPJPE', 'Handedness_acc']) + assert_almost_equal(infos['MRRPE'], 0.0, decimal=5) + assert_almost_equal(infos['MPJPE_all'], 0.0, decimal=5) + assert_almost_equal(infos['MPJPE_single'], 0.0, decimal=5) + assert_almost_equal(infos['MPJPE_interacting'], 0.0, decimal=5) + assert_almost_equal(infos['Handedness_acc'], 1.0) + + with pytest.raises(KeyError): + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference_compatibility.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference_compatibility.py new file mode 100644 index 0000000000..b08f114b6d --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_inference_compatibility.py @@ -0,0 +1,140 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import numpy as np +import pytest + +from mmpose.apis import (extract_pose_sequence, get_track_id, + inference_bottom_up_pose_model, + inference_pose_lifter_model, + inference_top_down_pose_model, init_pose_model, + vis_3d_pose_result, vis_pose_result, + vis_pose_tracking_result) + + +def test_inference_without_dataset_info(): + # Top down + pose_model = init_pose_model( + 'configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/' + 'coco/res50_coco_256x192.py', + None, + device='cpu') + image_name = 'tests/data/coco/000000000785.jpg' + + person_result = [] + person_result.append({'bbox': [50, 50, 50, 100]}) + + with pytest.warns(DeprecationWarning): + pose_results, _ = inference_top_down_pose_model( + pose_model, image_name, person_result, format='xywh') + + with pytest.warns(DeprecationWarning): + vis_pose_result(pose_model, image_name, pose_results) + + with pytest.raises(NotImplementedError): + with pytest.warns(DeprecationWarning): + pose_results, _ = inference_top_down_pose_model( + pose_model, + image_name, + person_result, + format='xywh', + dataset='test') + + # Bottom up + pose_model = init_pose_model( + 'configs/body/2d_kpt_sview_rgb_img/associative_embedding/' + 'coco/res50_coco_512x512.py', + None, + device='cpu') + + image_name = 'tests/data/coco/000000000785.jpg' + with pytest.warns(DeprecationWarning): + pose_results, _ = inference_bottom_up_pose_model( + pose_model, image_name) + with pytest.warns(DeprecationWarning): + vis_pose_result(pose_model, image_name, pose_results) + + # Top down tracking + pose_model = init_pose_model( + 'configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/' + 'coco/res50_coco_256x192.py', + None, + device='cpu') + image_name = 'tests/data/coco/000000000785.jpg' + person_result = [{'bbox': [50, 50, 50, 100]}] + + with pytest.warns(DeprecationWarning): + pose_results, _ = inference_top_down_pose_model( + pose_model, image_name, person_result, format='xywh') + + pose_results, _ = get_track_id(pose_results, [], next_id=0) + + with pytest.warns(DeprecationWarning): + vis_pose_tracking_result(pose_model, image_name, pose_results) + + with pytest.raises(NotImplementedError): + with pytest.warns(DeprecationWarning): + vis_pose_tracking_result( + pose_model, image_name, pose_results, dataset='test') + + # Bottom up tracking + pose_model = init_pose_model( + 'configs/body/2d_kpt_sview_rgb_img/associative_embedding/' + 'coco/res50_coco_512x512.py', + None, + device='cpu') + + image_name = 'tests/data/coco/000000000785.jpg' + with pytest.warns(DeprecationWarning): + pose_results, _ = inference_bottom_up_pose_model( + pose_model, image_name) + + pose_results, next_id = get_track_id(pose_results, [], next_id=0) + + with pytest.warns(DeprecationWarning): + vis_pose_tracking_result( + pose_model, + image_name, + pose_results, + dataset='BottomUpCocoDataset') + + # Pose lifting + pose_model = init_pose_model( + 'configs/body/3d_kpt_sview_rgb_img/pose_lift/' + 'h36m/simplebaseline3d_h36m.py', + None, + device='cpu') + + pose_det_result = { + 'keypoints': np.zeros((17, 3)), + 'bbox': [50, 50, 50, 50], + 'track_id': 0, + 'image_name': 'tests/data/h36m/S1_Directions_1.54138969_000001.jpg', + } + + pose_results_2d = [[pose_det_result]] + + dataset = pose_model.cfg.data['test']['type'] + + pose_results_2d = extract_pose_sequence( + pose_results_2d, frame_idx=0, causal=False, seq_len=1, step=1) + + with pytest.warns(DeprecationWarning): + _ = inference_pose_lifter_model( + pose_model, pose_results_2d, dataset, with_track_id=False) + + with pytest.warns(DeprecationWarning): + pose_lift_results = inference_pose_lifter_model( + pose_model, pose_results_2d, dataset, with_track_id=True) + + for res in pose_lift_results: + res['title'] = 'title' + with pytest.warns(DeprecationWarning): + vis_3d_pose_result( + pose_model, + pose_lift_results, + img=pose_results_2d[0][0]['image_name'], + dataset=dataset) + + with pytest.raises(NotImplementedError): + with pytest.warns(DeprecationWarning): + _ = inference_pose_lifter_model( + pose_model, pose_results_2d, dataset='test') diff --git a/tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset_compatibility.py b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset_compatibility.py new file mode 100644 index 0000000000..76972f97f4 --- /dev/null +++ b/tests/test_backward_compatibility/test_dataset_info_compatibility/test_top_down_dataset_compatibility.py @@ -0,0 +1,745 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import copy +import tempfile +from unittest.mock import MagicMock + +import pytest +from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output + +from mmpose.datasets import DATASETS + + +def test_top_down_COCO_dataset_compatibility(): + dataset = 'TopDownCocoDataset' + # test COCO datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=17, + dataset_joints=17, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 + ]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='tests/data/coco/test_coco_det_AP_H_56.json', + ) + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/coco/test_coco.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/coco/test_coco.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/coco/test_coco.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'coco' + + image_id = 785 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 4 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_top_down_MHP_dataset_compatibility(): + dataset = 'TopDownMhpDataset' + # test MHP datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=16, + dataset_joints=16, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 + ]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + bbox_thr=1.0, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='', + ) + + # Test det bbox + with pytest.raises(AssertionError): + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/mhp/test_mhp.json', + img_prefix='tests/data/mhp/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/mhp/test_mhp.json', + img_prefix='tests/data/mhp/', + data_cfg=data_cfg, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/mhp/test_mhp.json', + img_prefix='tests/data/mhp/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'mhp' + + image_id = 2889 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_top_down_PoseTrack18_dataset_compatibility(): + dataset = 'TopDownPoseTrack18Dataset' + # test PoseTrack datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=17, + dataset_joints=17, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 + ]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='tests/data/posetrack18/' + 'test_posetrack18_human_detections.json', + ) + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/posetrack18/test_posetrack18.json', + img_prefix='tests/data/posetrack18/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/posetrack18/test_posetrack18.json', + img_prefix='tests/data/posetrack18/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/posetrack18/test_posetrack18.json', + img_prefix='tests/data/posetrack18/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'posetrack18' + + image_id = 10128340000 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 3 + _ = custom_dataset[0] + + +def test_top_down_CrowdPose_dataset_compatibility(): + dataset = 'TopDownCrowdPoseDataset' + # test CrowdPose datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=14, + dataset_joints=14, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='tests/data/crowdpose/test_crowdpose_det_AP_40.json', + ) + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/crowdpose/test_crowdpose.json', + img_prefix='tests/data/crowdpose/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/crowdpose/test_crowdpose.json', + img_prefix='tests/data/crowdpose/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/crowdpose/test_crowdpose.json', + img_prefix='tests/data/crowdpose/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'crowdpose' + + image_id = 103319 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_top_down_COCO_wholebody_dataset_compatibility(): + dataset = 'TopDownCocoWholeBodyDataset' + # test COCO datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=133, + dataset_joints=133, + dataset_channel=[ + list(range(133)), + ], + inference_channel=list(range(133))) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='tests/data/coco/test_coco_det_AP_H_56.json', + ) + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/coco/test_coco_wholebody.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/coco/test_coco_wholebody.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/coco/test_coco_wholebody.json', + img_prefix='tests/data/coco/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'coco_wholebody' + + image_id = 785 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 4 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_top_down_OCHuman_dataset_compatibility(): + dataset = 'TopDownOCHumanDataset' + # test OCHuman datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=17, + dataset_joints=17, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 + ]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='', + ) + + with pytest.raises(AssertionError): + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/ochuman/test_ochuman.json', + img_prefix='tests/data/ochuman/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/ochuman/test_ochuman.json', + img_prefix='tests/data/ochuman/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'ochuman' + + image_id = 1 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 3 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_top_down_MPII_dataset_compatibility(): + dataset = 'TopDownMpiiDataset' + # test COCO datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=16, + dataset_joints=16, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + ) + + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/mpii/test_mpii.json', + img_prefix='tests/data/mpii/', + data_cfg=data_cfg_copy, + pipeline=[]) + + assert len(custom_dataset) == 5 + assert custom_dataset.dataset_name == 'mpii' + _ = custom_dataset[0] + + +def test_top_down_MPII_TRB_dataset_compatibility(): + dataset = 'TopDownMpiiTrbDataset' + # test MPII TRB datasets + dataset_class = DATASETS.get(dataset) + + channel_cfg = dict( + num_output_channels=40, + dataset_joints=40, + dataset_channel=[list(range(40))], + inference_channel=list(range(40))) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + + data_cfg_copy = copy.deepcopy(data_cfg) + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/mpii/test_mpii_trb.json', + img_prefix='tests/data/mpii/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/mpii/test_mpii_trb.json', + img_prefix='tests/data/mpii/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'mpii_trb' + _ = custom_dataset[0] + + +def test_top_down_AIC_dataset_compatibility(): + dataset = 'TopDownAicDataset' + # test AIC datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=14, + dataset_joints=14, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='') + + with pytest.raises(AssertionError): + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/aic/test_aic.json', + img_prefix='tests/data/aic/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/aic/test_aic.json', + img_prefix='tests/data/aic/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/aic/test_aic.json', + img_prefix='tests/data/aic/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'aic' + + image_id = 1 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 3 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + assert_almost_equal(infos['AP'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'PCK') + + +def test_top_down_JHMDB_dataset_compatibility(): + dataset = 'TopDownJhmdbDataset' + # test JHMDB datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=15, + dataset_joints=15, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], + ], + inference_channel=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]) + + data_cfg = dict( + image_size=[192, 256], + heatmap_size=[48, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel'], + soft_nms=False, + nms_thr=1.0, + oks_thr=0.9, + vis_thr=0.2, + use_gt_bbox=True, + det_bbox_thr=0.0, + bbox_file='') + + with pytest.raises(AssertionError): + # Test det bbox + data_cfg_copy = copy.deepcopy(data_cfg) + data_cfg_copy['use_gt_bbox'] = False + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/jhmdb/test_jhmdb_sub1.json', + img_prefix='tests/data/jhmdb/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=True) + + with pytest.warns(DeprecationWarning): + _ = dataset_class( + ann_file='tests/data/jhmdb/test_jhmdb_sub1.json', + img_prefix='tests/data/jhmdb/', + data_cfg=data_cfg_copy, + pipeline=[], + test_mode=False) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/jhmdb/test_jhmdb_sub1.json', + img_prefix='tests/data/jhmdb/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'jhmdb' + + image_id = 2290001 + assert image_id in custom_dataset.img_ids + assert len(custom_dataset.img_ids) == 3 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['PCK']) + assert_almost_equal(infos['Mean PCK'], 1.0) + + infos = custom_dataset.evaluate(outputs, tmpdir, ['tPCK']) + assert_almost_equal(infos['Mean tPCK'], 1.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_top_down_h36m_dataset_compatibility(): + dataset = 'TopDownH36MDataset' + # test AIC datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=17, + dataset_joints=17, + dataset_channel=[ + [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], + ], + inference_channel=[ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 + ]) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + + # Test gt bbox + with pytest.warns(DeprecationWarning): + custom_dataset = dataset_class( + ann_file='tests/data/h36m/h36m_coco.json', + img_prefix='tests/data/h36m/', + data_cfg=data_cfg, + pipeline=[], + test_mode=True) + + assert custom_dataset.test_mode is True + assert custom_dataset.dataset_name == 'h36m' + + image_id = 1 + assert image_id in custom_dataset.img_ids + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, 'EPE') + assert_almost_equal(infos['EPE'], 0.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'AUC') diff --git a/tests/test_datasets/test_animal_dataset.py b/tests/test_datasets/test_animal_dataset.py index f46c03475a..1ba83c019b 100644 --- a/tests/test_datasets/test_animal_dataset.py +++ b/tests/test_datasets/test_animal_dataset.py @@ -2,65 +2,19 @@ import copy import tempfile -import numpy as np import pytest +from mmcv import Config from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output from mmpose.datasets import DATASETS -def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): - outputs = [] - len_db = len(db) - for i in range(0, len_db, batch_size): - if is_3d: - keypoints = np.stack([ - db[j]['joints_3d'].reshape((-1, 3)) - for j in range(i, min(i + batch_size, len_db)) - ]) - else: - keypoints = np.stack([ - np.hstack([ - db[j]['joints_3d'].reshape((-1, 3))[:, :2], - db[j]['joints_3d_visible'].reshape((-1, 3))[:, :1] - ]) for j in range(i, min(i + batch_size, len_db)) - ]) - image_paths = [ - db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) - ] - bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack([ - np.array([ - db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], - db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 - ], - dtype=np.float32) - for j in range(i, min(i + batch_size, len_db)) - ]) - - output = {} - output['preds'] = keypoints - output['boxes'] = box - output['image_paths'] = image_paths - output['output_heatmap'] = None - output['bbox_ids'] = bbox_ids - - if keys is not None: - keys = keys if isinstance(keys, list) else [keys] - for key in keys: - output[key] = [ - db[j][key] for j in range(i, min(i + batch_size, len_db)) - ] - - outputs.append(output) - - return outputs - - def test_animal_horse10_dataset(): dataset = 'AnimalHorse10Dataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/horse10.py').dataset_info channel_cfg = dict( num_output_channels=22, @@ -89,6 +43,7 @@ def test_animal_horse10_dataset(): ann_file='tests/data/horse10/test_horse10.json', img_prefix='tests/data/horse10/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -96,9 +51,11 @@ def test_animal_horse10_dataset(): ann_file='tests/data/horse10/test_horse10.json', img_prefix='tests/data/horse10/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'horse10' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 3 _ = custom_dataset[0] @@ -115,6 +72,8 @@ def test_animal_horse10_dataset(): def test_animal_fly_dataset(): dataset = 'AnimalFlyDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/fly.py').dataset_info channel_cfg = dict( num_output_channels=32, @@ -144,6 +103,7 @@ def test_animal_fly_dataset(): ann_file='tests/data/fly/test_fly.json', img_prefix='tests/data/fly/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -151,9 +111,11 @@ def test_animal_fly_dataset(): ann_file='tests/data/fly/test_fly.json', img_prefix='tests/data/fly/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'fly' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -170,6 +132,8 @@ def test_animal_fly_dataset(): def test_animal_locust_dataset(): dataset = 'AnimalLocustDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/locust.py').dataset_info channel_cfg = dict( num_output_channels=35, @@ -200,6 +164,7 @@ def test_animal_locust_dataset(): ann_file='tests/data/locust/test_locust.json', img_prefix='tests/data/locust/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -207,9 +172,11 @@ def test_animal_locust_dataset(): ann_file='tests/data/locust/test_locust.json', img_prefix='tests/data/locust/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'locust' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -226,6 +193,8 @@ def test_animal_locust_dataset(): def test_animal_zebra_dataset(): dataset = 'AnimalZebraDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/zebra.py').dataset_info channel_cfg = dict( num_output_channels=9, @@ -249,6 +218,7 @@ def test_animal_zebra_dataset(): ann_file='tests/data/zebra/test_zebra.json', img_prefix='tests/data/zebra/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -256,9 +226,11 @@ def test_animal_zebra_dataset(): ann_file='tests/data/zebra/test_zebra.json', img_prefix='tests/data/zebra/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'zebra' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -275,6 +247,8 @@ def test_animal_zebra_dataset(): def test_animal_ATRW_dataset(): dataset = 'AnimalATRWDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/atrw.py').dataset_info channel_cfg = dict( num_output_channels=15, @@ -306,6 +280,7 @@ def test_animal_ATRW_dataset(): ann_file='tests/data/atrw/test_atrw.json', img_prefix='tests/data/atrw/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -313,9 +288,11 @@ def test_animal_ATRW_dataset(): ann_file='tests/data/atrw/test_atrw.json', img_prefix='tests/data/atrw/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'atrw' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -332,6 +309,8 @@ def test_animal_ATRW_dataset(): def test_animal_Macaque_dataset(): dataset = 'AnimalMacaqueDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/macaque.py').dataset_info channel_cfg = dict( num_output_channels=17, @@ -365,6 +344,7 @@ def test_animal_Macaque_dataset(): ann_file='tests/data/macaque/test_macaque.json', img_prefix='tests/data/macaque/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -372,9 +352,11 @@ def test_animal_Macaque_dataset(): ann_file='tests/data/macaque/test_macaque.json', img_prefix='tests/data/macaque/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'macaque' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -391,6 +373,8 @@ def test_animal_Macaque_dataset(): def test_animalpose_dataset(): dataset = 'AnimalPoseDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/animalpose.py').dataset_info channel_cfg = dict( num_output_channels=20, @@ -428,6 +412,7 @@ def test_animalpose_dataset(): ann_file='tests/data/animalpose/test_animalpose.json', img_prefix='tests/data/animalpose/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -435,9 +420,11 @@ def test_animalpose_dataset(): ann_file='tests/data/animalpose/test_animalpose.json', img_prefix='tests/data/animalpose/', data_cfg=data_cfg_copy, + dataset_info=dataset_info, pipeline=[], test_mode=False) + assert custom_dataset.dataset_name == 'animalpose' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] diff --git a/tests/test_datasets/test_body3d_dataset.py b/tests/test_datasets/test_body3d_dataset.py index 27d25ba6ce..561133695c 100644 --- a/tests/test_datasets/test_body3d_dataset.py +++ b/tests/test_datasets/test_body3d_dataset.py @@ -2,6 +2,7 @@ import tempfile import numpy as np +from mmcv import Config from mmpose.datasets import DATASETS from mmpose.datasets.builder import build_dataset @@ -11,6 +12,8 @@ def test_body3d_h36m_dataset(): # Test Human3.6M dataset dataset = 'Body3DH36MDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/h36m.py').dataset_info # test single-frame input data_cfg = dict( @@ -27,6 +30,7 @@ def test_body3d_h36m_dataset(): ann_file='tests/data/h36m/test_h36m_body3d.npz', img_prefix='tests/data/h36m', data_cfg=data_cfg, + dataset_info=dataset_info, pipeline=[], test_mode=False) @@ -34,9 +38,11 @@ def test_body3d_h36m_dataset(): ann_file='tests/data/h36m/test_h36m_body3d.npz', img_prefix='tests/data/h36m', data_cfg=data_cfg, + dataset_info=dataset_info, pipeline=[], test_mode=True) + assert custom_dataset.dataset_name == 'h36m' assert custom_dataset.test_mode is True _ = custom_dataset[0] @@ -71,6 +77,7 @@ def test_body3d_h36m_dataset(): ann_file='tests/data/h36m/test_h36m_body3d.npz', img_prefix='tests/data/h36m', data_cfg=data_cfg, + dataset_info=dataset_info, pipeline=[], test_mode=False) @@ -78,6 +85,7 @@ def test_body3d_h36m_dataset(): ann_file='tests/data/h36m/test_h36m_body3d.npz', img_prefix='tests/data/h36m', data_cfg=data_cfg, + dataset_info=dataset_info, pipeline=[], test_mode=True) @@ -102,6 +110,8 @@ def test_body3d_h36m_dataset(): def test_body3d_semi_supervision_dataset(): # Test Body3d Semi-supervision Dataset + dataset_info = Config.fromfile( + 'configs/_base_/datasets/h36m.py').dataset_info # load labeled dataset labeled_data_cfg = dict( @@ -115,11 +125,12 @@ def test_body3d_semi_supervision_dataset(): subjects=['S1'], need_camera_param=True, camera_param_file='tests/data/h36m/cameras.pkl') - labeled_dataset = dict( + labeled_dataset_cfg = dict( type='Body3DH36MDataset', ann_file='tests/data/h36m/test_h36m_body3d.npz', img_prefix='tests/data/h36m', data_cfg=labeled_data_cfg, + dataset_info=dataset_info, pipeline=[]) # load unlabled data @@ -134,11 +145,12 @@ def test_body3d_semi_supervision_dataset(): need_camera_param=True, camera_param_file='tests/data/h36m/cameras.pkl', need_2d_label=True) - unlabeled_dataset = dict( + unlabeled_dataset_cfg = dict( type='Body3DH36MDataset', ann_file='tests/data/h36m/test_h36m_body3d.npz', img_prefix='tests/data/h36m', data_cfg=unlabeled_data_cfg, + dataset_info=dataset_info, pipeline=[ dict( type='Collect', @@ -150,11 +162,12 @@ def test_body3d_semi_supervision_dataset(): # combine labeled and unlabeled dataset to form a new dataset dataset = 'Body3DSemiSupervisionDataset' dataset_class = DATASETS.get(dataset) - custom_dataset = dataset_class(labeled_dataset, unlabeled_dataset) + custom_dataset = dataset_class(labeled_dataset_cfg, unlabeled_dataset_cfg) item = custom_dataset[0] + assert custom_dataset.labeled_dataset.dataset_name == 'h36m' assert 'unlabeled_input' in item.keys() - unlabeled_dataset = build_dataset(unlabeled_dataset) + unlabeled_dataset = build_dataset(unlabeled_dataset_cfg) assert len(unlabeled_dataset) == len(custom_dataset) @@ -162,6 +175,8 @@ def test_body3d_mpi_inf_3dhp_dataset(): # Test MPI-INF-3DHP dataset dataset = 'Body3DMpiInf3dhpDataset' dataset_class = DATASETS.get(dataset) + dataset_info = Config.fromfile( + 'configs/_base_/datasets/mpi_inf_3dhp.py').dataset_info # Test single-frame input on trainset single_frame_train_data_cfg = dict( @@ -224,6 +239,7 @@ def test_body3d_mpi_inf_3dhp_dataset(): img_prefix='tests/data/mpi_inf_3dhp', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -231,6 +247,7 @@ def test_body3d_mpi_inf_3dhp_dataset(): img_prefix='tests/data/mpi_inf_3dhp', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True diff --git a/tests/test_datasets/test_bottom_up_dataset.py b/tests/test_datasets/test_bottom_up_dataset.py index 02365e9b2f..29149c29f5 100644 --- a/tests/test_datasets/test_bottom_up_dataset.py +++ b/tests/test_datasets/test_bottom_up_dataset.py @@ -3,6 +3,7 @@ import numpy as np import pytest +from mmcv import Config from numpy.testing import assert_almost_equal from mmpose.datasets import DATASETS @@ -47,6 +48,8 @@ def convert_coco_to_output(coco, is_wholebody=False): def test_bottom_up_COCO_dataset(): dataset = 'BottomUpCocoDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/coco.py').dataset_info # test COCO datasets dataset_class = DATASETS.get(dataset) @@ -76,6 +79,7 @@ def test_bottom_up_COCO_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -83,11 +87,12 @@ def test_bottom_up_COCO_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) + assert custom_dataset.dataset_name == 'coco' assert custom_dataset.num_images == 4 _ = custom_dataset[0] - assert custom_dataset.dataset_name == 'coco' outputs = convert_coco_to_output(custom_dataset.coco) with tempfile.TemporaryDirectory() as tmpdir: @@ -100,6 +105,8 @@ def test_bottom_up_COCO_dataset(): def test_bottom_up_CrowdPose_dataset(): dataset = 'BottomUpCrowdPoseDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/crowdpose.py').dataset_info # test CrowdPose datasets dataset_class = DATASETS.get(dataset) @@ -127,6 +134,7 @@ def test_bottom_up_CrowdPose_dataset(): img_prefix='tests/data/crowdpose/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -134,13 +142,15 @@ def test_bottom_up_CrowdPose_dataset(): img_prefix='tests/data/crowdpose/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) + assert custom_dataset.dataset_name == 'crowdpose' + image_id = 103319 assert image_id in custom_dataset.img_ids assert len(custom_dataset.img_ids) == 2 _ = custom_dataset[0] - assert custom_dataset.dataset_name == 'crowdpose' outputs = convert_coco_to_output(custom_dataset.coco) with tempfile.TemporaryDirectory() as tmpdir: @@ -153,6 +163,8 @@ def test_bottom_up_CrowdPose_dataset(): def test_bottom_up_MHP_dataset(): dataset = 'BottomUpMhpDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/mhp.py').dataset_info # test MHP datasets dataset_class = DATASETS.get(dataset) @@ -182,6 +194,7 @@ def test_bottom_up_MHP_dataset(): img_prefix='tests/data/mhp/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -189,13 +202,15 @@ def test_bottom_up_MHP_dataset(): img_prefix='tests/data/mhp/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) + assert custom_dataset.dataset_name == 'mhp' + image_id = 2889 assert image_id in custom_dataset.img_ids assert len(custom_dataset.img_ids) == 2 _ = custom_dataset[0] - assert custom_dataset.dataset_name == 'mhp' outputs = convert_coco_to_output(custom_dataset.coco) with tempfile.TemporaryDirectory() as tmpdir: @@ -208,6 +223,8 @@ def test_bottom_up_MHP_dataset(): def test_bottom_up_AIC_dataset(): dataset = 'BottomUpAicDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/aic.py').dataset_info # test MHP datasets dataset_class = DATASETS.get(dataset) @@ -236,6 +253,7 @@ def test_bottom_up_AIC_dataset(): img_prefix='tests/data/aic/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -243,8 +261,11 @@ def test_bottom_up_AIC_dataset(): img_prefix='tests/data/aic/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) + assert custom_dataset.dataset_name == 'aic' + image_id = 1 assert image_id in custom_dataset.img_ids assert len(custom_dataset.img_ids) == 3 @@ -261,6 +282,8 @@ def test_bottom_up_AIC_dataset(): def test_bottom_up_COCO_wholebody_dataset(): dataset = 'BottomUpCocoWholeBodyDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/coco_wholebody.py').dataset_info # test COCO-wholebody datasets dataset_class = DATASETS.get(dataset) @@ -289,6 +312,7 @@ def test_bottom_up_COCO_wholebody_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -296,6 +320,7 @@ def test_bottom_up_COCO_wholebody_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True diff --git a/tests/test_datasets/test_dataset_info.py b/tests/test_datasets/test_dataset_info.py new file mode 100644 index 0000000000..d939b9dbb6 --- /dev/null +++ b/tests/test_datasets/test_dataset_info.py @@ -0,0 +1,77 @@ +# Copyright (c) OpenMMLab. All rights reserved. +from mmpose.datasets import DatasetInfo + + +def test_dataset_info(): + dataset_info = dict( + dataset_name='zebra', + paper_info=dict( + author='Graving, Jacob M and Chae, Daniel and Naik, Hemal and ' + 'Li, Liang and Koger, Benjamin and Costelloe, Blair R and ' + 'Couzin, Iain D', + title='DeepPoseKit, a software toolkit for fast and robust ' + 'animal pose estimation using deep learning', + container='Elife', + year='2019', + homepage='https://github.com/jgraving/DeepPoseKit-Data', + ), + keypoint_info={ + 0: + dict(name='snout', id=0, color=[255, 255, 255], type='', swap=''), + 1: + dict(name='head', id=1, color=[255, 255, 255], type='', swap=''), + 2: + dict(name='neck', id=2, color=[255, 255, 255], type='', swap=''), + 3: + dict( + name='forelegL1', + id=3, + color=[255, 255, 255], + type='', + swap='forelegR1'), + 4: + dict( + name='forelegR1', + id=4, + color=[255, 255, 255], + type='', + swap='forelegL1'), + 5: + dict( + name='hindlegL1', + id=5, + color=[255, 255, 255], + type='', + swap='hindlegR1'), + 6: + dict( + name='hindlegR1', + id=6, + color=[255, 255, 255], + type='', + swap='hindlegL1'), + 7: + dict( + name='tailbase', id=7, color=[255, 255, 255], type='', + swap=''), + 8: + dict( + name='tailtip', id=8, color=[255, 255, 255], type='', swap='') + }, + skeleton_info={ + 0: dict(link=('head', 'snout'), id=0, color=[255, 255, 255]), + 1: dict(link=('neck', 'head'), id=1, color=[255, 255, 255]), + 2: dict(link=('forelegL1', 'neck'), id=2, color=[255, 255, 255]), + 3: dict(link=('forelegR1', 'neck'), id=3, color=[255, 255, 255]), + 4: + dict(link=('hindlegL1', 'tailbase'), id=4, color=[255, 255, 255]), + 5: + dict(link=('hindlegR1', 'tailbase'), id=5, color=[255, 255, 255]), + 6: dict(link=('tailbase', 'neck'), id=6, color=[255, 255, 255]), + 7: dict(link=('tailtip', 'tailbase'), id=7, color=[255, 255, 255]) + }, + joint_weights=[1.] * 9, + sigmas=[]) + + dataset_info = DatasetInfo(dataset_info) + assert dataset_info.keypoint_num == len(dataset_info.flip_index) diff --git a/tests/test_datasets/test_face_dataset.py b/tests/test_datasets/test_face_dataset.py index 730357489c..f99b1c1fca 100644 --- a/tests/test_datasets/test_face_dataset.py +++ b/tests/test_datasets/test_face_dataset.py @@ -3,64 +3,18 @@ import tempfile from unittest.mock import MagicMock -import numpy as np import pytest +from mmcv import Config from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output from mmpose.datasets import DATASETS -def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): - outputs = [] - len_db = len(db) - for i in range(0, len_db, batch_size): - if is_3d: - keypoints = np.stack([ - db[j]['joints_3d'].reshape((-1, 3)) - for j in range(i, min(i + batch_size, len_db)) - ]) - else: - keypoints = np.stack([ - np.hstack([ - db[j]['joints_3d'].reshape((-1, 3))[:, :2], - db[j]['joints_3d_visible'].reshape((-1, 3))[:, :1] - ]) for j in range(i, min(i + batch_size, len_db)) - ]) - image_paths = [ - db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) - ] - bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack([ - np.array([ - db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], - db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 - ], - dtype=np.float32) - for j in range(i, min(i + batch_size, len_db)) - ]) - - output = {} - output['preds'] = keypoints - output['boxes'] = box - output['image_paths'] = image_paths - output['output_heatmap'] = None - output['bbox_ids'] = bbox_ids - - if keys is not None: - keys = keys if isinstance(keys, list) else [keys] - for key in keys: - output[key] = [ - db[j][key] for j in range(i, min(i + batch_size, len_db)) - ] - - outputs.append(output) - - return outputs - - def test_face_300W_dataset(): dataset = 'Face300WDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/300w.py').dataset_info # test Face 300W datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -88,6 +42,7 @@ def test_face_300W_dataset(): img_prefix='tests/data/300w/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -95,8 +50,10 @@ def test_face_300W_dataset(): img_prefix='tests/data/300w/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) + assert custom_dataset.dataset_name == '300w' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -112,6 +69,8 @@ def test_face_300W_dataset(): def test_face_AFLW_dataset(): dataset = 'FaceAFLWDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/aflw.py').dataset_info # test Face AFLW datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -139,6 +98,7 @@ def test_face_AFLW_dataset(): img_prefix='tests/data/aflw/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -146,8 +106,10 @@ def test_face_AFLW_dataset(): img_prefix='tests/data/aflw/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) + assert custom_dataset.dataset_name == 'aflw' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] @@ -163,6 +125,8 @@ def test_face_AFLW_dataset(): def test_face_WFLW_dataset(): dataset = 'FaceWFLWDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/wflw.py').dataset_info # test Face WFLW datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -190,6 +154,7 @@ def test_face_WFLW_dataset(): img_prefix='tests/data/wflw/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -197,8 +162,67 @@ def test_face_WFLW_dataset(): img_prefix='tests/data/wflw/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, + test_mode=False) + + assert custom_dataset.dataset_name == 'wflw' + assert custom_dataset.test_mode is False + assert custom_dataset.num_images == 2 + _ = custom_dataset[0] + + outputs = convert_db_to_output(custom_dataset.db) + + with tempfile.TemporaryDirectory() as tmpdir: + infos = custom_dataset.evaluate(outputs, tmpdir, ['NME']) + assert_almost_equal(infos['NME'], 0.0) + + with pytest.raises(KeyError): + _ = custom_dataset.evaluate(outputs, tmpdir, 'mAP') + + +def test_face_COFW_dataset(): + dataset = 'FaceCOFWDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/cofw.py').dataset_info + # test Face COFW datasets + dataset_class = DATASETS.get(dataset) + dataset_class.load_annotations = MagicMock() + dataset_class.coco = MagicMock() + + channel_cfg = dict( + num_output_channels=29, + dataset_joints=29, + dataset_channel=[ + list(range(29)), + ], + inference_channel=list(range(29))) + + data_cfg = dict( + image_size=[256, 256], + heatmap_size=[64, 64], + num_output_channels=channel_cfg['num_output_channels'], + num_joints=channel_cfg['dataset_joints'], + dataset_channel=channel_cfg['dataset_channel'], + inference_channel=channel_cfg['inference_channel']) + # Test + data_cfg_copy = copy.deepcopy(data_cfg) + _ = dataset_class( + ann_file='tests/data/cofw/test_cofw.json', + img_prefix='tests/data/cofw/', + data_cfg=data_cfg_copy, + pipeline=[], + dataset_info=dataset_info, + test_mode=True) + + custom_dataset = dataset_class( + ann_file='tests/data/cofw/test_cofw.json', + img_prefix='tests/data/cofw/', + data_cfg=data_cfg_copy, + pipeline=[], + dataset_info=dataset_info, test_mode=False) + assert custom_dataset.dataset_name == 'cofw' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 2 _ = custom_dataset[0] diff --git a/tests/test_datasets/test_fashion_dataset.py b/tests/test_datasets/test_fashion_dataset.py index 8cc04162a2..6fd0ec6aae 100644 --- a/tests/test_datasets/test_fashion_dataset.py +++ b/tests/test_datasets/test_fashion_dataset.py @@ -2,64 +2,18 @@ import tempfile from unittest.mock import MagicMock -import numpy as np import pytest +from mmcv import Config from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output from mmpose.datasets import DATASETS -def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): - outputs = [] - len_db = len(db) - for i in range(0, len_db, batch_size): - if is_3d: - keypoints = np.stack([ - db[j]['joints_3d'].reshape((-1, 3)) - for j in range(i, min(i + batch_size, len_db)) - ]) - else: - keypoints = np.stack([ - np.hstack([ - db[j]['joints_3d'].reshape((-1, 3))[:, :2], - db[j]['joints_3d_visible'].reshape((-1, 3))[:, :1] - ]) for j in range(i, min(i + batch_size, len_db)) - ]) - image_paths = [ - db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) - ] - bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack([ - np.array([ - db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], - db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 - ], - dtype=np.float32) - for j in range(i, min(i + batch_size, len_db)) - ]) - - output = {} - output['preds'] = keypoints - output['boxes'] = box - output['image_paths'] = image_paths - output['output_heatmap'] = None - output['bbox_ids'] = bbox_ids - - if keys is not None: - keys = keys if isinstance(keys, list) else [keys] - for key in keys: - output[key] = [ - db[j][key] for j in range(i, min(i + batch_size, len_db)) - ] - - outputs.append(output) - - return outputs - - def test_deepfashion_dataset(): dataset = 'DeepFashionDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/deepfashion_full.py').dataset_info # test JHMDB datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -96,6 +50,7 @@ def test_deepfashion_dataset(): subset='full', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True diff --git a/tests/test_datasets/test_hand_dataset.py b/tests/test_datasets/test_hand_dataset.py index de0bc2c664..0ba10efc8e 100644 --- a/tests/test_datasets/test_hand_dataset.py +++ b/tests/test_datasets/test_hand_dataset.py @@ -2,60 +2,19 @@ import copy import tempfile -import numpy as np import pytest +from mmcv import Config from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output from mmpose.datasets import DATASETS -def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): - outputs = [] - len_db = len(db) - for i in range(0, len_db, batch_size): - keypoints_dim = 3 if is_3d else 2 - keypoints = np.stack([ - np.hstack([ - db[j]['joints_3d'].reshape((-1, 3))[:, :keypoints_dim], - db[j]['joints_3d_visible'].reshape((-1, 3))[:, :1] - ]) for j in range(i, min(i + batch_size, len_db)) - ]) - - image_paths = [ - db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) - ] - bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack([ - np.array([ - db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], - db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 - ], - dtype=np.float32) - for j in range(i, min(i + batch_size, len_db)) - ]) - - output = {} - output['preds'] = keypoints - output['boxes'] = box - output['image_paths'] = image_paths - output['output_heatmap'] = None - output['bbox_ids'] = bbox_ids - - if keys is not None: - keys = keys if isinstance(keys, list) else [keys] - for key in keys: - output[key] = [ - db[j][key] for j in range(i, min(i + batch_size, len_db)) - ] - - outputs.append(output) - - return outputs - - def test_top_down_OneHand10K_dataset(): dataset = 'OneHand10KDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/onehand10k.py').dataset_info + dataset_class = DATASETS.get(dataset) channel_cfg = dict( @@ -86,6 +45,7 @@ def test_top_down_OneHand10K_dataset(): img_prefix='tests/data/onehand10k/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -93,8 +53,10 @@ def test_top_down_OneHand10K_dataset(): img_prefix='tests/data/onehand10k/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) + assert custom_dataset.dataset_name == 'onehand10k' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 4 _ = custom_dataset[0] @@ -112,6 +74,9 @@ def test_top_down_OneHand10K_dataset(): def test_top_down_FreiHand_dataset(): dataset = 'FreiHandDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/freihand2d.py').dataset_info + dataset_class = DATASETS.get(dataset) channel_cfg = dict( @@ -142,6 +107,7 @@ def test_top_down_FreiHand_dataset(): img_prefix='tests/data/freihand/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -149,8 +115,10 @@ def test_top_down_FreiHand_dataset(): img_prefix='tests/data/freihand/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) + assert custom_dataset.dataset_name == 'freihand' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 8 _ = custom_dataset[0] @@ -168,6 +136,9 @@ def test_top_down_FreiHand_dataset(): def test_top_down_RHD_dataset(): dataset = 'Rhd2DDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/rhd2d.py').dataset_info + dataset_class = DATASETS.get(dataset) channel_cfg = dict( @@ -198,6 +169,7 @@ def test_top_down_RHD_dataset(): img_prefix='tests/data/rhd/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -205,8 +177,10 @@ def test_top_down_RHD_dataset(): img_prefix='tests/data/rhd/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) + assert custom_dataset.dataset_name == 'rhd2d' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 3 _ = custom_dataset[0] @@ -224,6 +198,9 @@ def test_top_down_RHD_dataset(): def test_top_down_Panoptic_dataset(): dataset = 'PanopticDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/panoptic_hand2d.py').dataset_info + dataset_class = DATASETS.get(dataset) channel_cfg = dict( @@ -254,6 +231,7 @@ def test_top_down_Panoptic_dataset(): img_prefix='tests/data/panoptic/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -261,8 +239,10 @@ def test_top_down_Panoptic_dataset(): img_prefix='tests/data/panoptic/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) + assert custom_dataset.dataset_name == 'panoptic_hand2d' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 4 _ = custom_dataset[0] @@ -281,6 +261,9 @@ def test_top_down_Panoptic_dataset(): def test_top_down_InterHand2D_dataset(): dataset = 'InterHand2DDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/interhand2d.py').dataset_info + dataset_class = DATASETS.get(dataset) channel_cfg = dict( @@ -313,6 +296,7 @@ def test_top_down_InterHand2D_dataset(): img_prefix='tests/data/interhand2.6m/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -322,8 +306,10 @@ def test_top_down_InterHand2D_dataset(): img_prefix='tests/data/interhand2.6m/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) + assert custom_dataset.dataset_name == 'interhand2d' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 4 assert len(custom_dataset.db) == 6 @@ -344,6 +330,9 @@ def test_top_down_InterHand2D_dataset(): def test_top_down_InterHand3D_dataset(): dataset = 'InterHand3DDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/interhand3d.py').dataset_info + dataset_class = DATASETS.get(dataset) channel_cfg = dict( @@ -381,6 +370,7 @@ def test_top_down_InterHand3D_dataset(): img_prefix='tests/data/interhand2.6m/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) custom_dataset = dataset_class( @@ -390,8 +380,10 @@ def test_top_down_InterHand3D_dataset(): img_prefix='tests/data/interhand2.6m/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) + assert custom_dataset.dataset_name == 'interhand3d' assert custom_dataset.test_mode is False assert custom_dataset.num_images == 4 assert len(custom_dataset.db) == 4 diff --git a/tests/test_datasets/test_top_down_dataset.py b/tests/test_datasets/test_top_down_dataset.py index 7b05db61ff..52cfb55f5f 100644 --- a/tests/test_datasets/test_top_down_dataset.py +++ b/tests/test_datasets/test_top_down_dataset.py @@ -3,64 +3,18 @@ import tempfile from unittest.mock import MagicMock -import numpy as np import pytest +from mmcv import Config from numpy.testing import assert_almost_equal +from tests.utils.data_utils import convert_db_to_output from mmpose.datasets import DATASETS -def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): - outputs = [] - len_db = len(db) - for i in range(0, len_db, batch_size): - if is_3d: - keypoints = np.stack([ - db[j]['joints_3d'].reshape((-1, 3)) - for j in range(i, min(i + batch_size, len_db)) - ]) - else: - keypoints = np.stack([ - np.hstack([ - db[j]['joints_3d'].reshape((-1, 3))[:, :2], - db[j]['joints_3d_visible'].reshape((-1, 3))[:, :1] - ]) for j in range(i, min(i + batch_size, len_db)) - ]) - image_paths = [ - db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) - ] - bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] - box = np.stack([ - np.array([ - db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], - db[j]['scale'][1], - db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 - ], - dtype=np.float32) - for j in range(i, min(i + batch_size, len_db)) - ]) - - output = {} - output['preds'] = keypoints - output['boxes'] = box - output['image_paths'] = image_paths - output['output_heatmap'] = None - output['bbox_ids'] = bbox_ids - - if keys is not None: - keys = keys if isinstance(keys, list) else [keys] - for key in keys: - output[key] = [ - db[j][key] for j in range(i, min(i + batch_size, len_db)) - ] - - outputs.append(output) - - return outputs - - def test_top_down_COCO_dataset(): dataset = 'TopDownCocoDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/coco.py').dataset_info # test COCO datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -99,6 +53,7 @@ def test_top_down_COCO_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) _ = dataset_class( @@ -106,6 +61,7 @@ def test_top_down_COCO_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) # Test gt bbox @@ -114,6 +70,7 @@ def test_top_down_COCO_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -135,6 +92,8 @@ def test_top_down_COCO_dataset(): def test_top_down_MHP_dataset(): dataset = 'TopDownMhpDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/mhp.py').dataset_info # test MHP datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -177,6 +136,7 @@ def test_top_down_MHP_dataset(): img_prefix='tests/data/mhp/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) # Test gt bbox @@ -185,6 +145,7 @@ def test_top_down_MHP_dataset(): img_prefix='tests/data/mhp/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -192,6 +153,7 @@ def test_top_down_MHP_dataset(): img_prefix='tests/data/mhp/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -213,6 +175,8 @@ def test_top_down_MHP_dataset(): def test_top_down_PoseTrack18_dataset(): dataset = 'TopDownPoseTrack18Dataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/posetrack18.py').dataset_info # test PoseTrack datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -252,6 +216,7 @@ def test_top_down_PoseTrack18_dataset(): img_prefix='tests/data/posetrack18/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) _ = dataset_class( @@ -259,6 +224,7 @@ def test_top_down_PoseTrack18_dataset(): img_prefix='tests/data/posetrack18/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) # Test gt bbox @@ -267,6 +233,7 @@ def test_top_down_PoseTrack18_dataset(): img_prefix='tests/data/posetrack18/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -280,6 +247,8 @@ def test_top_down_PoseTrack18_dataset(): def test_top_down_CrowdPose_dataset(): dataset = 'TopDownCrowdPoseDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/crowdpose.py').dataset_info # test CrowdPose datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -316,6 +285,7 @@ def test_top_down_CrowdPose_dataset(): img_prefix='tests/data/crowdpose/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) _ = dataset_class( @@ -323,6 +293,7 @@ def test_top_down_CrowdPose_dataset(): img_prefix='tests/data/crowdpose/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) # Test gt bbox @@ -331,6 +302,7 @@ def test_top_down_CrowdPose_dataset(): img_prefix='tests/data/crowdpose/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -352,6 +324,8 @@ def test_top_down_CrowdPose_dataset(): def test_top_down_COCO_wholebody_dataset(): dataset = 'TopDownCocoWholeBodyDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/coco_wholebody.py').dataset_info # test COCO datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -388,6 +362,7 @@ def test_top_down_COCO_wholebody_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) _ = dataset_class( @@ -395,6 +370,7 @@ def test_top_down_COCO_wholebody_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) # Test gt bbox @@ -403,6 +379,7 @@ def test_top_down_COCO_wholebody_dataset(): img_prefix='tests/data/coco/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -424,6 +401,8 @@ def test_top_down_COCO_wholebody_dataset(): def test_top_down_OCHuman_dataset(): dataset = 'TopDownOCHumanDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/ochuman.py').dataset_info # test OCHuman datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -464,6 +443,7 @@ def test_top_down_OCHuman_dataset(): img_prefix='tests/data/ochuman/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) # Test gt bbox @@ -472,6 +452,7 @@ def test_top_down_OCHuman_dataset(): img_prefix='tests/data/ochuman/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -493,6 +474,8 @@ def test_top_down_OCHuman_dataset(): def test_top_down_MPII_dataset(): dataset = 'TopDownMpiiDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/mpii.py').dataset_info # test COCO datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -523,7 +506,9 @@ def test_top_down_MPII_dataset(): ann_file='tests/data/mpii/test_mpii.json', img_prefix='tests/data/mpii/', data_cfg=data_cfg_copy, - pipeline=[]) + pipeline=[], + dataset_info=dataset_info, + ) assert len(custom_dataset) == 5 assert custom_dataset.dataset_name == 'mpii' @@ -532,6 +517,8 @@ def test_top_down_MPII_dataset(): def test_top_down_MPII_TRB_dataset(): dataset = 'TopDownMpiiTrbDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/mpii_trb.py').dataset_info # test MPII TRB datasets dataset_class = DATASETS.get(dataset) @@ -555,6 +542,7 @@ def test_top_down_MPII_TRB_dataset(): img_prefix='tests/data/mpii/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) custom_dataset = dataset_class( @@ -562,6 +550,7 @@ def test_top_down_MPII_TRB_dataset(): img_prefix='tests/data/mpii/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -571,6 +560,8 @@ def test_top_down_MPII_TRB_dataset(): def test_top_down_AIC_dataset(): dataset = 'TopDownAicDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/aic.py').dataset_info # test AIC datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -608,6 +599,7 @@ def test_top_down_AIC_dataset(): img_prefix='tests/data/aic/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) _ = dataset_class( @@ -615,6 +607,7 @@ def test_top_down_AIC_dataset(): img_prefix='tests/data/aic/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) # Test gt bbox @@ -623,6 +616,7 @@ def test_top_down_AIC_dataset(): img_prefix='tests/data/aic/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -644,6 +638,8 @@ def test_top_down_AIC_dataset(): def test_top_down_JHMDB_dataset(): dataset = 'TopDownJhmdbDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/jhmdb.py').dataset_info # test JHMDB datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -681,6 +677,7 @@ def test_top_down_JHMDB_dataset(): img_prefix='tests/data/jhmdb/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=True) _ = dataset_class( @@ -688,6 +685,7 @@ def test_top_down_JHMDB_dataset(): img_prefix='tests/data/jhmdb/', data_cfg=data_cfg_copy, pipeline=[], + dataset_info=dataset_info, test_mode=False) # Test gt bbox @@ -696,6 +694,7 @@ def test_top_down_JHMDB_dataset(): img_prefix='tests/data/jhmdb/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True @@ -720,6 +719,8 @@ def test_top_down_JHMDB_dataset(): def test_top_down_h36m_dataset(): dataset = 'TopDownH36MDataset' + dataset_info = Config.fromfile( + 'configs/_base_/datasets/h36m.py').dataset_info # test AIC datasets dataset_class = DATASETS.get(dataset) dataset_class.load_annotations = MagicMock() @@ -749,6 +750,7 @@ def test_top_down_h36m_dataset(): img_prefix='tests/data/h36m/', data_cfg=data_cfg, pipeline=[], + dataset_info=dataset_info, test_mode=True) assert custom_dataset.test_mode is True diff --git a/tests/test_eval_hook.py b/tests/test_eval_hook.py index 4a933dc6be..f472541c95 100644 --- a/tests/test_eval_hook.py +++ b/tests/test_eval_hook.py @@ -143,10 +143,11 @@ def test_eval_hook(EvalHookCls): batch_processor=None, optimizer=optimizer, work_dir=tmpdir, - logger=logger) + logger=logger, + max_epochs=8) runner.register_checkpoint_hook(dict(interval=1)) runner.register_hook(eval_hook) - runner.run([loader], [('train', 1)], 8) + runner.run([loader], [('train', 1)]) real_path = osp.join(tmpdir, 'best_acc_epoch_4.pth') diff --git a/tests/test_visualization.py b/tests/test_visualization.py index 88caa76941..0f6e36732d 100644 --- a/tests/test_visualization.py +++ b/tests/test_visualization.py @@ -13,15 +13,15 @@ def test_imshow_keypoints(): img = np.zeros((100, 100, 3), dtype=np.uint8) kpts = np.array([[1, 1, 1], [10, 10, 1]], dtype=np.float32) pose_result = [kpts] - skeleton = [[1, 2]] + skeleton = [[0, 1]] pose_kpt_color = [(127, 127, 127)] * len(kpts) - pose_limb_color = [(127, 127, 127)] * len(skeleton) + pose_link_color = [(127, 127, 127)] * len(skeleton) img_vis_2d = imshow_keypoints( img, pose_result, skeleton=skeleton, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, show_keypoint_weight=True) # 3D keypoint @@ -32,7 +32,7 @@ def test_imshow_keypoints(): img=img_vis_2d, skeleton=skeleton, pose_kpt_color=pose_kpt_color, - pose_limb_color=pose_limb_color, + pose_link_color=pose_link_color, vis_height=400) diff --git a/tests/utils/data_utils.py b/tests/utils/data_utils.py new file mode 100644 index 0000000000..a04e2e6eb7 --- /dev/null +++ b/tests/utils/data_utils.py @@ -0,0 +1,47 @@ +# Copyright (c) OpenMMLab. All rights reserved. +import numpy as np + + +def convert_db_to_output(db, batch_size=2, keys=None, is_3d=False): + outputs = [] + len_db = len(db) + for i in range(0, len_db, batch_size): + keypoints_dim = 3 if is_3d else 2 + keypoints = np.stack([ + np.hstack([ + db[j]['joints_3d'].reshape((-1, 3))[:, :keypoints_dim], + db[j]['joints_3d_visible'].reshape((-1, 3))[:, :1] + ]) for j in range(i, min(i + batch_size, len_db)) + ]) + + image_paths = [ + db[j]['image_file'] for j in range(i, min(i + batch_size, len_db)) + ] + bbox_ids = [j for j in range(i, min(i + batch_size, len_db))] + box = np.stack([ + np.array([ + db[j]['center'][0], db[j]['center'][1], db[j]['scale'][0], + db[j]['scale'][1], + db[j]['scale'][0] * db[j]['scale'][1] * 200 * 200, 1.0 + ], + dtype=np.float32) + for j in range(i, min(i + batch_size, len_db)) + ]) + + output = {} + output['preds'] = keypoints + output['boxes'] = box + output['image_paths'] = image_paths + output['output_heatmap'] = None + output['bbox_ids'] = bbox_ids + + if keys is not None: + keys = keys if isinstance(keys, list) else [keys] + for key in keys: + output[key] = [ + db[j][key] for j in range(i, min(i + batch_size, len_db)) + ] + + outputs.append(output) + + return outputs