diff --git a/backend/visual_qc_apps/text_product_overlap/app.py b/backend/visual_qc_apps/text_product_overlap/app.py index 34c167d..0f05bb0 100644 --- a/backend/visual_qc_apps/text_product_overlap/app.py +++ b/backend/visual_qc_apps/text_product_overlap/app.py @@ -71,7 +71,19 @@ CALLOUT TEXT — lenient check: - However, callout text that directly OVERLAPS or TOUCHES the product hero zone (text sitting on top of the product imagery, text squeezed into tight space where the product edge is immediately adjacent with no clear separation) is still a FAIL. Having a connector line does not excuse the text physically overlapping the product. - The key test: is the callout text surrounded by clear/clean space, or is it crammed against the product imagery? -=== STEP 4: HEADLINE WIDTH CHECK (CRITICAL) === +=== STEP 4: HIDDEN OVERLAP DETECTION — INCOMPLETE WORDS === + +This step catches overlaps where the text colour matches the product colour, making the overlapping letters INVISIBLE. The LLM cannot see a black letter on a dark product, but it CAN detect that a word is incomplete. + +For every text block positioned adjacent to or near the product hero zone: +1. Read each word carefully. Does every word appear COMPLETE — starting and ending with expected letters that form a real word? +2. If a word appears TRUNCATED, MISSING ITS FIRST OR LAST LETTER(S), or has a gap where a character should be, AND the missing portion would be positioned over/against the product hero zone — this is strong evidence of hidden text-product overlap. +3. Example: Reading "ragrância" near the product edge instead of "Fragrância" — the missing "F" is hidden behind the dark product because the black text blends into the dark purple surface. The incomplete word PROVES the overlap exists. +4. Also check for words that look like they START mid-word (e.g., "ech" instead of "tech", "ara" instead of "para") — these suggest the beginning of the word is hidden behind the product. + +This counts as a FAIL even though the overlapping letter cannot be visually detected — the incomplete word is definitive proof that text extends into the product zone. Score 3-4 for this type of hidden overlap. + +=== STEP 5: HEADLINE WIDTH CHECK (CRITICAL) === This step catches a common layout problem that is easy to miss: @@ -87,7 +99,7 @@ COMPARE these two layouts: - BAD: "O nosso compromisso." on ONE LINE across ~60% of the image width, with the product in the centre-right. The right portion of the headline extends into the product's horizontal space → FAIL (score 4-5). - GOOD: "O nosso compromisso." wrapped to TWO LINES ("O nosso" / "compromisso.") on the left ~30% of the image, keeping entirely to the left of the product → PASS. -=== STEP 5: GENERAL LAYOUT COMPARISON === +=== STEP 6: GENERAL LAYOUT COMPARISON === Good layout: Text is arranged to AVOID the product hero zone entirely. This may mean: - Headlines are wrapped to multiple shorter lines on one side @@ -113,6 +125,7 @@ YOUR OUTPUT MUST BE a JSON code block: "text_product_overlap": "Pass" or "Fail" or "Not Applicable", "hero_zone_elements": ["List what you identified as part of the product hero zone (product + surrounding elements)"], "text_elements_checked": ["List each marketing text element and whether it overlaps the hero zone"], + "incomplete_words_detected": ["List any words that appear truncated/incomplete near the product, e.g. 'ragrância (expected: Fragrância) — first letter hidden behind product'. Empty array if all words are complete."], "overlap_details": "Describe specifically which text overlaps which hero zone element, or 'No overlap detected'", "score": 1-10, "recommendations": ["Recommendation 1", "Recommendation 2"]