AI Accelerator image recognition service

The AI Accelerator image recognition service enables Magnolia to automatically tag images using multimodal large language models (LLMs). It works as a service provider for the Image Recognition module, delegating image analysis to an AiTask executed inside the AI Accelerator Module.

This service can detect objects, concepts, and other relevant labels in supported image formats (PNG, JPG, JPEG) and return a configurable number of tags. By leveraging multimodal LLMs such as Google Gemini, OpenAI GPT-4o, or Anthropic Claude, it provides more context-aware and semantically rich image tagging than traditional computer vision services.

To use this service, you must install and configure the Magnolia AI Accelerator module, then follow the instructions on this page.

Set the service provider

Configure the service provider class in /image-recognition/config.yaml:

/image-recognition/config.yaml
currentService: info.magnolia.ai.image.accelerator.AiAcceleratorImageRecogniser (1)

<1>The class name of the service to be used for image recognition. Use info.magnolia.ai.image.accelerator.AiAcceleratorImageRecogniser. Default is info.magnolia.ai.image.ImageRecogniser$Noop.

Configure the AI Accelerator service

The service provider offers a gateway to an AiTask executed within the AI Accelerator module.

Ensure the module is installed and properly configured. For details, refer to the AI Accelerator module documentation.

Configuration options

You can configure the following properties for the image recognition service in /ai-accelerator-image-recognition/config.yaml:

Property Description

aiTaskId

required default is ai-accelerator-image-recognition:tagImageWithLLM

AiTask to be executed for image recognition.

Only change this if you provide a custom AiTask implementation. For most cases, decorating the configuration of the default task is sufficient.

maxLabels

required, default is 10

The maximum number of tags you want the recognition service to return.

This is an integer and the minimum value is 0.

If set to 0, no tags are assigned to an image asset.

supportedFormats

required, default is png, jpg, jpeg

A list of image formats defining which image types are automatically recognized by the image recognition service.

Check the capabilities of your configured model.

maxWidth

required, default is 256

Images sent to the multimodal LLM will be resized to the given size. LLMs typically don’t need high resolution images and lowering the resolution reduces number of used tokens and therefore token cost.

Model configuration

Configure a default AI Model as described in the AiModel configuration

To use a different model than the default for the task, decorate the configuration in <YOUR-LIGHT-MODULE>/decorations/aiTasks/ai-accelerator-image-recognition:tagImageWithLLM.yaml:

modelId: <YOUR-MODEL-ID>

You can use any multimodal LLM from the AI Model Registry. Multimodal models support image processing. Examples include Google Gemini 2.5 Flash/Pro, OpenAI GPT-4o, and Anthropic Claude 3.5+ Sonnet.

MaxLabels

To change the maximum number of labels generated, change the defaultValue of the task through decoration in <YOUR-LIGHT-MODULE>/decorations/aiTasks/ai-accelerator-image-recognition:tagImageWithLLM.yaml:

input:
  maxLabels:
    defaultValue: 10 (1)
1 Value must be an integer.
The AI Accelerator image recognition service executes the configured task (default: tagImageWithLLM) without passing explicit parameter values. Therefore, you must use task decoration to override the default maxLabels value.
Feedback

DX Core

×

Location

This widget lets you know where you are on the docs site.

You are currently perusing through the Image Recognition module docs.

Main doc sections

DX Core Headless PaaS Legacy Cloud Incubator modules