Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Creation of an approximate kNN graph for diffusion application

NotificationsYou must be signed in to change notification settings

IMPLabUniPr/LSH_kNN_graph

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

[paper] [project]

The proposed method allows to create an approximate kNN graph in C++ for the diffusion application.Then the retrieval is tested and the performance are the same or better than the ones obtained on the brute-force graph, but in less time (due to the reduction in the approximate kNN graph creation).

Datasets

The original dataset files are converted in binary through the application of a simple C++ script:

After downloading the dat files you need to create a folder calleddataset and then put in the uncompressed version.Remember to modify the path in the C++ files.

Installation

  • Requirements:
    • G++ 5.4 or greater
    • openmp
    • cblas
  • Build: g++ -o LSH_sparse LSH_sparse.cpp -lstdc++fs -std=c++14 -fopenmp -O2 -lcblas

Test

LSH kNN (δ = 6, L = 20, th = 5000, using global descriptors):./LSH_sparse 6 20 oxford5k false 5000 0 ResNet50

multi LSH kNN graph (δ = 6, L = 20, th = 5000, 80% of multi-probe LSH, using global descriptors):./LSH_sparse 6 20 oxford5k false 5000 80 ResNet50

For the diffusion application the python script implemented in thealzaman/paiss github is used.

Results

Oxford5k

ConfigurationLSH projectionkNN graph creationmAP
LSH kNN graph (δ = 6, L = 20)0.45 s0.52 s90.97%
LSH kNN graph (δ = 8, L = 10)0.4 s0.94 s88.98%
multi LSH kNN graph (δ = 6, L = 2)0.29 s1.54 s91.13%
NN-descent (1)-55 s83.81%
RP-div (2)-1.16 s82.68%
brute-force-1.33 s90.79%

Oxford105k

ConfigurationLSH projectionkNN graph creationmAP
LSH kNN graph (δ = 6, L = 20)23 s77 s92.50%
LSH kNN graph (δ = 8, L = 10)15 s145 s90.79%
multi LSH kNN graph (δ = 6, L = 4)5s420 s92.85%
brute-force-4733 s91.45%

Reference

@article{magliani2019efficient,  title={An Efficient Approximate kNN Graph Method for Diffusion on Image Retrieval},  author={Magliani, Federico and McGuiness, Kevin and Mohedano, Eva and Prati, Andrea},  journal={arXiv preprint arXiv:1904.08668},  year={2019}}@inproceedings{dong2011efficient,  title={Efficient k-nearest neighbor graph construction for generic similarity measures},  author={Dong, Wei and Moses, Charikar and Li, Kai},  booktitle={Proceedings of the 20th International Conference on World Wide Web},  pages={577--586},  year={2011},  organization={ACM}}@inproceedings{sieranoja2018fast,  title={Fast random pair divisive construction of kNN graph using generic distance measures},  author={Sieranoja, Sami and Fr{\"a}nti, Pasi},  booktitle={Proceedings of the 2018 International Conference on Big Data and Computing},  pages={95--98},  year={2018},  organization={ACM}}

About

Creation of an approximate kNN graph for diffusion application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++100.0%

[8]ページ先頭

©2009-2025 Movatter.jp