mmpose icon indicating copy to clipboard operation
mmpose copied to clipboard

How to set positive target_weigth and zero target for hidden keypoints

Open GPhilo opened this issue 3 years ago • 1 comments

Hello,

I'm training a keypoints detector for a use-case in which I have 8 keypoints and for each sample I know in advance that 4 of the 8 keypoints are occluded. I set up the trainig dataset and trained a network, however during inference the network always predicts all 8 keypoints, instead of being able to recognize between the visible ones and the occluded ones.

Tracking down the issue, I realized that in TopDownGenerateTarget._msra_generate_target() the target_weight is derived directly from the keypoint visibility, so the network receives weight updates only if a keypoint is present in the image.

What I want to enable is for the network to have negative feedback too, by setting the target_weight to 1 and having an all-zero target heatmap. Is there a way to enable this behaviour? Or should I implement my own variation of TopDownGenerateTarget._msra_generate_target()?

GPhilo avatar Aug 05 '22 09:08 GPhilo

Is there a way to enable this behaviour? Currently, no.

_Or should I implement my own variation of TopDownGenerateTarget.msra_generate_target()? Yes. I think so.

jin-s13 avatar Aug 05 '22 09:08 jin-s13