You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SimCC Label Confidence Score is Low for COCO_Val Evaluation]
#3206
I'm currently testing an RTMPose-like model using a SimCC-style encoder/decoder, and I’ve been puzzled by the confidence scores produced by SimCC.
During training, I’m using the standard KLDiscreteLoss, and my labels are unnormalized Gaussian distributions. During inference, I apply a softmax to the output logits from SimCC, then pass the result to get_simcc_maximum to extract both the predicted coordinates (via the max indices) and the confidence scores (via the max values).
However, I’ve noticed that the maximum values after the softmax are quite low—usually around 0.02 to 0.05—even though the visualization results look pretty good.
I have two questions:
During inference, is it appropriate to apply a softmax to the output logits?
How should I align or interpret the confidence scores from the model in relation to COCO-style evaluation metrics?
Thanks so much in advance!
No. MMPose does not apply a softmax at inference.SimCCLabel.decode() calls get_simcc_maximum(simcc_x, simcc_y) with its default apply_softmax=False. So the keypoint score is the raw logit at the argmax, taking the smaller of the x and y values. A plain softmax over 384/512 bins is expected to give a small max (the uniform level is about 1/512). Values of 0.02-0.05 are normal for that, and they say nothing bad about the model.
Why the raw logit works as a score: RTMPose trains with KLDiscretLoss(beta=10., label_softmax=True), which compares log_softmax(pred * 10) with softmax(gt * 10). With unnormalized Gaussian targets (normalize=False, peak = 1), the logits learn to look like the target Gaussian (peak about 1) up to a shift. The peak logit then behaves like a heatmap peak score, and the keypoint_score_thr=0.2 below is meant for this kind of score. If you want a softmax-based score, it must use the same temperature as the loss (softmax(logits * beta)), not beta=1. MMPose only does this for the optional visibility output (decode_visibility=True, which uses apply_softmax=True with decode_beta * sigma).
Why it matters for COCO AP:CocoMetric defaults to score_mode='bbox_keypoint' with keypoint_score_thr=0.2. Each instance is rescored as bbox_score * mean(keypoint scores > 0.2). If no keypoint passes 0.2, the mean is 0, so the instance score becomes 0. With softmax scores of about 0.03, almost every instance gets score 0, the OKS-based ranking is lost, and AP drops even when the coordinates are good. (OKS-NMS also uses these scores.)
So use the head's own decode path (head.predict() / self.decode((pred_x, pred_y))), or call get_simcc_maximum(simcc_x, simcc_y) without softmax on the logits.
To check, run tools/test.py once with the default decode and once with your softmax scores. The coordinates are the same in both runs, so any AP difference comes only from the rescoring.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi guys,
I'm currently testing an RTMPose-like model using a SimCC-style encoder/decoder, and I’ve been puzzled by the confidence scores produced by SimCC.
During training, I’m using the standard KLDiscreteLoss, and my labels are unnormalized Gaussian distributions. During inference, I apply a softmax to the output logits from SimCC, then pass the result to get_simcc_maximum to extract both the predicted coordinates (via the max indices) and the confidence scores (via the max values).
However, I’ve noticed that the maximum values after the softmax are quite low—usually around 0.02 to 0.05—even though the visualization results look pretty good.
I have two questions:
During inference, is it appropriate to apply a softmax to the output logits?
How should I align or interpret the confidence scores from the model in relation to COCO-style evaluation metrics?
Thanks so much in advance!
All reactions