Repository navigation
gt_instances keypoints are all zeros when fine-tuning on COCO #3189
Replies: 1 comment
|
This is expected, and your setup is fine. The zeros come from the When # mmpose/datasets/datasets/base/base_coco_style_dataset.py, _load_detection_results()
# use dummy keypoint location and visibility
keypoints = np.zeros((1, num_keypoints, 2), dtype=np.float32)
keypoints_visible = np.ones((1, num_keypoints), dtype=np.float32)The samples have no matching GT person, because they are detector boxes, so To see the real GT keypoints in the data samples during validation (for example to debug or to compute your own metric), evaluate on GT boxes. Remove val_dataloader = dict(
...,
dataset=dict(
type=dataset_type, data_root=data_root, data_mode=data_mode,
ann_file='annotations/person_keypoints_val2017.json',
# bbox_file=..., # removed -> samples come from GT annotations
data_prefix=dict(img='images/val2017/'),
test_mode=True, pipeline=val_pipeline))Then The training samples are not affected. To check: print |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
gt_instanceskeypoints are all zeros when fine-tuning on COCODescription
I encountered an issue where the keypoints in gt_instances are always an array of zeros during training. I have checked browse_dataset.py and PackPoseInputs, and both seem to be working correctly. However, I can't figure out where the problem might be.
Please suggest any potential errors or solutions. Thank you!
Steps to Reproduce
Attempt to fine-tune the model on the COCO dataset using the following command:
python./mmpose/tools/train.py \ ./mmpose/configs/body_2d_keypoint/topdown_heatmap/ap2d/td-hm_hrnet-w48_8xb32-210e_coco-256x192_testing.pyExpected Behavior
The gt_instances.keypoints should contain the correct annotated keypoint coordinates from the dataset instead of an array of zeros.
Modifications
The only modification I made was updating the settings in the configuration file and print out the datasample inside the CocoMetric.
Environment
The settings
All reactions