OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Deep Metric Learning Baselines

Deep Metric Learning Baselines is an Apache-2.0 Python/PyTorch codebase for training, implementing and evaluating deep metric-learning methods. It includes dataset loaders, evaluation utilities, ResNet50 and GoogLeNet implementations, and configurable loss and sampling methods.

Independent OpenViST project profile, based on linked sources.

Deep Metric Learning Baselines — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you need a configurable research pipeline for training and evaluating deep metric-learning models on the datasets and methods listed in the repository.

Who it is for

  • Researchers comparing deep metric-learning training strategies.
  • Developers extending a PyTorch image-embedding training pipeline.

Documented uses

  • Train a metric-learning model with a selected dataset, loss, sampling method and architecture.
  • Compare loss and sampling choices across supported image datasets.
  • Evaluate models using recall-at-k values and configurable embedding dimensions.
  • Adapt the codebase to implement additional metric-learning methods.
Before you choose

Requirements & limits

The public GitHub repository is licensed under Apache-2.0.

  • The documented stack is Python 3 and PyTorch 1.0.0/1; the README gives a Python 3.6 Conda setup and describes testing around CUDA 8 and CUDA 9.
  • Faiss is used for k-means and nearest-neighbour computation; the README describes a scikit-learn alternative through auxiliaries_nofaiss.py.
  • The documented architecture choices are ResNet50 and GoogLeNet, with default embedding dimensions of 128 and 512 respectively.
  • PKU Vehicle-ID requires special licensing, according to the README.
  • The README identifies a later extended repository with additional criteria, miners, metrics and logging options.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up the Python environment

Create and activate the documented Python environment and install the repository's required libraries.

Before you start

  • Python 3.6 environment, using Conda as shown in the README
  • Repository files, including requirements.txt and installer.sh

Steps

  1. Create an environment with conda create -n python=3.6.

  2. Activate it with conda activate .

  3. Install the required libraries by running the command below.

    Documented command
    bash installer.sh

Expected outcome

A configured environment with the libraries installed through the repository's installer script.

Guide limitations

  • The README describes a pipeline built around Python 3 and PyTorch 1.0.0/1, and notes testing around CUDA 8 and CUDA 9.
  • The README also says requirements.txt can be checked directly; it does not provide a separate execution or deployment procedure here.
Source-based practical guide

Configure a documented training run

Choose a supported dataset, loss, sampling method, architecture and recall-at-k values for the main training script.

Before you start

  • A prepared Python environment with the required libraries
  • A dataset arranged in the structure described for that dataset in the README

Steps

  1. Choose a dataset from cub200, cars196, online_products, in-shop or vehicle_id.

  2. Choose a listed loss, sampling method and architecture: marginloss, triplet, npair or proxynca; distance, semihard, random or npair; and resnet50 or googlenet.

  3. Set recall-at-k values and an embedding dimension as needed.

  4. Use the documented Standard_Training.py arguments to specify those choices; consult the script's input arguments for other training settings.

Expected outcome

A configured command for a training run using the selected documented options.

Guide limitations

  • The README's example default is ResNet50 on CUB200-2011 with Margin Loss and distance sampling.
  • PKU Vehicle-ID is mentioned as optional in the repository's dataset overview, and requires special licensing; it is not included in the listed dataset flag values in the usage section.
  • This recipe covers configuration, not a verified run or guaranteed result.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
Confusezius/Deep-Metric-Learning-Baselines · Official homepage title · retained in its source language

Related options

Revisiting_Deep_Metric_Learning_PyTorch — The README identifies this as a newly released codebase based on an extended version of this repository, with more criteria, miners, metrics and logging options.