fix: stabilize dense-text rejection and serialize delayed image flush
This commit is contained in:
@@ -241,6 +241,7 @@ class ImageAnalyzer:
|
||||
|
||||
DENSE_TEXT_SUBJECT_KEYWORDS = (
|
||||
"宣传栏", "公告栏", "展板", "海报墙", "通知栏", "知识栏", "制度牌", "公示栏", "墙报", "密密麻麻",
|
||||
"宣传海报", "知识海报", "科普海报", "防灾减灾", "宣传板", "宣传页",
|
||||
"表格", "检索表", "配伍表", "药物配伍", "课程表", "流程表", "说明表", "数据表",
|
||||
"word wall", "poster wall", "bulletin board",
|
||||
)
|
||||
@@ -571,6 +572,10 @@ class ImageAnalyzer:
|
||||
kw in scene_text
|
||||
for kw in self.DENSE_TEXT_SUBJECT_KEYWORDS
|
||||
)
|
||||
dense_text_hint = any(
|
||||
kw in scene_text
|
||||
for kw in ("密集文字", "大量文字", "小字", "多板块", "细字")
|
||||
)
|
||||
|
||||
# 校验比例合法性
|
||||
valid_ratios = {"1:1", "9:16", "16:9", "3:4", "4:3", "3:2", "2:3", "5:4", "4:5"}
|
||||
@@ -640,7 +645,8 @@ class ImageAnalyzer:
|
||||
|
||||
# 硬规则1:文字很多(>100)且密密麻麻不接单
|
||||
text_gt_100 = text_amount in ["大量 (51-200 字)", "极多 (200 字以上)"]
|
||||
if text_gt_100 or dense_text_scene:
|
||||
dense_text_hard_reject = text_gt_100 or dense_text_scene or (has_text == "yes" and dense_text_hint)
|
||||
if dense_text_hard_reject:
|
||||
feasibility = "no"
|
||||
risk = "high"
|
||||
note = "文字内容过于密集(如宣传栏/公告栏),暂不接单处理"
|
||||
|
||||
Reference in New Issue
Block a user