JaguarDB
The Most Scalable Vector Database                
Home Technology Product Document Download



Vector database sharding

Multimodal search

JaguarDB quantization

JaguarDB Vector API

Best Vector databases



JaguarDB in Docker

Setup JaguarDB with tar package

Setup JaguarDB on multiple nodes

Vector index sharing

How zeromove works

Video introduction



Example: Image Search

CLIP, which stands for "Contrastive Language-Image Pretraining", is a powerful and innovative deep learning model developed by OpenAI. It is designed to bridge the gap between understanding natural language and processing visual information simultaneously. CLIP is known for its ability to understand and interpret text and images in a unified manner, making it versatile and applicable in various domains. It can answer questions about images, describe images based on textual prompts, and even generate textual descriptions for images.

The following Python example demonstrates extracting embeddings from images and searching similar images from a query image. You will need "pip install -U jaguardb-http-client" to have the jaguar http client package.

from PIL import Image
from sentence_transformers import SentenceTransformer
from jaguardb_http_client.JaguarHttpClient import JaguarHttpClient

url="http://192.168.8.88:8080/fwww/"
jag = JaguarHttpClient(url)
apikey = "demouser"

token = jag.login( apikey )
q= "create store imgvec (v vector(512, 'euclidean_fraction_float'), v:img file, cat char(16))"
jag.get(q, token)

model = SentenceTransformer('clip-ViT-B-32')

images = [ Image.open('img1.jpg') ]
embeddings = model.encode( images )
comma_sep_str = ",".join( [str(x) for x in embeddings[0] ])
jag.postFile(token, 'imag1.jpg', 2 )
q = "insert into imgvec values ( '" + comma_sep_str + "', 'img1.jpg', 'outdoor')"
jag.post(q, token, True)

# add more images here ...

# prepare a query image
images = [ Image.open('queryimg.jpg') ]
embeddings = model.encode( images )
comma_sep_str = ",".join( [str(x) for x in embeddings[0] ])
qs = "select similarity(v, '" + embeddings + "','type=euclidean_fraction_float,topk=3') from imgvec"
resp = jag.post(qs, token)
jarr = json.loads(resp.text)

while rec in jarr:
    print(json.loads(rec))


The difference between image similarity search and text similarity search is that a CLIP model "clip-ViT-B-32" for images is used in computing the embeddings of image data. The size of the dimension is 512 in this context.








JaguarDB

JaguarDB offers comprehensive support for vector database in artificial intelligence, along with instantly scalable datalake storage for raw media files and robust similarity search capabilities. This facilitates efficient handling of large datasets and enhances AI applications that require rapid data retrieval and similarity comparisons. JaguarDB, with integrated features, provides a seamless solution for managing and analyzing complex data in AI-driven environments.



Products

AI VectorDB
AI Datalake
Time Series
Geospatial
JaguarDB
Client Drivers

Resources

Cloud Admin Manual
Developer Guide
Configuration Help
Frequent Questions
ZeroMove Demo
Video Introduction

Social

  LinkedIn
 
Youtube
 
Contact Us