共用方式為


Projects - Import

Imports a project.

POST {Endpoint}/customvision/v3.3/training/projects/import?token={token}
POST {Endpoint}/customvision/v3.3/training/projects/import?token={token}&name={name}

URI Parameters

Name In Required Type Description
Endpoint
path True

string

Supported Cognitive Services endpoints.

token
query True

string

Token generated from the export project call.

name
query

string

Optional, name of the project to use instead of auto-generated name.

Request Header

Name Required Type Description
Training-Key True

string

Responses

Name Type Description
200 OK

Project

OK

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

Other Status Codes

CustomVisionError

Error response

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

Security

Training-Key

Type: apiKey
In: header

Examples

Successful ImportProject request

Sample request

POST https://westus.api.cognitive.microsoft.com/customvision/v3.3/training/projects/import?token=token

Sample response

{
  "id": "bc3f7dad-5544-468c-8573-3ef04d55463e",
  "name": "Import Project",
  "description": "",
  "settings": {
    "domainId": "ee85a74c-405e-4adc-bb47-ffa8ca0c9f31"
  },
  "created": "2019-10-06T05:43:18Z",
  "lastModified": "2019-10-06T05:43:18Z",
  "thumbnailUri": "",
  "status": "Importing"
}

Definitions

Name Description
Classifier

Gets the classification type of the project.

CustomVisionError
CustomVisionErrorCodes

The error code.

ImageProcessingSettings

Represents image preprocessing settings used by image augmentation.

Project

Represents a project.

ProjectSettings

Represents settings associated with a project.

ProjectStatus

Gets the status of the project.

TargetExportPlatforms

A list of ExportPlatform that the trained model should be able to support.

Classifier

Gets the classification type of the project.

Value Description
Multiclass
Multilabel

CustomVisionError

Name Type Description
code

CustomVisionErrorCodes

The error code.

message

string

A message explaining the error reported by the service.

CustomVisionErrorCodes

The error code.

Value Description
BadRequest
BadRequestCannotMigrateProjectWithName
BadRequestClassificationTrainingValidationFailed
BadRequestCustomerManagedKeyRevoked
BadRequestDetectionTrainingNotAllowNegativeTag
BadRequestDetectionTrainingValidationFailed
BadRequestDomainNotSupportedForAdvancedTraining
BadRequestExceedIterationPerProjectLimit
BadRequestExceedProjectLimit
BadRequestExceedTagPerImageLimit
BadRequestExceedTagPerProjectLimit
BadRequestExceededBatchSize
BadRequestExceededQuota
BadRequestExportAlreadyInProgress
BadRequestExportPlatformNotSupportedForAdvancedTraining
BadRequestExportValidationFailed
BadRequestExportWhileTraining
BadRequestImageBatch
BadRequestImageDimensions
BadRequestImageExceededCount
BadRequestImageFormat
BadRequestImageMetadataKey
BadRequestImageMetadataValue
BadRequestImageRegions
BadRequestImageSizeBytes
BadRequestImageStream
BadRequestImageTags
BadRequestImageUrl
BadRequestInvalid
BadRequestInvalidArtifactUri
BadRequestInvalidEmailAddress
BadRequestInvalidIds
BadRequestInvalidImportToken
BadRequestInvalidPublishName
BadRequestInvalidPublishTarget
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
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
ErrorUnknown
ErrorUnknownBaseModel
Forbidden
ForbiddenDRModeEnabled
ForbiddenInvalid
ForbiddenUser
ForbiddenUserDisabled
ForbiddenUserDoesNotExist
ForbiddenUserInsufficientCapability
ForbiddenUserResource
ForbiddenUserSignupAllowanceExceeded
ForbiddenUserSignupDisabled
NoError
NotFound
NotFoundApimSubscription
NotFoundDomain
NotFoundImage
NotFoundInvalid
NotFoundIteration
NotFoundIterationPerformance
NotFoundProject
NotFoundProjectDefaultIteration
NotFoundTag
UnsupportedMediaType

ImageProcessingSettings

Represents image preprocessing settings used by image augmentation.

Name Type Description
augmentationMethods

object

Gets or sets enabled image transforms. The key corresponds to the transform name. If value is set to true, then correspondent transform is enabled. Otherwise this transform will not be used. Augmentation will be uniformly distributed among enabled transforms.

Project

Represents a project.

Name Type Description
created

string

Gets the date this project was created.

description

string

Gets or sets the description of the project.

drModeEnabled

boolean

Gets if the Disaster Recovery (DR) mode is on, indicating the project is temporarily read-only.

id

string

Gets the project id.

lastModified

string

Gets the date this project was last modified.

name

string

Gets or sets the name of the project.

settings

ProjectSettings

Gets or sets the project settings.

status

ProjectStatus

Gets the status of the project.

thumbnailUri

string

Gets the thumbnail url representing the image. If VNET feature is enabled this will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to the resource.

ProjectSettings

Represents settings associated with a project.

Name Type Description
classificationType

Classifier

Gets or sets the classification type of the project.

detectionParameters

string

Detection parameters in use, if any.

domainId

string

Gets or sets the id of the Domain to use with this project.

imageProcessingSettings

ImageProcessingSettings

Gets or sets image preprocessing settings.

targetExportPlatforms

TargetExportPlatforms[]

A list of ExportPlatform that the trained model should be able to support.

useNegativeSet

boolean

Indicates if negative set is being used.

ProjectStatus

Gets the status of the project.

Value Description
Failed
Importing
Succeeded

TargetExportPlatforms

A list of ExportPlatform that the trained model should be able to support.

Value Description
CoreML
DockerFile
ONNX
TensorFlow
VAIDK