Image quality evaluation

Updated at:

The image quality evaluation operator assesses the visual quality of images based on dimensions such as definition, noise, color saturation, and exposure. It outputs an objective, quantitative score. This topic describes how to configure the image quality evaluation operator.

Prerequisites

  • You can use the workflow feature only after you purchase the unstructured data feature for your instance.

  • A workflow has been created. For more information, see Create a workflow.

Background information

  • The image quality evaluation operator supports the following file formats: jpg, jpeg, jpe, jfif, png, bmp, tiff, tif, webp, heic, heif, gif, ico, ppm, pgm, pbm, pnm, and tga.

  • By default, the image quality evaluation operator is allocated 1 Core and 4 GB of resources when it uses the system built-in model, and 0.5 Core and 1 GB of resources when it uses a multi-modal large language model (LLM).

Permissions

Project administrators, developers, and analysts of a Basic project, and custom project roles with the Dataset-Use permission, can use all datasets in the project as input and output datasets for the operator.

Procedure

  1. On the Dataphin home page, choose R&D > Data R&D from the top menu bar.

  2. On the Developer page, select Project from the top menu bar.

  3. In the left navigation pane, select Data Processing > Workflow. In the Workflow list, click the target workflow to open the workflow canvas. From the Operator Library on the left, drag the Image Quality Evaluation operator to the canvas and configure the following parameters in the Image Quality Evaluation panel on the right.

    Parameter

    Description

    Step Name

    Enter a name for the operator. The name can contain up to 256 characters.

    Input Configuration

    Dataset

    Select the dataset to process. You can select only a mixed dataset. After you select a dataset, you must also select a Version. The first version of the dataset is selected by default.

    When this operator is a downstream operator, the selected dataset is typically the same as the output dataset of the upstream operator.

    Input Field

    The storage URL of the image to be processed. Select a source field from the input dataset. You can select only fields for which the Is URL parameter is set to Yes.

    Filter Condition (optional)

    Use SQL syntax. Enter only the filter condition that follows the WHERE statement. System global variables are supported, such as the data timestamp ${bizdate}.

    Operator Configuration

    Processing Model

    Select System-built-in model (CLIP-IQA) or Multi-modal LLM. If you select Multi-modal LLM, you must specify the Model that the operator uses. You can select only models that are of the Vision (Images and Videos) type and are enabled in Intelligent Application Management > Model Configuration.

    Output Configuration

    Dataset

    You can select Source dataset or Other dataset. If the metadata table of the source dataset does not have a primary key, Other dataset is selected by default.

    When you select Other dataset, you must also specify a mixed dataset or a table dataset and its Version as the output dataset. The first version of the dataset is selected by default. You can also select other versions of the source dataset.

    When you select Source dataset, the metadata generated by the operator is written to the metadata table that corresponds to the same version of the source dataset.

    Loading Policy

    If the metadata table of the selected output dataset has a primary key, Update on primary key conflict is selected by default. If no primary key exists, Append data is selected by default.

    • Append data: Appends new data to the destination table. An error is reported in the case of a primary key or constraint violation.

    • Update on primary key conflict: If a primary key or constraint conflict occurs, the old data in the entire row with the duplicate primary key is deleted before the new data is inserted.

    • Overwrite: Deletes the data from the destination table before writing the new data.

    Note

    If you set Dataset to Source dataset, only Update on primary key conflict is supported for the loading policy.

    Field Mapping

    The image quality evaluation operator always outputs the following field:

    quality_score: The score ranges from 0 to 1. A higher score indicates better image quality. A score greater than 0.5 is generally considered good.

    By default, the output fields of the operator are mapped to fields with the same names in the output dataset. You can also manually select destination fields for custom mapping. In addition, you can map pass-through fields from the source dataset to the destination dataset. Manage field mappings as follows:

    • Add output field: Click to add a blank row for field mapping. This feature is supported only when you set the output dataset to Other dataset.

    • Batch mapping: Click to perform batch manual mapping, mapping by name, or mapping by row. This feature is supported only when you set the output dataset to Other dataset.

    • Delete mapping: Click the Delete icon to delete the field mapping in the corresponding row. You cannot delete the mapping for the fixed output field of the operator.

  4. After the configuration is complete, click Save in the top menu bar of the canvas.

    After you configure an operator, you can add upstream or downstream operators to complete the workflow configuration.