File size: 700 Bytes
329b20b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from pydantic import BaseModel
from typing import List, Dict, Any, Optional

class ClothingItem(BaseModel):
    item_type: str
    confidence: float
    bounding_box: List[int]

class DominantColor(BaseModel):
    color_name: str
    rgb: List[int]
    hex: str
    percentage: float

class ConfidenceScores(BaseModel):
    overall: float
    style: float
    color: float

class ClothingAnalysisResponse(BaseModel):
    status: str
    clothing_items: List[ClothingItem]
    style_classification: str
    formality: str
    texture: str
    dominant_colors: List[DominantColor]
    color_distribution: Dict[str, float]
    detailed_attributes: Dict[str, Any]
    confidence_scores: ConfidenceScores