This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: UTF-8 -*- | |
| """ | |
| Python script to read SIFT1B dataset files, including .bvecs, .ivecs, .fvecs | |
| Dataset source: http://corpus-texmex.irisa.fr/ | |
| """ | |
| import numpy as np | |
| def bvecs_read(fname): | |
| a = np.fromfile(fname, dtype=np.int32, count=1) | |
| b = np.fromfile(fname, dtype=np.uint8) |