Code Monkey home page Code Monkey logo

pytorch_deep_metric_learning's Introduction

Deep Metric Learning

modefied from github.com/bnuwangxun/Deep_Metric

Learn a deep metric which can be used image retrieval , clustering.

============================

Pytorch Code for deep metric methods:

Dataset

  • Car-196

    first 98 classes as train set and last 98 classes as test set

  • CUB-200-2011

    first 98 classes as train set and last 98 classes as test set

  • Stanford-Online

    for the experiments, we split 59,551 images of 11,318 classes for training and 60,502 images of 11,316 classes for testing

    After downloading all the three data file, you should precess them as above, and put the directionary named DataSet in the project. We provide a script to precess CUB( Deep_Metric/DataSet/split_dataset.py ). The other two are similar, you can modify the script by yourself.

Pretrained models in Pytorch

Inceptionn BN network as other metric learning papers do, to save your time, we already download them down and put on my Baidu YunPan.

We also put inception v3 in the Baidu YunPan, the performance of inception v-3 is a little worse(about 1.5% on recall@1 ) than inception BN on CUB/Car datasets.

The download site(https://pan.baidu.com/s/1snmKa1v)

Prerequisites

  • Computer with Linux or OSX
  • PyTorch

NOTE!!!

 To exactly reproduce the result in my paper, please make sure to use the same version of pytorch with me: !!! 0.2.0_3 there are some problem for other version to load the pretrained model of inception-BN.

  • For training, an NVIDIA GPU is strongly recommended for speed. CPU is supported but training may be slow.

Reproducing Car-196 (or CUB-200-2011) experiments

With our loss based on fussy clustering:

sh run_train.sh

To reproduce other experiments, you can edit the run_train.sh file by yourself.

pytorch_deep_metric_learning's People

Contributors

zhengxiawu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.