(I never thought to ask if she worked on commission.)

It’s free, every week, in your inbox.

I returned the pricey clothing and decided to build my own (cheaper!)

How to build an AI stylist inspired by outfits on Instagram

In this post, Ill show you how you might, too.

Want to see a video version of this post?

Particularly, fashionable people on Instagram.

Article image

Heres what it looks like:

(you might also check out the live apphere.)

On the left panethe closet screenyou can see all the clothing items I already own.

On the right pane, youll see a list of Instagram accounts I follow for inspiration.

Screenshot of the AI Stylist

I divided the architecture into two bits.

Unfortunately, Instagram doesnt have an API (and using ascraperwould violate their TOS).

So I specifically asked Laura for permission to use her photos.

Diagram of batch process for making outfit recommendations

So I needed some way of knowing which pictures contained outfits (worn by people) and which didnt.

First, I used its classification feature, which assigns labels to an image.

Notice theres one label called Fashion (confidence 90%).

Architecture diagram of a web app reading from Firestore

Heres the code:

If you want the full code, check it outhere.

I hung each item up on my mannequin and snapped a pic.

This API is designed to power features like similar product search.

Dog in front of a laptop

Just:

So in the gif above, all my black bomber pics are in a folder namedblack_bomber_jacket.

Once you do, you could create a new project and download a credentials file.)

Phew, that was more steps than I thought!

Screenshot of the Vision API analyzing an outfit

The indexing process can take up to 30 minutes, so go fly a kite or something.

skirt, top) and what items in your project set matched with them.

Sometimes the Product Search API doesnt return a logical outfit.

Article image

Figuring out how to score an outfit is a creative problem that has no single answer!

Here are a couple of score functions I wrote.

And thats pretty much it!

Screenshot of Pinterest’s similar item search feature

Take that, expensive stylist.

She also likes solving her own life problems with AI, and talks about it on YouTube.

Also tagged with

Article image

Article image

Article image

Article image

Article image

Article image

Article image

Article image

Article image

Article image

Article image