Image Moderation - Evaluate Url Input
返回包含不雅内容或成人内容的图像的概率。
POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessImage/Evaluate
POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessImage/Evaluate?overload=url&CacheImage={CacheImage}
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
Endpoint
|
path | True |
string |
支持的 Azure 认知服务终结点(协议和主机名,如 https://westus.api.cognitive.microsoft.com)。 |
|
Cache
|
query |
boolean |
是否保留提交的映像以供将来使用。 如果省略,则默认值为 false。 |
请求头
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | True |
string |
|
| Content-Type | True |
string |
内容类型。 |
请求正文
| 名称 | 类型 | 说明 |
|---|---|---|
| DataRepresentation |
string |
|
| Value |
string |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK | ||
| Other Status Codes |
错误响应。 |
安全性
Ocp-Apim-Subscription-Key
类型:
apiKey
在:
header
示例
Evaluate Image request
示例请求
POST {Endpoint}/contentmoderator/moderate/v1.0/ProcessImage/Evaluate?overload=url
{
"DataRepresentation": "URL",
"Value": "https://moderatorsampleimages.blob.core.windows.net/samples/sample.jpg"
}
示例响应
{
"AdultClassificationScore": 0.021854378283023834,
"IsImageAdultClassified": false,
"RacyClassificationScore": 0.045791395008563995,
"IsImageRacyClassified": false,
"AdvancedInfo": [
{
"Key": "ImageDownloadTimeInMs",
"Value": "2328"
}
],
"Result": false,
"Status": {
"Code": 3000,
"Description": "OK",
"Exception": ""
},
"TrackingId": "SEA_ad975eeae1f24f81bebb40be0c3ba4fd_ContentModerator.Preview_c6ca58fc-dc30-4961-9526-e8bdfb3b3bf5",
"CacheID": "c660dfa6-eba9-4950-aa58-a6967de57ea8_636422189473647994"
}
定义
| 名称 | 说明 |
|---|---|
| APIError |
API 返回的错误信息。 |
| Error |
错误正文。 |
| Evaluate |
评估响应对象。 |
|
Key |
键/值对对象属性。 |
| Status |
状态属性。 |
APIError
API 返回的错误信息。
| 名称 | 类型 | 说明 |
|---|---|---|
| Error |
错误正文。 |
Error
错误正文。
| 名称 | 类型 | 说明 |
|---|---|---|
| Code |
string |
|
| Message |
string |
Evaluate
评估响应对象。
| 名称 | 类型 | 说明 |
|---|---|---|
| AdultClassificationScore |
number |
成人分类分数。 |
| AdvancedInfo |
高级信息。 |
|
| CacheID |
string |
缓存 ID。 |
| IsImageAdultClassified |
boolean |
指示图像是否被归类为成人。 |
| IsImageRacyClassified |
boolean |
指示图像是否被归类为不雅。 |
| RacyClassificationScore |
number |
Racy 分类分数。 |
| Result |
boolean |
评估结果。 |
| Status |
评估状态。 |
|
| TrackingId |
string |
跟踪 ID。 |
KeyValuePair
键/值对对象属性。
| 名称 | 类型 | 说明 |
|---|---|---|
| Key |
string |
键参数。 |
| Value |
string |
值参数。 |
Status
状态属性。
| 名称 | 类型 | 说明 |
|---|---|---|
| Code |
integer |
状态代码。 |
| Description |
string |
状态说明。 |
| Exception |
string |
异常状态。 |