Giter Club home page Giter Club logo

proxy-nca's Introduction

About

This repository contains a PyTorch implementation of No Fuss Distance Metric Learning using Proxies as introduced by Google Research.

The same parameters were used as described in the paper, except for the optimizer. In particular, the size of the embedding and batches equals 64 and 32 respectively. Also, BN-Inception is used and trained with random resized crop and horizontal flip and evaluated with resized center crop.

I have ported the PyTorch BN-Inception model from PyTorch 0.2 to 0.4. It's weights are stored inside the repository in the directory net.

Reproducing Results with CUB 200

You need Python3 and minimum PyTorch 0.4.1 to run the code.

If you want to reproduce the results in the table below, then the only thing you have to do is to execute: python3 train.py.

In this case, the CUB dataset will be automatically downloaded to the directory cub200 (default) and verified with the corresponding md5 hash. If you train the model for the first time, then the images file will be extracted automatically in the same folder. After that you can use the argument --cub-is-extracted to avoid extracting the dataset over and over again.

Training takes about 10 minutes with one Titan X (Pascal).

Metric This Implementation Google's Implementation
R@1 49.26 49.21
R@2 60.99 61.90
R@4 71.31 67.90
R@8 80.78 72.40
NMI 58.12 59.53

An example training log file can be found in the log dir, see example.log.

proxy-nca's People

Contributors

dichotomies avatar

Watchers

Thalita 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.