๐ AI Fashion Classifier with Pretrained Color Detection
Using CLIP Vision Transformer for Zero-Shot Color Recognition
Fashion Model: Fashion-CLIP (pretrained)
Color Model: OpenAI CLIP ViT-B/32 (pretrained)
Color Categories: 101 colors
Method: Zero-shot learning (no dataset training needed)
โจ Why Pretrained Models?
- ๐ฏ Highly Accurate - Trained on millions of images
- โก Fast - No preprocessing needed
- ๐ง Smart - Understands context and variations
- ๐ Generalizable - Works on any clothing type
- ๐ Reliable - Consistent results
๐ก Tips:
- Clear photos work best
- Good lighting recommended
- Single item preferred
๐จ Supported Colors (101 types):
- Basic: Red, Blue, Green, Yellow, Orange, Purple, Pink, Brown, Black, White, Gray
- Shades: Dark/Light variations
- Specific: Navy, Maroon, Teal, Lavender, Beige, etc.
โก No Installation Needed: All models are pretrained and ready to use!
๐ Example Test Cases
| Item | Expected Colors |
|---|---|
| Gray Shorts | Gray, Light Gray, Dark Gray, Charcoal |
| Denim Jeans | Denim Blue, Navy Blue, Dark Blue |
| Red Saree | Red, Crimson, Dark Red |
| White Shirt | White, Off-White, Cream |
| Black Kurta | Black, Dark Gray, Charcoal |
| Beige Dress | Beige, Tan, Light Brown, Cream |
๐จ Color Detection Technology
Model: OpenAI CLIP (Contrastive Language-Image Pre-training)
How it works:
- Image is processed through Vision Transformer
- Compared with 101 color text descriptions
- Returns best matching colors with confidence scores
- No background removal needed
- Context-aware (understands "denim blue" vs "sky blue")
Advantages over traditional methods:
- โ Pretrained on 400M+ image-text pairs
- โ Understands color context (e.g., "denim blue", "burgundy red")
- โ No manual threshold tuning needed
- โ Works on complex patterns and textures
- โ Handles shadows and lighting variations
๐ Powered by:
- Fashion-CLIP (patrickjohncyh/fashion-clip)
- OpenAI CLIP ViT-B/32
- HuggingFace Transformers
- Zero-shot learning (no training required)