Giter Site home page Giter Site logo

dsn's Introduction

Video-based Emotion Recognition Using Deeply-Supervised Neural Networks

An ensemble of proposed models achieves an accuracy of 61.10% in EmotiW 2018. Details about the EmotiW2016 Challenge can be found at: https://sites.google.com/view/emotiw2018. For more details about the codes, please refer to our paper.

Model accuracy on the validation set:

Model accuracy on the validation set

Accuracy of our top 4 submissions to EmotiW 2018:

acc


Requirements

pycaffe
python 2.7
ffpemg
opencv 2.4.11
cuda 8.0


Datasets and models

  1. Datasets:

    Two datasets we used can be downloaded from the EmotiW 2018 and Real-world Affective FacesRAF-DB. You can send an e-mail to the author to access the database.

  2. Data Pre-processing:

    (1) Extract all frames of the videos:

    cd ./scripts 
    python extract_frames.py  
    

    (2) We employe MTCNN implemented in facenet to detect faces in the frames (image size=400,margin=100).

    (3) Compile Dlib's Python interface and download shape_predictor_68_face_landmarks.dat. Get 68 landmarks of 400*400 images cropped by MTCNN.

    cd ./scripts 
    wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
    python getLandmarks.py
    

    (4) Face alignments from the cropped images. landmark_list.txt is a list of 68 landmarks detected by Dlib; /CropData/ is the directory of 400*400 cropped images; /AlignData/ is the target directory of aligned faces.

    ./face_align  landmark_list.txt  ./CropData/  ./AlignData/
    
  3. Models:

    To train DSN-VGG-FACE , DSN-Res-50 or DenseNet-121,
    you can finetune using pretrained models from: VGG-FACE,ResNet-50,DenseNet-121.

    git clone https://github.com/EvelynFan/DSN.git  
    cd ./DSN-VGG-FACE  
    python run_dsn.py  
    cd ./DSN-Res-50  
    python run_dsn_res50.py
    

    To test on the validation set and test set of 2018 Emotion Challenge Dataset, please download our models from GoogleDrive

    cd ./scripts 
    python test_video.py  
    
  4. Model fusion:

    cd ./scripts 
    python merge_score.py
    

Citing

If you find the code useful, please cite:

dsn's People

Contributors

evelynfan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.