Skip to main content

project_versions

Creates, updates, deletes, gets or lists a project_versions resource.

Overview

Nameproject_versions
TypeResource
Idaws.rekognition.project_versions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
base_model_versionstringThe base detection model version used to create the project version.
billable_training_time_in_secondsinteger (int64)The duration, in seconds, that you were billed for a successful training of the model version. This value is only returned if the model version has been successfully trained.
creation_timestampstring (date-time)The Unix datetime for the date and time that training started.
evaluation_resultobjectThe training results. EvaluationResult is only returned if training is successful.
featurestringThe feature that was customized. (CONTENT_MODERATION, CUSTOM_LABELS)
feature_configobjectFeature specific configuration that was applied during training.
kms_key_idstringThe identifer for the AWS Key Management Service key (AWS KMS key) that was used to encrypt the model during training. (pattern: <code>^[A-Za-z0-9][A-Za-z0-9:_/+=,@.-]{0,2048}$</code>)
manifest_summaryobjectThe S3 bucket that contains an Amazon Sagemaker Ground Truth format manifest file.
max_inference_unitsintegerThe maximum number of inference units Amazon Rekognition uses to auto-scale the model. Applies only to Custom Labels projects. For more information, see StartProjectVersion.
min_inference_unitsintegerThe minimum number of inference units used by the model. Applies only to Custom Labels projects. For more information, see StartProjectVersion.
output_configobjectThe location where training results are saved.
project_version_arnstringThe Amazon Resource Name (ARN) of the project version. (pattern: <code>(^arn:[a-z\d-]+:rekognition:[a-z\d-]+:\d{12}:project/[a-zA-Z0-9_.-]{1,255}/version/[a-zA-Z0-9_.-]{1,255}/[0-9]+$)</code>)
source_project_version_arnstringIf the model version was copied from a different project, SourceProjectVersionArn contains the ARN of the source model version. (pattern: <code>(^arn:[a-z\d-]+:rekognition:[a-z\d-]+:\d{12}:project/[a-zA-Z0-9_.-]{1,255}/version/[a-zA-Z0-9_.-]{1,255}/[0-9]+$)</code>)
statusstringThe current status of the model version. (TRAINING_IN_PROGRESS, TRAINING_COMPLETED, TRAINING_FAILED, STARTING, RUNNING, FAILED, STOPPING, STOPPED, DELETING, COPYING_IN_PROGRESS, COPYING_COMPLETED, COPYING_FAILED, DEPRECATED, EXPIRED)
status_messagestringA descriptive message for an error or warning that occurred.
testing_data_resultobjectContains information about the testing results.
training_data_resultobjectContains information about the training results.
training_end_timestampstring (date-time)The Unix date and time that training of the model ended.
version_descriptionstringA user-provided description of the project version. (pattern: <code>[a-zA-Z0-9-_. ()':,;?]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_project_versionsselectregionLists and describes the versions of an Amazon Rekognition project. You can specify up to 10 model or adapter versions in ProjectVersionArns. If you don't specify a value, descriptions for all model/adapter versions in the project are returned. This operation requires permissions to perform the rekognition:DescribeProjectVersions action.
create_project_versioninsertregion, ProjectArn, VersionName, OutputConfigCreates a new version of Amazon Rekognition project (like a Custom Labels model or a custom adapter) and begins training. Models and adapters are managed as part of a Rekognition project. The response from CreateProjectVersion is an Amazon Resource Name (ARN) for the project version. The FeatureConfig operation argument allows you to configure specific model or adapter settings. You can provide a description to the project version by using the VersionDescription argment. Training can take a while to complete. You can get the current status by calling DescribeProjectVersions. Training completed successfully if the value of the Status field is TRAINING_COMPLETED. Once training has successfully completed, call DescribeProjectVersions to get the training results and evaluate the model. This operation requires permissions to perform the rekognition:CreateProjectVersion action. The following applies only to projects with Amazon Rekognition Custom Labels as the chosen feature: You can train a model in a project that doesn't have associated datasets by specifying manifest files in the TrainingData and TestingData fields. If you open the console after training a model with manifest files, Amazon Rekognition Custom Labels creates the datasets for you using the most recent manifest files. You can no longer train a model version for the project by specifying manifest files. Instead of training with a project without associated datasets, we recommend that you use the manifest files to create training and test datasets for the project.
delete_project_versiondeleteregionDeletes a Rekognition project model or project version, like a Amazon Rekognition Custom Labels model or a custom adapter. You can't delete a project version if it is running or if it is training. To check the status of a project version, use the Status field returned from DescribeProjectVersions. To stop a project version call StopProjectVersion. If the project version is training, wait until it finishes. This operation requires permissions to perform the rekognition:DeleteProjectVersion action.
detect_custom_labelsexecregion, ProjectVersionArn, ImageThis operation applies only to Amazon Rekognition Custom Labels. Detects custom labels in a supplied image by using an Amazon Rekognition Custom Labels model. You specify which version of a model version to use by using the ProjectVersionArn input parameter. You pass the input image as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. For each object that the model version detects on an image, the API returns a (CustomLabel) object in an array (CustomLabels). Each CustomLabel object provides the label name (Name), the level of confidence that the image contains the object (Confidence), and object location information, if it exists, for the label on the image (Geometry). To filter labels that are returned, specify a value for MinConfidence. DetectCustomLabelsLabels only returns labels with a confidence that's higher than the specified value. The value of MinConfidence maps to the assumed threshold values created during training. For more information, see Assumed threshold in the Amazon Rekognition Custom Labels Developer Guide. Amazon Rekognition Custom Labels metrics expresses an assumed threshold as a floating point value between 0-1. The range of MinConfidence normalizes the threshold value to a percentage value (0-100). Confidence responses from DetectCustomLabels are also returned as a percentage. You can use MinConfidence to change the precision and recall or your model. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide. If you don't specify a value for MinConfidence, DetectCustomLabels returns labels based on the assumed threshold of each label. This is a stateless API operation. That is, the operation does not persist any data. This operation requires permissions to perform the rekognition:DetectCustomLabels action. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Lists and describes the versions of an Amazon Rekognition project. You can specify up to 10 model or adapter versions in ProjectVersionArns. If you don't specify a value, descriptions for all model/adapter versions in the project are returned. This operation requires permissions to perform the rekognition:DescribeProjectVersions action.

SELECT
base_model_version,
billable_training_time_in_seconds,
creation_timestamp,
evaluation_result,
feature,
feature_config,
kms_key_id,
manifest_summary,
max_inference_units,
min_inference_units,
output_config,
project_version_arn,
source_project_version_arn,
status,
status_message,
testing_data_result,
training_data_result,
training_end_timestamp,
version_description
FROM aws.rekognition.project_versions
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a new version of Amazon Rekognition project (like a Custom Labels model or a custom adapter) and begins training. Models and adapters are managed as part of a Rekognition project. The response from CreateProjectVersion is an Amazon Resource Name (ARN) for the project version. The FeatureConfig operation argument allows you to configure specific model or adapter settings. You can provide a description to the project version by using the VersionDescription argment. Training can take a while to complete. You can get the current status by calling DescribeProjectVersions. Training completed successfully if the value of the Status field is TRAINING_COMPLETED. Once training has successfully completed, call DescribeProjectVersions to get the training results and evaluate the model. This operation requires permissions to perform the rekognition:CreateProjectVersion action. The following applies only to projects with Amazon Rekognition Custom Labels as the chosen feature: You can train a model in a project that doesn't have associated datasets by specifying manifest files in the TrainingData and TestingData fields. If you open the console after training a model with manifest files, Amazon Rekognition Custom Labels creates the datasets for you using the most recent manifest files. You can no longer train a model version for the project by specifying manifest files. Instead of training with a project without associated datasets, we recommend that you use the manifest files to create training and test datasets for the project.

INSERT INTO aws.rekognition.project_versions (
ProjectArn,
VersionName,
OutputConfig,
TrainingData,
TestingData,
Tags,
KmsKeyId,
VersionDescription,
FeatureConfig,
region
)
SELECT
'{{ ProjectArn }}' /* required */,
'{{ VersionName }}' /* required */,
'{{ OutputConfig }}' /* required */,
'{{ TrainingData }}',
'{{ TestingData }}',
'{{ Tags }}',
'{{ KmsKeyId }}',
'{{ VersionDescription }}',
'{{ FeatureConfig }}',
'{{ region }}'
RETURNING
project_version_arn
;

DELETE examples

Deletes a Rekognition project model or project version, like a Amazon Rekognition Custom Labels model or a custom adapter. You can't delete a project version if it is running or if it is training. To check the status of a project version, use the Status field returned from DescribeProjectVersions. To stop a project version call StopProjectVersion. If the project version is training, wait until it finishes. This operation requires permissions to perform the rekognition:DeleteProjectVersion action.

DELETE FROM aws.rekognition.project_versions
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

This operation applies only to Amazon Rekognition Custom Labels. Detects custom labels in a supplied image by using an Amazon Rekognition Custom Labels model. You specify which version of a model version to use by using the ProjectVersionArn input parameter. You pass the input image as base64-encoded image bytes or as a reference to an image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is not supported. The image must be either a PNG or JPEG formatted file. For each object that the model version detects on an image, the API returns a (CustomLabel) object in an array (CustomLabels). Each CustomLabel object provides the label name (Name), the level of confidence that the image contains the object (Confidence), and object location information, if it exists, for the label on the image (Geometry). To filter labels that are returned, specify a value for MinConfidence. DetectCustomLabelsLabels only returns labels with a confidence that's higher than the specified value. The value of MinConfidence maps to the assumed threshold values created during training. For more information, see Assumed threshold in the Amazon Rekognition Custom Labels Developer Guide. Amazon Rekognition Custom Labels metrics expresses an assumed threshold as a floating point value between 0-1. The range of MinConfidence normalizes the threshold value to a percentage value (0-100). Confidence responses from DetectCustomLabels are also returned as a percentage. You can use MinConfidence to change the precision and recall or your model. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide. If you don't specify a value for MinConfidence, DetectCustomLabels returns labels based on the assumed threshold of each label. This is a stateless API operation. That is, the operation does not persist any data. This operation requires permissions to perform the rekognition:DetectCustomLabels action. For more information, see Analyzing an image in the Amazon Rekognition Custom Labels Developer Guide.

EXEC aws.rekognition.project_versions.detect_custom_labels
@region='{{ region }}' --required
@@json=
'{
"ProjectVersionArn": "{{ ProjectVersionArn }}",
"Image": "{{ Image }}",
"MaxResults": {{ MaxResults }},
"MinConfidence": {{ MinConfidence }}
}'
;