(Translated by https://www.hiragana.jp/)
GitHub - j4y/emotion-api-python: Python class to access Affectiva's Emotion as a Service API
Skip to content
This repository has been archived by the owner on Mar 9, 2024. It is now read-only.

j4y/emotion-api-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Utils for Affectiva Emotion API

This is a python library to communicate with the Affectiva Emotion API service to process videos and images. For more information, visit Affectiva's Developer Portal.

Build Status

Dependencies

  • Python 2.7
  • requests

Installation

pip install AffectivaEmotionAPI

Usage

Sign up for credentials

http://developer.affectiva.com/apioverview/

Upload an image or a video for processing

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

# Upload a file for Processing
filename = '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)

Uploading to PyPI

Increment the version in setup.py

rm dist/*.tar.gz
python setup.py sdist
twine upload dist/*

Packages

No packages published

Languages

  • Python 100.0%