Skip to content

CONVERT

1. CONVERT Statement

The "CONVERT" statement allows users to convert unstructured data (image|audio|video|text) to vector format using a vectorization algorithm.

2. CONVERT Syntax

query_statement:
    query_expr

CONVERT USING (model_name_expression)
OPTIONS (
    expression [ , ...]
    )
AS
(query_expr)

3. CONVERT Example

Note

  • Examples are specific to one model, and the required option values ​​or the dataset used may differ from model to model. For a detailed description of each model, refer to the ThanoSQL Model Statement Reference
  • Because the example only works when a specific model and dataset are present, it may not run normally if copied and used as is.
%%thanosql
CONVERT USING tutorial_search_clip
OPTIONS (
    image_col='image_path', 
    convert_type='image',
    batch_size=128,
    result_col='convert_result'
    )
AS 
SELECT *
FROM unsplash_data

AI Models That Can Be Used with 'CONVERT Statement'

  • SimCLR Model - SimCLR
  • CLIP Model - CLIP
  • XCLIP Model - XCLIP
  • SBERT Model - SBERTKo, SBERTEn

Last update: 2023-08-09