Giter Site home page Giter Site logo

deephash's Introduction

DeepHash

DeepHash is a lightweight deep learning to hash library that implements state-of-the-art deep hashing/quantization algorithms. We will implement more representative deep hashing models continuously according to our released deep hashing paper list. Specifically, we welcome other researchers to contribute deep hashing models into this toolkit based on our framework. We will announce the contribution in this project.

The implemented models include:

Requirements

  • Python3
  • Other packages: pip install tensorflow-gpu scipy h5py

To import the algorithms implemented in ./DeepHash, we need to add the path of ./DeepHash to environment variables as:

export PYTHONPATH=/path/to/project/DeepHash/DeepHash:$PYTHONPATH

Data Preparation

In data/cifar10/train.txt, we give an example to show how to prepare image training data. In data/cifar10/test.txt and data/cifar10/database.txt, the list of testing and database images could be processed during predicting procedure. If you want to add other datasets as the input, you need to prepare train.txt, test.txt and database.txt as CIFAR-10 dataset.

Get Started

Pre-trained model

You should manually download the model file of the Imagenet pre-tained AlexNet from here or from release page and unzip it to /path/to/project/DeepHash/architecture/pretrained_model.

Make sure the tree of /path/to/project/DeepHash/architecture looks like this:

├── __init__.py
├── pretrained_model
       └── reference_pretrain.npy

Training and Testing

The example of $method (DCH, DVSQ, DQN and DHN) can be run with the following command:

cd example/$method/
python train_val_script.py --gpus "0,1" --"other parameters descirbe in train_val_script.py"

Citations

If you find DeepHash is useful for your research, please consider citing the following papers:

@InProceedings{cite:AAAI16DQN,
  Author = {Yue Cao and Mingsheng Long and Jianmin Wang and Han Zhu and Qingfu Wen},
  Publisher = {AAAI},
  Title = {Deep Quantization Network for Efficient Image Retrieval},
  Year = {2016}
}

@InProceedings{cite:AAAI16DHN,
  Author = {Han Zhu and Mingsheng Long and Jianmin Wang and Yue Cao},
  Publisher = {AAAI},
  Title = {Deep Hashing Network for Efficient Similarity Retrieval},
  Year = {2016}
}

@InProceedings{cite:CVPR17DVSQ,
  Title={Deep visual-semantic quantization for efficient image retrieval},
  Author={Cao, Yue and Long, Mingsheng and Wang, Jianmin and Liu, Shichen},
  Booktitle={CVPR},
  Year={2017}
}

@InProceedings{cite:CVPR18DCH,
  Title={Deep Cauchy Hashing for Hamming Space Retrieval},
  Author={Cao, Yue and Long, Mingsheng and Bin, Liu and Wang, Jianmin},
  Booktitle={CVPR},
  Year={2018}
}

Contacts

Maintainers of this library:

deephash's People

Contributors

bl0 avatar caoyue10 avatar

Watchers

 avatar  avatar

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.