Giter Site home page Giter Site logo

fcakir / deep-mihash Goto Github PK

View Code? Open in Web Editor NEW
19.0 4.0 6.0 568 KB

Code for papers "Hashing with Mutual Information" (TPAMI 2019) and "Hashing with Binary Matrix Pursuit" (ECCV 2018)

License: Other

MATLAB 100.00%
hashing deep-hashing image-retrieval nearest-neighbor-search embeddings retrieval querying computer-vision mutual-information binary-matrices eccv tpami

deep-mihash's Introduction

Hashing with Mutual Information

This repository contains the MATLAB implementation of the following paper:

Hashing with Mutual Information,
Fatih Cakir*, Kun He*, Sarah Adel Bargal, and Stan Sclaroff. TPAMI 2019 (PDF, arXiv)

If you use this code in your research, please cite:

@inproceedings{Cakir_deep_mihash,
  author    = {Fatih Cakir and Kun He and Sarah Adel Bargal and Stan Sclaroff},
  title     = {Hashing with Mutual Information},
  booktitle = {IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year      = {2019},
}

⚠️ The hbmp branch contains the implementation of the following paper:

Hashing with Binary Matrix Pursuit,
Fatih Cakir, Kun He, and Stan Sclaroff. ECCV 2018 (conference page, arXiv)

If you use this code in your research, please cite:

@InProceedings{Cakir_2018_ECCV,
author = {Cakir, Fatih and He, Kun and Sclaroff, Stan},
title = {Hashing with Binary Matrix Pursuit},
booktitle = {The European Conference on Computer Vision (ECCV)},
year = {2018}
}

Setup

  • Install or symlink MatConvNet at ./matconvnet (for training CNNs)
  • Install or symlink VLFeat at ./vlfeat
  • Download necessary datasets to ./cachedir/data/ Note: Large file ~35GB
  • Download necessary model files to ./cachedir/models/
  • Create ./cachedir/results/ folder to hold experimental data
  • In the root folder, run startup.m

⚠️ Follow the setup instructions for HBMP in the hbmp branch.

Example Commands

  • The main functions for experimenting are demo_imagenet.m (for the ImageNet100 benchmark) and demo_AP.m (for other benchmarks such as CIFAR-10 and NUSWIDE).
  • The main arguments can be found in get_opts.m.
  • Below are examples commands to replicate some of the results in the paper. Please refer to Section 5 of the paper and get_opts.m for experimental setting and parameter details. A MATLAB diary will be saved to the corresponding experimental folder.
    • CIFAR-1 32 bits:
      • demo_AP('cifar',32,'vggf','split',1,'nbins',32,'sigmf', [1 0],'lr', 1e-3,'lrstep',50,'epoch',100,'obj','mi','testInterval',10, 'batchSize', 256, 'metrics', 'AP')
      • Diary. Achieves 0.78-0.79 mAP at 100 epochs.
    • CIFAR-2 32 bits:
      • demo_AP('cifar',32,'vggf','split',2,'nbins',12,'sigmf', [30 0],'lr', 2e-3,'lrstep',50,'epoch',100,'obj','mi','testInterval',10, 'batchSize', 256, 'metrics', 'AP')
      • Diary. Achieves 0.93-0.94 mAP at 100 epochs.
    • NUSWIDE-1 32 bits :
      • demo_AP('nus',32,'vggf_ft','split',1, 'nbins',16,'sigmf', [1 0],'lr', 0.05,'lrstep',50, 'epoch',120,'obj','mi','testInterval',10, 'batchSize', 250, 'metrics', {'AP','AP@5000', 'AP@50000'})
      • Diary. Achieves 0.82-0.83 mAP@5K at 120 epochs.
    • NUSWIDE-2 32 bits :
      • demo_AP('nus',32,'vggf_ft','split',2, 'nbins',16,'sigmf', [1 0],'lr', 0.01,'lrstep',50, 'epoch',100,'obj','mi','testInterval',5, 'batchSize', 250, 'metrics', {'AP','AP@5000', 'AP@50000'})
      • Diary. Achieves 0.81-0.82 mAP@50K at 100 epochs.
    • ImageNet100 48 bits:
      • demo_imagenet(48, 'alexnet_ft', 'split', 1 , 'nbins', 16, 'lr', 0.1, 'lrdecay', 0.05, 'lrmult', 0.01, 'lrstep', 100, 'nbins', 16, 'sigmf', [10 0], 'testInterval', 25, 'metrics', {'AP', 'AP@1000'}, 'epoch', 125)
      • Diary. Achieves 0.68-0.69 mAP@1K at 125 epochs.

License

MIT License, see LICENSE

Contact

For questions and comments, feel free to contact: [email protected]

Notes

  • This implementation extends MIHash, and is specifically designed for deep learning experiments. Special thanks to Kun and Sarah.

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.