AWS web service to upload and analyse users video

Viewed 39

I'm developing a prototype of a video analysis service on AWS.

The question is: am thinking in the right direction or I will fail to implement this architecture?

Architecture:

  1. Flask on EC2.
  2. User(authenticated) upload file via web view, I'm saving it to S3.
  3. Lambda triggers SageMaker.
  4. SageMaker taking a file from S3, making preparation and analysis then: 1) Saving the results to PostgreSQL DB. 2) Triggers lambda that sends a notification to Flask that analysis is Done
  5. User receives a notification from Flask that the analysis is done.
  6. Flask web page visualizes data from the analysis for the user.

It has only a prototyping purpose, I'm trying to keep it as simple as possible.

will appreciate any comments and recommendations.

1 Answers

rekognition can find labels, text, faces, and expression in images and video. I demonstrate how to find labels in a image that you have stored in a s3 bucket. use the key of the image object in the bucket for rekognition to use to label.

 def detect_labels(bucket, key, max_labels=10, min_confidence=95, region="us-east-1"):
    rekognition = boto3.client("rekognition", region,    
        aws_access_key_id=AWS_KEY_ID,
        aws_secret_access_key=AWS_SECRET
    )
    response = rekognition.detect_labels(
        Image={
            "S3Object": {
                "Bucket": bucket,
            "Name": key,
            }
        },
        MaxLabels=max_labels,
        MinConfidence=min_confidence,
    )
    return response['Labels']
Related