Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ImageCensor.cs #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion AipSdk/Baidu/Aip/ContentCensor/ImageCensor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,29 @@ public JObject UserDefined(byte[] image, Dictionary<string, object> options = nu
return PostAction(aipReq);
}

/// <summary>
/// 图像审核接口
/// 为用户提供色情识别、暴恐识别、政治敏感人物识别、广告识别、图像垃圾文本识别(反作弊)、恶心图像识别等一系列图像识别接口的一站式服务调用,
/// 并且支持用户在控制台中自定义配置所有接口的报警阈值和疑似区间,上传自定义文本黑库和敏感人物名单等。
/// 相比于组合服务接口,本接口除了支持自定义配置外,还对返回结果进行了总体的包装,按照用户在控制台中配置的规则直接返回是否合规,如果不合规则指出具体不合规的内容。
/// </summary>
/// <param name="image"></param>
/// <param name="options"></param>
/// <returns></returns>
public JObject UserDefined(string image, Dictionary<string, object> options = null)
{
var aipReq = DefaultRequest(USER_DEFINED);

CheckNotNull(image, "image");
aipReq.Bodys["image"] = image;
PreAction();

if (options != null)
foreach (var pair in options)
aipReq.Bodys[pair.Key] = pair.Value;
return PostAction(aipReq);
}

/// <summary>
/// 图像审核接口
/// 为用户提供色情识别、暴恐识别、政治敏感人物识别、广告识别、图像垃圾文本识别(反作弊)、恶心图像识别等一系列图像识别接口的一站式服务调用,
Expand All @@ -76,4 +99,4 @@ public JObject UserDefinedUrl(string imageUrl, Dictionary<string, object> option


}
}
}