Image Search Clip
vector-searchvector-databaseretrieval-augmented-generationllm-frameworksweaviate-featuresfunction-callingweaviate-recipesmedia-searchPythongenerative-ai
Export
Image Search with CLIP
This recipe demonstrates how build image search with CLIP model (multi2vec-clip).
CLIP allows us to search through text and images.
Weaviate Setup
The CLIP model is only available with local Weaviate deployments with Docker or Kubernetes.
CLIP is not supported with Weaviate Cloud Database (WCD).
Steps to deploy Weaviate locally with CLIP
We will use docker-compose-clip.yaml. For that, run:
[ ]
Dependencies
[ ]
Configuration
[ ]
Create Animals collection
The collection has the following key characteristics:
- Name:
"Animals" - Vectorizer:
multi2vec-clip - Image property:
"image"- Weaviate will use values in "image" property to generate vectors. Note, you can call it anything you want.
[ ]
Import Images
For every object, we will store:
name- the file namepath- path to the file, so that we could display returned images at query time.image- a base64 representation of the image file, Weaviate will use it to generate a vector - seeimageFields.
[ ]
[ ]
Check number of objects in the Animals collection
[ ]
[ ]
Query examples
[ ]
Text to Image search
[ ]
Image to Image search
[ ]