4 ms·
I wrote a custom SP-GiST index for fuzzy image searching. Along the way, I also wound up with a decent example in how to do a simple binary-tree SP-GiST index.
by fake-name 7y ago
I wrote a custom SP-GiST index for fuzzy image searching. Along the way, I also wound up with a decent example in how to do a simple binary-tree SP-GiST index.
SP-GiST indexes are specific to optimizing data that can fit into a metric-space, but if your application can use that, it's on github here: https://github.com/fake-name/pg-spgist_hamming https://github.com/fake-name/pg-spgist_hamming
- tsomctl 7y agoHey, fake-name, I've been following your work. Have you looked into faiss from Facebook or annoy from Spotify? Their biggest drawback is that you can't modify the index, you have to create a new one if you want to add additional entries.
- fake-name 7y ago> Their biggest drawback is that you can't modify the index I hadn't looked into them, but being read only would make them useless for my use case. Basically, my application is online zips-of-images set deduplication, with a continuous input stream of files. I have to be able to add new values continuously.
- bobosha 7y agorelated: we just opensourced pgANN[1] that allows ANN searches and include an example for image search. It uses the vectors from an imagenet and find it works well for our needs. [1] https://github.com/netrasys/pgANN/blob/master/README.md https://github.com/netrasys/pgANN/blob/master/README.md