All Products
Search
Document Center

Platform For AI:Image-Text Filtering

Last Updated:Sep 04, 2024

LVM image processing algorithms are used to cleanse images, cleanse image content, extract basic information from images, and generate captions for images. You can combine different algorithms to filter high-quality image data and generate text samples that meet your business requirements. You can use the generated image data to train models. This topic describes how to use the Image-Text Filtering preset template in Machine Learning Designer of Platform for AI (PAI).

Limits

The Image-Text Filtering preset template is available only in the China (Hangzhou), China (Shanghai), China (Beijing), and China (Shenzhen) regions.

Prepare image data

PAI provides sample data for your reference.

  1. Download the image metadata file and the image file.

    • Image metadata file: image_meta.jsonl, which can be used as the input of the image-text algorithms.

    • Image file: data.zip, which can be used as the input of general image processing algorithms.

  2. Decompress the .zip package and upload the image files to OSS. For more information, see Use the OSS console.

  3. Modify the image metadata file.

    Replace the your_oss_path field in the image metadata file with the directory of the OSS bucket to which you upload images. For example, if you upload images to the image_algorithm_test/image_data directory of an OSS bucket, replace the your_oss_path field with image_algorithm_test/image_data.

    image

    image

  4. Upload the image metadata file to the same OSS bucket as in Step 2. For more information, see Use the OSS console.

Create and run a pipeline

  1. Go to the Visualized Modeling (Designer) page.

    1. Log on to the PAI console.

    2. In the upper-left corner, select a region based on your business requirements.

    3. In the left-side navigation pane, click Workspaces. On the Workspaces page, click the name of the workspace that you want to manage.

    4. In the left-side navigation pane, choose Model Training > Visualized Modeling (Designer).

  2. Create a pipeline.

    1. On the Preset Templates tab, choose Business Area > Multi-modal LLM. In the Image-Text Filtering section, click Create.

      image

    2. In the Create Pipeline dialog box, configure the pipeline parameters and click OK. You can retain the default values.

    3. In the pipeline list, find the pipeline that you created and click Open.

  3. Configure the pipeline.

    Configure the LVM image preprocessing algorithm components. For more information, see Image preprocessing operators.

    image

  4. Run the pipeline. After you run the pipeline, view the generated files.

    • meta.jsonl file: The image metadata file meta.jsonl is generated in the upper-level directory of the directory specified by the Image Data OSS Path parameter.

    • Output file: You can view the output file in the directory specified by the Output File OSS Path parameter.

    For more information about the output file, see the description of the Output File OSS Path parameter in the Image preprocessing operators topic.

References

Image preprocessing operators