Skip to content

Instantly share code, notes, and snippets.

View CharlesLiu7's full-sized avatar

Charles CharlesLiu7

  • USTC
  • Hefei Anhui, China
View GitHub Profile
# -*- 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)