Generating Titles and Descriptions for Images
Enhance Image Search with AI-Powered Titles and Descriptions
Improve the discoverability of your images within SearchBlox Enterprise Search by leveraging AI-driven analysis. This feature utilizes Large Language Models (LLMs) to automatically generate accurate and contextually relevant titles and descriptions for your images.
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
Note: This notebook is designed to operate exclusively with a GPU-accelerated runtime.
Follow these steps to effectively use the provided Google Colab notebook for generating image titles and descriptions:
- Connect to a Runtime:
Click the "Connect" button located in the upper-right corner of the Colab notebook.

-
Select GPU Runtime:
Navigate to "Runtime" > "Change runtime type."
Choose "GPU" as the hardware accelerator. -
Install Required Libraries:
Run the first code block under the "install the required libraries" section by clicking the "play button." -
Import Libraries:
Execute the "import the libraries" code block in the same manner. -
Enter User Credentials:
In the "user credentials" code block, modify the auth() variable with your SearchBlox server credentials:- host address
- port number
- username
- password
- Set the index_name variable to the appropriate collection ID.

- Check Cluster Health:
Execute the "checking cluster health" code block. - Retrieve and Clean Data:
Execute the "retrieving and cleaning the data" code block. - Load Model:
Execute the "loading the model" code block. - Define Prompts:
Execute the "prompts for the desired outputs" code block. - Generate and Push Metadata:
Execute the "Generating the relevant output and pushing it onto the metadata" code block.
Steps to View the Results
After successfully executing the Google Colab notebook and generating image titles and descriptions, follow these steps to review the results within SearchBlox:
-
Access the SearchBlox Collection:
Navigate to the SearchBlox Console > Manage Collection.
Locate the collection containing the images you processed.
Click the search icon associated with that collection. -
Enable Debug Mode:
Click the search icon for the desired collection.
Log in to the SearchBlox search interface.
Append &debug=TRUE to the end of the URL in your browser's address bar. This will activate debug mode and display metadata. -
-
Review AI-Generated Metadata:
In the SearchBlox search bar, enter the search term mlimage.
The search results will display the AI-generated metadata for your images, including titles and descriptions, prefixed with mlimage.
Updated about 2 months ago