Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, I have a python code that detects emotions by using the FER library on python. however, it just rates the emotions not giving a

Hello, I have a python code that detects emotions by using the FER library on python. however, it just rates the emotions not giving a certain result. How can I select the emotion with the maximum probability?

before running the code don't forget to install FER and open cv libraries

import cv2 camera = cv2.VideoCapture(0) while True: return_value,image = camera.read() gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY) cv2.imshow('image',gray) if cv2.waitKey(1)& 0xFF == ord('s'): cv2.imwrite('test.jpg',image) break camera.release() from fer import FER import matplotlib.pyplot as plt # img = plt.imread("test.jpg") detector = FER(mtcnn=True) # print(detector.detect_emotions(img)) # plt.imshow(img)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions

Question

6. Why are the GAAP and IFRS standards being converged?

Answered: 1 week ago