KevinMusgrave/pytorch-metric-learning
The easiest way to use deep metric learning in your application. Modular, flexible, and extensible. Written in PyTorch. observed · 2026-10-19
Health v2 · maintenance only
43/100
- Activity 29
- Release rhythm 28
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 38
- age_days: 2554
- days_rel: 429
- days_push: 429
- n_releases_24m: 4
Adoption not part of the score
6342 stars · 660 forks observed · 2026-10-19
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A PyTorch library providing modular losses, miners, samplers, and testers for deep metric learning. It supports building complete train/test workflows for learning embeddings, with composable components usable independently.
Use cases
- train a model to learn image embeddings with triplet loss
- implement contrastive learning in PyTorch
- mine hard negative pairs for metric learning
- build an image retrieval system with deep embeddings
- train face recognition embeddings with ArcFace loss
- run self-supervised metric learning experiments
- evaluate embedding quality with retrieval metrics
When to choose
- you need metric learning losses and miners in a PyTorch codebase
- you want a complete, modular train/test workflow for embedding learning
- you need well-tested implementations of losses like ArcFace, TripletMarginLoss, or MultiSimilarityLoss
When to avoid
- you use TensorFlow, JAX, or another framework instead of PyTorch
- you only need off-the-shelf pretrained embeddings without training
- your task is standard classification rather than embedding learning
Facets
library · maturity active
machine-learning deep-learning computer-vision machine-learning deep-learning computer-vision image-processing python cross-platform metric-learning pytorch contrastive-learning embeddings triplet-loss image-retrieval self-supervised-learning loss-functions hard-negative-mining gpu
3 sources
- readme: https://github.com/KevinMusgrave/pytorch-metric-learning · fetched 2026-10-19 · f43c5ab5b797
- homepage: https://kevinmusgrave.github.io/pytorch-metric-learning/ · fetched 2026-08-29 · e7b84ca1a101
- registry_pypi: https://pypi.org/pypi/pytorch-metric-learning/json · fetched 2026-08-29 · 03dd24c6b0e4
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| KevinMusgrave/pytorch-metric-learning | main | 43 |
For agents
markdown · JSON · MCP: product_card(name="KevinMusgrave/pytorch-metric-learning")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem