From d9c50de19644c1b24416416e3c2f1ac4fae8cb63 Mon Sep 17 00:00:00 2001 From: Daniel Bedeleanu Date: Wed, 22 Apr 2026 11:51:04 +0300 Subject: [PATCH] docs: improve crop guidance in AI prompt - capture entire item - Increase padding from 10-15px to 20-30px for context - Emphasize ENTIRE item must be visible, not tight crop - Add examples of correct vs wrong crop detection - Address findings from debug panel testing: AI was cropping too tightly --- config/ai_prompt.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/config/ai_prompt.md b/config/ai_prompt.md index d7f3e3c1..5ced1497 100644 --- a/config/ai_prompt.md +++ b/config/ai_prompt.md @@ -86,9 +86,17 @@ - Return bounding box: `{x, y, width, height}` in pixel coordinates - Rules: - `x, y`: top-left corner of item (pixel offset from image top-left) - - `width, height`: dimensions of item bounding box - - Include minimal padding (10-15 pixels) around item edges + - `width, height`: dimensions of item bounding box — **MUST include the ENTIRE visible item** + - Include adequate padding (20-30 pixels) around item edges for context + - Crop should show the complete item clearly with some breathing room, NOT tightly squeezed - Ignore background clutter, other items, hands, reflections + - **CRITICAL**: If the item has text/labels on multiple sides, ensure the bounding box captures ALL of them, not just one section + + **Crop Examples**: + - ✅ CORRECT: Entire hard drive visible with all text readable (top label, side labels, connectors) + - ✅ CORRECT: Full cable with both ends visible and part number readable on main label + - ❌ WRONG: Only the top corner cropped, missing the body and other labels + - ❌ WRONG: Tiny bounding box around just one line of text, ignoring rest of item ### Rotation Analysis (CRITICAL - MAKE TEXT READABLE IN STANDARD ENGLISH)