AI image similarity search for a Surat textile design house: find saree, suit and dupatta designs by photo or by words
How Yukti AI built textile design software that searches a design library by look. A fabric photo, or a description such as “pink floral border design”, returns the closest designs in the chosen category, each with its design code and a similarity score. Built in about 7 days on the client’s real files, and measured at every step.
A Surat textile design house makes print and embroidery-look designs for ladies’ ethnic wear, in a library of roughly 80,000 images across about 1,000 sets that could only be searched by folder and filename. Yukti AI profiled the real files, fixed the “colourway collage” problem with automatic main-panel cropping, tested OpenAI and Google Vertex AI embeddings head to head, chose Vertex AI, and delivered two visual-search apps plus an n8n search workflow. The system is designed to index the full library; the numbers here come from 97 recon files and a 401-design test catalogue.
Quick facts
| Client | A Surat textile design house (name withheld) |
|---|---|
| Industry | Digital print and embroidery-look designs for ladies’ ethnic wear: suit and kurti & dupatta sets, sarees, dupattas, lehenga, daman, all-over prints |
| Library | Roughly 80,000 design images in about 1,000 sets, each design with a numeric code; the system is designed to index all of it |
| Measured on | 97 recon files in 2 sets; a 401-design test catalogue in 6 categories |
| Core challenge | Search only by folder and filename; files are colourway collages with inline watermarks; Google Lens cannot search a private catalogue |
| Solution | Image similarity search by photo or by words, inside one category, with design code and score on every result |
| Embeddings chosen | Google Vertex AI multimodal (1408 dimensions), over gpt-4o-mini captions + text-embedding-3-small (1536) |
| Headline measurement | Worst colourway-sheet case, design 13102: rank 70 of 97 raw, rank 1 after main-panel cropping |
| Build time & status | About 7 days; live, with two working search apps and an n8n workflow tested end to end |
| Stack | Python, Flask, Pillow, NumPy, Google Vertex AI, OpenAI, Pinecone, n8n |
What is image similarity search for a textile catalogue? Every design image becomes an embedding, a list of numbers that captures how it looks. A photo or a typed description becomes the same kind of vector, and the designs whose vectors sit closest are returned, whatever their filenames say.
What did Yukti AI build? Two live search apps that return the eight closest designs in a chosen category, one on Google Vertex AI multimodal embeddings (the pipeline chosen) and one on an OpenAI caption pipeline; an n8n search workflow over a Pinecone index; and a main-panel detector that isolates the motif on colourway sheets. Each pipeline change was scored as the rank of the true design among 97 samples.
How does a Surat textile design house’s design catalogue work?
This design house produces digital print and embroidery-look designs for ladies’ ethnic wear. Every design carries a numeric code printed on the artwork, such as 13101 or 21875, alongside the brand watermark. Buyers choose by look; the library is filed by code. It is organised the way the trade works:
- Sets — such as a viscose-look suits set with four colours per design, or an embroidery thread-stitching set of 30 designs.
- Six categories — All Over, Saree, Kurti & dup (suit sets), Dupatta, daman and Lehengha.
- Colourway sheets — one image with a large main panel plus 3–4 narrow strips of the same design in other colours.
- Model mockups — for some designs, a model wearing the stitched kurti and dupatta.
- Clean repeats — sets such as the embroidery set are full-bleed repeating tiles in one colourway.
The ask: when a customer sends a photo of a fabric or describes it, return the matching design code, plus similar designs in the same category.
Every design already comes in several colourways, so “something pink” is not an answer. The design matters more than the colour, and that rule shaped every technical decision on this page.
Why was an 80,000-design library impossible to search by look?
Because nothing in the library described what a design looks like. The only handles were folder names and codes inside filenames, and the files were made to show buyers, not to be read by software: collages, moving watermarks and uneven formats. The recon of real files found:
- Collages, not designs. Most files are colourway grids and sometimes model mockups, so embedding a raw file captures “a four-panel collage”, not the motif.
- Watermarks that move. The brand watermark and phone number are printed as text at varying positions, so no fixed crop removes them.
- No two sets alike. Sizes from 1800×2250 to 4354×4000 px, 100, 150 or 300 DPI (sometimes within one set), aspect ratios from 0.8 to 1.1, and 0 of 97 files with a solid border to auto-crop on.
- Uneven naming. Suffixes such as “Modeling”, “Suits 4 color” and “copy”, and mixed .jpg, .JPG, .jpeg and .jfif extensions.
- Few lifestyle shots. About 7 of 67 codes in the suits sample had model photos, none in embroidery, so they cannot be the basis for matching.
- Heavy files. About 1.48 MB each, or roughly 119 GB at 80,000 images; processing is limited by reading files more than by computation.
- Colourway sheet and main panel
- One image showing a design plus narrow strips of it in other colours; the main panel is the large section with the full motif, the part worth matching.
- Motif, all-over repeat, pallu, buti
- The drawn element of a print; a motif tiled across the fabric; the decorated end of a saree; a small scattered or corner motif.
- Embedding, vector database, cosine similarity
- Numbers an AI model produces to represent an image or sentence; a store that finds the nearest vectors fast; a score of how closely two vectors point the same way.
- Rank of the true design
- Where the correct design lands in the results list: the main accuracy measure in this build.
How finding a design changed
Before
- Designs findable only by folder name and filename
- No search by what a design looks like
- Google Lens could not reach a private catalogue
- Colourway collages that confuse any whole-image match
After
- Search by a fabric photo or a typed description
- Eight closest designs in the category, each with code and score
- Main panel of each colourway sheet isolated automatically
- Design codes read from filenames; no catalogue image made public
Why not just use Google Lens?
The client raised it in a walkthrough, and it is the right question. Lens finds similar images on the public web, but it has no API for searching a private catalogue, so it cannot say which of a design house’s own unpublished codes a photo matches. The Google tool that can is Vertex AI multimodal embeddings, used for private vector search over your own files. That is the Google Lens alternative for a private catalogue, and it is what the final pipeline uses.
What did the recon of real design files show?
Before any search code, Yukti AI profiled 97 real files from two sets, 67 suit colourway files and 30 embroidery files (143.9 MB), logging size, dimensions, aspect ratio, DPI, brightness and borders per file, plus a per-set profile of where the code and watermark sit. Aspect ratios clustered at 0.80, 0.91 and about 1.0. Then three sensible-sounding ideas were tested on real embeddings instead of being assumed:
| Hypothesis | Result |
|---|---|
| H1: grayscale to make matching ignore colour | Supported, with a caveat: motifs stayed distinct, but one design’s colourways collapse together |
| H2: index 30% crops so a partial photo can match | Partly: works for placement designs with landmarks, not dense all-over repeats; a crop must hold a full repeat |
| H3: find the set first, then the design | Looked separable on 2 sets, too weak on real embeddings; so the user picks the category |
Why did the first AI model match the collage instead of the print?
Because a colourway sheet looks like a grid before it looks like a flower. A CLIP baseline (ViT-B-32) scored designs within a set closer to each other (0.816 and 0.841) than across sets (0.748): it was seeing each set’s template. With a model photo as the query, the plain design ranked anywhere from 5th to 51st of 60, and only 2 of 7 reached the top 10.
A caption pipeline came next: gpt-4o-mini describes the print, and text-embedding-3-small embeds the caption. With a 30% crop of a known design standing in for a customer’s photo, 3 of 4 queries on raw files put the true design in the top 5 of 97.
A 30% crop plays the customer’s photo; the rank of the true design among all 97 is recorded; the pipeline is changed and the same queries re-run; scores are checked against an independent Python calculation. Every result here is a true design’s rank.
How main-panel cropping moved a design from rank 70 to rank 1
On the suit colourway sheets, a thin near-black or near-white vertical line separates the main panel from the colour strips. Yukti AI wrote a detector that scans a band of the image for that line in the 35–85% width range and crops everything to its left, so only the main panel is embedded. On the known failure case, design 13102, the true design moved from rank 70 of 97 to rank 1.
Scope was narrowed on purpose: full panel-splitting was estimated at 3–5 days of work against 2–3 for main-panel cropping, which fixed the measured failure directly, and the strips stay with their design as “also available in these colours”. Not every query improved: design 13401 dropped from rank 4 to 27 and is unresolved, and a controlled resize-only test is the next measurement.
How the visual search system is put together
OpenAI or Google Vertex AI: which embeddings found the right fabric designs?
On this client’s designs, Google Vertex AI. Both pipelines embedded the same 401-design test catalogue, and a harness listed the five nearest designs in the same category for six queries, one per category (Saree 6102, All Over 14260, Kurti & dup 16008, Dupatta 4530, daman 3170, Lehengha 576), checked by eye side by side.
| OpenAI caption pipeline | Google Vertex AI multimodal | |
|---|---|---|
| Image to vector | gpt-4o-mini caption, then text-embedding-3-small (1536 dimensions) | Image embedded directly (1408 dimensions) |
| Search by words | Text embedded like a caption | Same model’s text encoder, same space as images |
| Rate limits | 200k tokens a minute hit after about 10 full-size images | None hit |
| All Over 14260 neighbours | 0.72–0.75, mixed designs | 0.84–0.89, its own 14255–14261 colourway block |
| Recorded API fee per image | About double the Vertex AI fee | About half the OpenAI path’s fee |
| Verdict | Kept as its own app to compare or revert | Chosen |
One spot check shows why this matters to a buyer: a magenta tropical-leaf dupatta (4530) returned the same illustration style in green (4851). That is design over colour, verified by eye. The fee comparison uses the cloud providers’ usage fees recorded during the build, not Yukti AI pricing.
The components of the visual search system
Beyond the recon inventory, main-panel detector and comparison harness above, these parts were built and run on real files.
Two catalogue builders
The OpenAI builder walks the six category folders, resizes each image to a maximum of 1024 px, has gpt-4o-mini describe it at temperature 0 (motif type, colours, density, layout style) and embeds the caption. The Vertex AI builder embeds each image directly with Google’s multimodalembedding@001 model. Both parse the design code from the filename digits, retry on rate-limit, quota and temporary service errors, and resume from a JSON cache; each produced 401 entries. Benefit: ingestion that survives interruptions.
Pinecone index and n8n visual-search workflow
A Pinecone index (1536 dimensions, cosine) holds the 97 recon embeddings with set, filename, design code, caption and a model-photo flag. In n8n, a webhook takes a JSON text query or a multipart image; a “Has Image?” branch runs Caption Image and Embed Caption for photos, or Embed Text for words, and both end at Query Pinecone. It was tested end to end live. Benefit: one endpoint a WhatsApp bot, website or ERP could call. More on n8n automation.
Two visual-search apps
Flask apps open on six category tiles with design counts, under a Gujarati-English prompt, “Sauthi pehla category select karo” (first, select a category). Each search page offers two options: upload a fabric photo, or describe it in words. Results are the top 8 designs in the category as thumbnails with design code and similarity score. The OpenAI app shows an “Interpreted as:” box with the caption; the Vertex AI app, badged “Google Vertex AI”, embeds photos directly and needs no captions for text search. They run side by side, so the team can switch or revert, and work on a phone. See custom web app development.
How do you find similar saree, suit and dupatta designs?
Staff pick a category, then give the system a photo of the fabric or a few words describing it. The system turns that input into a vector, compares it with every design in the category and returns the eight closest designs with their codes and scores. Other systems can run the same fabric image search through the n8n webhook. AI steps are highlighted.
Search by photo
Search by words
Search through the n8n webhook
How do you know the search results are right?
Compare the system’s scores with an independent calculation. Here, pipeline scores were checked against a separate Python reference, and the silent failures found in testing, a drifting caption and two n8n scoring bugs, were fixed during the build. A search that returns the wrong design with a confident score is worse than no search, so consistency, privacy and isolation from live systems were treated as requirements, not extras.
Same photo, same answer
Captions that varied between runs made one photo return different results. Found in testing and fixed with temperature 0 before customers saw it.
Silent bugs caught
Two n8n issues returned plausible but wrong scores with no error: 0.159 where 0.672 was expected. Only an independent Python check exposed them.
Exact match after the fix
A live text query then scored 0.672, matching the Python reference exactly.
No public images
Photos travel as binary uploads, not hosted links, so no catalogue image had to be made public.
Nothing live touched
New keys, index and workflow sit apart from the production bots, knowledge-base index and WhatsApp workflow in the same accounts.
Built around limits
The caption model’s rate limit was hit after about 10 full-size images, so images are resized first.
What each person gets
Staff and sales
Pick a category, search by photo or description, and act on design codes with similarity scores, from a phone or a desk.
Customer
Sends a photo or description of the fabric they want; that is the query. A customer-facing channel such as WhatsApp is a separate step.
Catalogue admin
Adds folders of design images and rebuilds the embedding catalogue with the build scripts.
How should a textile design catalogue be labelled?
In the trade’s own words, not in generic image tags. Vectors find designs that look alike, but buyers still talk about pallus, butis and paisleys. Alongside the vectors, Yukti AI drafted a motif taxonomy for this design house, to be revised as more sets are seen, so labels use the vocabulary a buyer recognises:
| Facet | Draft values |
|---|---|
| Layout | All-over repeat, border and pallu, placement panel, corner buti, garment-look mockup |
| Motif family | Realistic floral, linear-sketch floral, embroidery-texture floral, damask and lattice, geometric abstract, paisley, conversational |
| Density | Sparse, medium, dense |
| Background | Solid, textured or grunge, gradient, dark ground, light ground |
| Colourway group | An ID linking the colour variants of one design, derived at ingestion |
How it was built in about 7 days
Recon of real files
97 files profiled for size, DPI, borders, codes and watermarks before any search code.
Hypotheses and baseline
Grayscale, crop indexing and set-first search tested; a CLIP baseline exposed the collage problem.
First pipeline, tested live
Caption embeddings, Pinecone and n8n end to end; silent scoring bugs and caption drift fixed.
Fix the collage problem
Main-panel detection: 67 of 67 dividers found; the worst case from rank 70 to rank 1.
Vertex AI pipeline
Direct image embeddings for the 401-design test catalogue, with text search in the same space.
Head-to-head and two apps
Six queries compared side by side; Vertex AI chosen; two search apps running.
What was measured
Measured results only. No business outcomes, such as time saved, have been recorded yet, so none are claimed.
What is live today, and what comes next?
The system is live: two search apps run over the 401-design test catalogue, the n8n workflow runs over a 97-design Pinecone index, and Google Vertex AI is the pipeline chosen for the full library. This case study does not claim that the whole library of roughly 80,000 designs is indexed yet; the cards below separate what is live, what comes next and what is only possible.
Live today
Two search apps over the 401-design test catalogue, one on Google Vertex AI and one on OpenAI; the n8n workflow, tested end to end over a 97-design Pinecone index. Also built and measured: the main-panel detector and the Vertex AI catalogue builder.
Next steps
Index the rest of the roughly 80,000-design library with main-panel cropping at ingestion; run the resize-only test and resolve regressions such as 13401; revise the taxonomy.
Possible extensions
Yukti AI can connect the search to a WhatsApp bot or website, add filters such as fabric or stock status, and link results to an ERP. Options, not features already built.
Technology and security
Stack: Python · Flask · Pillow · NumPy for cosine similarity · Google Vertex AI multimodal embeddings · OpenAI gpt-4o-mini and text-embedding-3-small · Pinecone · n8n. An open-source CLIP model was used only for the baseline.
Security: no catalogue image was made public; the cloud project uses service-account authentication; API keys live in environment variables, not code.
Full technical detail
- Vertex AI multimodalembedding@001 — 1408-dimension image and text embeddings in one space.
- gpt-4o-mini + text-embedding-3-small — temperature-0 captions on 1024 px images; 1536-dimension embeddings.
- Pinecone — dense serverless index, cosine, metadata per design.
- n8n — Webhook, IF branch, OpenAI image analysis and HTTP Request nodes.
- Flask, Pillow, NumPy, JSON caches — the apps, resizing, in-category similarity and resumable builds.
What does AI image search for a textile business cost, and how long does it take?
It is a one-time custom build with a fixed quote, set after a free workflow audit of real sample files from your library. This one took about 7 days. Running costs are mainly cloud API usage and hosting, paid to the providers; embedding fees here were small per image. What moves the quote:
- Library size — images and sets to ingest.
- File condition — colourway sheets, mockups, watermarks, naming.
- Query modes and categories — photo, words, or both.
- Where search lives — staff app, website, WhatsApp bot or ERP.
Not sure AI search is the right first step? Start with AI consulting.
Can AI visual search work for your textile business in Surat?
Very likely, if your catalogue is large, visual and filed by code, whether it is a saree design catalogue, a suit and dupatta library or an all-over print archive, and it can be measured on your own files before you commit. The same approach fits print and embroidery design houses, saree, suit and dress-material traders who receive fabric photos, and dupatta, kurti and lehenga suppliers with designs in several colourways.
It is one part of what Yukti AI builds for the trade: see Textile & Apparel software, the self-serve B2B ordering system for a fabric-printing firm, the WhatsApp AI chatbot and AI agent development.
Yukti AI works from 220, Leonard Square, Yogichowk, Varachha, Surat, for businesses across Surat and India. Other Surat builds include a jewellery ERP for Lumera Fine Jewellery and a diamond trading platform for a Surat export house.
Questions textile businesses ask about AI visual search
Explore more
Textile & Apparel Software
Design catalogue, stock, job work and party ledger.
Case study: Aster Print & Hub
Self-serve B2B ordering for a fabric-printing firm, on web and WhatsApp.
n8n Automation Agency
Webhook-driven workflows like the search flow on this page.
AI Agent Development
AI agents that answer customers and run tasks end to end.
WhatsApp AI Chatbot
AI replies on WhatsApp, where a search like this could connect next.
App & Web App Development
Search apps, dashboards and internal tools built around your workflow.
AI Consulting
A free workflow audit and a plan for where AI actually helps.
Case study: Diamond trading platform
A private B2B diamond portal for a Surat export house.
All case studies
Every Yukti AI build, across industries.
Summary
- Yukti AI, a software company in Varachha, Surat, built AI image similarity search for a Surat textile design house in about 7 days, to find designs by a fabric photo or a typed description.
- The Surat design house’s library holds roughly 80,000 designs in about 1,000 sets; Yukti AI designed the pipeline to index all of it and measured it on 97 recon files and a 401-design test catalogue.
- Yukti AI’s main-panel detector for colourway sheets found the divider line in 67 of 67 files and moved the worst case, design 13102, from rank 70 of 97 to rank 1.
- In Yukti AI’s head-to-head test on the client’s own designs, Google Vertex AI multimodal embeddings beat an OpenAI caption pipeline on motif matching and cost, and were chosen.
- Yukti AI’s textile visual search apps return the top eight designs inside a chosen category, such as saree or dupatta, each with design code and score.
- Yukti AI’s n8n search workflow for the Surat design house found design 21875 at rank 2 of 97 in a live photo test and matched a Python reference score of 0.672 exactly in a live text test.