OSS violation detection

更新时间:
复制 MD 格式

This topic describes how to use the OSS violation detection feature of AI Guardrails to monitor images on a social media platform. In this scenario, users upload many images each day to an Object Storage Service (OSS) bucket named tmpsample. The platform uses this feature to check the new images for violations, such as pornography and terrorist content.

Prerequisites

Step 1: Grant access permissions to an OSS bucket

The OSS violation detection feature is available only to users who have activated the Alibaba Cloud Object Storage Service (OSS). Before you use OSS violation detection, you must activate OSS, create the tmpsample bucket, and grant AI Guardrails permission to read the bucket. For more information about how to grant permissions, see Grant AI Guardrails the permissions to access an OSS bucket.

Step 2: Set an incremental scan task

You can configure an incremental scan to automatically detect violations in new images and videos that are uploaded to the tmpsample bucket. A scan is triggered whenever new content is added. You can then view the scan results from the last 7 days in real time.

  1. Log on to the AI Guardrails console. In the navigation pane on the left, choose OSS Violation Detection V1.0 > Settings.

  2. On the Incremental Scan tab, configure the following parameters:

    1. Select Bucket.

      From the To Be Selected box on the left, select the bucket that you want to scan and add it to the Selected box on the right.

      Then, click Next.

    2. Set Filter Conditions.

      Click Set Filter Conditions to the right of the selected bucket. Configure the settings to scan only image files with the img/test_ prefix. For more information about the configuration, see Set filter conditions.

      Then, click Next.

    3. Configure Detection Scenarios.

      From the Recommended Configurations drop-down list, select Recommended Configurations for Social Networking. Then, turn off the detection scenarios for videos and audio.

      For more information about the parameters, see Configure detection scenarios.

      Then, click Next.

    4. Configure Scan Scope.

      The scan scope is displayed based on the detection scenarios that you configure. For example, if you select only Image on the Scenario Configuration page, only the configuration information for images is displayed on the Scan Configuration page.

      Set Daily Image Scan Limit to 100 and turn on Scan Files Without Suffixes.

      Then, click Next.

    5. Configure Freeze Scope.

      • Turn on the Auto-freeze switch for images.

        Set the Pornography, Politics-related, Ad Violations, and Undesirable Scenes options to automatically freeze content that is flagged for these violations.

      • Select Modify Permissions as the freeze method.

        Change the access permissions of non-compliant files in your bucket from public to private.

      Then, click Next.

  3. Select I have agreed to the terms of service for OSS Violation Detection and click Save.

    The system estimates the maximum scan fee based on your configuration. You can choose the pay-as-you-go billing method or use a resource plan. Then, click OK.

    The incremental scan configuration takes effect immediately. The system automatically scans new images and videos in the selected bucket for violations based on your configuration.

Step 3: View scan results

The OSS violation detection service lets you view scan results. After you configure an incremental scan task, you can view the scan results in the AI Guardrails console at any time and perform a human review based on the results.

  1. Log on to the AI Guardrails console.

  2. In the navigation pane on the left, choose OSS Violation Detection V1.0 > Incremental Scan.

  3. On the Incremental Scan page, click Scan Results in the Actions column.

    On the Incremental Scan Results page, view the scan results from the last 7 days and handle non-compliant content.

    If the scan results do not meet your business needs, you can perform a human review. Human review includes the following operations:

    • Violation and Delete

      Click Violation and Delete to delete the image or video from both the AI Guardrails console and the OSS bucket. You can select one or more items.

    • Normal and Ignore

      Click Normal and Ignore to ignore the detection result. After you ignore the result, the image or video is no longer displayed in the console. This does not affect the image or video stored in the OSS bucket. You can select one or more items.

    • Restore to Normal

      If you have enabled the auto-freeze feature, you can also select an image or video and click Normal and Restore to restore the frozen item.

Step 4: View statistics

The OSS violation detection service provides data statistics. After you configure an incremental scan task, you can view the statistics in the AI Guardrails console at any time. You can monitor the statistics over a period of time to strengthen control over your website's content.

  1. Log on to the AI Guardrails console.

  2. In the navigation pane on the left, choose OSS Violation Detection V1.0 > Incremental Scan.

  3. On the Incremental Scan page, click the 图标 icon, and then click Data Statistics.

  4. On the Image tab of the OSS Scan page, view the statistics for incremental scans from the last 7 days.