GithubHelp home page GithubHelp logo

lxw4939 / dhn-caffe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhuhan1236/dhn-caffe

0.0 1.0 0.0 9.1 MB

[DEPRECATED] Please move to https://github.com/thuml/hash-caffe

License: Other

CMake 3.13% Makefile 0.72% C++ 80.10% MATLAB 0.71% Python 8.75% Shell 0.30% Cuda 4.91% Protocol Buffer 1.37%

dhn-caffe's Introduction

DEPRECATED

This repository is deprecated, please move to hash-caffe

dhn-caffe

This is the implementation of AAAI paper "Deep Hashing Network for Efficient Similarity Retrieval". We fork the repository from Caffe and make our modifications. The main modifications are listed as follow:

  • Change the label from a single integer to an array, whose length is the dimension of label.
  • Add pairwise loss layer described in the paper

Training Model

In models/nus_wide, we give an example model based on Alexnet and NUS-WIDE dataset.

The bvlc_reference_caffenet is used as the pre-trained model.

Data Preparation

In data/nus_wide/train.txt, we give an example to show how to prepare the train data file. In this file, each image in NUS-WIDE has its label whose dimension is 21. The training set is extracted from the whole dataset as described in our paper.

Parameter Tuning

In ImageDataLayer, parameter label_dim should be set to tell the dimension of label. For example, label_dim: 21 for NUS-WIDE.

base_lr, stepsize and gamma in solver.prototxt can be tuned to achieve better performance. num_output of hash_layer in train_val.prototxt can be tuned to train with different hash bits. q_gamma in pairwise_loss layer can be tuned to set different loss weight for quantization loss.

Testing

After training from bvlc_reference_caffenet, a finetuned caffemodel can be used to generate hash codes for images in database and test samples. The python program in models/predict can help gengerating hash codes by given a file like train.txt.

dhn-caffe's People

Contributors

zhuhan1236 avatar

Watchers

James Cloos 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.