Skip to content
Code for CVPR 2018 paper "Hashing as Tie-Aware Learning to Rank"
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
+demo NUSWIDE NDCG Oct 10, 2018
+eval NUSWIDE NDCG Oct 10, 2018
+imdb update NUSWIDE Jun 30, 2018
+models update NUSWIDE Jun 30, 2018
data
main update NUSWIDE Jun 30, 2018
util initial release Jun 14, 2018
LICENSE initial release Jun 14, 2018
README.md
apr_s_backward.m
apr_s_forward.m initial release Jun 14, 2018
ndcgr_s_backward.m
ndcgr_s_forward.m NUSWIDE NDCG Oct 10, 2018
run_cifar_s1.m initial release Jun 14, 2018
run_cifar_s2.m
run_imagenet.m add ImageNet100 Jun 16, 2018
run_nuswide_AP.m update NUSWIDE Jun 30, 2018
run_nuswide_NDCG.m NUSWIDE NDCG Oct 10, 2018
startup.m initial release Jun 14, 2018

README.md

Tie-Aware Hashing

This repository contains Matlab implementation for the following paper:

"Hashing as Tie-Aware Learning to Rank",
Kun He, Fatih Cakir, Sarah Adel Bargal, and Stan Sclaroff. IEEE CVPR, 2018 (arXiv)

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

@inproceedings{He_2018_TALR,
  title={Hashing as Tie-Aware Learning to Rank},
  author={Kun He and Fatih Cakir and Sarah Adel Bargal and Stan Sclaroff},
  booktitle={The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
  month={June}, 
  year={2018}
}

Preparation

  • Create or symlink a directory cachedir under the root directory to hold experimental results
  • Install or symlink MatConvNet at ./matconvnet (for training CNNs)
  • Install or symlink VLFeat at ./vlfeat. Note: this is only necessary for computing the regular tie-agnostic AP metric. We provide efficient implementation for the tie-aware metrics in +eval.
  • For ImageNet-pretrained models: in the data directory, run download_models.sh to download pretrained CNNs (VGG-F and AlexNet).
  • For CIFAR-10: in data, run download_cifar.sh. This will download the precomputed IMDB format used in our experiments.
  • For NUS-WIDE: see data/NUSWIDE/README.md.
  • For ImageNet100: see data/ImageNet/README.md.

Usage

  • In the root folder, run startup.m
  • To (approximately) replicate results in the paper, run one of the run_*.m files. For example, run_cifar_s1(32) will run the Setting 1 experiment on the CIFAR-10 dataset, with 32-bit hash codes, using the default parameters therein.
  • Alternatively, directly run the files in +demo/ with your parameter choices. See main/get_opts.m for the parameters.

License

MIT License, see LICENSE

Contact

For questions/comments, feel free to contact:

hekun@bu.edu

Notes

  • We provide simplified versions of tie-aware AP (apr_s_forward.m and apr_s_backward.m) and tie-aware NDCG (ndcgr_s_forward.m and ndcgr_s_backward.m). They attain similar performance compared to the original versions, but are much simpler to implement. The derivations can be found in the appendix of the arxiv version of the paper (v4).
  • This implementation is partly based on MIHash.
You can’t perform that action at this time.