HRNet-Facial-Landmark-Detection
HRNet-Facial-Landmark-Detection copied to clipboard
rotations are not considered when training NME is computed.
Hello, it seems that rotations are not considered when counting training NME.
I'll put 300W experiments as example.
In lib.datasets.face300w, the original ground truth landmarks are passed (in some cases they are flipped), and random rotation is carried out for training set (note that ground truth landmarks are not rotated).
And in lib.core.function.train, the NME is computed with
preds = decode_preds(score_map, meta['center'], meta['scale'], [64, 64])
nme_batch = compute_nme(preds, meta)
Where the parameters don't contain rotation information
And in lib.utils.transforms.transform_preds
coords[p, 0:2] = torch.tensor(transform_pixel(coords[p, 0:2], center, scale, output_size, 1, 0))
the rotation factor is set to constant 0.
So a non-rotated ground truth and prediction based on random rotated image (without rotated back) is used to compute training NME, is there anything wrong?
yeah, i meet the same problem here and i think you are right. so the training nme here is incorrect because of mistake of the rotation, however,loss calculation is correct and we can train normally.
yes, I also think it's a bug.
target landmarks contain rotation and flip