# omoindrot/tensorflow-triplet-loss

Implementation of triplet loss in TensorFlow

Repository: https://github.com/omoindrot/tensorflow-triplet-loss
Canonical: https://ross.abutalabs.com/products/tensorflow-triplet-loss
Homepage: https://omoindrot.github.io/triplet-loss
Language: Python
License: MIT
License Family: permissive
Topics: tensorflow, triplet-loss, online-triplet-mining, embeddings
Last push: 2019-05-09T18:20:20+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3095, "days_push": 2673, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1126, forks 280 (observed 2026-08-28T04:03:41.320372+00:00)

## What it is
A TensorFlow implementation of triplet loss with online triplet mining strategies (batch all and batch hard), for training embedding models like those used in face recognition. It includes MNIST training experiments, embedding visualization, and tests.

## Use cases
- train embeddings with triplet loss in tensorflow
- implement online triplet mining
- learn metric learning with batch hard triplet loss
- visualize mnist embeddings with tsne
- reproduce facenet-style embedding training

## When to choose
- you need a reference implementation of triplet loss with online mining in TensorFlow 1.x
- you are learning how batch all and batch hard triplet mining work
- you want a well-explained, tested metric learning example

## When to avoid
- you use TensorFlow 2.x or PyTorch, since this targets old TensorFlow 1.x and is unmaintained
- you need production-ready, actively maintained metric learning libraries
- you need offline triplet mining or other loss functions

## Facets
- artifact type: library
- maturity: abandoned
- function: machine-learning, deep-learning
- domain: machine-learning, deep-learning
- platform: python
- tags: triplet-loss, tensorflow, online-triplet-mining, embeddings, metric-learning, face-recognition

## Member repositories
- omoindrot/tensorflow-triplet-loss (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:41.320372+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:39:12.832743+00:00, confidence not recorded.
  - readme: https://github.com/omoindrot/tensorflow-triplet-loss (fetched 2026-08-28T04:03:41.320372+00:00, sha 5d7bb87b1a89)
  - homepage: https://omoindrot.github.io/triplet-loss (fetched 2026-08-29T12:43:45.796376+00:00, sha b0331bc58c5e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
