←back to thread

76 points unixpickle | 2 comments | | HN request time: 0.49s | 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

1. araes ◴[] No.43376482[source]
I actually found this product most interesting, perhaps oddly, for voyaging far afield from the fashion preference.

Picture leads to books leads to toys leads to ... a television that emits heat like a fireplace. I actually kind of want a television that emits heat / cold in response to what's on television (the product was just a tv fireplace that made heat).

Notably, like others have pointed out, and the author already addressed, the model definitely starts giving some rather "strange" results when you travel far away from the central training theme. Just click on a kid's hoverboard, and it gives me vacuum cleaners and leaf blowers. Dinosaur toy, and not a dinosaur in the results.

They're still interesting, and the main idea of having a "variety" slider with nearness of similarity was a cool feature for image browsing like most image searches. Be kind of nice if some browser image searches would let you have a "variety" or "nearness" slider when you're just looking at similar images.

replies(1): >>43376512 #
2. unixpickle ◴[] No.43376512[source]
The "shop for random products" direction was actually fun for me too. Reminds me of amazon.com/stream a bit.