Mood Detection Using AWS Rekognition

Vinayak Pandey
Apr 18, 2021

Given code will capture your picture unsing webcam and then use AWS Rekognition to detect your mood. Based on that, it will play a song on Youtube.

Pre-Requsite: Need to create an S3 bucket and IAM credentials with appropriate permissions should be configured.

Code: Save this code as script.py

import webbrowser
import cv2
import boto3
def main():
capture = capture_write()
play_music()
def capture_write(filename="image.jpeg", port=0, ramp_frames=30, x=1280…

--

--