←back to thread

76 points unixpickle | 1 comments | | HN request time: 0.211s | 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
ResearchAtPlay ◴[] No.43373523[source]
This is great! I've forwarded the site to my wife.

Would you mind sharing how you trained the model to produce the vectors? Are you using a vision transformer under the hood with contrastive training against price, product category, etc.?

EDIT: I see that the training script is included in the repo and you are using a CNN. Inspiring work!

replies(1): >>43373757 #
1. unixpickle ◴[] No.43373757[source]
Yup, it's a small model I trained on my Mac mini! The model itself just classifies product attributes like keywords, price, retailer, etc. The features it learns are then used as embeddings