Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 1.7 KB

File metadata and controls

24 lines (18 loc) · 1.7 KB

Emotions recognition using OpenPose

Below you can observe detailed desctiption of how to run script of emotions recognition by using OpenPose. Project was done as a part of Human-Robot Interaction course in Nazarbayev University.

Instal OpenPose

First of all you need to install OpenPose itself. In order to do that, go to the official release page and download it OpenPose.

Dowload OpenPose Tutorial folder

  1. Download adove folder and place it inside the folder, where OpenPose installed.
  2. To detect and extract keypoints from videos you can use parse_videos.py script. Move your videos to the videos folder and run this script. Data will be saved in the output folder in json.
  3. In order to save all data into one csv file run the to_format.py script.
  4. In order to run the OpenPose on a webcam you can use the webcam.py script. Extracted files will be saved in the output folder in HH_MM_SS named new folder.

Run emotion.py script

In my case I used three emotion: happy, neutral and surprise. On the official website of OpenPose you can obserb location of keypoints. By importing your csv file to Python, Excel or online csv reader, you can observe x and y values. Thus, by comparing them you will achieve desired results.

It should be noted, that in case if emotion not in the list it should throw garbage. 
Also, you can modify pos[] for your emotion. 

Demonstration

Watch the video

Good Luck!