了解图像审查概念Learn image moderation concepts

使用内容审查器的机器辅助图像审查来审查图像中是否存在成人和猥亵内容。Use Content Moderator’s machine-assisted image moderation to moderate images for adult and racy content. 扫描图像以查找文本内容并提取该文本,以及检测人脸。Scan images for text content and extract that text, and detect faces. 可以将图像与自定义列表进行匹配,并执行进一步操作。You can match images against custom lists, and take further action.

评估成人和猥亵内容Evaluating for adult and racy content

评估操作返回 0 到 1 之间的置信度分数。The Evaluate operation returns a confidence score between 0 and 1. 它还返回等于 true 或 false 的布尔数据。It also returns boolean data equal to true or false. 这些值可预测图像是否包含潜在的成人或猥亵内容。These values predict whether the image contains potential adult or racy content. 使用图像(文件或 URL)调用 API 时,返回的响应包含以下信息:When you call the API with your image (file or URL), the returned response includes the following information:

"ImageModeration": {
  "adultClassificationScore": 0.019196987152099609,
  "isImageAdultClassified": false,
  "racyClassificationScore": 0.032390203326940536,
  "isImageRacyClassified": false,


  • isImageAdultClassified 表示可能存在某些情况下可能被视为色情或成人性质的图像。isImageAdultClassified represents the potential presence of images that may be considered sexually explicit or adult in certain situations.
  • isImageRacyClassified 表示可能存在某些情况下可能被视为性暗示或过于成熟的图像。isImageRacyClassified represents the potential presence of images that may be considered sexually suggestive or mature in certain situations.
  • 这些分数介于 0 和 1 之间。The scores are between 0 and 1. 分数越高,模型预测类别可能适用的可能性越高。The higher the score, the higher the model is predicting that the category may be applicable. 此预览版依赖于统计模型,而不是人工编码结果。This preview relies on a statistical model rather than manually coded outcomes. 我们建议对你自己的内容进行测试,以确定每个类别是否满足你的需求。We recommend testing with your own content to determine how each category aligns to your requirements.
  • 布尔值为 true 或 false,具体情况取决于内部分数阈值。The boolean values are either true or false depending on the internal score thresholds. 客户应评估是使用该值,还是根据他们的内容策略确定自定义阈值。Customers should assess whether to use this value or decide on custom thresholds based on their content policies.

使用光学字符识别 (OCR) 检测文本Detecting text with Optical Character Recognition (OCR)

光学字符识别 (OCR) 操作可预测图像中是否存在文本内容,并将其提取出来以进行文本审查,以及用于其他用途。The Optical Character Recognition (OCR) operation predicts the presence of text content in an image and extracts it for text moderation, among other uses. 你可以指定语言。You can specify the language. 如果未指定语言,则检测默认为英语。If you do not specify a language, the detection defaults to English.

响应包含以下信息:The response includes the following information:

  • 原始文本。The original text.
  • 检测到的文本元素及其置信度分数。The detected text elements with their confidence scores.

示例提取:Example extract:

"TextDetection": {
  "status": {
    "code": 3000.0,
    "description": "OK",
    "exception": null
  "language": "eng",
  "text": "IF WE DID \r\nALL \r\nTHE THINGS \r\nWE ARE \r\nCAPABLE \r\nOF DOING, \r\nWE WOULD \r\nLITERALLY \r\nASTOUND \r\nOURSELVE \r\n",
  "candidates": []

检测人脸Detecting faces

检测人脸有助于检测个人数据,例如图像中的人脸。Detecting faces helps to detect personal data such as faces in the images. 可以检测每个图像中的潜在人脸和潜在人脸的数量。You detect potential faces and the number of potential faces in each image.

响应包括以下信息:A response includes this information:

  • 人脸计数Faces count
  • 检测到的人脸的位置列表List of locations of faces detected

示例提取:Example extract:

"FaceDetection": {
  "result": true,
  "count": 2,
  "advancedInfo": [
  "faces": [
      "bottom": 598,
      "left": 44,
      "right": 268,
      "top": 374
      "bottom": 620,
      "left": 308,
      "right": 532,
      "top": 396

创建和管理自定义列表Creating and managing custom lists

在许多在线社区中,在用户上传图像或其他类型的内容之后,冒犯性项目可能在接下来的几天、几周和几个月内多次共享。In many online communities, after users upload images or other type of content, offensive items may get shared multiple times over the following days, weeks, and months. 从多个地方重复扫描和筛选出相同图像或甚至略微修改的图像版本的成本可能是昂贵的,并且容易出错。The costs of repeatedly scanning and filtering out the same image or even slightly modified versions of the image from multiple places can be expensive and error-prone.

可以将令人反感的图像添加到阻止内容的自定义列表中,而不是多次审核同一图像。Instead of moderating the same image multiple times, you add the offensive images to your custom list of blocked content. 这样,内容审核系统就会将传入图像与自定义列表进行比较,并停止任何进一步处理。That way, your content moderation system compares incoming images against your custom lists and stops any further processing.


最大限制为“5 个图像列表”,每个列表“不超过 10,000 个图像”。There is a maximum limit of 5 image lists with each list to not exceed 10,000 images.

内容审查器提供了完整的图像列表管理 API,其中包含用于管理自定义图像列表的操作。The Content Moderator provides a complete Image List Management API with operations for managing lists of custom images. 图像列表 API 控制台开始,使用 REST API 代码示例。Start with the Image Lists API Console and use the REST API code samples. 如果熟悉 Visual Studio 和 C#,还请参阅图像列表 .NET 快速入门Also check out the Image List .NET quickstart if you are familiar with Visual Studio and C#.

与自定义列表进行匹配Matching against your custom lists

匹配操作允许将传入图像与使用列表操作创建和管理的任何自定义列表进行模糊匹配。The Match operation allows fuzzy matching of incoming images against any of your custom lists, created and managed using the List operations.

如果找到匹配项,该操作将返回匹配图像的标识符和审查标记。If a match is found, the operation returns the identifier and the moderation tags of the matched image. 响应包括以下信息:The response includes this information:

  • 匹配分数(介于 0 和 1 之间)Match score (between 0 and 1)
  • 匹配图像Matched image
  • 图像标记(在之前的审查期间分配)Image tags (assigned during previous moderation)
  • 图像标签Image labels

示例提取:Example extract:

"IsMatch": true,
"Matches": [
        "Score": 1.0,
        "MatchId": 169490,
        "Source": "169642",
        "Tags": [],
        "Label": "Sports"

后续步骤Next steps

试用图像审查 API 控制台并使用 REST API 代码示例。Test drive the Image Moderation API console and use the REST API code samples. 如果熟悉 Visual Studio 和 C#,还请参阅图像审查 .NET 快速入门Also check out the Image moderation .NET quickstart if you are familiar with Visual Studio and C#.