We proposed a generalizable adaptation of Focal Loss to keypoint detection leveraging difficulty scores from a discriminator.
Sorry for not being able to provide the code. The team and I conducted this research project while I was working full-time at GE Healthcare, and by the time I organized this repository I had already left the company for PhD.
Paper can be found here
@article{liu2022adversarial,
title={Adversarial Focal Loss: Asking Your Discriminator for Hard Examples},
author={Liu, Chen and Dong, Xiaomeng and Potter, Michael and Chang, Hsi-Ming and Soni, Ravi},
journal={arXiv preprint arXiv:2207.07739},
year={2022}
}