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},
}

:warning: 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

:warning: 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 :
    • NUSWIDE-2 32 bits :
    • 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', '[email protected]'}, 'epoch', 125)
      • Diary. Achieves 0.68-0.69 [email protected] at 125 epochs.

License

MIT License, see LICENSE

Contact

For questions and comments, feel free to contact: fcakirs@gmail.com

Notes

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

Deep Mihash

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

Deep Mihash Info

⭐ Stars15
🔗 Source Codegithub.com
🕒 Last Updatea year ago
🕒 Created5 years ago
🐞 Open Issues0
➗ Star-Issue RatioInfinity
😎 Authorfcakir