yg33717 / DSH_tensorflow

implemement of DEEP SUPERVISED HASHING FOR FAST IMAGE RETRIEVAL_CVPR2016
105 stars 37 forks source link

Some questions about the input data #1

Open wangtingwei1993 opened 7 years ago

wangtingwei1993 commented 7 years ago

The original paper said the input image is paried, I did not fiind how to generate image pairs in your code, can you give me some help?

yg33717 commented 7 years ago

@wangtingwei1993 In original paper, section 3.3 paragraph 3, Training methodology, the author said "To make better use of computational resources and storage space, we propose to generate image pairs online by exploiting all the unique pairs in each mini-batch." I implement it with the function "hashing_loss(image,label,alpha,m)" ,in each mini-batch(n images), there are n(n-1) image pairs, and the variable "w_label"(a matrix nn) indicate the similarity of the n(n-1) image pairs, function "hashing_loss " will calculate total loss of n(n-1) image pairs, then divide n(n-1) get the mean loss. This is online training, do not need generate image pairs. Hope this would help you.