Image replacement in Canva designs using reverse image search
Canva built a reverse image search system to replace IP-restricted images in templates, after ruling out its recommendation engine, perceptual hashing, metadata text search and AI-generated images. Five embedding models (DINOv2, CLIP, ViTMAE, DreamSim, CaiT) plus a GPT-4o-description-to-CLIP approach were compared qualitatively on 50,000 images using Faiss and a subject/color/composition similarity hierarchy, and DINOv2 won. Embeddings for 150M+ images live in a third-party external vector database instead of in memory, which keeps up with library changes and supports aspect-ratio filtering. Results are strong for photos but weak for text, symbols and cartoons, yet pilots showed designers replacing images 4.5x faster.
Related posts
- Image search with 🤗 datasets
Hugging Face mediumAdeptA text-to-image search over 10,000 British Library book embellishments can be built by loading the images with the 🤗 datasets ImageFolder loader and embedding them with the CLIP ViT-B/32 model via sentence_transformers. The embeddings are indexed with datasets' built-in add_faiss_index, and text prompts are queried with get_nearest_examples. push_to_hub stores intermediate datasets so work can move between machines, such as a laptop and a Colab GPU. Results for prompts like "a steam engine" or "a musical instrument" are not always correct but are usually reasonable, which is enough to search images by semantic content.
- Image Similarity with Hugging Face Datasets and Transformers
Hugging Face mediumAdeptAn image similarity system can be built by embedding images with a fine-tuned Vision Transformer (CLS token from the last hidden state) and ranking candidates by cosine similarity against a query embedding. The walkthrough uses 🤗 Transformers' AutoModel and 🤗 Datasets' batched map() to embed a 100-image subset of the Beans dataset, then retrieves top-k matches from the test split. For scale, brute-force search over 768-d embeddings becomes costly in memory and compute, so dimensionality reduction via random projection and locality-sensitive hashing, or a FAISS index through Datasets' add_faiss_index(), is recommended.
- Behind the scenes of Canva's DesignDNA campaign
Canva Engineering easyNoviceCanva's DesignDNA year-in-review campaign matched users to one of seven 2025 design trends using public template style and theme metadata, not private designs, as a privacy-safe proxy for each user's taste. Keyword scoring matched 95% of the target cohort, and LLM-expanded keyword sets raised that to 99%. Generative AI also produced about a million locale-specific poems, which were reviewed through localisation sampling, sensitive-word flagging and AI tone checks. The final stories were assembled by injecting each user's content into tagged template elements via URL parameters, yielding 95 million personalized designs.
- The infrastructure behind AI search in Figma
Figma mediumAdept
Figma's AI search embeds frames and published components with a CLIP-based multimodal model, so screenshots, layer selections and text all query one vector space. Text queries are embedded directly, while selections are rendered to images first, which worked better than embedding JSON. Indexing runs as chained async jobs: a headless C++ editor enumerates frames, metadata goes to DynamoDB, thumbnails go to S3, SageMaker produces embeddings in batches, and OpenSearch kNN serves faceted vector search. Component search runs lexical and vector queries in parallel and merges them with min-max score normalization. Costs were cut by porting Ruby to C++, CPU rendering with llvmpipe, a four-hour indexing debounce (only 12% of data processed), dropping duplicates and drafts (index halved) and vector quantization; the post also covers an OpenSearch replica bug and a pitfall where excluding embeddings from _source wiped them on document updates.
- Implementing semantic image search with Amazon Titan and Supabase Vector
Supabase mediumAdeptSemantic image search can be built in Python by generating 1024-dimensional embeddings for images with the Amazon Titan multimodal embedding model (amazon.titan-embed-image-v1) via Amazon Bedrock, then storing and querying them in Supabase Vector (Postgres with pgvector) using the vecs client. The walkthrough covers Poetry project setup, base64-encoding images for the Bedrock API, upserting embeddings with metadata into a vecs collection and creating an index. A text query is embedded with the same model and matched against image vectors with a metadata filter, and the top result is displayed with matplotlib. The same approach supports reverse image search.