I've been enjoying the new fashion choices and managing my wardrobe since coming to university. Picking my clothes and dressing for an occasion has been daunting many times. Other times, I'm particularly proud of the outfit I've curated and take a photo to remember it. But this got me thinking. Why don't I make an outfit logger? That was the idea at the nucleus of FITS, the working name for my outfit app.
The idea is simple. Take a photo of what you wear each day and share it with your friends. A natural extension of that is to recognize each piece you wear from a single photo of your entire outfit and log that as well. Then that requires some understanding of your existing pieces and wardrobe. So I guess the app will need that as well. Then if the app has a full digital copy of your wardrobe, why not let it curate outfits and plan them for you. You can see how the idea grew pretty fast.
So that's what I set out to build about a month ago. In this devblog, I'll share what I've built so far, how I've built it, my thought process, and some of the very fascinating machine vision and learning challenges I've encountered. Let's get cracking.
For the technical stuff, go straight to Interesting Technical Problems and My Solutions.
The Design Dogma
I felt the first step to making this app usable was having a very "nice" (for lack of a better word) UX. I want users to go through each interaction and go "nice!" in their heads as they discover a new feature, curate a fit, or see their photo of their outfit get automatically catalogued.
I heavily drew inspiration from Snapchat, where so many little interactions have that extra thought that makes you go "nice!" For example, did you know you can change the size of the text you send in chats by sliding the neatly hidden "scale" slider to the left of the send button? I didn't, but it's a smooth, seamless and experientially satisfying way to integrate such a feature into their chat. Another example comes from Instagram: holding down the send button on any post opens a little bubble where sliding your finger horizontally while still holding that send button selects the user you want to send it to. Nice!
These types of interactions and responsiveness were integral to what I wanted to build. First was defining the look and feel of the app. I wanted something bouncy, playful, responsive, and conveniently automatic. No cluttered UI, no questions like "Hang on, where do I find this feature?" or "How do I favorite/edit/delete this?" That was both a technical and design challenge. Let me explain.
The garment camera guide and review form, shown in separate QA captures.
When a user wants to catalogue their items, the flow is roughly as follows:
They take a photo of their garment, laid out, with an overlay guide that helps them center the piece in the camera view.
As in Snapchat after you take a Snap, a photo of the garment with a "form" underneath it slides up from the bottom. Pulling down closes that image and brings us back to the camera view. There's a brief "undo" button in case you accidentally close an item you're working on.
Then from here a lot of things need to happen. The user fills out a form and basically specifies what their piece is. This is where I wanted things to feel automatic and intelligent. The form requires a few things: color, garment type, size, fit, and brand. I thought, "Which one of these can be autofilled just based on the image of the garment?" Here's how I approached each thing:
Color: the image contains all the information you need: the app prefills the color with whatever the average color of the garment is (we use a fast on-device model to get a proxy for the cutout of the garment, basically removing its background, and then sample the color just from that). So how do you handle multi-colored garments? We do a little more than just take the average. The app averages similar colors in the image and outputs multiple colors if there are many distinct colors. So it's more of a "clump nearby points together" algorithm. The problem remaining is that lighting and shadows can't be adjusted for. Now, technical stuff aside, how do we make this whole thing feel satisfying? Firstly, we can identify and average colors nearly instantly, so the user doesn't need to see a loading screen. Secondly, colors aren't shown as "rgb(23, 44, 240)" or "#2e3fac". Instead, we use nearest-neighbor matching for colors with about 400 pre-defined names. This way, their garment gets a nice color name, like "charcoal grey" or "ruby red". Of course, we show the color sample in a palette and provide an intuitive, nonintrusive color adjuster if the automatic color system didn't get it quite right.
A current sampler run on an H&M garment photo. The center sample and neutral corners produce a corrected estimate, matched here to Cream.
Garment type: this was more technically interesting. From the image, we want to automatically categorize the type of garment (jackets, hoodies, socks, t-shirts, crewnecks, dresses, etc.) in the taken image for the user. Under the hood, we are running a local fashion embedder (FashionSigLIP). This model turns a photo of a garment into an embedding in 768-dimensional space. It also turns text into embeddings in this same space. It's used for many intelligent features across the app, including garment identification. We first create the embedding of the garment from the image cutout, then multiply it by a matrix to give it a different "garment type" embedding, which essentially can be thought of as some invariant representation. Finally, we do a nearest neighbor search with normalized garment types. So how did we derive the weights for this matrix? I considered gathering a corpus of labeled fashion items then training a linear classifier, but this was too much work. Instead, a simpler solution was to generate hundreds of text labels for jackets (e.g., "leather jacket", "suede jacket", "b3 bomber", etc.) and find the invariant component amongst the resulting embeddings of these text labels. Then that became the grounds for a dimension-reducing matrix, which learned to ignore unimportant details in the garment, like fit, cut, trim and style, as all we cared about was that it was a jacket. And again, this feature had to be considered through the lens of UX. If the model was unsure (i.e., cosine similarity was below a tuned threshold for all reference points), we left the selector unselected to avoid picking something erroneous. Secondly, in the selector, we separated garment types into broader categories, then specific types. For example, first the user picks a category (top, bottom, layer, shoe, etc.) and then narrows it down (e.g., top -> t-shirt, crewneck, crop-top, etc.). This made the selector fit in a couple of lines on the form. I also made icons for each type to give the selector some visual flair and make it easier to use. The end result is so satisfying that it almost feels like magic. I want users to go, "How did it know? And how was it so fast?"
A garment photo and a text query encoded as 768-dimensional vectors. The displayed cosine similarity comes from a local model run. Photograph by H&M.
Size, fit and brand: these were manual fields, as estimating size reliably is hard. I designed a tactile slider for selecting size, and brand was a hidden, optional textbox. Fit was a fun one to make. For the outfit curation aspects of the app, understanding a specific garment's fit on the user is important. Is it form-fitting, relaxed, loose, or baggy even? This could've just been a slider, but I wanted some visual flair. Firstly, I tried getting Codex to generate unique icons for each type of fit, but they didn't look great and didn't add much to the word descriptions of each gradation of tightness. So I turned to Codex ImageGen and generated gray, plain clothes on top of a plain mannequin at different tightness levels and lengths across every category of garment. Adjusting the slider now has a corresponding visual reference of what "relaxed" or "baggy" actually means.
Animation mattered tremendously, especially on mobile. It's what separates something that feels like vibe-coded hot garbage from a thoughtful, expertly crafted UI. This dogma influenced choices such as requiring that every page and popup be dismissed with a down swipe, that every close button be in the top left, and that every drag and drop scale the item when it's "lifted" and then scale it down when it's "dropped", of course with a satisfying animation ramp that gives it "pop."
To achieve this level of fluidity and fidelity in the animations, I created a standardized rule set that every component, page, and flow should abide by. Components follow standardized rules, which were refined until I felt I had something satisfying. Finding what small choices made these things satisfying isn't easy. It's a lot of trial and error, but I found that asking Codex to design a handful of alternatives, comparing the look and feel for myself, and then choosing and refining the best one worked well. Also, I drew inspiration and learned a lot from Enrico Tartarotti's videos, where he breaks down the small design choices behind satisfying tech. For those interested, The 7 Levels of Tech Design is a great watch.
The shared spring presets for press, open and settle interactions.
The app also used poppy highlight colors for selection and primary buttons, as well as rounded elements and thick icons, for this playful, bubbly look that the app logo mimics. For the main colors, I used neutral blacks and whites with a dark mode toggle that either matches the system setting or can be set by the user.
What I Wanted, and What I Didn't
Feature-wise, I wanted the app to be many things, but also not be some things.
I didn't want the app to be another endless-scroll or feed-style app. So the social aspects are limited to close circles and what your friends are wearing. Rating should be casual, with no comments or DMs. These features felt tangential, but not central to the core of the app.
I didn't want the app to feel high maintenance. At its core, FITS is an outfit logging and tracking app. It should do most of that with minimal input from a user. Take a photo, and the rest is automatic. The app handles cataloging, tracking what's worn, and logging it. Curating a fit within the app should also feel easy. The app helps you find matching pieces, dress for the weather, and mix it up, all within a few button presses. Even the process of cataloging and digitizing your wardrobe should feel effortless. Manually adding care tag instructions and other parameters was annoying, so I automated what I could. One feature I particularly like is the "edit queue". It gives you a list of clothes that are missing information, like size, care instructions or brand, and lets the user go through a queue and fill these things in themselves, serially, instead of needing to find items missing these parameters, click on them, click Edit, enter information into some fields, save, exit and repeat.
Defining the scope was important in developing this app, especially in a shorter time frame. I used this system to help me keep track of features and flesh out shippable versions.
Firstly, I defined certain goal posts / milestones. The first milestone was the MVP. The only features were cataloging, daily fit checks and calendar and folder organization for each day's fits. The second one brought in some lighter ML-assisted features, including automatic clothing recognition and matching to existing wardrobe items, easier labeling and flows for adding new garments, and the embedding vector each garment gets, which drives many other intelligent features.
An outfit entry, calendar and folders from separate QA captures.
I separated features into silos that I could build and focus on one at a time. Roughly, they were:
- Cataloging new items, handling tags, search, embedding, style embedding
- Fit Checking and Item Record, Wears, Preferred Style, Location + Weather + Clothing relation (Work, Going out, etc.)
- Fit curation, including manual design and suggestions based on weather, LLMs, or an aesthetic.
- Friends and social features
- Smart summary features: recently you've been into x, y, z. You might like, You haven't worn, Often worn with, Pairs well with.
Many new features used phased implementation plans from Codex. This helped keep progress bite-sized and new features testable before further building. And any future ideas I wanted to add had a home in an MD file within the project's repo. That way, I could revisit these ideas and implement them once the surrounding infrastructure was developed enough.
These practices proved to be useful, and I frankly believe they were integral to successful development. If I tried to slop-prompt my way into adding new features too soon, I'd end up with a pile of hot, disjointed rubbish. The importance of being patient, working on each flow at a time, and focusing on small details, including balancing technical implementation with user-facing considerations and proper UI/UX, couldn't be overstated.
Interesting Technical Problems and My Solutions
Here should be the real meat of the post for some of the readers out there. I'll dive into the variety of technical curiosities and practical learnings ranging from lessons in ML vision / testing / fine-tuning to UI/UX challenges and Codex-assisted coding tips I learnt.
The stack
The backend is Supabase, and the frontend is built with React. I used Expo Go for a live testing environment on my phone.
Why did I choose this stack? It was convenient, easy to set up and versatile. Supabase handles a lot of different things for you, Expo Go made on-device iOS testing easy, and Codex models seem to excel at building React apps. I was also already familiar with all these platforms, so that was a large factor.
Of course, this stack is also extremely scalable, and I will eventually move to iOS native builds for testing.
Garment matching from an image of a fit
One of the "must work" features of FITS was being able to recognize and match the clothes from your wardrobe to ones that you're wearing in a photo. This feature needed to be fast enough that logging your daily outfit would take only a few seconds and reliable enough that users wouldn't need to manually find or replace a garment the system didn't recognize every time.
So how exactly do we go from a photo to a list of garments in that photo, under these time and reliability constraints? The first thing I considered was the easiest thing to grab from my toolbox, a GPT model (like 6.2-Terra using vision). But creating a prompt that included hundreds of images of garments from the user's wardrobe just to ask "Which of these clothes in the images I provided are visible in this image: [photo of user]" was not going to be feasible, cost-wise at least.
The solution required using the same FashionSigLIP model as before, except with a few more steps. FashionSigLIP is designed to take in one item of clothing at a time and extract key distinct features from it by representing it in 768-dimensional space. Using dot products, we could match clothing items even under different lighting conditions and with slightly different clothing positions and drapes (remember, LIP learns across attributes, including categories, styles, colors, materials, and fine details). However, the challenge remained. How do we separate clothing items and extract information about, say, "a shirt under a jacket"?
This involved creating bounding boxes around each clothing item, feeding each crop to the FashionSigLIP model, computing dot products against all wardrobe items, and choosing matches with the highest dot product result. If the dot product was below a certainty threshold, we'd instead show the 5–6 most likely clothing items in the image and ask the user to manually label the garment.
A research prototype using Grounding DINO boxes and recorded FashionSigLIP rankings. The highlighted shirt crop includes part of the jacket. Photographs by H&M.
I found that using gemini-flash-3.1 to output x and y coordinates of bounding boxes proved to be an inexpensive way to solve the bounds problem. In the future, however, I may experiment with faster and cheaper custom models built to output these bounding boxes.
The current pipeline sends a resized photo to the cloud detector and ranks garment crops on the phone.
Using the exact implementation specified here, we get a correct match in the top 3 suggested garments ~92% of the time in my real-world tests with my own real-life wardrobe. On the demo wardrobe, nearly 99% of matches were in the top 3 (attributable to images of garments being in perfect studio-like lighting).
A separate 30-query retail pilot measured raw top-three retrieval with uncropped photos and annotated garment crops.
Suggested Clothing
In the outfit composer, clicking on a garment suggests similar replacements for it. This just calculates the closest embeddings to all garments in that broad category (e.g., jackets, pants, tops, shoes).
The implementation for this feature is pretty trivial, but at this point, I've come to realize how practical the fashion embedding is for so many features in this app. Being able to embed and search on-device was also crucial. It got me thinking: what can't the FashionSigLIP embedding capture about a garment?
I think it can capture almost everything by proxy, including the warmth and thickness of a garment and the styles of garments it likely matches with. That's my next avenue of experimentation. I want to find ways to combine garments in stylistically appealing ways. Now of course, there's not a single rulebook for how clothes look good together, and in many ways it is an art. But I imagine some trained model could learn which details matter for matching, how garment features relate, and which color palettes match. Another important representation to have alongside the FashionSigLIP would be some encoding of style. Fashion has many genres: Ivy Prep, Gorpcore, ’90s fashion, office fashion. I could go on forever. I think some representation that captures this information would be useful in creating styling intelligence in future versions of FITS.
A possible future styling flow combining garment embeddings with style and color features.
I don't want to lean entirely on LLMs. They're slow, tend to go with safe, boring combinations of clothes, and can lack a deeper understanding of fashion than a specialized model would. I think the solution to many of my problems is some combination of them. LLMs don't work well with thousands of outfit combinations. You can't dump an entire wardrobe and say "pick the best combination of clothes" without getting something super boring or derivative.
I feel that the next general step is using more targeted, specialized ML flows to narrow the scope, then using LLMs to choose between final combinations or shortlisted clothing options and add styling advice (e.g., wear it with the belt showing, let the shirt hang, or wear the pants low). This way, we get more depth without relying entirely on computational fashion. I suppose LLMs are still fundamentally doing computation, but I digress. The best of both worlds, if you will.
Hybrid Search Approach for Garments
Search was probably the most applicable use case of the FashionSigLIP embedding that each wardrobe item had.
To score each item against a query, we weight keyword matching at 70% (e.g., if the query is a substring of the clothing item or contains the clothing item type) and the vector dot product of the embedded query against stored vectors for each clothing piece at 30%.
A local replay of FITS search across five catalogue items. Garment photographs by H&M.
For optimization, tests showed that the largest bottleneck by far was query-to-embed time. Performing dot products on every item scaled linearly, and I experimented with a cached matrix of how similar the vectors were to each other. The optimization would be useful because search would only need to calculate cosine distance against fewer "seed" garments. The search would then automatically return all other results related closely enough to those seeds. During testing, I found it hardly sacrificed search fidelity. The top 10 matches for each of the 8 queries stayed the same, while the time taken to calculate cosine distances was cut in half. However, I ultimately banked this optimization, as I found that embedding the search query took an order of magnitude more time than doing cosine distance calculations. For reference, the time it takes to embed a query is approximately the time it takes to search across 10,000 garments (the majority of users probably won't exceed a thousand added garments).
Imagegen's use cases
One tool I kept coming back to was imagegen. From demo account creation to training and test data creation, I kept finding uses for ImageGen in Codex. Here's where and how I used it.
I think its biggest strength is on-the-fly demo or placeholder content. I populated my clothing library with clothes that Codex automatically made and ran small tests for many computer vision features simply by getting Codex to generate a test set of images for me. We could generate images to test especially challenging cases, like detecting garments under layers of clothing, or for simple tests on a first-pass implementation. ImageGen was essential to my on-the-fly, fast development style. In some other cases, we'd scrape product pages for clothing images and larger datasets.
Generated garments and accessories from the demo wardrobe.
Generated layers obscure the garments in these research fixtures. Source photographs by H&M.
As I previously mentioned as well, we use a pre-generated ImageGen asset right in the app for the garment-fit calibration menu. For each piece of applicable clothing, we let the user specify how tight, relaxed, or baggy the garment is. As the user adjusts the fit, we use ImageGen images to show what "baggy" or "tight" really means. It's another great use case, as the alternative would've been (I think) to render the mannequins in Blender using cloth sims to drape the clothes.
Generated fit references at the same length, from tight through baggy.
Of course, we also use ImageGen for some parts of the app's virtual try-on feature. To make the results as accurate as possible, we feed in bagginess and fit details from each garment into the edit prompt.
A generated starting portrait, garment reference and edited portrait from the landing-page demo.
Annoying Codex-isms
I'd like to start off this section with a disclaimer. Many so-called Codex-isms will only apply to the latest models and often disappear or change when newer models get released. Subsequently, this section may contain information that isn't pertinent to your coding if you're using different, newer models (that likely come with their own set of downfalls and idiosyncrasies). For most of my coding, I used Codex with GPT 6.2 Sol or Astra, often at high, extra-high, max, or ultra for tasks that benefit from leveraging many agents concurrently.
One particular annoyance is that the UI and frontends Codex makes are littered with labels and disclaimers. Users don't read. They don't. A lot of text is overwhelming, and a lot of text the user doesn't need to know. As a user, I find it tiring to filter through all that text.
Many times, after a feature or a large task I hand off to Codex, I need to ask it to remove countless little labels, copy and descriptions under components. That includes things like every loading button having a "loading..." label under it, or a button saying "reaching bg remover" during the add garment flow. It tends to want to design UI that tells the user more than it needs to. Here's the prompt I used to fix this.
Reduce the use of text labels, copy and pop up dialogues and the unnecessary disclosure of information to the user. After designing the draft of a component, page or flow, I want you to create a UX spec detailing what the user should know and when exactly that information is needed. Once you have this spec, remove and cut everything outside of it. Consider alternate ways of showing user status, apart from text. In general, reduce the text in any given component, leverage icons, disabled or processing button styles, animations, and drop downs or other modular, paginated components to reduce information density. In general, keep components, flows and pages lean and sleek.
Another issue was that Codex often got lazy when it came to going the extra mile to implement features. A lot of features had stub backends, partial implementations, and seemingly functional interfaces that I only discovered were incomplete after trying to use them and seeing an "unavailable right now" label. This prompting steered its behavior away from these things:
Do not implement placeholder functionality, stub backends, mock responses, or superficial UI components that give the impression of a working feature. Trace every user-facing interaction through the entire stack, ensuring that the underlying functionality is implemented, connected, and operational. If an implementation requires additional infrastructure, dependencies, database migrations, or changes elsewhere in the codebase, undertake those changes rather than compromising the feature's completeness.
Once implemented, perform a comprehensive verification pass from the perspective of an actual user. Test the feature end-to-end, including less obvious interactions, failure states, data persistence, and its integration with existing functionality. Do not mistake successful compilation, passing unit tests, or a visually complete interface for a functioning feature.
If any aspect of the implementation cannot be completed, explicitly disclose it to me rather than concealing it behind a disabled button, placeholder, or generic error message. Do not consider a task complete until its intended functionality has been implemented and empirically verified.
Browser QA captures of the try-on photo review, render queue and result.
Lastly, Codex seemed adept at either building really good user-facing code (UX, flows, small confirmation modals, eye for detail) or at building deep, complex, technical features (ones that implement asynchronous updates between the backend and frontend, complex queue systems, anything ML, the tricky stuff). Instead of trying to get Codex to fully build a perfect feature across the whole stack, letting one session focus on backend implementation, while leaving room for good frontend code and then moving focus to polishing the frontend seemed to be a more reliable strategy for implementing a feature with less nit-picky, fine-tuning style prompting.
One last caveat of building on Expo Go initially without an EAS build was that Expo Go lacked many features, like Sign in with Apple, contact sync, and Apple Vision SDK features. That meant I had to build an app that had EAS build capabilities and also ran on Expo Go (my plan was to test EAS features in the future). Codex didn't quite understand this and left most EAS build features as stubs, so I had to build a more specific prompt telling it to make sure everything is sideways compatible.
Closing it Off
It's been a joy to both develop 'FITS' and write this devpost. It feels like the first time in a while that I haven't had to find an excuse to build something with AI. It's a use case for which machine learning happens to solve several interesting problems. I'm really, really excited for people to get their hands on this app and start using, creating and sharing with it. I think there's really been something satisfying about using this app (and building it), and as I close in on publishing the first public beta, I'd love for readers to be able to join the waitlist and get it as soon as the beta comes out. You'll be able to get a place on that waitlist right now: FITS — Your life, in outfits. (I'll replace the Vercel link with a proper URL once I get my hands on a nice domain name. I'll also rename FITS, since another app apparently already shares the name.)
If anyone is interested in contributing or joining the project, I'd be happy to consider your help. Please reach out to me via LinkedIn.
Until the next devblog,
- XVP.