def draw_bounding_boxes()

in dags/processing/processing.py [0:0]


def draw_bounding_boxes(**kwargs):
    """
    Draws images with bounding boxes of the objects Rekognition found

    :param kwargs:
    :return:
    """
    # list PNG files in S3
    prefix = kwargs['ti'].xcom_pull(task_ids=f"bag_file_sensor", key=f"filename_s3_key")[:-4] + "/"
    bucket = kwargs['bucket_dest']

    iterator = list_objects(bucket, prefix)
    for page in iterator:
        for object in page["Contents"]:
            key = object["Key"]
            if key.endswith(".json"):
                draw_bounding_box(bucket, key)