KevinMusgrave/pytorch-metric-learning

The easiest way to use deep metric learning in your application. Modular, flexible, and extensible. Written in PyTorch.

62
/ 100
Established

This library helps machine learning practitioners build models that can identify similarities between items, like recognizing different breeds of dogs or similar product images. You input labeled data (e.g., images with their corresponding categories), and it helps your model learn to produce 'embeddings' – numerical representations where similar items are clustered closer together. This is for machine learning engineers and researchers who are working on tasks requiring fine-grained similarity comparisons.

6,312 stars. Used by 5 other packages. No commits in the last 6 months. Available on PyPI.

Use this if you need to train a deep learning model to understand the subtle differences and similarities between complex data points, such as images or text, to group them effectively or find matches.

Not ideal if you are looking for a pre-trained, off-the-shelf solution for similarity search without needing to customize model training at a detailed level.

image-recognition similarity-search computer-vision representation-learning machine-learning-research
Stale 6m
Maintenance 2 / 25
Adoption 15 / 25
Maturity 25 / 25
Community 20 / 25

How are scores calculated?

Stars

6,312

Forks

663

Language

Python

License

MIT

Last pushed

Aug 17, 2025

Commits (30d)

0

Dependencies

4

Reverse dependents

5

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/ml-frameworks/KevinMusgrave/pytorch-metric-learning"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.