Predictions - Query
获取已发送到预测终结点的图像。
POST {Endpoint}/customvision/v3.3/training/projects/{projectId}/predictions/query
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
Endpoint
|
path | True |
string |
支持的认知服务终结点。 |
|
project
|
path | True |
string (uuid) |
项目 ID。 |
请求头
Media Types: "application/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"
| 名称 | 必需 | 类型 | 说明 |
|---|---|---|---|
| Training-Key | True |
string |
请求正文
Media Types: "application/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"
| 名称 | 类型 | 说明 |
|---|---|---|
| application |
string |
|
| continuation |
string |
|
| endTime |
string (date-time) |
|
| iterationId |
string (uuid) |
|
| maxCount |
integer (int32) |
|
| orderBy | ||
| session |
string |
|
| startTime |
string (date-time) |
|
| tags |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
还行 Media Types: "application/json", "application/xml", "text/xml" |
|
| Other Status Codes |
错误响应 Media Types: "application/json", "application/xml", "text/xml" |
安全性
Training-Key
类型:
apiKey
在:
header
示例
Successful QueryPredictions request
示例请求
POST https://westus.api.cognitive.microsoft.com/customvision/v3.3/training/projects/bc3f7dad-5544-468c-8573-3ef04d55463e/predictions/query
{
"orderBy": "Newest",
"tags": [
{
"id": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"maxThreshold": 1,
"minThreshold": 0.9
}
]
}
示例响应
{
"results": [
{
"id": "dfd2d346-3ed5-4e1e-857d-af4e32cec042",
"project": "8988643a-ae70-447d-9a22-15c4255e5ecb",
"iteration": "b7b9d99c-a2c6-4658-9900-a98d2ff5bc66",
"created": "2018-01-31T20:18:26Z",
"predictions": [
{
"tagId": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"tagName": "Tag 1",
"probability": 1
},
{
"tagId": "45619cda-d1c9-4bc8-a3e1-87c5d81adbc3",
"tagName": "Tag 2",
"probability": 3.60627153E-12
}
],
"originalImageUri": "<image uri>",
"thumbnailUri": "<thumbnail uri>",
"resizedImageUri": "<resized image uri>",
"domain": "b30a91ae-e3c1-4f73-a81e-c270bff27c39"
}
],
"token": {
"session": "1:286613",
"continuation": "",
"maxCount": 0,
"orderBy": "Newest",
"tags": [
{
"id": "b5f7e6a2-a481-49a6-afec-a7cef1af3544",
"minThreshold": 0.9,
"maxThreshold": 1
}
],
"iterationId": null,
"startTime": null,
"endTime": null,
"application": ""
}
}
定义
| 名称 | 说明 |
|---|---|
|
Bounding |
定义图像区域的边界框。 |
|
Custom |
|
|
Custom |
错误代码。 |
|
Order |
|
| Prediction |
预测结果。 |
|
Prediction |
发送到预测终结点的预测图像的查询结果。 |
|
Prediction |
|
|
Prediction |
|
|
Stored |
图像预测请求的结果。 |
|
Tag |
预测标记的类型。 |
BoundingBox
定义图像区域的边界框。
| 名称 | 类型 | 说明 |
|---|---|---|
| height |
number (float) |
高度。 |
| left |
number (float) |
左边界的坐标。 |
| top |
number (float) |
顶边界的坐标。 |
| width |
number (float) |
宽度。 |
CustomVisionError
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
错误代码。 |
|
| message |
string |
说明服务报告的错误的消息。 |
CustomVisionErrorCodes
错误代码。
| 值 | 说明 |
|---|---|
| NoError | |
| BadRequest | |
| BadRequestExceededBatchSize | |
| BadRequestNotSupported | |
| BadRequestInvalidIds | |
| BadRequestProjectName | |
| BadRequestProjectNameNotUnique | |
| BadRequestProjectDescription | |
| BadRequestProjectUnknownDomain | |
| BadRequestProjectUnknownClassification | |
| BadRequestProjectUnsupportedDomainTypeChange | |
| BadRequestProjectUnsupportedExportPlatform | |
| BadRequestProjectImagePreprocessingSettings | |
| BadRequestProjectDuplicated | |
| BadRequestIterationName | |
| BadRequestIterationNameNotUnique | |
| BadRequestIterationDescription | |
| BadRequestIterationIsNotTrained | |
| BadRequestIterationValidationFailed | |
| BadRequestWorkspaceCannotBeModified | |
| BadRequestWorkspaceNotDeletable | |
| BadRequestTagName | |
| BadRequestTagNameNotUnique | |
| BadRequestTagDescription | |
| BadRequestTagType | |
| BadRequestMultipleNegativeTag | |
| BadRequestMultipleGeneralProductTag | |
| BadRequestImageTags | |
| BadRequestImageRegions | |
| BadRequestNegativeAndRegularTagOnSameImage | |
| BadRequestUnsupportedDomain | |
| BadRequestRequiredParamIsNull | |
| BadRequestIterationIsPublished | |
| BadRequestInvalidPublishName | |
| BadRequestInvalidPublishTarget | |
| BadRequestUnpublishFailed | |
| BadRequestIterationNotPublished | |
| BadRequestSubscriptionApi | |
| BadRequestExceedProjectLimit | |
| BadRequestExceedIterationPerProjectLimit | |
| BadRequestExceedTagPerProjectLimit | |
| BadRequestExceedTagPerImageLimit | |
| BadRequestExceededQuota | |
| BadRequestCannotMigrateProjectWithName | |
| BadRequestNotLimitedTrial | |
| BadRequestImageBatch | |
| BadRequestImageStream | |
| BadRequestImageUrl | |
| BadRequestImageFormat | |
| BadRequestImageSizeBytes | |
| BadRequestImageDimensions | |
| BadRequestImageExceededCount | |
| BadRequestTrainingNotNeeded | |
| BadRequestTrainingNotNeededButTrainingPipelineUpdated | |
| BadRequestTrainingValidationFailed | |
| BadRequestClassificationTrainingValidationFailed | |
| BadRequestMultiClassClassificationTrainingValidationFailed | |
| BadRequestMultiLabelClassificationTrainingValidationFailed | |
| BadRequestDetectionTrainingValidationFailed | |
| BadRequestTrainingAlreadyInProgress | |
| BadRequestDetectionTrainingNotAllowNegativeTag | |
| BadRequestInvalidEmailAddress | |
| BadRequestDomainNotSupportedForAdvancedTraining | |
| BadRequestExportPlatformNotSupportedForAdvancedTraining | |
| BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining | |
| BadRequestExportValidationFailed | |
| BadRequestExportAlreadyInProgress | |
| BadRequestPredictionIdsMissing | |
| BadRequestPredictionIdsExceededCount | |
| BadRequestPredictionTagsExceededCount | |
| BadRequestPredictionResultsExceededCount | |
| BadRequestPredictionInvalidApplicationName | |
| BadRequestPredictionInvalidQueryParameters | |
| BadRequestInvalidImportToken | |
| BadRequestExportWhileTraining | |
| BadRequestImageMetadataKey | |
| BadRequestImageMetadataValue | |
| BadRequestOperationNotSupported | |
| BadRequestInvalidArtifactUri | |
| BadRequestCustomerManagedKeyRevoked | |
| BadRequestInvalid | |
| UnsupportedMediaType | |
| Forbidden | |
| ForbiddenUser | |
| ForbiddenUserResource | |
| ForbiddenUserSignupDisabled | |
| ForbiddenUserSignupAllowanceExceeded | |
| ForbiddenUserDoesNotExist | |
| ForbiddenUserDisabled | |
| ForbiddenUserInsufficientCapability | |
| ForbiddenDRModeEnabled | |
| ForbiddenInvalid | |
| NotFound | |
| NotFoundProject | |
| NotFoundProjectDefaultIteration | |
| NotFoundIteration | |
| NotFoundIterationPerformance | |
| NotFoundTag | |
| NotFoundImage | |
| NotFoundDomain | |
| NotFoundApimSubscription | |
| NotFoundInvalid | |
| Conflict | |
| ConflictInvalid | |
| ErrorUnknown | |
| ErrorIterationCopyFailed | |
| ErrorPreparePerformanceMigrationFailed | |
| ErrorProjectInvalidWorkspace | |
| ErrorProjectInvalidPipelineConfiguration | |
| ErrorProjectInvalidDomain | |
| ErrorProjectTrainingRequestFailed | |
| ErrorProjectImportRequestFailed | |
| ErrorProjectExportRequestFailed | |
| ErrorFeaturizationServiceUnavailable | |
| ErrorFeaturizationQueueTimeout | |
| ErrorFeaturizationInvalidFeaturizer | |
| ErrorFeaturizationAugmentationUnavailable | |
| ErrorFeaturizationUnrecognizedJob | |
| ErrorFeaturizationAugmentationError | |
| ErrorExporterInvalidPlatform | |
| ErrorExporterInvalidFeaturizer | |
| ErrorExporterInvalidClassifier | |
| ErrorPredictionServiceUnavailable | |
| ErrorPredictionModelNotFound | |
| ErrorPredictionModelNotCached | |
| ErrorPrediction | |
| ErrorPredictionStorage | |
| ErrorRegionProposal | |
| ErrorUnknownBaseModel | |
| ErrorInvalid |
OrderBy
| 值 | 说明 |
|---|---|
| Newest | |
| Oldest | |
| Suggested |
Prediction
预测结果。
| 名称 | 类型 | 说明 |
|---|---|---|
| boundingBox |
预测的边界框。 |
|
| probability |
number (float) |
标记的概率。 |
| tagId |
string (uuid) |
预测标记的 ID。 |
| tagName |
string |
预测标记的名称。 |
| tagType |
预测标记的类型。 |
PredictionQueryResult
发送到预测终结点的预测图像的查询结果。
| 名称 | 类型 | 说明 |
|---|---|---|
| results |
图像预测请求的结果。 |
|
| token |
预测查询令牌。 |
PredictionQueryTag
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string (uuid) |
|
| maxThreshold |
number (float) |
|
| minThreshold |
number (float) |
PredictionQueryToken
| 名称 | 类型 | 说明 |
|---|---|---|
| application |
string |
|
| continuation |
string |
|
| endTime |
string (date-time) |
|
| iterationId |
string (uuid) |
|
| maxCount |
integer (int32) |
|
| orderBy | ||
| session |
string |
|
| startTime |
string (date-time) |
|
| tags |
StoredImagePrediction
图像预测请求的结果。
| 名称 | 类型 | 说明 |
|---|---|---|
| created |
string (date-time) |
创建此预测的日期。 |
| domain |
string (uuid) |
用于预测的域。 |
| id |
string (uuid) |
预测 ID。 |
| iteration |
string (uuid) |
迭代 ID。 |
| originalImageUri |
string |
原始预测图像的 URI。 如果启用了 VNET 功能,则会是用于 GetArtifact 的相对路径,否则这是资源的绝对 URI。 |
| predictions |
预测列表。 |
|
| project |
string (uuid) |
项目 ID。 |
| resizedImageUri |
string |
预测图像的 URI(调整大小)。 如果启用了 VNET 功能,则会是用于 GetArtifact 的相对路径,否则这是资源的绝对 URI。 |
| thumbnailUri |
string |
原始预测图像缩略图的 URI。 如果启用了 VNET 功能,则会是用于 GetArtifact 的相对路径,否则这是资源的绝对 URI。 |
TagType
预测标记的类型。
| 值 | 说明 |
|---|---|
| Regular | |
| Negative | |
| GeneralProduct |