Coder Social home page Coder Social logo

kamwoh / dpn Goto Github PK

View Code? Open in Web Editor NEW
10.0 4.0 1.0 20 KB

[IJCAI 2020] This is an official code implementation for Deep Polarized Network for Supervised Learning of Accurate Binary Hashing Codes.

Dockerfile 1.38% Python 98.62%
deep-hashing dpn hashing image-retrieval pytorch supervised-hashing ijcai

dpn's Introduction

Deep Polarized Network (IJCAI 2020)

Official pytorch implementation of the paper:

  • Deep Polarized Network for Supervised Learning of Accurate Binary Hashing Codes (IJCAI 2020)

Released on July 7, 2021

Other Implementations

https://github.com/swuxyj/DeepHash-pytorch/blob/master/DPN.py

How to run

Training

python main.py

Run python main.py --help to check what hyperparameters to run with. All the hyperparameters are the default parameters to get the performance in the paper.

Testing

python val.py -l /path/to/logdir -m 0  # normal
python val.py -l /path/to/logdir -m 1  # ternary

Dataset

You may refer to this repo (https://github.com/swuxyj/DeepHash-pytorch) to download the datasets. I was using the same dataset format as HashNet.

Dataset sample: https://raw.githubusercontent.com/swuxyj/DeepHash-pytorch/master/data/imagenet/test.txt

Performance Tuning (Some Tricks)

I have found some tricks to further improve the mAP score.

Database Shuffling

If you shuffle the order of database before calculate_mAP, you might get 1~2% improvement in mAP.

It is because many items with same hamming distance will not be sorted properly, hence it will affect the mAP calculation.

Regularization on hash layer output

Run with --reg 0.001 might help to improve mAP a little bit.

Centroids Method

Run with --centroid-method O might help to improve mAP by 1~2%.

Notes

The original code base is the private asset of Webank. This repo is a re-implementation of the paper, therefore the performance you computed from this repo might not be exactly the same as the paper (but should be quite close with only +-1% difference)

Feedback

Suggestions and opinions on this work (both positive and negative) are greatly welcomed. Please contact the authors by sending an email to lixinfan at webank.com or kamwoh at gmail.com or cs.chan at um.edu.my.

License and Copyright

The project is open source under BSD-3 license (see the LICENSE file).

©2020 Webank and University of Malaya.

dpn's People

Contributors

kamwoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

pyjsnnu

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.