Create Images From Urls - Create Images From Urls
Fügen Sie die bereitgestellten Bild-URLs zur Gruppe von Schulungsbildern hinzu.
Diese API akzeptiert einen Batch von URLs und optional Tags zum Erstellen von Bildern. Es gibt eine Beschränkung von 64 Bildern und 20 Tags.
Wenn alle Bilder erfolgreich erstellt wurden, wird der Statuscode 200(OK) zurückgegeben.
Andernfalls wird der Statuscode 207 (Multi-Status) zurückgegeben, und der Detailstatus für jedes Bild wird in der Antwortnutzlast aufgeführt.
POST {Endpoint}/customvision/v3.4-preview/training/projects/{projectId}/images/urls
URI-Parameter
Name | In | Erforderlich | Typ | Beschreibung |
---|---|---|---|---|
Endpoint
|
path | True |
string |
Unterstützte Cognitive Services-Endpunkte. |
project
|
path | True |
string (uuid) |
Die Projekt-ID. |
Anforderungsheader
Media Types: "application/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"
Name | Erforderlich | Typ | Beschreibung |
---|---|---|---|
Training-Key | True |
string |
Anforderungstext
Media Types: "application/json", "application/xml", "text/xml", "application/x-www-form-urlencoded"
Name | Typ | Beschreibung |
---|---|---|
images | ||
metadata |
object |
Die Metadaten des Bilds. Beschränkt auf 10 Schlüsselwertpaare pro Bild. Die Länge des Schlüssels ist auf 128 begrenzt. Die Länge des Werts ist auf 256 begrenzt. |
tagIds |
string[] (uuid) |
Antworten
Name | Typ | Beschreibung |
---|---|---|
200 OK |
OKAY Media Types: "application/json", "application/xml", "text/xml" |
|
Other Status Codes |
207 Media Types: "application/json", "application/xml", "text/xml" |
|
Other Status Codes |
Fehlerantwort Media Types: "application/json", "application/xml", "text/xml" |
Sicherheit
Training-Key
Typ:
apiKey
In:
header
Beispiele
Successful CreateImagesFromUrls request
Beispielanforderung
POST https://westus.api.cognitive.microsoft.com/customvision/v3.4-preview/training/projects/64b822c5-8082-4b36-a426-27225f4aa18c/images/urls
{
"images": [
{
"url": "{url to image}"
}
],
"tagIds": [
"b607964f-7bd6-4a3b-a869-6791fb6aab87"
]
}
Beispiel für eine Antwort
{
"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
}
]
}
Definitionen
Name | Beschreibung |
---|---|
Custom |
|
Custom |
Der Fehlercode. |
Image |
Bildmodell, das als JSON gesendet werden soll. |
Image |
|
Image |
Status der Bilderstellung. |
Image |
|
Image |
|
Image |
|
Image |
|
Image |
|
Region |
CustomVisionError
Name | Typ | Beschreibung |
---|---|---|
code |
Der Fehlercode. |
|
message |
string |
Eine Meldung, die den vom Dienst gemeldeten Fehler erklärt. |
CustomVisionErrorCodes
Der Fehlercode.
Wert | Beschreibung |
---|---|
BadRequest | |
BadRequestCannotMigrateProjectWithName | |
BadRequestClassificationTrainingValidationFailed | |
BadRequestCustomBaseModelArchitectureRetired | |
BadRequestCustomBaseModelDomainNotCompatible | |
BadRequestCustomBaseModelIterationStatusNotCompleted | |
BadRequestCustomerManagedKeyRevoked | |
BadRequestDetectionTrainingNotAllowNegativeTag | |
BadRequestDetectionTrainingValidationFailed | |
BadRequestDomainNotSupportedForAdvancedTraining | |
BadRequestExceedIterationPerProjectLimit | |
BadRequestExceedProjectLimit | |
BadRequestExceedTagPerImageLimit | |
BadRequestExceedTagPerProjectLimit | |
BadRequestExceededBatchSize | |
BadRequestExceededQuota | |
BadRequestExportAlreadyInProgress | |
BadRequestExportPlatformNotSupportedForAdvancedTraining | |
BadRequestExportValidationFailed | |
BadRequestExportWhileTraining | |
BadRequestImageAspectRatio | |
BadRequestImageBatch | |
BadRequestImageDimensions | |
BadRequestImageExceededCount | |
BadRequestImageFormat | |
BadRequestImageMetadataKey | |
BadRequestImageMetadataValue | |
BadRequestImageRegions | |
BadRequestImageSizeBytes | |
BadRequestImageStream | |
BadRequestImageTags | |
BadRequestImageUrl | |
BadRequestInvalid | |
BadRequestInvalidArtifactUri | |
BadRequestInvalidEmailAddress | |
BadRequestInvalidIds | |
BadRequestInvalidImportToken | |
BadRequestInvalidPublishName | |
BadRequestInvalidPublishTarget | |
BadRequestInvalidUri | |
BadRequestIterationDescription | |
BadRequestIterationIsNotTrained | |
BadRequestIterationIsPublished | |
BadRequestIterationName | |
BadRequestIterationNameNotUnique | |
BadRequestIterationNotPublished | |
BadRequestIterationValidationFailed | |
BadRequestMultiClassClassificationTrainingValidationFailed | |
BadRequestMultiLabelClassificationTrainingValidationFailed | |
BadRequestMultipleGeneralProductTag | |
BadRequestMultipleNegativeTag | |
BadRequestNegativeAndRegularTagOnSameImage | |
BadRequestNotLimitedTrial | |
BadRequestNotSupported | |
BadRequestOperationNotSupported | |
BadRequestPredictionIdsExceededCount | |
BadRequestPredictionIdsMissing | |
BadRequestPredictionInvalidApplicationName | |
BadRequestPredictionInvalidQueryParameters | |
BadRequestPredictionResultsExceededCount | |
BadRequestPredictionTagsExceededCount | |
BadRequestProjectDescription | |
BadRequestProjectDuplicated | |
BadRequestProjectImagePreprocessingSettings | |
BadRequestProjectName | |
BadRequestProjectNameNotUnique | |
BadRequestProjectUnknownClassification | |
BadRequestProjectUnknownDomain | |
BadRequestProjectUnsupportedDomainTypeChange | |
BadRequestProjectUnsupportedExportPlatform | |
BadRequestRequiredParamIsNull | |
BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining | |
BadRequestRetiredDomainNotSupportedForTraining | |
BadRequestSubscriptionApi | |
BadRequestTagDescription | |
BadRequestTagName | |
BadRequestTagNameNotUnique | |
BadRequestTagType | |
BadRequestTrainingAlreadyInProgress | |
BadRequestTrainingNotNeeded | |
BadRequestTrainingNotNeededButTrainingPipelineUpdated | |
BadRequestTrainingValidationFailed | |
BadRequestUnpublishFailed | |
BadRequestUnsupportedDomain | |
BadRequestWorkspaceCannotBeModified | |
BadRequestWorkspaceNotDeletable | |
Conflict | |
ConflictInvalid | |
ErrorExporterInvalidClassifier | |
ErrorExporterInvalidFeaturizer | |
ErrorExporterInvalidPlatform | |
ErrorFeaturizationAugmentationError | |
ErrorFeaturizationAugmentationUnavailable | |
ErrorFeaturizationInvalidFeaturizer | |
ErrorFeaturizationQueueTimeout | |
ErrorFeaturizationServiceUnavailable | |
ErrorFeaturizationUnrecognizedJob | |
ErrorInvalid | |
ErrorIterationCopyFailed | |
ErrorPrediction | |
ErrorPredictionModelNotCached | |
ErrorPredictionModelNotFound | |
ErrorPredictionServiceUnavailable | |
ErrorPredictionStorage | |
ErrorPreparePerformanceMigrationFailed | |
ErrorProjectExportRequestFailed | |
ErrorProjectImportRequestFailed | |
ErrorProjectInvalidDomain | |
ErrorProjectInvalidPipelineConfiguration | |
ErrorProjectInvalidWorkspace | |
ErrorProjectTrainingRequestFailed | |
ErrorRegionProposal | |
ErrorServerTimeOut | |
ErrorUnknown | |
ErrorUnknownBaseModel | |
Forbidden | |
ForbiddenDRModeEnabled | |
ForbiddenInvalid | |
ForbiddenUser | |
ForbiddenUserDisabled | |
ForbiddenUserDoesNotExist | |
ForbiddenUserInsufficientCapability | |
ForbiddenUserResource | |
ForbiddenUserSignupAllowanceExceeded | |
ForbiddenUserSignupDisabled | |
NoError | |
NotFound | |
NotFoundApimSubscription | |
NotFoundDomain | |
NotFoundImage | |
NotFoundInvalid | |
NotFoundIteration | |
NotFoundIterationPerformance | |
NotFoundProject | |
NotFoundProjectDefaultIteration | |
NotFoundTag | |
UnsupportedMediaType |
Image
Bildmodell, das als JSON gesendet werden soll.
Name | Typ | Beschreibung |
---|---|---|
created |
string (date-time) |
Das Erstellungsdatum des Bilds. |
height |
integer (int32) |
Höhe des Bilds. |
id |
string (uuid) |
ID des Bilds. |
metadata |
object |
Diesem Bild zugeordnete Metadaten. |
originalImageUri |
string |
Der URI für das ursprüngliche hochgeladene Bild. Wenn das VNET-Feature aktiviert ist, handelt es sich um einen relativen Pfad, der mit GetArtifact verwendet werden soll, andernfalls handelt es sich um einen absoluten URI für die Ressource. |
regions |
Diesem Bild zugeordnete Regionen. |
|
resizedImageUri |
string |
Der URI zum (verkleinerten) Bild, das für die Schulung verwendet wird. Wenn das VNET-Feature aktiviert ist, handelt es sich um einen relativen Pfad, der mit GetArtifact verwendet werden soll, andernfalls handelt es sich um einen absoluten URI für die Ressource. |
tags |
Image |
Tags, die diesem Bild zugeordnet sind. |
thumbnailUri |
string |
Der URI für die Miniaturansicht des Originalbilds. Wenn das VNET-Feature aktiviert ist, handelt es sich um einen relativen Pfad, der mit GetArtifact verwendet werden soll, andernfalls handelt es sich um einen absoluten URI für die Ressource. |
width |
integer (int32) |
Breite des Bilds. |
ImageCreateResult
Name | Typ | Beschreibung |
---|---|---|
image |
Das Bild. |
|
sourceUrl |
string |
Quell-URL des Bilds. |
status |
Status der Bilderstellung. |
ImageCreateStatus
Status der Bilderstellung.
Wert | Beschreibung |
---|---|
ErrorImageDimensions | |
ErrorImageFormat | |
ErrorImageSize | |
ErrorInvalidTag | |
ErrorLimitExceed | |
ErrorNegativeAndRegularTagOnSameImage | |
ErrorRegionLimitExceed | |
ErrorSource | |
ErrorStorage | |
ErrorTagLimitExceed | |
ErrorUnknown | |
OK | |
OKDuplicate |
ImageCreateSummary
Name | Typ | Beschreibung |
---|---|---|
images |
Liste der Ergebnisse der Bilderstellung. |
|
isBatchSuccessful |
boolean |
True, wenn alle Bilder im Batch erfolgreich erstellt wurden, andernfalls "false". |
ImageRegion
Name | Typ | Beschreibung |
---|---|---|
created |
string (date-time) |
|
height |
number (float) |
Höhe. |
left |
number (float) |
Koordinate der linken Grenze. |
regionId |
string (uuid) |
|
tagId |
string (uuid) |
ID des Tags, das diesem Bereich zugeordnet ist. |
tagName |
string |
|
top |
number (float) |
Koordinate der oberen Grenze. |
width |
number (float) |
Breite. |
ImageTag
Name | Typ | Beschreibung |
---|---|---|
created |
string (date-time) |
|
tagId |
string (uuid) |
|
tagName |
string |
ImageUrlCreateBatch
Name | Typ | Beschreibung |
---|---|---|
images | ||
metadata |
object |
Die Metadaten des Bilds. Beschränkt auf 10 Schlüsselwertpaare pro Bild. Die Länge des Schlüssels ist auf 128 begrenzt. Die Länge des Werts ist auf 256 begrenzt. |
tagIds |
string[] (uuid) |
ImageUrlCreateEntry
Name | Typ | Beschreibung |
---|---|---|
regions |
Region[] |
|
tagIds |
string[] (uuid) |
|
url |
string |
URL des Bilds. |
Region
Name | Typ | Beschreibung |
---|---|---|
height |
number (float) |
Höhe. |
left |
number (float) |
Koordinate der linken Grenze. |
tagId |
string (uuid) |
ID des Tags, das diesem Bereich zugeordnet ist. |
top |
number (float) |
Koordinate der oberen Grenze. |
width |
number (float) |
Breite. |