models icon indicating copy to clipboard operation
models copied to clipboard

models/research/delf/: The use of Product Quantization

Open prismformore opened this issue 7 years ago • 6 comments

DELF is used for Image Retrieval but it seems that the code for retrieval is not provided.

In the DELF paper: We encode each descriptor to a 50-bit code using PQ, where each 40D feature descriptor is split into 10 subvectors with equal dimensions, and we identify 25 centroids per subvector by k-means clustering to achieve 50-bit encoding. We perform asymmetric distance calculation, where the query descriptors are not encoded to improve the accuracy of nearest neighbor retrieval. To speed up the nearest neighbor search, we construct an inverted index for descriptors, using a codebook of size 8K. To reduce encoding errors, a KD-tree is used to partition each Voronoi cell, and a Locally Optimized Product Quantizer [20] is employed for each subtree with fewer than 30K features.

This description seems that the authors used PQ +Inverted Index + KD-TREE + LOPQ(on KD-tree), with no specific example and sound complicated. Would that be possible to provide some example codes related to the image retrieval system? Thank you. @andrefaraujo

prismformore avatar Dec 06 '18 16:12 prismformore

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks. What is the top-level directory of the model you are using Have I written custom code OS Platform and Distribution TensorFlow installed from TensorFlow version Bazel version CUDA/cuDNN version GPU model and memory Exact command to reproduce

tensorflowbutler avatar Dec 07 '18 12:12 tensorflowbutler

Hello, Can you check if you can make use of the image retrieval example in: https://modeldepot.io/mikeshi/delf Also in models/research/delf/ the sub-directory delf/python/examples provides an image retrieval example match_images.py using DELF features extracted using extract_features.py Thanks.

msymp avatar Dec 27 '18 23:12 msymp

I am afraid the function I am inquiring is not in the provided link @msymp

prismformore avatar Dec 28 '18 03:12 prismformore

Hi @prismformore

Unfortunately we cannot provide examples at this point. If you have questions on the techniques, please let me know.

andrefaraujo avatar Jan 10 '19 23:01 andrefaraujo

Hi @prismformore you got any insight on the images retrieval system?

mbenami avatar Apr 16 '19 16:04 mbenami

Hi @prismformore you got any insight on the images retrieval system?

No. I just decide to use faiss. This method is too time consuming becuase of the geometric verfication by the way.

prismformore avatar Apr 18 '19 01:04 prismformore