Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. C/C++
  3. LSHBOX

LSHBOX

GPL-3.0C++

A C++ toolbox providing multiple locality-sensitive hashing algorithms for large-scale approximate nearest neighbor search, with Python and MATLAB bindings.

GitHubGitHub
293 stars78 forks0 contributors

What is LSHBOX?

LSHBOX is a C++ toolbox that implements multiple locality-sensitive hashing (LSH) algorithms for approximate nearest neighbor search. It is designed to solve the problem of efficient similarity retrieval in high-dimensional data, such as images, by providing fast and scalable indexing and querying methods. The toolbox includes several state-of-the-art LSH variants and supports integration with Python and MATLAB.

Target Audience

Researchers and engineers working on large-scale image retrieval, similarity search, or machine learning applications that require efficient nearest neighbor queries in high-dimensional spaces. It is particularly useful for those who need to benchmark or deploy LSH algorithms in C++, Python, or MATLAB environments.

Value Proposition

Developers choose LSHBOX because it consolidates multiple LSH algorithms into a single, easy-to-use toolbox with cross-language support, eliminating the need to implement these complex algorithms from scratch. Its focus on performance, binary data handling, and reusable indexes makes it a practical choice for production-grade similarity search systems.

Overview

A c++ toolbox of locality-sensitive hashing (LSH), provides several popular LSH algorithms, also support python and matlab.

Use Cases

Best For

  • Large-scale image retrieval systems requiring fast approximate search
  • Benchmarking different LSH algorithms on custom datasets
  • Integrating LSH into existing C++ applications for similarity matching
  • Prototyping nearest neighbor search in Python or MATLAB without rewriting core algorithms
  • High-dimensional data indexing for machine learning pipelines
  • Educational purposes to study and compare LSH algorithm implementations

Not Ideal For

  • Applications requiring exact nearest neighbor search without approximation errors
  • Teams wanting plug-and-play solutions without data format conversion or parameter tuning
  • Projects prioritizing actively maintained libraries with recent updates and community support

Pros & Cons

Pros

Comprehensive Algorithm Suite

Implements eight LSH variants including Random Hyperplane, p-Stable, and Spectral Hashing, providing a wide range of techniques for different use cases.

Multi-Language Flexibility

Offers native C++ interfaces with Python and MATLAB bindings, enabling integration into diverse development environments without rewriting core logic.

Efficient Index Management

Supports saving and loading hash indexes to disk, allowing faster subsequent queries by avoiding re-indexing, as demonstrated in the Python and MATLAB examples.

Optimized Data Storage

Uses a compact binary format for datasets, improving I/O performance and reducing memory footprint, though it requires specific preprocessing.

Configurable Performance Tuning

Each algorithm exposes parameters like hash table size and binary code length for fine-grained control over accuracy-speed trade-offs, as detailed in the algorithm chapters.

Cons

Compilation and Dependency Hurdles

Python bindings require Boost library, and compilation can be complex, especially for multi-language support, as noted in the CMake instructions.

Inflexible Data Requirements

Datasets must be converted to a specific binary format and zero-centered for some algorithms, adding significant preprocessing overhead that isn't user-friendly.

Dated Development and Support

Last updates were in 2015, with incomplete testing for Mac and no mention of recent maintenance, raising compatibility concerns with modern systems.

Frequently Asked Questions

Quick Stats

Stars293
Forks78
Contributors0
Open Issues6
Last commit9 years ago
CreatedSince 2014

Tags

#image-retrieval#c-plus-plus#high-dimensional-data#nearest-neighbor-search#python-bindings#approximate-search#machine-learning#similarity-search

Built With

C
CMake
P
Python
B
Boost
M
MATLAB
C
C++

Included in

C/C++70.6k
Auto-fetched 15 hours ago

Related Projects

Parallel HashmapParallel Hashmap

A family of header-only, very fast and memory-friendly hashmap and btree containers.

Stars3,199
Forks310
Last commit1 month ago
CRoaringCRoaring

Roaring bitmaps in C (and C++), with SIMD (AVX2, AVX-512 and NEON) optimizations: used by Apache Doris, ClickHouse, Alibaba Tair, Redpanda, YDB and StarRocks

Stars1,863
Forks327
Last commit1 day ago
flat_hash_mapflat_hash_map

A very fast hashtable

Stars1,856
Forks204
Last commit2 years ago
robin-hood-hashingrobin-hood-hashing

Fast & memory efficient hashtable based on robin hood hashing for C++11/14/17/20

Stars1,617
Forks153
Last commit3 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub