1.  [](/)
2.  [Code examples](/recipes)
3.  Image Similarity Search Pipeline

Back to code examples

Similar

# Image Similarity Search Pipeline

Deploy a visual search engine that finds similar images using state-of-the-art embedding models. Perfect for product catalogs, stock photo libraries, and visual discovery.

image

Single Tier

[Run in Builder](/build?recipe=image-similarity-search)

Python

cURL

from mixpeek import Mixpeek

client \= Mixpeek(api\_key\="YOUR\_API\_KEY", namespace\="image-search")

\# 1. A bucket for the images, and a collection that embeds each one with SigLIP

bucket \= client.buckets.create(

    bucket\_name\="product-images",

    bucket\_schema\={

        "properties": {

            "image": {

                "type": "image",

            },

        },

    },

)

collection \= client.collections.create(

    collection\_name\="products",

    source\={"type": "bucket", "bucket\_ids": \[bucket\["bucket\_id"\]\]},

    feature\_extractor\={

        "feature\_extractor\_name": "image\_extractor",

        "version": "v1",

    },

)

\# 2. Upload and process

client.buckets.upload(

    bucket\["bucket\_id"\],

    blobs\=\[{"property": "image", "type": "image", "data": "s3://your-bucket/product-images/handbag-0142.jpg"}\],

)

client.collections.trigger(collection\["collection\_id"\])

\# 3. A text query searched against the image embeddings

retriever \= client.retrievers.create(

    retriever\_name\="image-search",

    collection\_identifiers\=\["products"\],

    input\_schema\={

        "query": {

            "type": "text",

            "required": True,

        },

    },

    stages\=\[

        {

            "stage\_name": "search",

            "stage\_id": "feature\_search",

            "parameters": {

                "searches": \[

                    {

                        "feature\_uri": "mixpeek://image\_extractor@v1/google\_siglip\_base\_v1",

                        "query": {

                            "input\_mode": "text",

                            "value": "{{INPUT.query}}",

                        },

                        "top\_k": 20,

                    },

                \],

                "final\_top\_k": 20,

            },

        },

    \],

)

\# 4. Search

results \= client.retrievers.execute(

    retriever\["retriever\_id"\],

    inputs\={

    "query": "red leather handbag with gold hardware",

},

)

for doc in results\["documents"\]:

    print(doc\["document\_id"\], doc\["score"\])

### Feature Extractors

Image Embedding

Generate visual embeddings for similarity search and clustering

### Retriever Stages

feature search

Search and filter documents by vector similarity using feature embeddings

filter

## Frequently asked questions

### What image formats are supported?

JPEG, PNG, WebP, GIF, BMP, TIFF, and SVG are all supported.

### Can I search using an image instead of text?

Yes. Mixpeek supports both text-to-image and image-to-image search using the same pipeline.

### How many images can this handle?

Mixpeek scales to millions of images. The vector index is optimized for sub-100ms queries at scale.

## Use Cases Using This Recipe

Beginner

### Visual Product Search for E-commerce

Let shoppers find products by uploading a photo instead of typing keywords

+30% for visual search queries

Search-to-cart conversion rate

[

ecommerce

](/solutions/ecommerce)

Who It's For

E-commerce platforms, online retailers, and marketplace operators managing catalogs of 50K+ SKUs who want to offer camera-based product discovery

[View Details](/use-cases/visual-product-search)

Beginner

### Visual Search for Retail

Bridge the gap between in-store inspiration and online purchase

+35% higher than text search

In-app visual search conversion

[

ecommerce

](/solutions/ecommerce)

Who It's For

Omnichannel retailers, retail apps, and brands with physical and digital presence looking to connect in-store browsing with online purchasing

[View Details](/use-cases/visual-search-retail)

Beginner

### Fashion Visual Product Discovery

Search for fashion by style, not just by name or brand

3x more products viewed per session

Product discovery engagement

[

ecommerce

](/solutions/ecommerce)

Who It's For

Fashion e-commerce platforms, apparel retailers, and personal styling services managing catalogs of 100K+ products where visual style drives purchase decisions

[View Details](/use-cases/fashion-visual-discovery)

## Related code examples and resources

Pages on the same stages, extractors and patterns.

[

Extractor

### Image Embedding

Generate visual embeddings for similarity search and clustering

Learn more





](/extractors/image)[

Extractor

### Face Identity Extractor

Detect, align, and embed faces to 512-D ArcFace vectors across image, video and PDF, using SCRFD for detection.

Learn more





](/extractors/face-identity)[

Recipe

### Automatic Image Tagging Pipeline

Automatically tag images with objects, scenes, colors, and custom labels using computer vision models. Perfect for DAM systems and media libraries.

Learn more





](/recipes/image-tagging-pipeline)[

Recipe

### E-commerce Product Image Analytics

Analyze product images across your catalog to extract visual attributes, identify trends, detect quality issues, and benchmark against competitors.

Learn more





](/recipes/ecommerce-product-analytics)[

Recipe

### Reverse Image Search

Build a reverse image search engine that accepts an image as input and returns visually similar results from your indexed collection. Uses multimodal embeddings to match visual features like color, shape, composition, and semantic content.

Learn more





](/recipes/reverse-image-search)[

Recipe

### Image Deduplication Pipeline

Identify near-duplicate and visually similar images in your collection using embedding-based clustering. Groups images by visual similarity, flags duplicates, and provides confidence scores to help clean up redundant content in media libraries and product catalogs.

Learn more





](/recipes/image-deduplication)