metric_learning icon indicating copy to clipboard operation
metric_learning copied to clipboard

Metric Learning App Dev Resource

Metric Learning Application Development Resource

This repository is a work in progress, currently focusing on Deep Mmetric Learning and contains notebooks for:

  • Anomaly detection application example for MVTec Anomaly Detection dataset[1], and related small utilities.
  • Benchmarks of various deep metric learnings by Anomaly Detection problem setting with MNIST/CIFAR-10 datasets.
  • Visualizations such as grad-CAM, failure cases of the benchmarks, and so on.

Possible final goals:

  • Test/benchmark resources summary for metric learning methods as well as various applications.
  • Utilities and/or library for metric learning applications.
  • Links for resources.

1. How to run examples

Examples in this repository depend on some external modules/source codes. Follow steps below to install them first.

Then just running each notebook will show you the results.

1.1 Install dependent modules first

  • Install dl-cliche. dl-cliche is a general purpose utility module, my repo is always depending on it...
pip install dl-cliche
  • Install fast.ai and other dependent modules.
pip install fastai
 :

1.2 Download external source codes

wget https://raw.githubusercontent.com/ronghuaiyang/arcface-pytorch/master/models/metrics.py
wget https://raw.githubusercontent.com/KaiyangZhou/pytorch-center-loss/master/center_loss.py

2. Examples

  • MVTecAD contains anomaly detection application examples for MVTec Anomaly Detection dataset[1].
  • MNIST contains benchmark examples for MNIST dataset.
  • CIFAR-10 contains benchmark examples for CIFAR-10 dataset.

3. Published documents

4. Acknowledgements & references

Many thanks to the people who worked for MVTec AD dataset, it would greatly help future researches. And many thanks to fast.ai library[2] for minimizing time to develop experiments.

  • [1] Paul Bergmann, Michael Fauser, David Sattlegger, Carsten Steger. MVTec AD - A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection; in: IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2019. https://www.mvtec.com/fileadmin/Redaktion/mvtec.com/company/research/mvtec_ad.pdf
  • [2] Jeremy Howard et al. (2018). The fast.ai deep learning library, https://github.com/fastai/fastai.