From the course: Advanced RAG Applications with Vector Databases
Demo: Getting semantic vectors
- [Instructor] In this video, we're going to get a semantic vector from an image. We'll use the open clip embeddings with link chain as our clip embedding model. We will also use glob to get all of the images in our file path. Next, we load our embedding model and call the embed image function on all of our file paths. Despite the name of the function, this function actually takes a list of URIs for images, and not just a single image itself. Now that we have our embeddings, let's examine our embeddings. Opening up embedding at index zero shows us what a sample embedding looks like. Checking the length of this embedding shows us that each of the embeddings generated from our open clip model has a dimensionality of 1024.