{"forkee":{"id":144019283,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQwMTkyODM=","name":"Emotion-Detection-in-Videos","full_name":"Yizhiqing/Emotion-Detection-in-Videos","owner":{"login":"Yizhiqing","id":3107757,"node_id":"MDQ6VXNlcjMxMDc3NTc=","avatar_url":"https://avatars0.githubusercontent.com/u/3107757?v=4","gravatar_id":"","url":"https://api.github.com/users/Yizhiqing","html_url":"https://github.com/Yizhiqing","followers_url":"https://api.github.com/users/Yizhiqing/followers","following_url":"https://api.github.com/users/Yizhiqing/following{/other_user}","gists_url":"https://api.github.com/users/Yizhiqing/gists{/gist_id}","starred_url":"https://api.github.com/users/Yizhiqing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yizhiqing/subscriptions","organizations_url":"https://api.github.com/users/Yizhiqing/orgs","repos_url":"https://api.github.com/users/Yizhiqing/repos","events_url":"https://api.github.com/users/Yizhiqing/events{/privacy}","received_events_url":"https://api.github.com/users/Yizhiqing/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Yizhiqing/Emotion-Detection-in-Videos","description":"The aim of this work is to recognize the six emotions (happiness, sadness, disgust, surprise, fear and anger) based on human facial expressions extracted from videos. To achieve this, we are considering people of different ethnicity, age and gender where each one of them reacts very different when they express their emotions. We collected a data set of 149 videos that included short videos from both, females and males, expressing each of the the emotions described before. The data set was built by students and each of them recorded a video expressing all the emotions with no directions or instructions at all.  Some videos included more body parts than others. In other cases, videos have objects in the background an even different light setups. We wanted this to be as general as possible with no restrictions at all, so it could be a very good indicator of our main goal.   The code detect_faces.py just detects faces from the video and we saved this video in the dimension 240x320. Using this algorithm creates shaky videos. Thus we then stabilized all videos. This can be done via a code or online free stabilizers are also available. After which we used the stabilized videos and ran it through code emotion_classification_videos_faces.py. in the code we developed a method to extract features based on histogram of dense optical flows (HOF) and we used a support vector machine (SVM) classifier to tackle the recognition problem.   For each video at each frame we extracted optical flows. Optical flows measure the motion relative to an observer between two frames at each point of them. Therefore, at each point in the image you will have two values that describes the vector representing the motion between the two frames: the magnitude and the angle. In our case, since videos have a resolution of 240x320, each frame will have a feature descriptor of dimensions 240x320x2. So, the final video descriptor will have a dimension of #framesx240x320x2. In order to make a video comparable to other inputs (because inputs of different length will not be comparable with each other), we need to somehow find a way to summarize the video into a single descriptor. We achieve this by calculating a histogram of the optical flows. This is, separate the extracted flows into categories and count the number of flows for each category. In more details, we split the scene into a grid of s by s bins (10 in this case) in order to record the location of each feature, and then categorized the direction of the flow as one of the 8 different motion directions considered in this problem. After this, we count for each direction the number of flows occurring in each direction bin. Finally, we end up with an s by s by 8 bins descriptor per each frame. Now, the summarizing step for each video could be the average of the histograms in each grid (average pooling method) or we could just pick the maximum value of the histograms by grid throughout all the frames on a video (max pooling   For the classification process, we used support vector machine (SVM) with a non linear kernel classifier, discussed in class, to recognize the new facial expressions. We also considered a Naïve Bayes classifier, but it is widely known that svm outperforms the last method in the computer vision field. A confusion matrix can be made to plot results better. ","fork":true,"url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos","forks_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/forks","keys_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/teams","hooks_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/hooks","issue_events_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/issues/events{/number}","events_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/events","assignees_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/assignees{/user}","branches_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/branches{/branch}","tags_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/tags","blobs_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/statuses/{sha}","languages_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/languages","stargazers_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/stargazers","contributors_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/contributors","subscribers_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/subscribers","subscription_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/subscription","commits_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/contents/{+path}","compare_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/merges","archive_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/downloads","issues_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/issues{/number}","pulls_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/pulls{/number}","milestones_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/milestones{/number}","notifications_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/labels{/name}","releases_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/releases{/id}","deployments_url":"https://api.github.com/repos/Yizhiqing/Emotion-Detection-in-Videos/deployments","created_at":"2018-08-08T13:42:07Z","updated_at":"2018-08-07T03:33:06Z","pushed_at":"2016-01-17T22:07:49Z","git_url":"git://github.com/Yizhiqing/Emotion-Detection-in-Videos.git","ssh_url":"git@github.com:Yizhiqing/Emotion-Detection-in-Videos.git","clone_url":"https://github.com/Yizhiqing/Emotion-Detection-in-Videos.git","svn_url":"https://github.com/Yizhiqing/Emotion-Detection-in-Videos","homepage":null,"size":6,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master","public":true}}
{"actor":{"display_login":"Yizhiqing"}}