Images - Create From Urls
Voeg de opgegeven installatiekopieën-URL's toe aan de set trainingsafbeeldingen. Deze API accepteert een batch URL's en eventueel tags om afbeeldingen te maken. Er geldt een limiet van 64 afbeeldingen en 20 tags. Als alle installatiekopieën zijn gemaakt, wordt de statuscode 200(OK) geretourneerd. Anders wordt de statuscode 207 (Multi-Status) geretourneerd en wordt de detailstatus voor elke afbeelding weergegeven in de nettolading van het antwoord.
POST {Endpoint}/customvision/v3.3/training/projects/{projectId}/images/urls
URI-parameters
| Name | In | Vereist | Type | Description |
|---|---|---|---|---|
|
Endpoint
|
path | True |
string |
Ondersteunde Cognitive Services-eindpunten. |
|
project
|
path | True |
string (uuid) |
De project-id. |
Aanvraagkoptekst
Media Types: "application/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"
| Name | Vereist | Type | Description |
|---|---|---|---|
| Training-Key | True |
string |
Aanvraagbody
Media Types: "application/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"
| Name | Type | Description |
|---|---|---|
| images | ||
| metadata |
object |
De metagegevens van de afbeelding. Beperkt tot 50 sleutel-waardeparen per afbeelding. De lengte van de sleutel is beperkt tot 256. De lengte van de waarde is beperkt tot 512. |
| tagIds |
string[] (uuid) |
Antwoorden
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK Media Types: "application/json", "application/xml", "text/xml" |
|
| Other Status Codes |
207 Media Types: "application/json", "application/xml", "text/xml" |
|
| Other Status Codes |
Foutreactie Media Types: "application/json", "application/xml", "text/xml" |
Beveiliging
Training-Key
Type:
apiKey
In:
header
Voorbeelden
Successful CreateImagesFromUrls request
Voorbeeldaanvraag
POST https://westus.api.cognitive.microsoft.com/customvision/v3.3/training/projects/64b822c5-8082-4b36-a426-27225f4aa18c/images/urls
{
"images": [
{
"url": "{url to image}"
}
],
"tagIds": [
"b607964f-7bd6-4a3b-a869-6791fb6aab87"
]
}
Voorbeeldrespons
{
"isBatchSuccessful": true,
"images": [
{
"sourceUrl": "{url to image}",
"status": "OK",
"image": {
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"created": "2017-12-19T15:56:10Z",
"width": 1095,
"height": 900,
"resizedImageUri": "{Resized Image Uri}",
"originalImageUri": "{Image Uri}",
"thumbnailUri": "{Thumbnail Uri}",
"tags": [
{
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"created": "2017-12-19T15:56:09Z",
"tagName": "tag name"
}
]
}
}
]
}
{
"isBatchSuccessful": false,
"images": [
{
"sourceUrl": "{url to image}",
"status": "OK",
"image": {
"id": "4d6eb844-42ee-42bc-bd6f-c32455ef07c9",
"created": "2017-12-19T15:56:10Z",
"width": 1095,
"height": 900,
"resizedImageUri": "{Resized Image Uri}",
"originalImageUri": "{Image Uri}",
"thumbnailUri": "{Thumbnail Uri}",
"tags": [
{
"tagId": "b607964f-7bd6-4a3b-a869-6791fb6aab87",
"created": "2017-12-19T15:56:09Z",
"tagName": "tag name"
}
]
}
},
{
"sourceUrl": "{url to image}",
"status": "ErrorSource",
"image": null
}
]
}
Definities
| Name | Description |
|---|---|
|
Custom |
|
|
Custom |
De foutcode. |
| Image |
Afbeeldingsmodel dat moet worden verzonden als JSON. |
|
Image |
|
|
Image |
Status van het maken van de installatiekopie. |
|
Image |
|
|
Image |
|
|
Image |
|
|
Image |
|
|
Image |
|
| Region |
CustomVisionError
| Name | Type | Description |
|---|---|---|
| code |
De foutcode. |
|
| message |
string |
Een bericht waarin de fout wordt uitgelegd die door de service is gerapporteerd. |
CustomVisionErrorCodes
De foutcode.
| Waarde | Description |
|---|---|
| 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 |
Image
Afbeeldingsmodel dat moet worden verzonden als JSON.
| Name | Type | Description |
|---|---|---|
| created |
string (date-time) |
De datum waarop de installatiekopieën zijn gemaakt. |
| height |
integer (int32) |
Hoogte van de afbeelding. |
| id |
string (uuid) |
Id van de afbeelding. |
| metadata |
object |
Metagegevens die aan deze afbeelding zijn gekoppeld. |
| originalImageUri |
string |
De URI naar de oorspronkelijk geüploade afbeelding. Als VNET-functie is ingeschakeld, is dit een relatief pad dat moet worden gebruikt met GetArtifact, anders is dit een absolute URI voor de resource. |
| regions |
Regio's die zijn gekoppeld aan deze installatiekopieën. |
|
| resizedImageUri |
string |
De URI naar de (verkleinde) installatiekopieën die worden gebruikt voor training. Als VNET-functie is ingeschakeld, is dit een relatief pad dat moet worden gebruikt met GetArtifact, anders is dit een absolute URI voor de resource. |
| tags |
Image |
Tags die aan deze afbeelding zijn gekoppeld. |
| thumbnailUri |
string |
De URI naar de miniatuur van de oorspronkelijke afbeelding. Als VNET-functie is ingeschakeld, is dit een relatief pad dat moet worden gebruikt met GetArtifact, anders is dit een absolute URI voor de resource. |
| width |
integer (int32) |
Breedte van de afbeelding. |
ImageCreateResult
| Name | Type | Description |
|---|---|---|
| image |
De afbeelding. |
|
| sourceUrl |
string |
Bron-URL van de afbeelding. |
| status |
Status van het maken van de installatiekopie. |
ImageCreateStatus
Status van het maken van de installatiekopie.
| Waarde | Description |
|---|---|
| OK | |
| OKDuplicate | |
| ErrorSource | |
| ErrorImageFormat | |
| ErrorImageSize | |
| ErrorStorage | |
| ErrorLimitExceed | |
| ErrorTagLimitExceed | |
| ErrorRegionLimitExceed | |
| ErrorUnknown | |
| ErrorNegativeAndRegularTagOnSameImage |
ImageCreateSummary
| Name | Type | Description |
|---|---|---|
| images |
Lijst met de resultaten van het maken van afbeeldingen. |
|
| isBatchSuccessful |
boolean |
Waar als alle installatiekopieën in de batch zijn gemaakt, anders onwaar. |
ImageRegion
| Name | Type | Description |
|---|---|---|
| created |
string (date-time) |
|
| height |
number (float) |
Hoogte. |
| left |
number (float) |
Coördinaat van de linkergrens. |
| regionId |
string (uuid) |
|
| tagId |
string (uuid) |
Id van de tag die is gekoppeld aan deze regio. |
| tagName |
string |
|
| top |
number (float) |
Coördinaat van de bovengrens. |
| width |
number (float) |
Breedte. |
ImageTag
| Name | Type | Description |
|---|---|---|
| created |
string (date-time) |
|
| tagId |
string (uuid) |
|
| tagName |
string |
ImageUrlCreateBatch
| Name | Type | Description |
|---|---|---|
| images | ||
| metadata |
object |
De metagegevens van de afbeelding. Beperkt tot 50 sleutel-waardeparen per afbeelding. De lengte van de sleutel is beperkt tot 256. De lengte van de waarde is beperkt tot 512. |
| tagIds |
string[] (uuid) |
ImageUrlCreateEntry
| Name | Type | Description |
|---|---|---|
| regions |
Region[] |
|
| tagIds |
string[] (uuid) |
|
| url |
string |
URL van de afbeelding. |
Region
| Name | Type | Description |
|---|---|---|
| height |
number (float) |
Hoogte. |
| left |
number (float) |
Coördinaat van de linkergrens. |
| tagId |
string (uuid) |
Id van de tag die is gekoppeld aan deze regio. |
| top |
number (float) |
Coördinaat van de bovengrens. |
| width |
number (float) |
Breedte. |