时装周秀场元素识别程序,提取剪裁,印花特征转化为电商新品开发参数。
时装周秀场元素识别程序 —— 从秀场到电商新品开发参数转化
一、实际应用场景描述
在《时尚产业与品牌创新》课程中,时装周秀场(Fashion Week) 是趋势发源地。四大时装周(纽约、伦敦、米兰、巴黎)每年两季,数千套 LOOK 中包含大量设计元素:
- 剪裁特征:廓形(A-line、H-line、Oversized)、肩线处理(落肩/垫肩/无肩)、腰线位置(高腰/中腰/低腰)
- 印花图案:几何/花卉/条纹/波普/抽象/动物纹
- 材质肌理:光泽感/哑光/透明叠层/针织纹理/皮革压纹
- 色彩组合:主色/辅色/点缀色
传统转化流程:
时装周结束 → 设计师手动翻阅数千张秀场图 → 提炼趋势报告(2~4 周)
→ 产品会议讨论 → 确定新品方向 → 打样生产(3~6 个月)
核心痛点:从秀场到新品上架,整个链路 6~10 个月,等商品出来,趋势可能已经过了"萌芽→成长"的黄金窗口。
本程序的目标:输入秀场 LOOK 的结构化数据,自动提取 剪裁 + 印花 + 材质 + 色彩 四大维度特征,转化为电商新品开发参数表,将"趋势感知 → 产品定义"的时间从 4 周压缩到 4 小时。
二、引入痛点
2.1 行业现状问题
痛点 具体表现 后果
信息过载 每季时装周 2000+ LOOK,人工无法穷尽 错过小众但高潜力的设计方向
主观偏差 趋势报告依赖编辑个人审美 同一季不同机构报告结论差异大
元素拆解粗放 "新中式""废土风"等大标签 无法落地到具体的版型/工艺参数
缺乏量化 "今年流行宽肩" → 肩宽具体多少? 版师无法直接使用
跨季追踪难 无法量化"一个元素从秀场到街拍的演化路径" 追趋势总慢半拍
2.2 一个典型效率损失场景
某品牌 2024 SS 新品开发:
1 月:时装周结束
2~3 月:设计师翻阅秀场图,撰写趋势报告
4 月:产品会议,争论"今年到底流行什么"
5 月:确定方向,开始打样
8 月:新品上架
问题:
• 2~3 月的手工分析漏掉了"美拉德色系 + 解构剪裁"的交叉趋势
• 竞品用 AI 工具 1 周内完成分析,6 月就上了相关产品
• 品牌 8 月才上架,已经错过第一波热度
如果用自动化分析:
1 月时装周结束 → 当天跑程序 → 次日拿到结构化趋势参数表
→ 3 月确定方向 → 6 月上架 → 抢占先机
核心矛盾:不是"有没有趋势信息"的问题,而是从"看秀场图"到"定义新品参数"的转化效率——这个链路每压缩一天,品牌就多一天的市场先发优势。
三、核心逻辑讲解
3.1 整体架构
输入层 分析层 输出层
┌────────────────┐ ┌──────────────────┐ ┌────────────────┐
│ 秀场 LOOK 数据 │ │ 剪裁特征提取 │ │ 新品开发参数表 │
│ (结构化描述) │ → │ 印花图案识别 │ → │ 趋势热度排行 │
│ │ │ 材质肌理分类 │ │ 交叉趋势发现 │
│ │ │ 色彩组合提取 │ │ 竞品对标建议 │
└────────────────┘ └──────────────────┘ └────────────────┘
3.2 剪裁特征向量化
每件 LOOK 的剪裁特征表示为多维向量:
剪裁向量 C = [廓形, 肩线, 腰线, 裙长/裤长, 领型, 袖型, 开叉]
各维度量化(示例):
廓形: A-line=1, H-line=2, Oversized=3, Fitted=4, Wrap=5
肩线: 落肩=-2, 自然肩=0, 垫肩=+2
腰线: 高腰=+2, 中腰=0, 低腰=-2
裙长: 迷你=1, 膝上=2, 及膝=3, 中长=4, 长裙=5, 及地=6
领型: V领=1, 圆领=2, 方领=3, 高领=4, 一字肩=5
袖型: 无袖=0, 短袖=1, 七分=2, 长袖=3, 泡泡袖=4
开叉: 无=0, 侧叉=1, 后叉=2, 高叉=3
3.3 印花图案分类体系
印花类型(8 大类):
1. 几何 (Geometric) - 条纹/格纹/波点/三角
2. 花卉 (Floral) - 写实花卉/抽象花卉/植物
3. 动物纹 (Animal) - 豹纹/斑马纹/蛇纹
4. 波普 (Pop Art) - 漫画/文字/涂鸦
5. 民族 (Ethnic) - 蜡染/图腾/民族符号
6. 抽象 (Abstract) - 泼墨/渐变/色块
7. 复古 (Vintage) - 怀旧图案/老照片/报纸
8. 无印花 (Solid) - 纯色/素面
3.4 色彩组合提取
色彩向量 = (主色 HSL, 辅色 HSL, 点缀色 HSL, 配色方案类型)
配色方案:
单色系 (Monochromatic) - 同色相不同明度
邻近色 (Analogous) - 色轮相邻 30° 内
对比色 (Complementary) - 色轮对向 180°
三角色 (Triadic) - 色轮等距 120°
分裂互补 (Split-Comp) - 对比色两侧各 30°
色相分组(简化 12 色轮):
红/橙/黄/黄绿/绿/青/蓝/蓝紫/紫/紫红/棕/中性
3.5 趋势热度计算
元素热度 = 出现频次 × 秀场权重 × 品牌影响力权重
秀场权重:
顶级秀场 (Chanel/Dior/Gucci 等) = 1.5
主流秀场 = 1.0
新兴设计师 = 0.7
品牌影响力权重:
Heritage 奢侈品牌 = 1.3
主流商业品牌 = 1.0
新锐设计师 = 0.8
趋势加速度 = (本季频次 − 上季频次) / 上季频次
正值 → 上升趋势
负值 → 下降趋势
3.6 交叉趋势发现
交叉分析:剪裁 × 印花 × 色彩 的三维组合
例如:
"A-line 廓形 × 花卉印花 × 邻近色配色" → 出现 12 次,热度上升 40%
"Oversized × 波普印花 × 对比色" → 出现 8 次,新出现(上季 0 次)
输出:Top 10 高潜力交叉趋势,供产品开发参考
四、项目结构
runway_analyzer/
├── config.py # 设计元素数据库、权重参数
├── data_models.py # 数据模型(LOOK/剪裁/印花/色彩/趋势)
├── silhouette_extractor.py # 剪裁特征提取器
├── print_analyzer.py # 印花图案分析器
├── color_extractor.py # 色彩组合提取器
├── trend_aggregator.py # 趋势聚合器(热度/加速度/交叉分析)
├── product_mapper.py # 电商新品参数映射器
├── report.py # 报告生成(表格 + 可视化)
├── main.py # 主程序入口(含完整示例数据)
├── README.md # 项目说明
└── requirements.txt # 依赖声明
五、代码模块化实现
"requirements.txt"
numpy>=1.24.0
matplotlib>=3.7.0
collections-extended>=0.7.0
"config.py"
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
config.py
设计元素数据库与权重参数配置中心
"""
from typing import Dict, List, Tuple
# ========== 剪裁特征编码体系 ==========
SILHOUETTE_CODES = {
# 廓形
"silhouette": {
1: "A-line", # A 字廓形
2: "H-line", # H 直筒
3: "Oversized", # 超大号
4: "Fitted", # 修身
5: "Wrap", # 裹身
6: "Balloon", # 气球廓形
7: "Peplum", # 裙摆式
8: "Empire", # 帝国腰线
},
# 肩线处理
"shoulder": {
-2: "落肩 (Dropped)",
-1: "微落肩",
0: "自然肩 (Natural)",
1: "微垫肩",
2: "垫肩 (Padded)",
3: "夸张垫肩 (Exaggerated)",
},
# 腰线位置
"waistline": {
-2: "低腰 (Low-rise)",
-1: "中低腰",
0: "中腰 (Regular)",
1: "高腰 (High-rise)",
2: "超高腰 (Extra High)",
},
# 裙长
"hem_length": {
1: "迷你裙 (Mini)",
2: "膝上 (Above-knee)",
3: "及膝 (Knee-length)",
4: "中长 (Midi)",
5: "长裙 (Maxi)",
6: "及地 (Floor-length)",
},
# 领型
"neckline": {
1: "V领",
2: "圆领 (Crew)",
3: "方领 (Square)",
4: "高领 (Turtleneck)",
5: "一字肩 (Off-shoulder)",
6: "心形领 (Sweetheart)",
7: "彼得潘领 (Peter Pan)",
8: "衬衫领 (Collar)",
},
# 袖型
"sleeve": {
0: "无袖 (Sleeveless)",
1: "短袖 (Short)",
2: "七分袖 (Three-quarter)",
3: "长袖 (Long)",
4: "泡泡袖 (Puff)",
5: "羊腿袖 (Leg-of-mutton)",
6: "喇叭袖 (Bell)",
7: "开衩袖 (Slit)",
},
}
# ========== 印花图案分类 ==========
PRINT_CATEGORIES = {
1: {"name": "几何 (Geometric)", "sub": ["条纹", "格纹", "波点", "三角", "菱形"]},
2: {"name": "花卉 (Floral)", "sub": ["写实花卉", "抽象花卉", "植物叶脉"]},
3: {"name": "动物纹 (Animal)", "sub": ["豹纹", "斑马纹", "蛇纹", "虎纹"]},
4: {"name": "波普 (Pop Art)", "sub": ["漫画", "涂鸦", "文字", "色块"]},
5: {"name": "民族 (Ethnic)", "sub": ["蜡染", "图腾", "民族符号", "扎染"]},
6: {"name": "抽象 (Abstract)", "sub": ["泼墨", "渐变", "几何抽象", "水彩"]},
7: {"name": "复古 (Vintage)", "sub": ["怀旧", "报纸", "老照片", "徽章"]},
8: {"name": "无印花 (Solid)", "sub": []},
}
# ========== 色相分组(12 色轮)==========
HUE_GROUPS = {
"红": (0, 15),
"橙红": (15, 35),
"橙": (35, 55),
"黄橙": (55, 70),
"黄": (70, 90),
"黄绿": (90, 135),
"绿": (135, 175),
"青": (175, 200),
"蓝": (200, 250),
"蓝紫": (250, 275),
"紫": (275, 305),
"紫红": (305, 335),
"红(紫红)": (335, 360),
}
# ========== 配色方案类型 ==========
COLOR_SCHEME_TYPES = {
"单色系 (Mono)": "同一色相,不同明度/饱和度",
"邻近色 (Analog)": "色轮相邻 30° 以内",
"对比色 (Comp)": "色轮对向 180°",
"三角色 (Triad)": "色轮等距 120°",
"分裂互补 (Split)": "对比色两侧各 30°",
"四角色 (Tetrad)": "两对对比色",
"中性色 (Neutral)": "黑白灰米棕",
}
# ========== 秀场权重 ==========
SHOW_WEIGHTS = {
"top_tier": 1.5, # Chanel, Dior, Gucci, Prada, Louis Vuitton
"major": 1.2, # Alexander McQueen, Balenciaga, Bottega Veneta
"mainstream": 1.0, # 主流商业品牌
"emerging": 0.7, # 新兴设计师
}
# ========== 品牌影响力权重 ==========
BRAND_INFLUENCE = {
"heritage_luxury": 1.3, # Heritage 奢侈
"contemporary": 1.1, # 当代设计师
"commercial": 1.0, # 商业品牌
"fast_fashion": 0.8, # 快时尚
"emerging_designer": 0.7, # 新锐设计师
}
# ========== 可视化配色 ==========
COLORS = {
"silhouette": "#E91E63", # 粉 - 剪裁
"print": "#4CAF50", # 绿 - 印花
"color": "#2196F3", # 蓝 - 色彩
"material": "#FF9800", # 橙 - 材质
"trend_up": "#4CAF50", # 绿 - 上升趋势
"trend_down": "#F44336", # 红 - 下降趋势
"trend_new": "#9C27B0", # 紫 - 新出现
"neutral": "#607D8B", # 灰蓝
}
"data_models.py"
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
data_models.py
数据模型层:秀场 LOOK / 剪裁特征 / 印花 / 色彩 / 趋势结果
"""
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Tuple
from enum import Enum
class Season(Enum):
"""时装周季节"""
SS = "Spring/Summer"
FW = "Fall/Winter"
class SilhouetteType(Enum):
"""廓形类型"""
A_LINE = "A-line"
H_LINE = "H-line"
OVERSIZED = "Oversized"
FITTED = "Fitted"
WRAP = "Wrap"
BALLOON = "Balloon"
PEPLUM = "Peplum"
EMPIRE = "Empire"
@dataclass
class SilhouetteFeatures:
"""剪裁特征"""
silhouette: int = 0 # 廓形编码
shoulder: int = 0 # 肩线编码
waistline: int = 0 # 腰线编码
hem_length: int = 0 # 裙长/裤长编码
neckline: int = 0 # 领型编码
sleeve: int = 0 # 袖型编码
slit: int = 0 # 开叉编码
# 附加特征(文本描述)
details: List[str] = field(default_factory=list)
def to_vector(self) -> List[int]:
"""转为特征向量"""
return [
self.silhouette, self.shoulder, self.waistline,
self.hem_length, self.neckline, self.sleeve, self.slit,
]
def to_dict(self) -> Dict:
return {
"廓形": self._decode("silhouette", self.silhouette),
"肩线": self._decode("shoulder", self.shoulder),
"腰线": self._decode("waistline", self.waistline),
"裙长/裤长": self._decode("hem_length", self.hem_length),
"领型": self._decode("neckline", self.neckline),
"袖型": self._decode("sleeve", self.sleeve),
"开叉": self._decode("slit", self.slit),
"细节": self.details,
}
@staticmethod
def _decode(dim: str, code: int) -> str:
from config import SILHOUETTE_CODES
return SILHOUETTE_CODES.get(dim, {}).get(code, "未知")
@dataclass
class PrintFeatures:
"""印花特征"""
print_category: int = 0 # 印花大类编码
sub_type: str = "" # 子类型
coverage: float = 0.0 # 覆盖率 0~1
placement: str = "" # 位置 (all-over/placement/partial)
scale: str = "" # 图案尺度 (micro/medium/large)
def to_dict(self) -> Dict:
from config import PRINT_CATEGORIES
cat_name = PRINT_CATEGORIES.get(self.print_category, {}).get("name", "未知")
return {
"印花类型": cat_name,
"子类型": self.sub_type,
"覆盖率": f"{self.coverage*100:.0f}%",
"位置": self.placement,
"尺度": self.scale,
}
@dataclass
class ColorFeatures:
"""色彩特征"""
primary_color: Tuple[int, int, int] = (0, 0, 0) # 主色 RGB
secondary_color: Tuple[int, int, int] = None # 辅色 RGB
accent_color: Tuple[int, int, int] = None # 点缀色 RGB
color_scheme: str = "" # 配色方案
primary_hue_group: str = "" # 主色色相组
def to_dict(self) -> Dict:
def rgb_label(c):
if c is None:
return "—"
return f"RGB({c[0]},{c[1]},{c[2]})"
return {
"主色": rgb_label(self.primary_color),
"辅色": rgb_label(self.secondary_color),
"点缀色": rgb_label(self.accent_color),
"配色方案": self.color_scheme,
"主色色相": self.primary_hue_group,
}
@dataclass
class MaterialFeatures:
"""材质特征"""
material_type: str = "" # 面料类型
texture: str = "" # 肌理描述
sheen: str = "" # 光泽度 (matte/satin/glossy)
opacity: str = "" # 透明度 (opaque/sheer/mixed)
weight: str = "" # 克重感知 (light/medium/heavy)
def to_dict(self) -> Dict:
return {
"面料类型": self.material_type,
"肌理": self.texture,
"光泽度": self.sheen,
"透明度": self.opacity,
"克重感知": self.weight,
}
@dataclass
class RunwayLook:
"""单套秀场 LOOK"""
look_id: str # 唯一 ID
brand: str # 品牌
season: Season # 季节
show_tier: str = "mainstream" # 秀场级别
brand_tier: str = "commercial" # 品牌级别
# 四大维度特征
silhouette: SilhouetteFeatures = field(default_factory=SilhouetteFeatures)
prints: List[PrintFeatures] = field(default_factory=list)
color: ColorFeatures = field(default_factory=ColorFeatures)
material: MaterialFeatures = field(default_factory=MaterialFeatures)
# 品类
category: str = "" # dress/top/bottom/outerwear/accessory
# 风格标签
style_tags: List[str] = field(default_factory=list)
@dataclass
class TrendResult:
"""趋势分析结果"""
element_name: str
element_type: str # silhouette/print/color/material
frequency: int = 0 # 出现频次
weighted_score: float = 0.0 # 加权热度
acceleration: float = 0.0 # 趋势加速度(与上季对比)
trend_direction: str = "" # rising/declining/new/stable
brands_featuring: List[str] = field(default_factory=list)
cross_trends: List[Dict] = field(default_factory=list)
@dataclass
class ProductDevParams:
"""电商新品开发参数"""
product_category: str
recommended_silhouette: Dict
recommended_print: Dict
recommended_color: Dict
recommended_material: Dict
trend_score: float = 0.0
confidence: float = 0.0
competing_brands: List[str] = field(default_factory=list)
market_gap: str = "" # 市场空白点分析
def to_dict(self) -> Dict:
return {
"推荐品类": self.product_category,
"剪裁参数": self.recommended_silhouette,
"印花参数": self.recommended_print,
"色彩参数": self.recommended_color,
"材质参数": self.recommended_material,
"趋势热度": f"{self.trend_score:.1f}",
"置信度": f"{self.confidence*100:.0f}%",
"竞品动态": self.competing_brands,
"市场空白": self.market_gap,
}
"silhouette_extractor.py"
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
silhouette_extractor.py
剪裁特征提取器:将秀场 LOOK 的结构化描述转化为剪裁特征向量
"""
from typing import Dict, List
from config import SILHOUETTE_CODES
from data_models import RunwayLook, SilhouetteFeatures
class SilhouetteExtractor:
"""
剪裁特征提取器
职责:将 LOOK 的结构化描述解析为标准化剪裁向量
支持从文本描述中推断剪裁特征(简化版 NLP)
"""
# 关键词 → 编码映射
KEYWORD_MAP = {
# 廓形关键词
"a-line": 1, "a字": 1, "伞裙": 1, "蓬蓬": 1,
"h-line": 2, "直筒": 2, "h型": 2, "column": 2,
"oversized": 3, "超大": 3, "宽大": 3, "boyfriend": 3,
"fitted": 4, "修身": 4, "贴身": 4, "bodycon": 4,
"wrap": 5, "裹身": 5, "wrap": 5,
"balloon": 6, "气球": 6, "puff": 6,
"peplum": 7, "裙摆": 7,
"empire": 8, "帝国腰": 8, "高腰线": 8,
# 肩线关键词
"dropped shoulder": -2, "落肩": -2, "slouchy": -2,
"natural shoulder": 0, "自然肩": 0,
"padded shoulder": 2, "垫肩": 2, "power shoulder": 2,
# 腰线关键词
"low-rise": -2, "低腰": -2,
"high-rise": 1, "高腰": 1,
"extra high-rise": 2, "超高腰": 2,
# 裙长关键词
"mini": 1, "迷你裙": 1,
"above-knee": 2, "膝上": 2,
"knee-length": 3, "及膝": 3,
"midi": 4, "中长裙": 4,
"maxi": 5, "长裙": 5,
"floor-length": 6, "及地": 6,
# 领型关键词
"v-neck": 1, "v领": 1,
"crew neck": 2, "圆领": 2,
"square neck": 3, "方领": 3,
"turtleneck": 4, "高领": 4,
"off-shoulder": 5, "一字肩": 5,
"sweetheart": 6, "心形领": 6,
# 袖型关键词
"sleeveless": 0, "无袖": 0,
"short sleeve": 1, "短袖": 1,
"three-quarter": 2, "七分袖": 2,
"long sleeve": 3, "长袖": 3,
"puff sleeve": 4, "泡泡袖": 4,
"bell sleeve": 6, "喇叭袖": 6,
}
@classmethod
def from_keywords(cls, description: str) -> SilhouetteFeatures:
"""
从文本描述中推断剪裁特征
Args:
description: 如 "A-line 廓形 落肩 高腰 中长裙 泡泡袖"
Returns:
SilhouetteFeatures 对象
"""
desc = description.lower()
features = SilhouetteFeatures()
details = []
# 逐项匹配关键词
for keyword, code in cls.KEYWORD_MAP.items():
if keyword in desc:
if keyword in ("a-line", "a字", "伞裙", "蓬蓬"):
features.silhouette = code
details.append("A-line廓形")
elif keyword in ("h-line", "直筒", "h型", "column"):
features.silhouette = code
details.append("H-line廓形")
elif keyword in ("oversized", "超大", "宽大", "boyfriend"):
features.silhouette = code
details.append("Oversized廓形")
elif keyword in ("fitted", "修身", "贴身", "bodycon"):
features.silhouette = code
details.append("修身廓形")
elif "肩" in keyword or "shoulder" in keyword:
features.shoulder = code
details.append("落肩" if code < 0 else "垫肩" if code > 0 else "自然肩")
elif "腰" in keyword or "rise" in keyword:
features.waistline = code
details.append("低腰" if code < 0 else "高腰" if code > 0 else "中腰")
elif "mini" in keyword or "膝" in keyword or "长裙" in keyword or "及地" in keyword:
features.hem_length = code
elif "领" in keyword or "neck" in keyword:
features.neckline = code
elif "袖" in keyword or "sleeve" in keyword:
features.sleeve = code
features.details = details
return features
@classmethod
def batch_extract(cls, looks: List[RunwayLook]) -> None:
"""批量提取(结果写回 LOOK 对象)"""
for look in looks:
# 如果 silhouette 未填充,尝试从 style_tags 推断
if look.silhouette.silhouette == 0 and look.style_tags:
desc = " ".join(look.style_tags)
extracted = cls.from_keywords(desc)
look.silhouette = extracted
@staticmethod
def compute_silhouette_frequency(
looks: List[RunwayLook]
) -> Dict[str, int]:
"""统计各廓形出现频次"""
freq = {}
for look in looks:
code = look.silhouette.silhouette
name = SILHOUETTE_CODES["silhouette"].get(code, "未知")
freq[name] = freq.get(name, 0) + 1
return freq
@staticmethod
def compute_feature_distribution(
looks: List[RunwayLook]
) -> Dict[str, Dict[str, int]]:
"""统计所有剪裁维度的分布"""
dims = {
"廓形": ("silhouette", SILHOUETTE_CODES["silhouette"]),
"肩线": ("shoulder", SILHOUETTE_CODES["shoulder"]),
"腰线": ("waistline", SILHOUETTE_CODES["waistline"]),
"裙长/裤长": ("hem_length", SILHOUETTE_CODES["hem_length"]),
"领型": ("neckline", SILHOUETTE_CODES["neckline"]),
"袖型": ("sleeve", SILHOUETTE_CODES["sleeve"]),
}
result = {}
for dim_name, (attr, code_map) in dims.items():
dist = {}
for look in looks:
val = getattr(look.silhouette, attr)
name = code_map.get(val, "未标注")
dist[name] = dist.get(name, 0) + 1
# 只保留 Top 5
sorted_dist = sorted(dist.items(), key=lambda x: x[1], reverse=True)[:5]
result[dim_name] = dict(sorted_dist)
return result
"print_analyzer.py"
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
print_analyzer.py
印花图案分析器:分类、统计、热度排名
"""
from typing import Dict, List
from config import PRINT_CATEGORIES
from data_models import RunwayLook, PrintFeatures
class PrintAnalyzer:
"""
印花图案分析器
功能:
1. 统计各印花类型的出现频次
2. 分析覆盖率/位置/尺度的分布
3. 计算印花热度排名
4. 发现"印花 × 品类"交叉趋势
"""
@staticmethod
def analyze(looks: List[RunwayLook]) -> Dict:
"""完整印花分析"""
# 频次统计
freq = PrintAnalyzer.frequency(looks)
# 热度排名(加权)
ranked = PrintAnalyzer.ranked_scores(looks)
# 交叉分析
cross = PrintAnalyzer.cross_with_category(looks)
# 覆盖率分析
coverage = PrintAnalyzer.coverage_analysis(looks)
return {
"frequency": freq,
"ranked": ranked,
"cross_category": cross,
"coverage_analysis": coverage,
}
@staticmethod
def frequency(looks: List[RunwayLook]) -> Dict[str, int]:
"""印花频次统计"""
freq = {}
for look in looks:
for p in look.prints:
cat_name = PRINT_CATEGORIES.get(p.print_category, {}).get("name", "未知")
freq[cat_name] = freq.get(cat_name, 0) + 1
return freq
@staticmethod
def ranked_scores(looks: List[RunwayLook]) -> List[Dict]:
"""加权热度排名"""
scores = {}
for look in looks:
weight = PrintAnalyzer._get_look_weight(look)
for p in look.prints:
cat = p.print_category
cat_name = PRINT_CATEGORIES.get(cat, {}).get("name", "未知")
if cat_name
利用AI解决实际问题,如果你觉得这个工具好用,欢迎关注长安牧笛!
更多推荐



所有评论(0)