It recognize facial emotions from the image
Project description
#Project Description
Facial Emotion Recognition using PyTorch.
It creates a bounding box around the face of the person present in the picture and put a text
at the top of the bounding box representing the recognised emotion.
#Install
pip install emotion_recognition
Requirements
pytorch >= 1.2.0
torchvision >= 0.3.0
#Usage:
from facial_emotion_recognition import EmotionRecognition
import cv2 as cv
er = EmotionRecognition(device='gpu', gpu_id=0)
cam = cv.VideoCapture(0)
success, frame = cam.read()
frame = er.recognise_emotion(frame, return_type='BGR')
cv.imshow('frame', frame)
cv.waitkey(0)
#Arguments
er = EmotionRecognition(device='gpu', gpu_id=0)
device = 'gpu' or cpu'
gpu_id will be effective only when more than two GPUs are detected or it will through error.
frame = er.recognise_emotion(frame, return_type='BGR')
return_type='BGR' or 'RGB'
#References
- "Challenges in Representation Learning: A report on three machine learning contests." I Goodfellow, D Erhan, PL Carrier, A Courville, M Mirza, B Hamner, W Cukierski, Y Tang, DH Lee, Y Zhou, C Ramaiah, F Feng, R Li, X Wang, D Athanasakis, J Shawe-Taylor, M Milakov, J Park, R Ionescu, M Popescu, C Grozea, J Bergstra, J Xie, L Romaszko, B Xu, Z Chuang, and Y. Bengio. arXiv 2013.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for facial_emotion_recognition-0.3.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1678ce3d23c3c90639d59a93358d5783478dc91fa6311a4860b2ce59dff9447d |
|
MD5 | dfd973507d34d1496e6066b04a7515de |
|
BLAKE2b-256 | f7d1c63d32b85599d6628f1cb1eba1d0f6ce7f9bcff332ebd0011df5ce7cc14f |