Skip to content

valefranz/emotion-api-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Utils for Affectiva Emotion API

Welcome to our repository on GitHub! Here you will find the source code of a python library that can be used to communicate with the Affectiva Emotion API service to process videos or images. For more information, visit our Affectiva's Developer Portal.

Build Status

Dependencies

  • Python 2.7
  • requests

Installation

git clone https://github.com/Affectiva/emotion-api-python.git
cd emotion-api-python
python setup.py sdist
pip install dist/AffectivaEmotionAPI-0.0.1.tar.gz

Usage

**Sign up for credentials: ** http://developer.affectiva.com/apioverview/

Upload an Image or a Video file for processing ?

import affectiva.api
username = 'API_USER'
passwd = 'API_PASSWD'
api = affectiva.api.EmotionAPI(username,passwd)

# Upload a file for Processing
filename = '/home/mahmoud/Desktop/test_file.mp4'
job_url = api.create_job(filename)['self']

**Get face detection and emotion results **

job_status = api.query_job(job_url)['status']

if status == 'done':
  metrics_json = api.results(job_url)

About

Python class to access Emotion As A service API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages