For image content, after activating IMS, you can directly call the ImageModeration API to batch recognize images in albums (such as Qzone album). Note:
Before calling the API, make sure that the current account has at least the access permission of IMS. For more information on how to configure the permission, see CAM Authorization Guide. If you cannot access the service, you will need to activate the service/check the billing information (for root account) or request the corresponding permission from the admin or root account (for sub-account/collaborator).
The custom dictionary is used to configure the personalized recognition content. You can skip this step if you don't need to configure a custom library.
1. Log in to the CMS console and select IMS > Custom Library Management > Custom Dictionary on the left sidebar to enter the Custom Dictionary page. 2. On the Custom Dictionary page, click Add Dictionary in the top-left corner to pop up the Create Dictionary window.
3. In the Create Dictionary pop-up window, configure a custom library based on your business needs.
4. Click OK.
5. On the Custom Dictionary page, select the target dictionary and click Manage in the Operation column to enter the dictionary content management page.
6. On the dictionary content management page, click Add Sample in the top-left corner to pop up the Add Sample window.
7. In the Add Sample pop-up window, select the recognition details, enter keywords, and click OK.
Note:
Recognition Details: violation type that corresponds to the recognition model.
Keywords: each keyword can contain up to 20 characters, and a maximum of 500 keywords separated by line breaks can be batch submitted at a time.
8. On the Custom Dictionary page, select the target dictionary and click in the Operation column to enable or disable it. Note:
After the dictionary is disabled, samples in it will not be used to match and recognize image content.
9.After configuring the custom dictionary, you can associate it with the policy created in Configure a task policy.
You can skip this step if you use the preset default policy. The default policy is developed by TenDI based on models for multiple industries. It is suitable for most content security requirements.
1. Log in to the IMS console and select IMS > Policy Management on the left sidebar to enter the Policy Management page. 2. On the Policy Management page, click Create Policy in the top-left corner to enter the Create Policy page.
3. On the Create Policy page, set the relevant policy information, including the policy name, Biztype name, associated service template (not required currently), and industry category (select whether to use TenDI's preset industry templates for recognition), and click Next.
4. Configure the recognition policy, select whether to recognize different types of risky content based on your business needs, and click Next.
5. Configure the custom library, select whether to configure the custom dictionary, and click Next.
6. After the creation is completed, you can view the policy configuration information on this page. After confirming it, click Complete.
Step 3. Create a task and get the recognition result
After completing the above steps, you can call the ImageModeration API to create an album recognition task as instructed below:
Note:
When connecting to the service, you can use API Explorer for online debugging.
Was this page helpful?