https://bugs.kde.org/show_bug.cgi?id=518410

            Bug ID: 518410
           Summary: Replace FLANN with HNSW and SQLite-Vec for Vector
                    Indexing
    Classification: Applications
           Product: digikam
      Version First 9.1.0
       Reported In:
          Platform: unspecified
                OS: All
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Faces-Engine
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Note:
This is a performance fix and a necessary technical pre-step to modernize the
indexing backend before (or unless) the architectural shift to Centroid
Clustering in Feature Request 1 is implemented.

Motivation: The current implementation relies on FLANN (Fast Library for
Approximate Nearest Neighbors), which typically uses KD-trees for indexing. In
128D face embeddings, KD-trees suffer from the "curse of dimensionality,"
causing search efficiency to collapse toward linear O(N) and making face
confirmation a major UI bottleneck. As databases like MariaDB move toward
native vector support, digiKam’s application-side FLANN approach is becoming a
legacy limitation.

The Proposal: I propose migrating the face indexing backend from FLANN to HNSW
(Hierarchical Navigable Small World). HNSW is the industry standard for
high-dimensional vector search, providing superior search speed and much higher
accuracy (recall) compared to tree-based methods. To maintain portability,
digiKam should leverage native database vector capabilities where possible and
provide a fallback for SQLite.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to