Generating Titles and Descriptions for Images

Improve the discoverability of images in your SearchBlox Enterprise Search by using this feature. This feature uses AI (Large Language Models) to analyze images and automatically create accurate titles and descriptions.

📘

Prerequisites:

  • Download and install SearchBlox Service and set-up the configurations by creating a collection and indexing documents.
  • Access to a Google Colaboratory (Colab) account with GPU runtime enabled. To download Colab Notebook click on the following link:
    SearchAI_Image

Steps to Use the Google Colab Notebook

  1. To connect to a runtime, click on the connect button on the upper-right corner as shown in the following:

  2. Choose the GPU accelerated runtime by clicking Runtime>Change runtime type.
    NOTE: The code can only run on an GPU accelerated runtime.

  3. Run the first code block under the install the required libraries section, by clicking the play button marked in red to execute the code block, as shown in the following screenshot:

  4. Execute the import the libraries code block similar to the above.

  5. Under user credentials code block, input your host address, port number and username and password inside the auth() variable. Enter the desired collection id for the index_name variable as shown in the following example:

  6. Execute the checking cluster health code block.

  7. Execute the retrieving and cleaning the data code block.

  8. Execute the loading the model code block.

  9. Execute the prompts for the desired outputs code block.

  10. Execute the Generating the relevant output and pushing it onto the metadata code block.

Steps to View the Results

  1. After completing the execution of previous section , navigate to the SearchBlox Console > Manage Collection, look for the Collection which was used with images and click on the search icon on that collection as shown in the following example.

  2. To activate the debug mode, follow the following steps:

    • Click on the search icon on the collection.

    • Log in to the search interface.

    • Append &debug=TRUE at the end of the URL.

  3. To Review AI-Generated Metadata, search for the term ml_image_. You should see the two entities with the AI-generated metadata.