This repo includes tools used for conducting experiments of image retrieval by using CUDA.
Install Python 2.7.
Install Python modules:
pip install numpypip install bitarraypip install redisOther prerequisites:
Download and compile yael library with the --enable-numpy option. Copy generated yael.py, _yael.so under the same path of these scripts.
This repo uses modified LSHash.
To build fastdict:
mkdir build
cd build
cmake path_to_fastdict/
make
cp fastdict.so path_to_repo/
python fast_binary.py -f sift_base.fvecs
python fast_binary.py -f bigann_base.bvecs -v bvecs -n 100000000 -k 10 -o 0 -s random -i y -e bigann_100000000.npz
python fast_binary_for_indexonly.py -f ../bigann_base.bvecs -v bvecs -n 500000000 -k 10 -o 0 -s random -i y -e bigann_500000000_random_k8_b64 -r 8
Parameters:
R --slave --args <binary code length> <number of binary codes> <bit width of bit counts> <number of sampled dimensions> <weight of worst-case> <weight of best-case> < cal_compress_effect.R
For example:
R --slave --args 64 1000000000 32 32 0.19 0.81 < cal_compress_effect.R
Python
67.7%
C++
28.0%
R
2.3%
C
1.0%
This repo includes tools used for conducting experiments of image retrieval by using CUDA.
Install Python 2.7.
Install Python modules:
pip install numpypip install bitarraypip install redisOther prerequisites:
Download and compile yael library with the --enable-numpy option. Copy generated yael.py, _yael.so under the same path of these scripts.
This repo uses modified LSHash.
To build fastdict:
mkdir build
cd build
cmake path_to_fastdict/
make
cp fastdict.so path_to_repo/
python fast_binary.py -f sift_base.fvecs
python fast_binary.py -f bigann_base.bvecs -v bvecs -n 100000000 -k 10 -o 0 -s random -i y -e bigann_100000000.npz
python fast_binary_for_indexonly.py -f ../bigann_base.bvecs -v bvecs -n 500000000 -k 10 -o 0 -s random -i y -e bigann_500000000_random_k8_b64 -r 8
Parameters:
R --slave --args <binary code length> <number of binary codes> <bit width of bit counts> <number of sampled dimensions> <weight of worst-case> <weight of best-case> < cal_compress_effect.R
For example:
R --slave --args 64 1000000000 32 32 0.19 0.81 < cal_compress_effect.R
Python
67.7%
C++
28.0%
R
2.3%
C
1.0%