Giter VIP home page Giter VIP logo

dcmh-cvpr2017's Introduction


Source code for Deep Cross-Modal Hashing


Introduction

  • This package contains the source code for the following paper:

    • Qing-Yuan Jiang and Wu-Jun Li. Deep Cross-Modal Hashing. CVPR-2017.
  • Author: Qing-Yuan Jiang and Wu-Jun Li

  • Contact: qyjiang24#gmail.com or liwujun#nju.edu.cn

  • We recommend you use matlab version to run DCMH algorithm.

  • If you require IAPR TC12 dataset and NUS-WIDE dataset, please contact me (qyjiang24#gmail.com).

dcmh-cvpr2017's People

Contributors

jiangqy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dcmh-cvpr2017's Issues

the loss is NAN from 105 epoch

Hi,
Thanks for your code.
I have a question that the loss is NAN from 105 epoch in the data set FLICKR-25K.
Can you have any idea about the problem?
I use the tensorflow code.

Many thanks!

ref:
...epoch: 102, loss: 27617250.477, comment: update B
...epoch: 103, loss: 27464020.237, comment: update B
...epoch: 104, loss: 27408385.730, comment: update B
...epoch: 105, loss: nan, comment: update B
...epoch: 106, loss: nan, comment: update B
...epoch: 107, loss: nan, comment: update B
...epoch: 108, loss: nan, comment: update B

The choose of the index

Hello, I notice that you annotated some code in the function '' train_img_net ", I wonder if the results of the two strategies for index construction are the same? I hope you can help me understand it. Thank you.

# index = range(0, num_train - 1, 1)
for iter in xrange(num_train / batch_size):
	index = np.random.permutation(num_train)
	ind = index[0: batch_size]
	# ind = index[iter * batch_size: (iter + 1) * batch_size]
	unupdated_ind = np.setdiff1d(range(num_train), ind)

magic of data sampling

I found that the model fails to re-produce the results when using the commented-out sampling strategy in Ln 37 and Ln 41 in DCMH_demo.py, i.e., sampling WITHOUT replacement, even if I shuffle the index before each training epochs. And it works well with Ln 39 ~ 40, i.e., sampling WITH replacement.
But why ?

details of partition of NUS-WIDE

hello, I'm asking a details of the partition of the NUS-WIDE data set.
before that, did you follow the settings like randomly select XXX samples in each classes for query set? if yes, then my question is:
how do you randomly select 100 samples in each classes for the query set (and so does the training set)?
I mean, as it's a multi-label data set, a same very sample might be selected several times during the sampling of each classes.
thanks

Tensorflow code does not give the proper results

Hi

I am trying to run the code for bit = 64 you provided in the tensor flow environment. The loss is decreasing but the accuracy (MAP) is remaining the same. As you can observe below the loss has decreased quite significantly but the accuracy is renaming the same.

Can you please tell me if I am going wrong somewhere ?

...loading and splitting data finish
...epoch:   0, loss: 177061069.097
...training procedure starts
...epoch:   1, loss: 175336058.349, comment: update B
...training procedure finish
...test map: map(i->t): 0.543, map(t->i): 0.543
...epoch:   2, loss: 173065982.115, comment: update B
...training procedure finish
...test map: map(i->t): 0.543, map(t->i): 0.543
...epoch:   3, loss: 170820578.049, comment: update B
...training procedure finish
...test map: map(i->t): 0.543, map(t->i): 0.543
...epoch:   4, loss: 168648051.304, comment: update B
...training procedure finish
...test map: map(i->t): 0.543, map(t->i): 0.543
...
...epoch: 496, loss: 70586304.761, comment: update B
...training procedure finish
...test map: map(i->t): 0.543, map(t->i): 0.543
...epoch: 497, loss: 70586286.625, comment: update B
...training procedure finish
...test map: map(i->t): 0.543, map(t->i): 0.543
...epoch: 498, loss: 70586388.189, comment: update B
...training procedure finish
...test map: map(i->t): 0.543, map(t->i): 0.543
...epoch: 499, loss: 70586918.393, comment: update B
...training procedure finish
...test map: map(i->t): 0.543, map(t->i): 0.543
...epoch: 500, loss: 70586985.325, comment: update B
...training procedure finish
...test map: map(i->t): 0.543, map(t->i): 0.543

In addition I had to make the following changes to run your code in Tensor-flow :
[1] changed xrange to range as I am using python 3
[2] put print statements inside quotes
[3] changed statements such as this
for iter in xrange(num_train / batch_size):
to
for iter in range(np.int(np.floor(num_train / batch_size))):
to make the data type int
[4] defined the variable
L['retrieval'] = labels[QUERY_SIZE:DATABASE_SIZE + QUERY_SIZE,:]

loadding data wrong

when i use vscode run the code of tensorflow,The following problems arise。But if i use pycharm or run it in DOS, it don't arise. so i can't find the reason of this BUG.Have you ever encountered this problem
problem:
Traceback (most recent call last):
File "main1.py", line 150, in
images, tags, labels = loading_data(DATA_DIR)
File "/content/drive/APP/load_data.py", line 7, in loading_data
image = file['images'][:].transpose(0,3,2,1)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "/usr/local/lib/python3.6/dist-packages/h5py/_hl/group.py", line 177, in getitem
oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5o.pyx", line 190, in h5py.h5o.open
KeyError: "Unable to open object (object 'images' doesn't exist)"

the learning rate of SGD in the NUS-WIDE dateset

Hello, thanks for the code.
I have a question about the learning rate of SGD in the NUS-WIDE dataset. I am trying to use your code in the NUS-WIDE dataset, but I found that the result is so bad when using the same SGD optimizer and learning rate as the MIRFLICKR-25K dataset.

image conversion

Hi! I want to know how the original image from flickr25k convert to 3224224 matrix, because I have want to convert matrix to image.

the learning rate of SGD in the NUS-WIDE dateset

Hello,thanks for the code.
I have a question about the learning rate of SGD in the NUS-WIDE dataset. I am trying to use your code in the NUS-WIDE dataset, but I found that the result is so bad when using the same SGD optimizer and learning rate as the MIRFLICKR-25K dataset.

求数据集合并方法或下载地址

你提供了MIRFLICKR25K、NUS-WIDE的下载地址,并说明了将多个文件合并为一个文件,
请问问合并文件的方法可以提供吗?或者直接提供合并后的文件链接也可以,万分感谢。

另:IAPR TC-12 这个数据集可以提供下载地址嘛?

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.