fix(viral_video): #2188 VLM outfit回填服装关键词扩充
CI/CD Pipeline / Check if frontend-only change (push) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (push) Successful in 2s
CI/CD Pipeline / Check push changed paths (push) Successful in 17s
ACR Cleanup / ACR Image Cleanup (pull_request_target) Successful in 28s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 47s
CI/CD Pipeline / Frontend Lint (push) Has been skipped
CI/CD Pipeline / PR Build API Image (push) Has been skipped
CI/CD Pipeline / PR Build Web Image (push) Has been skipped
CI/CD Pipeline / PR Build Worker Image (push) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m51s
CI/CD Pipeline / Build Staging API Image (push) Successful in 33s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m21s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Has been skipped
CI/CD Pipeline / Validate - Python (mypy + alembic) (push) Successful in 3m47s
CI/CD Pipeline / Integration Tests (push) Successful in 3m40s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m54s
CI/CD Pipeline / Validate - Style (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging API Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Retag skipped Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
CI/CD Pipeline / Validate - Security (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (push) Has been cancelled
AI Code Review / AI Code Review (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Security (pull_request) Successful in 9m45s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 2s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 2s
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Successful in 3m16s
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Successful in 4m22s
CI/CD Pipeline / Validate - Style (pull_request) Failing after 4m25s
CI/CD Pipeline / Frontend Lint (pull_request) Has been skipped
CI/CD Pipeline / PR Build Web Image (pull_request) Has been skipped
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 47s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 1m50s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Successful in 2m23s
CI/CD Pipeline / Build Production API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Canary Release to Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / CI Gate (pull_request) Failing after 2s

- 原 cloth_kws 漏了'上衣/打底衫/罩衫/雪纺衫/西服/套装/网纱/短袖/长袖/无袖'等常见词,
  导致'白色V领上衣''黑色透视网纱短袖上衣'等未命中,回退到通用'日常服装'
- 扩充到40+关键词,覆盖衬衫/T恤/毛衣/外套/裙装/裤装/制服/通用上装词
- 提取窗口 ci-8/ci+4 → ci-12/ci+8,向前多抓颜色/材质形容词,向后多抓款式词
- 重复词(马甲/背心)清理
This commit was merged in pull request #2192.
This commit is contained in:
xiaoxia
2026-10-05 13:47:26 +08:00
parent 35207ae040
commit 77133eb9a0
+20 -35
View File
@@ -495,47 +495,32 @@ def _analyze_single_image(
_ptxt = _pn + " " + _pf
# 服装关键词识别(常见上装/下装/裙装/套装)
_cloth_kws = [
"衬衫",
"T恤",
"毛衣",
"针织衫",
"卫衣",
"外套",
"西装",
"夹克",
"风衣",
"大衣",
"羽绒服",
"马甲",
"背心",
"连衣裙",
"半身裙",
"短裙",
"长裙",
"牛仔裤",
"休闲裤",
"西裤",
"运动裤",
"短裤",
"旗袍",
"汉服",
"制服",
"polo衫",
"POLO衫",
"针织",
"毛衫",
"开衫",
"帽衫",
"皮夹克",
"皮衣",
# 衬衫/T恤类
"衬衫", "T恤", "POLO衫", "polo衫", "Polo衫",
"打底衫", "雪纺衫", "罩衫", "针织衫",
# 毛衣/卫衣/针织类
"毛衣", "卫衣", "帽衫", "针织", "毛衫", "开衫",
# 外套/西装/夹克/风衣类
"外套", "西装", "西服", "夹克", "皮衣", "皮夹克",
"风衣", "大衣", "羽绒服", "棉服", "棉服", "马甲", "背心", "开衫外套",
# 裙装
"连衣裙", "半身裙", "短裙", "长裙", "百褶裙", "A字裙", "旗袍",
"汉服", "JK裙",
# 裤装
"牛仔裤", "休闲裤", "西裤", "运动裤", "短裤", "阔腿裤", "打底裤",
# 制服/套装
"制服", "套装", "职业装", "工装",
# 通用上装/下装词(兜底)
"上衣", "短袖", "长袖", "无袖", "半袖", "吊带", "背心",
"网纱", "雪纺", "真丝", "纯棉", "亚麻",
]
for _ckw in _cloth_kws:
if _ckw in _ptxt:
_ci = _ptxt.find(_ckw)
# 向前找颜色/材质/款式形容词(白/黑/米/红/蓝/灰/棉/麻/长/短/厚/薄/长袖/短袖/翻领/圆领/V领/印花/条纹等)
_start = max(0, _ci - 8)
_start = max(0, _ci - 12)
# 向后包含款式词(长袖/短袖/外套/套装/上衣等后续修饰)
_end = min(len(_ptxt), _ci + len(_ckw) + 4)
_end = min(len(_ptxt), _ci + len(_ckw) + 8)
_outfit_extract = _ptxt[_start:_end].strip(" ,,。.、")
# 仅清理明确的品牌/产品类前缀(不清理颜色/款式/尺寸形容词)
_outfit_extract = re.sub(