Live data from Hacker News

Show HN: Fashion Shopping with Nearest Neighbors

vibewall.shop

1–10 of 24 posts

Show HN: Fashion Shopping with Nearest Neighbors

#1
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 HN: Fashion Shopping with Nearest Neighbors
vibewall.shop

Re: Show HN: Fashion Shopping with Nearest Neighbors

#2
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

Re: Show HN: Fashion Shopping with Nearest Neighbors

#3

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

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.

Re: Show HN: Fashion Shopping with Nearest Neighbors

#4
I love this kind of “reaction decision” process. I have a hard time styling things until I see them and importantly when I see examples of what I don’t like.

Also this is what I imagine Stitch Fix uses for their stylists. I wish there was a polished stylist service that didn’t also have me buying clothes from them. I don’t need a $60 white T shirt or a $120 basic jean jacket but I do want to have styles that look good specially for me.

Re: Show HN: Fashion Shopping with Nearest Neighbors

#6
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!

Re: Show HN: Fashion Shopping with Nearest Neighbors

#8

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!

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

Re: Show HN: Fashion Shopping with Nearest Neighbors

#10

Very cool. Have you considered adding text-based search using CLIP-like embeddings?

I think it would be a useful feature. For the sake of being a fun project, I didn't use CLIP because I only wanted to use models that I trained myself on a single Mac. However, to make this more useful, text search would be quite helpful.
Post reply on HN