Custom image libraries

更新时间:
复制 MD 格式

Content Moderation uses Alibaba Cloud's global risk library by default, which meets most general moderation needs. Custom image libraries let you manage images that should be blocked, passed, or submitted for human review, so you can tailor moderation results to your business requirements and respond to emerging content risks.

Background information

Custom image libraries are categorized as blacklists, whitelists, and review lists. When an image matches a sample in a library, it receives the corresponding moderation result: block for blacklists, pass for whitelists, and review for review lists. There are two types of custom image libraries: feedback-based and self-managed.

  • A feedback-based image library is automatically generated from your human review records and applies by default to all image moderation tasks in the same scene. You can manage images within a feedback-based library but cannot disable or delete the library itself.

  • A self-managed image library is one that you create and manage. You can apply it to a specific moderation task or scene and manage both the images and the library itself.

Note

You can create up to 10 self-managed image libraries and add up to 10,000 image samples to each library.

You can also manage custom image libraries by using the API or an SDK. For more information, see the following topics:

Procedure

  1. Log on to the Alibaba Cloud Content Moderation console.

  2. In the left-side navigation pane, choose Machine Moderation V1.0 > Risk Libraries.

  3. On the Risk Libraries page, click the Custom Image Library tab, and then click Create Image Library.

  4. In the Create Image Library dialog box, configure the parameters as described in the following table and click OK.

    Table 1. Create Image Library parameters

    Parameter

    Description

    Name

    Enter a name for the image library. The name can be up to 20 characters in length.

    Detection Scene

    Select the scene where the library applies. Valid values:

    • Pornographic Content: moderates images and videos for pornographic content (the scenes parameter in an API request includes porn).

    • Violent or Terroristic Content: moderates images and videos for terrorist content (the scenes parameter in an API request includes terrorism).

    • Texts or Objects on Image: moderates images and videos for ad violations (the scenes parameter in an API request includes ad).

    • Undesirable Scene: moderates images and videos for undesirable scenes (the scenes parameter in an API request includes live).

    Suggestion

    Select the library's purpose. Valid values:

    • Block list: If content matches a sample in this library, the moderation result is block.

    • Review List: If content matches a sample in this library, the moderation result is review.

    • Trust list: If content matches a sample in this library, the moderation result is pass.

    BizType

    BizType lets you apply different image libraries for different business needs. For example, you can specify which image library to use in a specific moderation request. The logic is as follows:

    • If a library is configured with BizType="A" and a moderation API request also specifies BizType="A", only the library with BizType="A" is used for moderation, provided that the library is enabled.

    • In all other cases, all enabled libraries are used for moderation.

    Note

    Risk libraries with a BizType do not apply to OSS content moderation.

    After you create a custom image library, it is enabled by default.

  5. On the Custom Image Library tab, find the target library and click Modify in the Actions column.

    The Custom Image Library tab lists all custom image libraries. Feedback-based image libraries are marked with a System tag and are named in the SCENE_FEEDBACK_WHITE/BLACK format. For example, LIVE_FEEDBACK_BLACK is a feedback-based blacklist for the undesirable scene.

  6. On the Library Management page, perform the following operations as needed.

    Note

    Changes to the library, such as adding or deleting image samples, take about 15 minutes to take effect.

    • Search for images by Image ID, Time range, or Sample ID.

    • Click an image to open its Details panel. You can view information such as the recent hit count, addition time, and risky image ID.

    • Click Select File to upload images to the library.

      Note

      You can upload images in PNG, JPG, JPEG, and BMP formats. Each file must be smaller than 5 MB. You can upload up to 20 images at a time.

    • To delete a single image, click Delete below the image. To delete multiple images, select them and click Batch delete.

Related operations

For a self-managed image library, you can click Delete, Edit, or Disable in the Actions column on the Custom Image Library tab to manage the library.