Artistry AI is now a complete, intelligent interior design platform with budget-aware reasoning, item condition analysis, and integrated shopping recommendations. This implementation follows a sophisticated multi-layer architecture that goes beyond simple image generation.
- Detect (YOLOv8n) - Object detection for furniture and interior elements
- Segment (MobileSAM) - Precise segmentation with edge refinement
- Vision Analyzer (LLaVA) - Visual analysis and condition assessment
- Budget Collector - Low/Medium/High budget tiers
- Design Preference Collector - Free-text design style input
- Item Replacement Selector - User-controlled item selection with condition hints
- Base Design Planner - AI-generated initial design concepts
- Budget-Constrained Design Refiner - Material selection based on budget
- Item Upgrade Reasoner - Smart decision-making for replacements
- SD Img2Img - Global room redesign
- ControlNet (Canny) - Structure preservation
- Per-Object Inpainting - Precise item-by-item redesign
- Item Attribution - Identify items in generated design
- Style Classification - Extract overall design style
- Shopping Metadata Generator - Material, color, style extraction
- Product Matching - Semantic search-based product recommendations
- Affiliate Link Generation - Shopping redirection with tracking
- Budget-Aware Filtering - Products matched to user budget
POST /condition/detectInput:
{
"image_b64": "base64_string",
"objects_detected": ["bed", "chair", "curtains"]
}Output:
{
"condition_estimates": {
"bed": "old",
"chair": "acceptable",
"curtains": "old"
},
"detailed_conditions": [...]
}POST /advise/refine-budgetInput:
{
"base_design": {...},
"budget": "medium",
"item_selection": ["bed", "curtains"]
}Output:
{
"materials": {
"bed": "engineered wood with quality upholstered headboard",
"curtains": "poly-linen blend"
},
"detailed_specs": [...],
"cost_estimate": "medium"
}POST /advise/reason-upgradesInput:
{
"item_conditions": {"bed": "old", "curtains": "outdated"},
"user_selection": ["bed", "curtains"],
"budget": "medium"
}Output:
{
"replace": ["bed", "curtains"],
"keep": ["wardrobe"],
"reasoning": {...}
}POST /generate/budget-awareInput:
{
"image_b64": "base64_string",
"base_prompt": "Modern minimalist design",
"material_specs": {
"bed": {"material": "engineered wood", "finish": "fabric upholstery"}
},
"replace_items": ["bed", "curtains"],
"budget": "medium",
"masks": {...}
}Output:
{
"image_b64": "generated_image_base64",
"prompt_used": "detailed_prompt",
"materials_applied": {...}
}POST /generate/analyze-outputInput:
{
"generated_image_b64": "base64_string",
"replaced_items": ["bed", "curtains"]
}Output:
{
"items": [
{
"item_type": "bed",
"style": "modern",
"material": "engineered wood",
"color": "beige",
"confidence": 0.85
}
],
"overall_style": "Modern Minimalist",
"color_palette": ["beige", "white", "grey"]
}POST /api/collect-preferencesInput:
{
"budget_range": "medium",
"design_tips": "modern minimal with wood tones",
"item_replacement": ["bed", "curtains"]
}Output:
{
"session_id": "uuid",
"preferences_saved": true
}POST /workflow/enhancedInput:
{
"image_b64": "base64_string",
"session_id": "uuid",
"base_prompt": "Modern interior design"
}Output:
{
"generated_image": "base64_string",
"objects_detected": [...],
"condition_analysis": {...},
"items_replaced": [...],
"budget_applied": "medium",
"materials_used": {...},
"shopping_metadata": [...]
}POST /commerce/match-productsInput:
{
"item_type": "bed",
"style": "modern",
"material": "engineered wood",
"color": "beige",
"budget": "medium"
}Output:
{
"matches": [
{
"product_id": "bed_001",
"name": "Modern Upholstered Platform Bed",
"vendor": "Amazon",
"price": "$399",
"url": "https://...",
"match_score": 0.87,
"affiliate": true
}
]
}POST /commerce/generate-affiliate-linksInput:
{
"items": [{"product_id": "bed_001", "quantity": 1}],
"session_id": "uuid"
}Output:
{
"affiliate_links": [...],
"estimated_total": "$399.00"
}- Navigate to backend directory:
cd artistry-backend- Start all services with Docker Compose:
docker-compose up --buildThis will start:
- Gateway (8000)
- Detect (8001)
- Segment (8002)
- Advise (8003)
- Generate (8004)
- Commerce (8005)
- Or run services individually:
# Detect
cd detect && uvicorn app.main:app --port 8001
# Segment
cd segment && uvicorn app.main:app --port 8002
# Advise
cd advise && uvicorn app.main:app --port 8003
# Generate
cd generate && uvicorn app.main:app --port 8004
# Commerce
cd commerce && uvicorn app.main:app --port 8005
# Gateway
cd gateway && uvicorn app.main:app --port 8000- Navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Create
.envfile:
VITE_API_BASE=http://localhost:8000- Start development server:
npm run dev- Access the application:
http://localhost:5173/enhanced-workflow
User uploads a photo of their room.
- Budget: Low ($150-$500) / Medium ($500-$2,000) / High ($2,000+)
- Design Style: Free-text input (e.g., "Modern minimalist with warm wood tones")
- Item Selection: Checkboxes for detected items with condition hints
System executes complete pipeline:
- Detect objects
- Analyze conditions (old/acceptable/new)
- Reason about replacements
- Refine design with budget constraints
- Generate realistic image
- Extract shopping metadata
- Before/After Comparison
- Material Details - What materials were used
- Shopping Recommendations - Products matched to design
- Shop This Look - Direct purchase links
The system doesn't just generate random designs. It reasons about materials:
Low Budget ($150-$500):
- Bed: Engineered wood with basic fabric ($199)
- Curtains: Polyester blend ($29)
- Walls: Basic emulsion paint
Medium Budget ($500-$2,000):
- Bed: Engineered wood with quality upholstered headboard ($399)
- Curtains: Poly-linen blend with grommet hardware ($89)
- Walls: Premium emulsion with matte finish
High Budget ($2,000+):
- Bed: Solid wood with premium velvet upholstery ($1,299)
- Curtains: Natural linen or silk blend with custom hardware ($349)
- Walls: Designer paint or specialty textured finishes
Uses LLaVA to analyze:
- Visible wear and tear
- Style modernity (is it outdated?)
- Color fading or damage
Outputs: old, acceptable, or new
Uses semantic embeddings to match generated designs to real products:
- Extract item metadata (style, material, color)
- Compute semantic similarity with product catalog
- Filter by budget tier
- Return top 3 matches per item
- FastAPI - Modern async API framework
- LLaVA - Vision-language model for design reasoning
- YOLOv8n - Lightweight object detection
- MobileSAM - Fast image segmentation
- Stable Diffusion 1.5 - Image generation
- ControlNet (Canny) - Structure preservation
- SentenceTransformers - Semantic product matching
- React 18 - UI framework
- TailwindCSS - Styling
- Lucide Icons - Icon library
- shadcn/ui - Component library
- Docker & Docker Compose - Containerization
- MongoDB - Session & result storage
- CORS-enabled - Frontend-backend communication
Currently uses static product catalog. Ready to integrate:
- Amazon (Affiliate API)
- IKEA (Product API)
- Wayfair
- West Elm
- Pottery Barn
- Target
- Urban Ladder (India)
- Pepperfry (India)
- Amazon Associates
- Commission Junction
- ShareASale
- Rakuten Advertising
Gateway (.env):
MONGO_URI=mongodb://localhost:27017
DETECT_URL=http://localhost:8001
SEGMENT_URL=http://localhost:8002
ADVISE_URL=http://localhost:8003
GENERATE_URL=http://localhost:8004
COMMERCE_URL=http://localhost:8005Frontend (.env):
VITE_API_BASE=http://localhost:8000- Detect (YOLOv8n): ~2 seconds
- Segment (MobileSAM): ~3 seconds
- Advise (LLaVA): ~30 seconds (first load), ~5 seconds (subsequent)
- Generate (SD 1.5): ~20 seconds (first load), ~10 seconds (per image)
- Commerce: Instant (in-memory catalog)
- Detection: ~1-2 seconds
- Segmentation: ~3-5 seconds
- Condition Analysis: ~5-10 seconds
- Image Generation: ~60-120 seconds
- Product Matching: <1 second
- Detection: ~0.5 seconds
- Segmentation: ~1 second
- Condition Analysis: ~2-3 seconds
- Image Generation: ~10-20 seconds
- Product Matching: <1 second
Input:
- Budget: Low
- Style: "Cozy and minimal"
- Items: bed, curtains
Output:
- Engineered wood bed with basic fabric ($199)
- Polyester curtains ($29)
- Shopping links to Amazon Basics & IKEA
Input:
- Budget: High
- Style: "Luxury hotel vibe"
- Items: sofa, curtains, lighting
Output:
- Premium velvet sofa ($2,499)
- Silk blend drapes with brass hardware ($549)
- Designer pendant lights ($399)
- Shopping links to West Elm & Pottery Barn
- Real-time 3D Preview - Three.js room visualization
- AR Try-Before-You-Buy - Mobile AR placement
- Multi-room Projects - Complete home redesign
- Style Transfer - Match celebrity/magazine room styles
- AI Interior Designer Chat - Conversational design assistance
- Price Tracking - Monitor product price changes
- User Accounts - Save designs, shopping lists
- Social Sharing - Share designs on social media
MIT License - See LICENSE file for details
This is an advanced implementation. Contributions welcome for:
- Additional product catalog integrations
- Improved material classification
- Enhanced semantic matching algorithms
- UI/UX improvements
For issues or questions, please open a GitHub issue.
Built with ❤️ using AI-powered interior design technology