CfnStreamProcessorPropsMixin
- class aws_cdk.mixins_preview.aws_rekognition.mixins.CfnStreamProcessorPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::Rekognition::StreamProcessortype creates a stream processor used to detect and recognize faces or to detect connected home labels in a streaming video.Amazon Rekognition Video is a consumer of live video from Amazon Kinesis Video Streams. There are two different settings for stream processors in Amazon Rekognition, one for detecting faces and one for connected home features.
If you are creating a stream processor for detecting faces, you provide a Kinesis video stream (input) and a Kinesis data stream (output). You also specify the face recognition criteria in FaceSearchSettings. For example, the collection containing faces that you want to recognize.
If you are creating a stream processor for detection of connected home labels, you provide a Kinesis video stream for input, and for output an Amazon S3 bucket and an Amazon SNS topic. You can also provide a KMS key ID to encrypt the data sent to your Amazon S3 bucket. You specify what you want to detect in ConnectedHomeSettings, such as people, packages, and pets.
You can also specify where in the frame you want Amazon Rekognition to monitor with BoundingBoxRegionsOfInterest and PolygonRegionsOfInterest. The Name is used to manage the stream processor and it is the identifier for the stream processor. The
AWS::Rekognition::StreamProcessorresource creates a stream processor in the same Region where you create the Amazon CloudFormation stack.For more information, see CreateStreamProcessor .
- See:
- CloudformationResource:
AWS::Rekognition::StreamProcessor
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_rekognition import mixins as rekognition_mixins # polygon_regions_of_interest: Any cfn_stream_processor_props_mixin = rekognition_mixins.CfnStreamProcessorPropsMixin(rekognition_mixins.CfnStreamProcessorMixinProps( bounding_box_regions_of_interest=[rekognition_mixins.CfnStreamProcessorPropsMixin.BoundingBoxProperty( height=123, left=123, top=123, width=123 )], connected_home_settings=rekognition_mixins.CfnStreamProcessorPropsMixin.ConnectedHomeSettingsProperty( labels=["labels"], min_confidence=123 ), data_sharing_preference=rekognition_mixins.CfnStreamProcessorPropsMixin.DataSharingPreferenceProperty( opt_in=False ), face_search_settings=rekognition_mixins.CfnStreamProcessorPropsMixin.FaceSearchSettingsProperty( collection_id="collectionId", face_match_threshold=123 ), kinesis_data_stream=rekognition_mixins.CfnStreamProcessorPropsMixin.KinesisDataStreamProperty( arn="arn" ), kinesis_video_stream=rekognition_mixins.CfnStreamProcessorPropsMixin.KinesisVideoStreamProperty( arn="arn" ), kms_key_id="kmsKeyId", name="name", notification_channel=rekognition_mixins.CfnStreamProcessorPropsMixin.NotificationChannelProperty( arn="arn" ), polygon_regions_of_interest=polygon_regions_of_interest, role_arn="roleArn", s3_destination=rekognition_mixins.CfnStreamProcessorPropsMixin.S3DestinationProperty( bucket_name="bucketName", object_key_prefix="objectKeyPrefix" ), tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Rekognition::StreamProcessor.- Parameters:
props (
Union[CfnStreamProcessorMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['boundingBoxRegionsOfInterest', 'connectedHomeSettings', 'dataSharingPreference', 'faceSearchSettings', 'kinesisDataStream', 'kinesisVideoStream', 'kmsKeyId', 'name', 'notificationChannel', 'polygonRegionsOfInterest', 'roleArn', 's3Destination', 'tags']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
BoundingBoxProperty
- class CfnStreamProcessorPropsMixin.BoundingBoxProperty(*, height=None, left=None, top=None, width=None)
Bases:
objectIdentifies the bounding box around the label, face, text, or personal protective equipment.
The
left(x-coordinate) andtop(y-coordinate) are coordinates representing the top and left sides of the bounding box. Note that the upper-left corner of the image is the origin (0,0).The
topandleftvalues returned are ratios of the overall image size. For example, if the input image is 700x200 pixels, and the top-left coordinate of the bounding box is 350x50 pixels, the API returns aleftvalue of 0.5 (350/700) and atopvalue of 0.25 (50/200).The
widthandheightvalues represent the dimensions of the bounding box as a ratio of the overall image dimension. For example, if the input image is 700x200 pixels, and the bounding box width is 70 pixels, the width returned is 0.1. For more information, see BoundingBox . .. epigraph:The bounding box coordinates can have negative values. For example, if Amazon Rekognition is able to detect a face that is at the image edge and is only partially visible, the service can return coordinates that are outside the image bounds and, depending on the image edge, you might get negative values or values greater than 1 for the ``left`` or ``top`` values.
- Parameters:
height (
Union[int,float,None]) – Height of the bounding box as a ratio of the overall image height.left (
Union[int,float,None]) – Left coordinate of the bounding box as a ratio of overall image width.top (
Union[int,float,None]) – Top coordinate of the bounding box as a ratio of overall image height.width (
Union[int,float,None]) – Width of the bounding box as a ratio of the overall image width.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_rekognition import mixins as rekognition_mixins bounding_box_property = rekognition_mixins.CfnStreamProcessorPropsMixin.BoundingBoxProperty( height=123, left=123, top=123, width=123 )
Attributes
- height
Height of the bounding box as a ratio of the overall image height.
- left
Left coordinate of the bounding box as a ratio of overall image width.
- top
Top coordinate of the bounding box as a ratio of overall image height.
- width
Width of the bounding box as a ratio of the overall image width.
ConnectedHomeSettingsProperty
- class CfnStreamProcessorPropsMixin.ConnectedHomeSettingsProperty(*, labels=None, min_confidence=None)
Bases:
objectConnected home settings to use on a streaming video.
Defining the settings is required in the request parameter for
CreateStreamProcessor. Including this setting in the CreateStreamProcessor request lets you use the stream processor for connected home features. You can then select what you want the stream processor to detect, such as people or pets.When the stream processor has started, one notification is sent for each object class specified. For example, if packages and pets are selected, one SNS notification is published the first time a package is detected and one SNS notification is published the first time a pet is detected. An end-of-session summary is also published. For more information, see the ConnectedHome section of StreamProcessorSettings .
- Parameters:
labels (
Optional[Sequence[str]]) – Specifies what you want to detect in the video, such as people, packages, or pets. The current valid labels you can include in this list are: “PERSON”, “PET”, “PACKAGE”, and “ALL”.min_confidence (
Union[int,float,None]) – The minimum confidence required to label an object in the video.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_rekognition import mixins as rekognition_mixins connected_home_settings_property = rekognition_mixins.CfnStreamProcessorPropsMixin.ConnectedHomeSettingsProperty( labels=["labels"], min_confidence=123 )
Attributes
- labels
Specifies what you want to detect in the video, such as people, packages, or pets.
The current valid labels you can include in this list are: “PERSON”, “PET”, “PACKAGE”, and “ALL”.
- min_confidence
The minimum confidence required to label an object in the video.
DataSharingPreferenceProperty
- class CfnStreamProcessorPropsMixin.DataSharingPreferenceProperty(*, opt_in=None)
Bases:
objectAllows you to opt in or opt out to share data with Rekognition to improve model performance.
You can choose this option at the account level or on a per-stream basis. Note that if you opt out at the account level, this setting is ignored on individual streams. For more information, see StreamProcessorDataSharingPreference .
- Parameters:
opt_in (
Union[bool,IResolvable,None]) – Describes the opt-in status applied to a stream processor’s data sharing policy.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_rekognition import mixins as rekognition_mixins data_sharing_preference_property = rekognition_mixins.CfnStreamProcessorPropsMixin.DataSharingPreferenceProperty( opt_in=False )
Attributes
- opt_in
Describes the opt-in status applied to a stream processor’s data sharing policy.
FaceSearchSettingsProperty
- class CfnStreamProcessorPropsMixin.FaceSearchSettingsProperty(*, collection_id=None, face_match_threshold=None)
Bases:
objectThe input parameters used to recognize faces in a streaming video analyzed by a Amazon Rekognition stream processor.
FaceSearchSettingsis a request parameter for CreateStreamProcessor . For more information, see FaceSearchSettings .- Parameters:
collection_id (
Optional[str]) – The ID of a collection that contains faces that you want to search for.face_match_threshold (
Union[int,float,None]) – Minimum face match confidence score that must be met to return a result for a recognized face. The default is 80. 0 is the lowest confidence. 100 is the highest confidence. Values between 0 and 100 are accepted, and values lower than 80 are set to 80.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_rekognition import mixins as rekognition_mixins face_search_settings_property = rekognition_mixins.CfnStreamProcessorPropsMixin.FaceSearchSettingsProperty( collection_id="collectionId", face_match_threshold=123 )
Attributes
- collection_id
The ID of a collection that contains faces that you want to search for.
- face_match_threshold
Minimum face match confidence score that must be met to return a result for a recognized face.
The default is 80. 0 is the lowest confidence. 100 is the highest confidence. Values between 0 and 100 are accepted, and values lower than 80 are set to 80.
KinesisDataStreamProperty
- class CfnStreamProcessorPropsMixin.KinesisDataStreamProperty(*, arn=None)
Bases:
objectAmazon Rekognition Video Stream Processor take as input a Kinesis video stream (Input) and a Kinesis data stream (Output).
This is the Amazon Kinesis Data Streams instance to which the Amazon Rekognition stream processor streams the analysis results. This must be created within the constraints specified at KinesisDataStream .
- Parameters:
arn (
Optional[str]) – ARN of the output Amazon Kinesis Data Streams stream.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_rekognition import mixins as rekognition_mixins kinesis_data_stream_property = rekognition_mixins.CfnStreamProcessorPropsMixin.KinesisDataStreamProperty( arn="arn" )
Attributes
- arn
ARN of the output Amazon Kinesis Data Streams stream.
KinesisVideoStreamProperty
- class CfnStreamProcessorPropsMixin.KinesisVideoStreamProperty(*, arn=None)
Bases:
objectThe Kinesis video stream that provides the source of the streaming video for an Amazon Rekognition Video stream processor.
For more information, see KinesisVideoStream .
- Parameters:
arn (
Optional[str]) – ARN of the Kinesis video stream stream that streams the source video.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_rekognition import mixins as rekognition_mixins kinesis_video_stream_property = rekognition_mixins.CfnStreamProcessorPropsMixin.KinesisVideoStreamProperty( arn="arn" )
Attributes
- arn
ARN of the Kinesis video stream stream that streams the source video.
NotificationChannelProperty
- class CfnStreamProcessorPropsMixin.NotificationChannelProperty(*, arn=None)
Bases:
objectThe Amazon Simple Notification Service topic to which Amazon Rekognition publishes the object detection results and completion status of a video analysis operation.
Amazon Rekognition publishes a notification the first time an object of interest or a person is detected in the video stream. Amazon Rekognition also publishes an an end-of-session notification with a summary when the stream processing session is complete. For more information, see StreamProcessorNotificationChannel .
- Parameters:
arn (
Optional[str]) – The ARN of the SNS topic that receives notifications.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_rekognition import mixins as rekognition_mixins notification_channel_property = rekognition_mixins.CfnStreamProcessorPropsMixin.NotificationChannelProperty( arn="arn" )
Attributes
- arn
The ARN of the SNS topic that receives notifications.
PointProperty
- class CfnStreamProcessorPropsMixin.PointProperty(*, x=None, y=None)
Bases:
objectThe X and Y coordinates of a point on an image or video frame.
The X and Y values are ratios of the overall image size or video resolution. For example, if the input image is 700x200 and the values are X=0.5 and Y=0.25, then the point is at the (350,50) pixel coordinate on the image.
An array of
Pointobjects,Polygon, is returned by DetectText and by DetectCustomLabels or used to define regions of interest in Amazon Rekognition Video operations such asCreateStreamProcessor.Polygonrepresents a fine-grained polygon around a detected item. For more information, see Geometry .- Parameters:
x (
Union[int,float,None]) – The value of the X coordinate for a point on aPolygon.y (
Union[int,float,None]) – The value of the Y coordinate for a point on aPolygon.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_rekognition import mixins as rekognition_mixins point_property = rekognition_mixins.CfnStreamProcessorPropsMixin.PointProperty( x=123, y=123 )
Attributes
- x
The value of the X coordinate for a point on a
Polygon.
- y
The value of the Y coordinate for a point on a
Polygon.
S3DestinationProperty
- class CfnStreamProcessorPropsMixin.S3DestinationProperty(*, bucket_name=None, object_key_prefix=None)
Bases:
objectThe Amazon S3 bucket location to which Amazon Rekognition publishes the detailed inference results of a video analysis operation.
These results include the name of the stream processor resource, the session ID of the stream processing session, and labeled timestamps and bounding boxes for detected labels. For more information, see S3Destination .
- Parameters:
bucket_name (
Optional[str]) – Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name of a stream processor’s exports.object_key_prefix (
Optional[str]) – Describes the destination Amazon Simple Storage Service (Amazon S3) object keys of a stream processor’s exports.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_rekognition import mixins as rekognition_mixins s3_destination_property = rekognition_mixins.CfnStreamProcessorPropsMixin.S3DestinationProperty( bucket_name="bucketName", object_key_prefix="objectKeyPrefix" )
Attributes
- bucket_name
Describes the destination Amazon Simple Storage Service (Amazon S3) bucket name of a stream processor’s exports.
- object_key_prefix
Describes the destination Amazon Simple Storage Service (Amazon S3) object keys of a stream processor’s exports.