> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lancedb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ImageBind

We have support for [imagebind](https://github.com/facebookresearch/ImageBind) model embeddings. You can download our version of the packaged model via - `pip install imagebind-packaged==0.1.2`.

This function is registered as `imagebind` and supports Audio, Video and Text modalities(extending to Thermal,Depth,IMU data):

| Parameter | Type | Default Value | Description |
| - | - | - | - |
| `name` | `str` | `"imagebind_huge"` | Name of the model. |
| `device` | `str` | `"cpu"` | The device to run the model on. Can be `"cpu"` or `"gpu"`. |
| `normalize` | `bool` | `False` | set to `True` to normalize your inputs before model ingestion. |

Below is an example demonstrating how the API works:

import lancedb
from lancedb.embeddings import get\_registry
from lancedb.pydantic import LanceModel, Vector

db = lancedb.connect("/tmp/imagebind-db")
func = get\_registry().get("imagebind").create()

class ImageBindModel(LanceModel):
&#x20;   text: str
&#x20;   image\_uri: str = func.SourceField()
&#x20;   audio\_path: str
&#x20;   vector: Vector(func.ndims()) = func.VectorField()

text\_list = \["A dog.", "A car", "A bird"]
image\_paths = \[
&#x20;   "./assets/dog\_image.jpg",
&#x20;   "./assets/car\_image.jpg",
&#x20;   "./assets/bird\_image.jpg",
]
audio\_paths = \[
&#x20;   "./assets/dog\_audio.wav",
&#x20;   "./assets/car\_audio.wav",
&#x20;   "./assets/bird\_audio.wav",
]

inputs = \[
&#x20;   \{"text": a, "audio\_path": b, "image\_uri": c}
&#x20;   for a, b, c in zip(text\_list, audio\_paths, image\_paths)
]

table = db.create\_table("img\_bind", schema=ImageBindModel)
table.add(inputs)


Now, we can search using any modality:

#### image search

query\_image = "./assets/dog\_image2.jpg"
actual = table.search(query\_image).limit(1).to\_pydantic(ImageBindModel)\[0]
print(actual.text == "dog")


#### audio search

query\_audio = "./assets/car\_audio2.wav"
actual = table.search(query\_audio).limit(1).to\_pydantic(ImageBindModel)\[0]
print(actual.text == "car")


#### Text search

You can add any input query and fetch the result as follows:

query = "an animal which flies and tweets"
actual = table.search(query).limit(1).to\_pydantic(ImageBindModel)\[0]
print(actual.text == "bird")


If you have any questions about the embeddings API, supported models, or see a relevant model missing, please raise an issue [on GitHub](https://github.com/lancedb/lancedb/issues).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.