Rekognition / Client / update_stream_processor

update_stream_processor#

Rekognition.Client.update_stream_processor(**kwargs)#

Allows you to update a stream processor. You can change some settings and regions of interest and delete certain parameters.

See also: AWS API Documentation

Request Syntax

response = client.update_stream_processor(
    Name='string',
    SettingsForUpdate={
        'ConnectedHomeForUpdate': {
            'Labels': [
                'string',
            ],
            'MinConfidence': ...
        }
    },
    RegionsOfInterestForUpdate=[
        {
            'BoundingBox': {
                'Width': ...,
                'Height': ...,
                'Left': ...,
                'Top': ...
            },
            'Polygon': [
                {
                    'X': ...,
                    'Y': ...
                },
            ]
        },
    ],
    DataSharingPreferenceForUpdate={
        'OptIn': True|False
    },
    ParametersToDelete=[
        'ConnectedHomeMinConfidence'|'RegionsOfInterest',
    ]
)
Parameters:
  • Name (string) –

    [REQUIRED]

    Name of the stream processor that you want to update.

  • SettingsForUpdate (dict) –

    The stream processor settings that you want to update. Label detection settings can be updated to detect different labels with a different minimum confidence.

    • ConnectedHomeForUpdate (dict) –

      The label detection settings you want to use for your stream processor.

      • Labels (list) –

        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”.

        • (string) –

      • MinConfidence (float) –

        The minimum confidence required to label an object in the video.

  • RegionsOfInterestForUpdate (list) –

    Specifies locations in the frames where Amazon Rekognition checks for objects or people. This is an optional parameter for label detection stream processors.

    • (dict) –

      Specifies a location within the frame that Rekognition checks for objects of interest such as text, labels, or faces. It uses a BoundingBox or Polygon to set a region of the screen.

      A word, face, or label is included in the region if it is more than half in that region. If there is more than one region, the word, face, or label is compared with all regions of the screen. Any object of interest that is more than half in a region is kept in the results.

      • BoundingBox (dict) –

        The box representing a region of interest on screen.

        • Width (float) –

          Width of the bounding box as a ratio of the overall image width.

        • Height (float) –

          Height of the bounding box as a ratio of the overall image height.

        • Left (float) –

          Left coordinate of the bounding box as a ratio of overall image width.

        • Top (float) –

          Top coordinate of the bounding box as a ratio of overall image height.

      • Polygon (list) –

        Specifies a shape made up of up to 10 Point objects to define a region of interest.

        • (dict) –

          The 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 an 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 Point objects makes up a Polygon. A Polygon is returned by DetectText and by DetectCustomLabels Polygon represents a fine-grained polygon around a detected item. For more information, see Geometry in the Amazon Rekognition Developer Guide.

          • X (float) –

            The value of the X coordinate for a point on a Polygon.

          • Y (float) –

            The value of the Y coordinate for a point on a Polygon.

  • DataSharingPreferenceForUpdate (dict) –

    Shows whether you are sharing 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.

    • OptIn (boolean) – [REQUIRED]

      If this option is set to true, you choose to share data with Rekognition to improve model performance.

  • ParametersToDelete (list) –

    A list of parameters you want to delete from the stream processor.

    • (string) –

Return type:

dict

Returns:

Response Syntax

{}

Response Structure

  • (dict) –

Exceptions

  • Rekognition.Client.exceptions.AccessDeniedException

  • Rekognition.Client.exceptions.InternalServerError

  • Rekognition.Client.exceptions.ThrottlingException

  • Rekognition.Client.exceptions.InvalidParameterException

  • Rekognition.Client.exceptions.ResourceNotFoundException

  • Rekognition.Client.exceptions.ProvisionedThroughputExceededException