LVM-Image-Caption Mapper (DLC)

更新时间:
复制 MD 格式

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

Deep Learning Containers (DLC)

How it works

  1. Read image data from an OSS directory using the Read File Data component, or connect any image preprocessing component as the upstream input.

  2. On the first run, the component generates a metadata file meta.jsonl in the parent directory of the OSS path you specify. Subsequent runs can reference this file directly instead of the image directory.

  3. 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.

Important

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

OSS Directory for Saving OutputData

No

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

No

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

Number of Processes

No

4

The number of processes.

Single-node or Multi-node

No

single-node

Single-node or multi-node mode. Default value: single-node. Multi-node mode supports only the Ray framework.

Select Resource Group

No

Select a public resource group or a resource quota (if distributed mode is used, you must set resource parameters for the head and worker nodes separately):

  • Public resource group: You must select a GPU instance type for the algorithm.

  • Resource quota: select the number of GPUs, number of vCPUs, memory (GB), and shared memory (GB).

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.