跳转至

Image to embeddings(图像转嵌入向量(Image to embeddings))

Supported in: Batch

Converts images into embeddings using the provided model.

Expression categories: Media

Declared arguments

  • Media reference: Column containing media references (images) to convert to embeddings.
    Expression\
  • Model: The embedding model to use for the conversion. Must support vision capabilities.
    Model
  • optional Output mode: Choose between simply returning the output or returning a struct, containing either the output in a field named 'ok', or any errors in a field named 'errors'.
    Enum\

Output type: Embedded vector

Examples

Example 1: Base case

Description: Example embeddings for an image.

Argument values:

  • Media reference: mediaRef
  • Model:
    googleSiglip2Embedding(

    )
  • Output mode: null
mediaRef Output
{
"mimeType": "image/jpeg",
"reference": {
 "type": "mediaSetViewItem",
 "...
embeddings-result

Example 2: Null case

Description: Null input should have a null output.

Argument values:

  • Media reference: mediaRef
  • Model:
    googleSiglip2Embedding(

    )
  • Output mode: null
mediaRef Output
null null


中文翻译


图像转嵌入向量(Image to embeddings)

支持运行模式:批处理(Batch)

使用指定模型将图像转换为嵌入向量。

表达式类别: 媒体(Media)

声明的参数

  • 媒体引用(Media reference): 包含待转换媒体引用(图像)的列。
    表达式\<媒体引用>
  • 模型(Model): 用于转换的嵌入模型。必须支持视觉能力。
    模型
  • 可选 输出模式(Output mode): 选择直接返回输出结果,或返回一个结构体(struct),其中包含名为'ok'字段的输出结果,或名为'errors'字段的错误信息。
    枚举\<简单(Simple), 含错误(With errors)>

输出类型: 嵌入向量(Embedded vector)

示例

示例1:基础情况

描述: 图像的嵌入向量示例。

参数值:

  • 媒体引用: mediaRef
  • 模型:
    googleSiglip2Embedding(

    )
  • 输出模式: null
mediaRef 输出
{
"mimeType": "image/jpeg",
"reference": {
 "type": "mediaSetViewItem",
 "...
嵌入向量结果

示例2:空值情况

描述: 空输入应返回空输出。

参数值:

  • 媒体引用: mediaRef
  • 模型:
    googleSiglip2Embedding(

    )
  • 输出模式: null
mediaRef 输出
null null