{"adoption": {"forks": 659, "observed_at": "2026-08-28T04:09:41.836457+00:00", "stars": 6339}, "canonical_url": "https://ross.abutalabs.com/products/pytorch-metric-learning", "card": {"archived": false, "artifact_type": "library", "description": "The easiest way to use deep metric learning in your application. Modular, flexible, and extensible. Written in PyTorch.", "domain": ["machine-learning", "deep-learning", "computer-vision", "image-processing"], "enriched": true, "function": ["machine-learning", "deep-learning", "computer-vision"], "health_score": 56, "homepage": "https://kevinmusgrave.github.io/pytorch-metric-learning/", "language": "Python", "license": "MIT", "license_family": "permissive", "maturity": "active", "member_repos": ["KevinMusgrave/pytorch-metric-learning"], "name": "KevinMusgrave/pytorch-metric-learning", "platform": ["python", "cross-platform"], "pushed_at": "2025-08-17T17:08:48+00:00", "repo": "KevinMusgrave/pytorch-metric-learning", "stars": 6339, "tags": ["metric-learning", "pytorch", "contrastive-learning", "embeddings", "triplet-loss", "image-retrieval", "self-supervised-learning", "loss-functions", "hard-negative-mining", "gpu"], "topics": ["metric-learning", "deep-learning", "computer-vision", "machine-learning", "pytorch", "deep-metric-learning", "image-retrieval", "self-supervised-learning", "contrastive-learning", "embeddings"], "urls": [], "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"], "what_it_is": "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.", "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"], "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"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/pytorch-metric-learning", "repo": "KevinMusgrave/pytorch-metric-learning", "role": "main", "score": 48}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:09:41.836457+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-29T17:46:08.871310+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "f43c5ab5b797235014b0a224a8aef1a70cafcb4d21206b7b99a3a7ef29a0529e", "fetched_at": "2026-08-28T04:09:41.836457+00:00", "kind": "readme", "missing": false, "url": "https://github.com/KevinMusgrave/pytorch-metric-learning"}, {"content_hash": "e7b84ca1a10105948780074ced88f22aeee52e359189c1ad177e115b11d3ea5a", "fetched_at": "2026-08-29T08:42:29.090212+00:00", "kind": "homepage", "missing": false, "url": "https://kevinmusgrave.github.io/pytorch-metric-learning/"}, {"content_hash": "03dd24c6b0e49c95a0b62003fa83b57ce8194d8132ce4d7681f1add648dda3c2", "fetched_at": "2026-08-29T08:42:29.099323+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/pytorch-metric-learning/json"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:09:41.836457+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-29T17:46:08.871310+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "f43c5ab5b797235014b0a224a8aef1a70cafcb4d21206b7b99a3a7ef29a0529e", "fetched_at": "2026-08-28T04:09:41.836457+00:00", "kind": "readme", "missing": false, "url": "https://github.com/KevinMusgrave/pytorch-metric-learning"}, {"content_hash": "e7b84ca1a10105948780074ced88f22aeee52e359189c1ad177e115b11d3ea5a", "fetched_at": "2026-08-29T08:42:29.090212+00:00", "kind": "homepage", "missing": false, "url": "https://kevinmusgrave.github.io/pytorch-metric-learning/"}, {"content_hash": "03dd24c6b0e49c95a0b62003fa83b57ce8194d8132ce4d7681f1add648dda3c2", "fetched_at": "2026-08-29T08:42:29.099323+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/pytorch-metric-learning/json"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-29T17:46:08.871310+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "f43c5ab5b797235014b0a224a8aef1a70cafcb4d21206b7b99a3a7ef29a0529e", "fetched_at": "2026-08-28T04:09:41.836457+00:00", "kind": "readme", "missing": false, "url": "https://github.com/KevinMusgrave/pytorch-metric-learning"}, {"content_hash": "e7b84ca1a10105948780074ced88f22aeee52e359189c1ad177e115b11d3ea5a", "fetched_at": "2026-08-29T08:42:29.090212+00:00", "kind": "homepage", "missing": false, "url": "https://kevinmusgrave.github.io/pytorch-metric-learning/"}, {"content_hash": "03dd24c6b0e49c95a0b62003fa83b57ce8194d8132ce4d7681f1add648dda3c2", "fetched_at": "2026-08-29T08:42:29.099323+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/pytorch-metric-learning/json"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:09:41.836457+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:09:41.836457+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:09:41.836457+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-29T17:46:08.871310+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "f43c5ab5b797235014b0a224a8aef1a70cafcb4d21206b7b99a3a7ef29a0529e", "fetched_at": "2026-08-28T04:09:41.836457+00:00", "kind": "readme", "missing": false, "url": "https://github.com/KevinMusgrave/pytorch-metric-learning"}, {"content_hash": "e7b84ca1a10105948780074ced88f22aeee52e359189c1ad177e115b11d3ea5a", "fetched_at": "2026-08-29T08:42:29.090212+00:00", "kind": "homepage", "missing": false, "url": "https://kevinmusgrave.github.io/pytorch-metric-learning/"}, {"content_hash": "03dd24c6b0e49c95a0b62003fa83b57ce8194d8132ce4d7681f1add648dda3c2", "fetched_at": "2026-08-29T08:42:29.099323+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/pytorch-metric-learning/json"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:09:41.836457+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:09:41.836457+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-29T17:46:08.871310+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "f43c5ab5b797235014b0a224a8aef1a70cafcb4d21206b7b99a3a7ef29a0529e", "fetched_at": "2026-08-28T04:09:41.836457+00:00", "kind": "readme", "missing": false, "url": "https://github.com/KevinMusgrave/pytorch-metric-learning"}, {"content_hash": "e7b84ca1a10105948780074ced88f22aeee52e359189c1ad177e115b11d3ea5a", "fetched_at": "2026-08-29T08:42:29.090212+00:00", "kind": "homepage", "missing": false, "url": "https://kevinmusgrave.github.io/pytorch-metric-learning/"}, {"content_hash": "03dd24c6b0e49c95a0b62003fa83b57ce8194d8132ce4d7681f1add648dda3c2", "fetched_at": "2026-08-29T08:42:29.099323+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/pytorch-metric-learning/json"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:09:41.836457+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:09:41.836457+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:09:41.836457+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-29T17:46:08.871310+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "f43c5ab5b797235014b0a224a8aef1a70cafcb4d21206b7b99a3a7ef29a0529e", "fetched_at": "2026-08-28T04:09:41.836457+00:00", "kind": "readme", "missing": false, "url": "https://github.com/KevinMusgrave/pytorch-metric-learning"}, {"content_hash": "e7b84ca1a10105948780074ced88f22aeee52e359189c1ad177e115b11d3ea5a", "fetched_at": "2026-08-29T08:42:29.090212+00:00", "kind": "homepage", "missing": false, "url": "https://kevinmusgrave.github.io/pytorch-metric-learning/"}, {"content_hash": "03dd24c6b0e49c95a0b62003fa83b57ce8194d8132ce4d7681f1add648dda3c2", "fetched_at": "2026-08-29T08:42:29.099323+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/pytorch-metric-learning/json"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:09:41.836457+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:09:41.836457+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-29T17:46:08.871310+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "f43c5ab5b797235014b0a224a8aef1a70cafcb4d21206b7b99a3a7ef29a0529e", "fetched_at": "2026-08-28T04:09:41.836457+00:00", "kind": "readme", "missing": false, "url": "https://github.com/KevinMusgrave/pytorch-metric-learning"}, {"content_hash": "e7b84ca1a10105948780074ced88f22aeee52e359189c1ad177e115b11d3ea5a", "fetched_at": "2026-08-29T08:42:29.090212+00:00", "kind": "homepage", "missing": false, "url": "https://kevinmusgrave.github.io/pytorch-metric-learning/"}, {"content_hash": "03dd24c6b0e49c95a0b62003fa83b57ce8194d8132ce4d7681f1add648dda3c2", "fetched_at": "2026-08-29T08:42:29.099323+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/pytorch-metric-learning/json"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-29T17:46:08.871310+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "f43c5ab5b797235014b0a224a8aef1a70cafcb4d21206b7b99a3a7ef29a0529e", "fetched_at": "2026-08-28T04:09:41.836457+00:00", "kind": "readme", "missing": false, "url": "https://github.com/KevinMusgrave/pytorch-metric-learning"}, {"content_hash": "e7b84ca1a10105948780074ced88f22aeee52e359189c1ad177e115b11d3ea5a", "fetched_at": "2026-08-29T08:42:29.090212+00:00", "kind": "homepage", "missing": false, "url": "https://kevinmusgrave.github.io/pytorch-metric-learning/"}, {"content_hash": "03dd24c6b0e49c95a0b62003fa83b57ce8194d8132ce4d7681f1add648dda3c2", "fetched_at": "2026-08-29T08:42:29.099323+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/pytorch-metric-learning/json"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-29T17:46:08.871310+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "f43c5ab5b797235014b0a224a8aef1a70cafcb4d21206b7b99a3a7ef29a0529e", "fetched_at": "2026-08-28T04:09:41.836457+00:00", "kind": "readme", "missing": false, "url": "https://github.com/KevinMusgrave/pytorch-metric-learning"}, {"content_hash": "e7b84ca1a10105948780074ced88f22aeee52e359189c1ad177e115b11d3ea5a", "fetched_at": "2026-08-29T08:42:29.090212+00:00", "kind": "homepage", "missing": false, "url": "https://kevinmusgrave.github.io/pytorch-metric-learning/"}, {"content_hash": "03dd24c6b0e49c95a0b62003fa83b57ce8194d8132ce4d7681f1add648dda3c2", "fetched_at": "2026-08-29T08:42:29.099323+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/pytorch-metric-learning/json"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-29T17:46:08.871310+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "f43c5ab5b797235014b0a224a8aef1a70cafcb4d21206b7b99a3a7ef29a0529e", "fetched_at": "2026-08-28T04:09:41.836457+00:00", "kind": "readme", "missing": false, "url": "https://github.com/KevinMusgrave/pytorch-metric-learning"}, {"content_hash": "e7b84ca1a10105948780074ced88f22aeee52e359189c1ad177e115b11d3ea5a", "fetched_at": "2026-08-29T08:42:29.090212+00:00", "kind": "homepage", "missing": false, "url": "https://kevinmusgrave.github.io/pytorch-metric-learning/"}, {"content_hash": "03dd24c6b0e49c95a0b62003fa83b57ce8194d8132ce4d7681f1add648dda3c2", "fetched_at": "2026-08-29T08:42:29.099323+00:00", "kind": "registry_pypi", "missing": false, "url": "https://pypi.org/pypi/pytorch-metric-learning/json"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 37, "longevity": 100, "rhythm": 31}, "computed_at": "2026-09-02T17:46:02.011165+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 2506, "days_push": 381, "days_rel": 381, "gap_med": 38, "n_releases_24m": 4}, "score": 48, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}