Viewing a single comment thread. View all comments

fernandocamargoti t1_irc04s7 wrote

Very interesting. How would you compare your project to https://github.com/KevinMusgrave/pytorch-metric-learning?

11

Zestyclose-Check-751 OP t1_irc75zv wrote

Initially, in our project, we decided to start using PML, but we found it inconvenient and we even were not able to complete our pipeline because we struggled with the validation setup. The following is my IMHO:

  1. The design & documentation of PML is not clear and intuitive
  2. PML provides some Trainer, but even the author does not use it in his examples (which is also a sign of a not perfect design) and he writes train and test functions by himself. As a side effect, it means that I see no easy way to use it with DDP without rewriting the examples' code, which is a big issue.

I think it may be related to the fact that PML was not designed as an open-source project from its beginning and there was no strict plan for the whole library. In contrast, when we started working on OML we already realised the whole structure, which helped us a lot. Anyway, I believe PML's author made a big contribution to the metric learning sphere, especially with his paper "A Metric Learning Reality Check".

UPD. I also forget to mention that we have a ZOO of pre-trained models with automatic checkpoints downloading (as in torchvision), so it's also a big advantage and allows us to start experimenting immediately. I am talking about models like MoCo, CLIP, DINO

UPD. We added the comparison with PML to FAQ and also added examples of the usage our library with losses from PML.

14

I-am_Sleepy t1_irddanm wrote

Is it compatible with PML, or various deep metric learning method need to be re-implement along with OML?

2

Zestyclose-Check-751 OP t1_iri3ymj wrote

I guess you are mostly talking about different losses in PML, right?
The easiest way to work with these losses in our library is to take one of our examples and just replace the criterion object. I think we will add a few examples of this in the future.

2