https://github.com/avanindra/ggnn
GGNN: State of the Art Graph-based GPU Nearest Neighbor Search
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.2%) to scientific vocabulary
Last synced: 6 months ago
·
JSON representation
Repository
GGNN: State of the Art Graph-based GPU Nearest Neighbor Search
Basic Info
- Host: GitHub
- Owner: avanindra
- License: mit
- Default Branch: release_0.5
- Homepage: https://uni-tuebingen.de/fakultaeten/mathematisch-naturwissenschaftliche-fakultaet/fachbereiche/informatik/lehrstuehle/computergrafik/lehrstuhl/veroeffentlichungen/publications-since-2012/ggnn-graph-based-gpu-nearest-neighbor-search/
- Size: 944 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Fork of cgtuebingen/ggnn
Created almost 4 years ago
· Last pushed almost 5 years ago
https://github.com/avanindra/ggnn/blob/release_0.5/
# GGNN: Graph-based GPU Nearest Neighbor Search
*Fabian Groh, Lukas Ruppert, Patrick Wieschollek, Hendrik P.A. Lensch
Approximate nearest neighbor (ANN) search in high dimensions is an integral part of several computer vision systems and gains importance in deep learning with explicit memory representations. Since PQT and FAISS started to leverage the massive parallelism offered by GPUs, GPU-based implementations are a crucial resource for todays state-of-the-art ANN methods. While most of these methods allow for faster queries, less emphasis is devoted to accelerate the construction of the underlying index structures. In this paper, we propose a novel search structure based on nearest neighbor graphs and information propagation on graphs. Our method is designed to take advantage of GPU architectures to accelerate the hierarchical building of the index structure and for performing the query. Empirical evaluation shows that GGNN significantly surpasses the state-of-the-art GPU- and CPU-based systems in terms of build-time, accuracy and search speed.
---
# Update: 03/14/21
This work is currently under review.
We've updated the code. Some new results are shown below.

## How to run the code?
```bash
# Get the repository and dependencies
git clone --recursive https://github.com/cgtuebingen/ggnn.git
cd ggnn
# get the SIFT1M data
cd data
./get_sift1m
cd ..
# Build the demo
mkdir build_local
cd build_local
cmake ..
make
# Example for SIFT1M on GPU 0:
./sift1m_multi --base_filename ../data/sift/sift_base.fvecs
--query_filename ../data/sift/sift_query.fvecs
--groundtruth_filename ../data/sift/sift_groundtruth.ivecs
--gpu_ids="0"
# Example usage with 2 GPUs and 4 shards in total (4x250k = 1M):
./sift1m_multi --base_filename ../data/sift/sift_base.fvecs
--query_filename ../data/sift/sift_query.fvecs
--groundtruth_filename ../data/sift/sift_groundtruth.ivecs
--gpu_ids="0 1"
--factor 10000
--base 100
--shard 25
```
### Native build
Requirements:
* CUDA (>10.2)
* libgflags-dev (`sudo apt install libgflags-dev`)
### Docker build
An alternative to the native build is to use nvidia-docker. Follow instruction on https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#installing-docker-ce
Prepare the docker image by
```bash
cd docker
make
cd ../
```
Make sure you can run
```bash
sudo docker run --gpus all cgtuebingen/ggnn:v1 nvidia-smi
```
Now build the code via
```bash
user@host $ sudo docker run --rm -it --user "$(id -u):$(id -g)" -v ${PWD}:/ggnn:rw --gpus all cgtuebingen/ggnn:v1 bash
user@container $ ./build.sh
cd build_docker
make
```
## More Resources
- [Arxiv Pre-Print](https://arxiv.org/abs/1912.01059)
Owner
- Name: avanindra singh
- Login: avanindra
- Kind: user
- Location: India
- Repositories: 14
- Profile: https://github.com/avanindra