Skip to content

k-4m/sred-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart room emotion detection backend

setting up

This project is running on Python 3.6. Create a virtualenv and then install dependencies:

pip install -r requirements.txt

running in container

You can also try following when running on Linux (unfortunately, that wont work with mac)

docker build -t sred-backend
docker run -it -p 3000:3000 --device /dev/video0 --rm sred-backend

usage

Program will require access to your web camera in order to run. When requested permissions are given, you will be able to get json output on the localhost:3000. (Host and port can be updated in video_processor/settings.py):

{
  "image": "/9j/4AAQSkZJRgAB...6Em5RP/9k=",
  "emotions_data": {
    "emotion": {
      "angry": 1.9495684653520584,
      "disgust": 4.85497508861954e-7,
      "fear": 0.5955945234745741,
      "happy": 3.42639427941549e-7,
      "sad": 39.424800872802734,
      "surprise": 0.0003347103756823344,
      "neutral": 58.029705286026
    },
    "dominant_emotion": "neutral"
  }
}

In case nothing is rendered yet or there are no faces found, following message will be returned:

{
  "error": "no faces found"
}

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors