I’m building an automated workflow to intelligently crop decorative wallpaper images based on customer wall dimensions (width × height in cm). The catalog has 7000+ images with very different subjects (flowers, leaves, geometric patterns, figures, etc.).
My current approach:
AI Agent with OpenAI Vision analyzes the image and returns crop coordinates as percentages (left, right, focal_y)
A JavaScript node converts percentages to pixels based on image dimensions and wall size
A Python/Pillow node executes the actual crop
The problem is that GPT Vision estimates coordinates visually and is sometimes imprecise — subjects like leaves or flowers end up slightly cut at the edges.
What I already tried:
Setting temperature: 0 for determinism
Detailed prompt with design principles and examples
focal_y for vertical positioning
My question: What would be the best approach to improve precision on a large and varied catalog?
Refine the prompt further?
Add OpenCV in the Python node to detect precise object boundaries after GPT gives the approximate area?
Also, prompts are everything in AI agents, so you have to check your prompts here:
Your project idea is awesome, but 7k images are very concerning. Instead, why don’t you let AI generate the image based on the user requirement? I think that would be cheaper than actually picking an image from that huge catalogue.
ich bin auf deinen Thread gestoßen, während ich das gleiche Problem aus einem anderen Blickwinkel erforscht habe — mit Claude (nicht GPT), um Zuschnittkoordinaten für redaktionelle Sportfotografie zu erhalten, und dann den Zuschnitt über ImageMagick in n8n anzuwenden. Gleiche Architektur, gleiche Frustration: Das Modell schätzt visuell und verfehlt gelegentlich das Motiv.
Ein paar Fragen, falls du seit April Zeit zum Iterieren hattest:
Hast du am Ende OpenCV zur Grenzverfeinerung nach dem LLM-Durchlauf hinzugefügt, oder hat dir Prompt Engineering bereits gereicht?
Hast du versucht, zu einem anderen Modell (Gemini, Claude) oder einer dedizierten Cropping-API wie Imagga zu wechseln?
Welche Erkenntnisse hast du beim Strukturieren der Koordinatenausgabe gewonnen — Prozentsätze vs. Pixel, Bounding Box vs. Fokuspunkt?
Ich teile gerne meine Prompt-Iterationen mit dir, falls das hilfreich ist.