Code Monkey home page Code Monkey logo

pytorch-hdml's Introduction

Hardness-Aware Deep Metric Learning

This is an unofficial implementation of "Hardness-Aware Deep Metric Learning" (CVPR 2019 Oral) in Pytorch.

Installation

cd pytorch-hdml
pip install pipenv
pipenv install

Download dataset

cd data
python cars196_downloader.py
python cars196_converter.py

Train CARS196 dataset

Execute a training script. When executed, the tensorboard log is saved.

pipenv shell
python train_triplet.py

Result triplet HDML

CARS196 result on training(99 classes, 30000 iterations)

Loss

loss

t-SNE

tsne

CARS196 result on testing(97 classes)

t-SNE

tsne

Todo

  • Implementation of Npair loss HDML

Reference

Official tensorflow implementation https://github.com/wzzheng/HDML

pytorch-hdml's People

Contributors

neka-nat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pytorch-hdml's Issues

Reconstruction Loss

Reconstruction loss is calculated between the embeddings (embedding_yp - embedding_y_orig).pow(2).sum()) which are the output of FC layers. Should the embeddings not be normalized before calculating the loss? I am getting very high reconstruction loss and nans.

results

Thank you for your work!What's the result you can reproduce? Can you achieve the results in the paper?

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.