Delen via


Object Detector - Analyze Image

Detecteer objecten in een afbeelding en slaat het resultaat op.

POST {Endpoint}/customvision/v3.1/prediction/{projectId}/detect/iterations/{publishedName}/image
POST {Endpoint}/customvision/v3.1/prediction/{projectId}/detect/iterations/{publishedName}/image?application={application}

URI-parameters

Name In Vereist Type Description
imageData
formData True

file

Binaire afbeeldingsgegevens. Ondersteunde indelingen zijn JPEG, GIF, PNG en BMP. Ondersteunt installatiekopieën van maximaal 4 MB.

Endpoint
path True

string

Ondersteunde Cognitive Services-eindpunten.

projectId
path True

string (uuid)

De project-id.

publishedName
path True

string

Hiermee geeft u de naam van het model te evalueren.

application
query

string

Facultatief. Hiermee geeft u de naam van de toepassing met behulp van het eindpunt.

Aanvraagkoptekst

Media Types: "multipart/form-data", "application/octet-stream"

Name Vereist Type Description
Prediction-Key True

string

Antwoorden

Name Type Description
200 OK

ImagePrediction

OK

Media Types: "application/json", "application/xml", "text/xml"

Other Status Codes

CustomVisionError

Foutreactie

Media Types: "application/json", "application/xml", "text/xml"

Beveiliging

Prediction-Key

Type: apiKey
In: header

Voorbeelden

Successful DetectImage request

Voorbeeldaanvraag

POST https://westus.api.cognitive.microsoft.com/customvision/v3.1/prediction/64b822c5-8082-4b36-a426-27225f4aa18c/detect/iterations/MyModel1/image

Voorbeeldrespons

{
  "id": "64615ba1-b53f-e911-b05b-f8633f7a2ef1",
  "project": "fb5bc587-b53f-e911-b05b-f8633f7a2ef1",
  "iteration": "45c79472-7198-46e1-8ed7-bad2ca111957",
  "created": "2019-03-10T06:10:28Z",
  "predictions": [
    {
      "tagId": "7e703b80-3c7a-4c3c-bf48-9673c6891a75",
      "tagName": "Tag 1",
      "probability": 0.05149666,
      "boundingBox": {
        "left": 0.955476165,
        "top": 0,
        "width": 0.0412225723,
        "height": 0.156851858
      }
    },
    {
      "tagId": "a0d06a54-18e4-4787-a9f9-27a9c13a91e8",
      "tagName": "Tag 2",
      "probability": 0.000193528482,
      "boundingBox": {
        "left": 0.062178582,
        "top": 0,
        "width": 0.9378114,
        "height": 0.6830492
      }
    }
  ]
}

Definities

Name Description
BoundingBox

Begrenzingsvak waarmee een regio van een afbeelding wordt gedefinieerd.

CustomVisionError
CustomVisionErrorCodes

De foutcode.

ImagePrediction

Resultaat van een voorspellingsaanvraag voor afbeeldingen.

Prediction

Voorspellingsresultaat.

TagType

Type van de voorspelde tag.

BoundingBox

Begrenzingsvak waarmee een regio van een afbeelding wordt gedefinieerd.

Name Type Description
height

number (float)

Hoogte.

left

number (float)

Coördinaat van de linkergrens.

top

number (float)

Coördinaat van de bovengrens.

width

number (float)

Breedte.

CustomVisionError

Name Type Description
code

CustomVisionErrorCodes

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

ImagePrediction

Resultaat van een voorspellingsaanvraag voor afbeeldingen.

Name Type Description
created

string (date-time)

Datum waarop deze voorspelling is gemaakt.

id

string (uuid)

Voorspellings-id.

iteration

string (uuid)

Iteratie-id.

predictions

Prediction[]

Lijst met voorspellingen.

project

string (uuid)

Project-id.

Prediction

Voorspellingsresultaat.

Name Type Description
boundingBox

BoundingBox

Begrenzingsvak van de voorspelling.

probability

number (float)

Waarschijnlijkheid van de tag.

tagId

string (uuid)

Id van de voorspelde tag.

tagName

string

Naam van de voorspelde tag.

tagType

TagType

Type van de voorspelde tag.

TagType

Type van de voorspelde tag.

Waarde Description
Regular
Negative
GeneralProduct