←back to thread

76 points unixpickle | 1 comments | | HN request time: 0.332s | source

I made this website with my wife in mind; it makes it possible to browse for similar fashion products over many different retailers at once.

The backend is written in Swift, and is hosted on a single Mac Mini. It performs nearest neighbors on the GPU over ~3M product images.

No vector DB, just pure matrix multiplications. Since we aren't just doing approximate nearest neighbors but rather sorting all results by distance, it's possible to show different "variety" levels by changing the stride over the sorted search results.

Nearest neighbors are computed in a latent vector space. The model which produces the vectors is also something I trained in pure Swift.

The underlying data is about 2TB scraped from https://www.shopltk.com/.

All the code is at https://github.com/unixpickle/LTKlassifier

Show context
thinkingemote ◴[] No.43373398[source]
Nice! I was going to ask about if the nearest neighbour algorithm gives less distance if a model has the same pose and then I realised that similar products (like a t-shirt) are shown with the same pose, so it shouldn't be an issue.

"hat" gives a range of poses

replies(1): >>43373406 #
1. unixpickle ◴[] No.43373406[source]
Ideally pose and lighting wouldn't matter as much as it currently does.

I think using a better model to produce feature vectors could achieve this, or perhaps even finetuning the feature model to match human preferences.