Wardrobe: AI-Powered Clothing Extraction and Organization with GPT-Image
Wardrobe uses OpenAI's GPT-Image to detect, extract, and organize clothing from photos, with optional modeled outfit generation. Open-source and local-first.
What is Wardrobe?
Wardrobe is an open-source tool that uses OpenAI's GPT-Image models to automatically detect, extract, and organize clothing items from your photos. It goes beyond simple tagging — it creates clean product-style cutouts, generates modeled editorial previews, and even suggests complete outfits. All data stays local on your machine.
Why This Matters
Managing a digital wardrobe is a pain. Most solutions either require manual tagging or send your photos to a cloud service with questionable privacy. Wardrobe solves both problems:
- Privacy-first: All originals, generated images, and the JSON database live in
data/on your local machine. - AI-powered: Uses OpenAI's latest vision and image generation models (gpt-5.4-mini and gpt-image-2) to handle the heavy lifting.
- Extensible: Comes with built-in Codex skills for importing clothes and generating outfits, but you can also use the web UI directly.
Quick Start
git clone https://github.com/tandpfun/wardrobe.git
cd wardrobe
npm install
cp .env.example .env
npm run dev
Important: The importer stays disabled until you:
- Add
OPENAI_API_KEYto.env - Place a PNG reference photo of yourself at
data/model-reference.png
Then open localhost:5173 and you're ready.
How It Works
1. Garment Detection
When you upload a photo (via drag, drop, paste, or the import skill), Wardrobe sends it to the OpenAI Responses API. The model identifies every garment in the image — shirts, pants, shoes, accessories — and returns bounding boxes or segmentation data.
2. Clean Cutouts
Using the OpenAI Images API, Wardrobe extracts each detected garment as a clean product-style cutout. This removes the background and isolates the item, making it ready for cataloging or outfit generation.
3. Modeled Editorial Previews
If you've provided a model reference photo, Wardrobe can generate modeled editorial previews — showing the garment on a model (you or a generated figure) in a flattering, studio-like setting.
4. Local Storage
Everything is saved locally:
data/library.json— the main database of all itemsdata/imported/— original photos and generated imagesdata/model-reference.png— your reference photo
Import with Codex
This is where Wardrobe really shines. It includes two Codex skills that automate the entire workflow:
$import-clothes
Import the clothes from ~/Pictures/outfits, create modeled photos, and add them to this wardrobe.
This skill:
- Scans a folder (or camera roll) for clothing photos
- Asks for a local model-reference PNG when needed
- Reviews every cutout and modeled photo before saving
- Writes to
data/library.jsonanddata/imported/
$generate-outfits
Create modeled outfit ideas from my wardrobe.
This skill:
- Asks how many looks to create
- Curates combinations from your existing wardrobe
- Generates modeled previews for each outfit
- Verifies and saves the complete collection under
data/
Configuration
| Variable | Default | Description |
|---|---|---|
OPENAI_API_KEY |
Required | Your OpenAI API key |
OPENAI_VISION_MODEL |
gpt-5.4-mini |
Model used for garment detection |
OPENAI_IMAGE_MODEL |
gpt-image-2 |
Model used for cutout and preview generation |
OPENAI_IMAGE_QUALITY |
high |
Quality setting for generated images |
WARDROBE_MODEL_REFERENCE |
data/model-reference.png |
Path to your reference photo |
WARDROBE_DATA_DIR |
data |
Directory for all local data |
Use Cases
- Personal wardrobe management: Catalog your clothes, see what you own, and get outfit suggestions.
- E-commerce product photography: Quickly generate clean cutouts and modeled previews for online listings.
- Fashion design: Experiment with different combinations and visualize outfits before committing.
- Content creation: Generate consistent, high-quality images for social media or blogs.
Technical Details
- Stack: JavaScript (74.3%), CSS (25.1%), HTML (0.6%)
- Build tool: Vite
- Runtime: Node 22+
- License: MIT
Final Thoughts
Wardrobe is a practical, privacy-respecting tool that leverages cutting-edge AI to solve a real problem. Whether you're a fashion enthusiast, a small business owner, or just someone who wants to get their closet in order, it's worth a look. The Codex skills make it especially powerful for batch processing, and the local-first approach means you never lose control of your data.
Check out the GitHub repo to get started.
Source
tandpfun/wardrobe: Your clothes, extracted and organized with gpt-image.