Inspiration
Online clothes shopping is a gamble. You never know if an outfit will actually look good on you. We wanted to build an AI-powered virtual closet that lets you instantly try on any outfit combination from a store's catalog just by uploading your photo.
What it does
FitCheck is a web app that lets you be your own fashion model. A user uploads four images:
- A full-body photo of a mannequin (or person)
- A shirt
- A pair of pants
- A pair of shoes
- Our AI backend takes all four images, analyzes the clothing items, and then generates a single, new image of the mannequin realistically wearing the complete outfit.
How we built it
Frontend: A clean HTML, CSS, and vanilla JavaScript interface for uploading the four images. Backend: A Python API server built with FastAPI to receive the images and handle the AI logic. AI: The Google Gemini API (gemini-2.5-flash). We used a two-call prompt strategy:
- The AI first generates a text description of the 3 clothing items.
- We feed the images and the text description into a second call, forcing an image response to generate the final outfit.
Challenges we ran into
Our main challenge was the AI's aggressive safety policies. The API constantly blocked our requests, even when using a mannequin, flagging the "virtual try-on" as a safety violation. This meant we had to re-engineer our prompts to be "safer" and build robust error-handling to catch empty API responses without crashing the server. We also spent a lot of time debugging the correct, modern syntax for the google-genai library.
Accomplishments that we're proud of
We built a complete, full-stack AI application from scratch in a single weekend. We're most proud of successfully debugging and navigating the AI's safety filters. We built a backend that can handle API refusals and still get a result, and our "text-description-first" logic is a clever solution to guide the AI.
What we learned
We learned how to build a production-ready API with FastAPI. Most of all, we learned that prompt engineering is the real challenge in generative AI. The smallest word choice in a prompt can be the difference between a safety-block and a successful image. We also learned how to debug an API response when it's not what the documentation promises!
What's next for FitCheck
The immediate next step is to experiment with alternative AI models that are specifically designed for image composition and modification and less prone to safety filters. We also want to add a database so users can save their favorite generated outfits to their "Digital Closet."
Built With
- css
- fastapi
- gemini
- genai
- html
- javascript
- pil
- python
Log in or sign up for Devpost to join the conversation.