Git Product home page Git Product logo

dml_cross_entropy's Introduction

Requirements for the experiments

Data management

For In-Shop, you need to manually download the data from https://drive.google.com/drive/folders/0B7EVK8r0v71pVDZFQXRsMDZCX1E (at least the img.zip and list_eval_partition.txt), put them in data/InShop and extract img.zip.

You can download and generate the train.txt and test.txt for every dataset using the prepare_data.py script with:

python prepare_data.py

This will download and prepare all the necessary data for CUB200, Cars-196 and Stanford Online Products.

Usage

This repo uses sacred to manage the experiments. To run an experiment (e.g. on CUB200):

python experiment.py with dataset.cub

You can add an observer to save the metrics and files related to the expriment by adding -F result_dir:

python experiment.py -F result_dir with dataset.cub

Reproducing the results of the paper

CUB200

python experiment.py with dataset.cub model.resnet50 epochs=30 lr=0.02

CARS-196

python experiment.py with dataset.cars model.resnet50 epochs=100 lr=0.05 model.norm_layer=batch

Stanford Online Products

python experiment.py with dataset.sop model.resnet50 epochs=100 lr=0.003 momentum=0.99 nesterov=True model.norm_layer=batch

In-Shop

python experiment.py with dataset.inshop model.resnet50 epochs=100 lr=0.003 momentum=0.99 nesterov=True model.norm_layer=batch

Citation

@inproceedings{boudiaf2020unifying,
  title={A unifying mutual information view of metric learning: cross-entropy vs. pairwise losses},
  author={Boudiaf, Malik and Rony, J{\'e}r{\^o}me and Ziko, Imtiaz Masud and Granger, Eric and Pedersoli, Marco and Piantanida, Pablo and {Ben Ayed}, Ismail},
  booktitle={European Conference on Computer Vision},
  pages={548--564},
  year={2020},
  organization={Springer}
}

dml_cross_entropy's People

Contributors

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