Glossary
Image embeddings
Image embeddings are vectors produced by a vision model that describe what an image shows, so that similar images sit close together and can be found by measuring distance.
Image embeddings are vectors of numbers that describe what an image looks like and what it shows, produced by a neural network so that visually or semantically similar images get similar vectors. A photo of a golden retriever on grass and another photo of a different golden retriever indoors land close together, while a photo of a bridge lands far away. Once every image in a library has an embedding, finding similar pictures, spotting duplicates, grouping a collection by subject or classifying images becomes a matter of measuring distances between vectors. They are the basic building block of visual search, reverse image search and most image features in modern asset libraries.
How image embeddings are produced
An image embedding comes from a vision model, usually called an encoder. The image is resized and normalised (224 by 224 pixels is a common input size), passed through the network, and the activations from a late layer are taken as the vector. That layer sits after the model has turned raw pixels into progressively more abstract features, from edges and textures in early layers to object parts and whole objects in later ones, so the vector summarises the content of the picture rather than its exact pixels. The result is a fixed-length list, typically 512 to 2,048 numbers, whatever the resolution of the original file.
Like any embedding, the vector has no meaning on its own. Its value comes from comparison: two images are judged similar when their vectors are close, usually measured with cosine similarity. The same embedding model must be used for every image you want to compare, because vectors from different models live in different spaces.
Convolutional networks and vision transformers
Two families of encoder dominate. Convolutional neural networks, such as the ResNet family, slide small filters across the image and pool the results; a ResNet-50, for example, produces a 2,048-number vector from its final pooling layer. Vision transformers split the image into patches, treat each patch like a word in a sentence, and let every patch attend to every other one; a base-sized model produces 768-number vectors. Transformers tend to capture global layout and relationships better, while convolutional networks remain cheap and strong on texture and local detail.
How the encoder is trained
The training objective decides what the embedding pays attention to. A model trained to classify ImageNet’s 1,000 categories learns features that separate those categories, which works well for everyday objects and less well for anything outside them. Self-supervised models, such as the DINO family, learn by matching different crops and colour shifts of the same image, so they capture visual structure without needing labels and often do better for near-duplicate and fine-grained matching. Contrastive image and text models, such as CLIP, learn by matching images to their captions, which produces image vectors that line up with language and turns them into multimodal embeddings.
Training approach | What the vectors capture well | Typical use |
|---|---|---|
Supervised classification | Object categories the model was trained on | General similarity in familiar domains |
Self-supervised | Visual structure, layout, fine detail | Duplicates, visual similarity, clustering |
Image and text contrastive | Concepts that have names in language | Text-to-image search, zero-shot tagging |
Global and local image embeddings
Most systems compute one global vector per image. That is compact and fast to search, and it works well when the query is about the whole picture. It struggles when the thing you care about is small: a logo in the corner of a photo, a single product on a crowded shelf or a face in a group shot. The global vector is an average over the whole frame, so a small object barely moves it.
Two techniques help. Region or patch embeddings keep several vectors per image, one for each detected object or grid cell, so a query can match part of a picture. This is the visual counterpart of multi-vector retrieval in text search and costs more storage for the same reason. The other approach pairs the global vector with signals that capture detail directly, such as object detection, OCR for text in the image and image captioning for a written description that a keyword index can match.
What image embeddings are used for
Visual search and reverse image search are the most direct uses: embed the query image, find the nearest vectors and return those images. An online shop uses this for “shop the look”; a photo agency uses it to find every shot from the same session. Content-based image retrieval is the academic name for the same family of methods.
Near-duplicate detection uses a tight similarity threshold to find resized, recompressed or lightly edited copies, which matters for cleaning up libraries and for rights management. Clustering groups thousands of untagged images into coherent sets, which is a quick way to understand a new archive. Classification can run on top of the embeddings with a small trained layer, or with no training at all when the embeddings come from an image and text model, which supports automatic image tagging. Image embeddings also feed recommendation systems, where items a user liked are used to find visually similar ones.
How image embedding search works at scale
For a few thousand images you can compare the query vector with every stored vector. Beyond that, vectors go into a vector database or index that supports approximate nearest neighbour search, usually with a graph index such as HNSW or a clustered index such as an IVF index. These return the closest vectors in milliseconds across millions of images, at the cost of occasionally missing the exact nearest match.
Storage grows quickly. A 2,048-number vector of 32-bit floats is 8 KB, so five million images take around 40 GB of vectors before index overhead. Teams reduce this with smaller models, dimensionality reduction or vector quantization, trading a little accuracy for a large saving. Search in practice also needs metadata filtering, so a query for similar images can be restricted to one brand, one campaign or one date range.
A worked example
An online furniture retailer has 300,000 product photos. A customer uploads a phone picture of a mid-century armchair seen in a café. The system crops to the main object, embeds it with the same encoder used for the catalogue, and retrieves the 50 nearest product vectors. Results show armchairs with tapered wooden legs and similar upholstery, even where the product titles say “lounge seat” rather than “armchair”. A filter keeps only items in stock, and a reranking step that weights colour similarity pushes the green fabric options to the top. The catalogue team did not have to write any of those attributes by hand.
Limits and trade-offs
Image embeddings reflect the data the encoder learned from. A model trained on consumer photos represents X-rays, satellite images, microscope slides or technical drawings poorly, and the fix is a domain model or fine-tuning, both of which mean re-embedding the library. Changing models for any reason has the same cost, since old and new vectors cannot be mixed, and an index built from a mix of model versions suffers from embedding drift.
Similarity is also not the same as relevance. Two images can be close because they share lighting, background or composition rather than subject, so a search for a particular product can return pictures of a different product shot in the same studio. Embeddings are weak at reading text, counting objects and fine spatial detail. And very large libraries see more images crowding the same neighbourhood of the space, a form of semantic collapse that makes the top results less distinct. Combining vectors with extracted text, captions, colour and metadata is the usual way to keep results precise.
Image embeddings and neighbouring concepts
Image embeddings are one modality of the wider idea. Multimodal embeddings align image vectors with text, audio or video so that one format can search another, which is what enables text-to-image search and cross-modal retrieval. Perceptual hashing is a lighter alternative for exact and near-exact copies: far cheaper, but blind to meaning. A vision language model generates text about an image rather than a vector, and is often used to produce the captions that sit alongside embeddings in a multimodal search system.
How Exabase uses image embeddings
Exabase indexes images for you when they are stored. Upload a JPEG, PNG, WebP or GIF as one of the Exabase Resources and it is processed on arrival: thumbnails in several sizes, captions and keywords, dominant colours, OCR text and capture attributes such as camera type and ISO are added to its metadata, and the image becomes searchable without an embedding pipeline to build. Exabase Extract returns the same structured data as JSON for any image you submit, and the free image to JSON tool shows the output.
Deep Search then accepts an image as the query and finds visually similar content across a Base, and the same endpoint takes text, colour and resource-similarity queries, with filters on kind, folder, tag and date. A text query is hybrid, so a search for a product code still finds the image where that code appears as OCR text. The searching resources guide and the search API reference describe the request, and the asset search solution covers the full pattern. Exabase is the indexing and retrieval layer; ranking rules specific to your product, such as stock or margin, stay in your application.
For deeper reading, see the brand asset search use case, the post on searching by colour, the best reverse image search APIs roundup and the Exabase vs Marqo comparison.
Frequently asked questions
What is an image embedding in simple terms?
An image embedding is a list of numbers that summarises what an image shows. Similar images get similar lists, so a computer can find related pictures by comparing the numbers instead of the pixels.
How many dimensions does an image embedding have?
Usually between 512 and 2,048. The number depends on the model: a base vision transformer gives 768, a ResNet-50 gives 2,048 and many image and text models give 512.
What is the difference between image embeddings and multimodal embeddings?
Image embeddings only describe images. Multimodal embeddings place images and another modality, usually text, in one shared space, so a text query can be compared directly with an image.
Can image embeddings find edited or cropped copies of an image?
Yes, for moderate edits such as resizing, recompression, colour changes and modest crops. Heavy crops or overlays can move the vector enough to miss, which is why duplicate checks often combine embeddings with perceptual hashes.
Do image embeddings understand text inside images?
Only weakly. OCR is the reliable way to make text in images searchable, and it works best alongside the embedding.
Which model should I use to create image embeddings?
Use an image and text model when people will search with words, and a self-supervised vision model when matching images to images. Test on a sample of your own library, since domain fit matters more than benchmark rank.
Does Exabase create image embeddings for me?
Yes, in effect. Images stored in a Base are indexed automatically, and Deep Search supports image, text and colour queries over them, so you do not run an embedding model or a vector index yourself.
Related pages: Multimodal embeddings, CLIP, visual search, reverse image search, near-duplicate detection, perceptual hashing, asset search, Deep Search, best reverse image search APIs, image captioning, image tagging