Content Moderation lets you create custom image libraries to customize detection results for your business needs. You can use a custom image library for scenarios such as Pornography Detection, Terrorism Detection, and Spam Ad Detection for images and videos. You can also use a custom image library to block, pass, or flag specific images for manual review.
Background information
A custom image library can function as a blacklist, whitelist, or review list. When you apply a custom image library to your moderation tasks, any content that matches a sample in the library is processed according to the library's type. Matches in a blacklist result in a block action. Matches in a whitelist result in a pass action. Matches in a review list flag the content for manual review. There are two types of custom image libraries: feedback-based and self-managed.
feedback-based image library: Content Moderation automatically generates this library from your manual review history. It applies by default to all image detection tasks in the sameScene. You can manage the images within these libraries, but you cannot perform library-level operations such as disabling or deleting them.self-managed image library: You create and populate this type of library. You can apply it to specific detection tasks or scenes. You have full control to manage both the images and the library itself.
You can create up to 10 self-managed image library instances. Each library can contain a maximum of 10,000 image samples.
Procedure
Log on to the Alibaba Cloud Content Moderation console.
In the left-side navigation pane, choose .
On the Risk Libraries page, click the Custom Image Library tab, and then click Create Image Library.
In the Create Image Library dialog box, configure the parameters as described in the following table and click OK.
Table 1. Parameters for creating an image library
Parameter
Description
Name
Enter a name for the image library. The name can be up to 20 characters long.
Scene
Select the use cases where this library applies. Valid values:
Pornographic Content: For moderating pornographic content in images and videos (where the
scenesparameter includesporn).Violent or Terroristic Content: For moderating violent or terroristic content in images and videos (where the
scenesparameter includesterrorism).Ad: For moderating ad violations in images and videos (where the
scenesparameter includesad).Undesirable Scene: For moderating undesirable scenes in images and videos (where the
scenesparameter includeslive).
List Category
Select the purpose of the library, which determines the moderation outcome. Valid values:
Block list: If content matches a
samplein this library, themachine-assisted moderation resultisblock.Review list: If content matches a
samplein this library, themachine-assisted moderation resultisreview.Trust list: If content matches a
samplein this library, themachine-assisted moderation resultispass.
BizType
The
bizTypeparameter allows you to apply libraries for specific business requirements. For example, you can usebizTypeto specify a particular library for a detection task. The logic is as follows:If an image library is configured with
bizType"A" and you passbizType"A" in your API request, only that specific library is used for detection, provided it is enabled.In all other cases, the system uses all enabled libraries for detection.
NoteImage libraries with the bizType attribute are not applicable to OSS compliance detection.
The new image library is enabled by default.
On the Custom Image Library tab, find the target library and click Manage in the Actions column.
The Custom Image Library tab displays all custom image libraries. Feedback-based image libraries have a System tag before their names and are named in the
Scene_FEEDBACK_WHITE/BLACKformat. For example, LIVE_FEEDBACK_BLACK is a feedback-based blacklist library generated by the system for undesirable scenes.On the Image Libraries page, you can perform the following operations:
NoteLibrary changes, 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 expand its Details panel and view information such as the number of recent hits, the time it was added, and the Image ID.
Click Select File to upload images to the library.
NoteYou can upload a maximum of 20 images at a time in PNG, JPG, JPEG, or BMP format, and each file must be less than 5 MB.
To delete a single image, click Delete below the image. To delete multiple images, select them and then click Batch Delete.
Related operations
On the Custom Image Library tab, you can manage a self-managed image library by clicking Delete, Edit, or Disable in the Actions column.
What to do next
After you configure a risk library, you can use the OSS compliance detection feature. However, you must first configure message notifications. For more information, see Configure message notifications.