Image Search with CLIP
Use Astra with Vector Search and the Contrastive Language-Image Pretraining (CLIP) model to generate and store image embeddings for images. These embeddings, along with metadata, are stored in Astra DB. This quickstart demonstrates how to find an image by creating embeddings from the search term 'a residence with a pool', and then querying for a matching image. The result is an image of a residence with a pool.
New to these concepts? See Overview.
An Astra Vector Search database is required. If you already have one, skip to Prepare for using your vector database, or take a couple of minutes to create one with the following instructions.
You are required to create a serverless Astra database with Vector Search before using its capacities to work with data. Details to consider precede the procedural steps.
As you create a serverless Astra database with Vector Search, fill out the required fields according to these rules:
Database Name: Name your database something meaningful. The database name cannot be altered after the database is created.
Name your keyspace to reflect your data model; where all of your tables are stored within the database.
You cannot name your keyspace
Use only alphanumeric characters and no more than 48 total characters.
The Vector Search examples use
vsearch as the keyspace name.
Provider: Choose a provider from one of the three major cloud providers; Amazon Web Services (AWS), Google Cloud (GCP), or Microsoft Azure.
When using the free plan, only the Google Cloud region is available for a serverless Astra database with Vector Search.
Region: The region associated with the chosen provider automatically populates this field.
Configure the basic details to create a serverless Astra database with Vector Search.
In your Astra DB dashboard, select Create Database.
Select Serverless (with Vector).
Enter your database details:
Choose a Provider.
Select Create Database.
When this database is active, a green notification appears at the top of your screen. Your Astra database with Vector Search is ready to use for your content.
Create a token and download your Secure Connect Bundle (SCB) for your application.
Select your database and then click on the Connect tab.
Get an application token using the Generate token button in the Quick Start section.
Make sure you download the
<db-name>-token.jsonfile to use later.
Use the Get Bundle button to generate and download your Secure Connect Bundle (SCB).
Now you are ready to run this example from a Python Jupyter notebook. Launch Image Search with CLIP Colab.