The LVM-Image-Caption Mapper (DLC) component generates natural language captions for images stored in Object Storage Service (OSS) using the BLIP (Bootstrapping Language-Image Pre-training) model. It combines computer vision and natural language processing to automate caption generation for large image datasets.
Common use cases include image search indexing, e-commerce product description generation, social media content creation, accessibility tools for visually impaired users, and news releases.
Supported computing resources
How it works
Read image data from an OSS directory using the Read File Data component, or connect any image preprocessing component as the upstream input.
On the first run, the component generates a metadata file
meta.jsonlin the parent directory of the OSS path you specify. Subsequent runs can reference this file directly instead of the image directory.The component runs BLIP-based captioning on each image and writes the results to the OSS output directory as a JSONL file.
Configure the component
Configure the LVM-Image-Caption Mapper (DLC) component in Machine Learning Designer using the parameters below.
Select a GPU instance type for this component. The BLIP model requires GPU compute.
Input ports
| Parameter | Required | Type | Description |
|---|---|---|---|
| Image Data OSS Path | No | OSS path | The OSS directory containing image data, or the meta.jsonl metadata file generated from a previous run. If no upstream component is connected on the first run, specify this path manually. The component generates meta.jsonl in the parent directory of the path you specify. |
Output ports
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Output File OSS Path | Yes | OSS path | — | The OSS directory where results are saved. The directory contains two files: {name}.jsonl (the caption output) and dj_run_yaml.yaml (the runtime parameter configuration). |
| Output Filename | Yes | String | result.jsonl | The filename for the caption output. |
Parameter settings
| Parameter | Required | Type | Range | Default | Description |
|---|---|---|---|---|---|
| Number of Candidate Captions | Yes | Integer | ≥ 1 | 1 | The number of caption candidates generated per image. |
Execution tuning
| Parameter | Required | Default | Description |
|---|---|---|---|
| Select Resource Group > Public resource group | No | — | The GPU instance type and virtual private cloud (VPC) to use. Select a GPU instance type. |
| Select Resource Group > Dedicated resource group | No | — | The number of vCPUs, memory, shared memory, and GPUs to allocate. |
| Maximum Running Duration (seconds) | No | — | The maximum time the component can run. The job is terminated if this limit is exceeded. |
What's next
To preprocess images before captioning, connect an image transformation component to the input port.
To use the generated captions as training data, connect the output port to a downstream data processing or model training component.