KevinMusgrave / pytorch-metric-learning

The easiest way to use deep metric learning in your application. Modular, flexible, and extensible. Written in PyTorch.
https://kevinmusgrave.github.io/pytorch-metric-learning/
MIT License
5.96k stars 656 forks source link

Selectively Contrastive Triplet loss #287

Open littleredxh opened 3 years ago

littleredxh commented 3 years ago

Hi Kevin

Would you mind add my Selectively Contrastive Triplet loss (which is published in ECCV2020)? The major idea of this paper is to overcome the local minima during the triplet optimization. This loss work especially well on high intra-variance datasets such as Hotel50K. And I provide my implementation in this repo:

https://github.com/littleredxh/HardNegative

You can find the loss function in "_code/Loss.py" file

I think this loss function can be easily adapted into your framework.

KevinMusgrave commented 3 years ago

👍 Will add to my to-do list

Konyrev commented 1 year ago

Can I commit to this feature? I mean to be a contributor? Or It's almost ready?

KevinMusgrave commented 1 year ago

Please do. I never got around to working on it.