Giter Site home page Giter Site logo

deep-emotion's Introduction

Deep-Emotion: Facial Expression Recognition Using Attentional Convolutional Network

This repository provides a PyTorch implementation of the research paper, Deep-Emotion.

Note: This implementation is not the official one described in the paper.

Architecture

  • An end-to-end deep learning framework based on attentional convolutional networks.
  • The attention mechanism is incorporated using spatial transformer networks.

Datasets

This implementation uses the following datasets:

Prerequisites

Make sure you have the following libraries installed:

  • PyTorch >= 1.1.0
  • torchvision == 0.5.0
  • OpenCV
  • tqdm
  • Pillow (PIL)

Repository Structure

This repository is organized as follows:

Usage

Watch this informative video created by DeepLearning_by_PhDScholar for a comprehensive guide on using this implementation.

Data Preparation

  1. Download the dataset from Kaggle.
  2. Decompress train.csv and test.csv into the ./data folder.

How to Run

Setup the Dataset

python main.py [-s [True]] [-d [data_path]]

--setup                 Setup the dataset for the first time
--data                  Data folder that contains data files

To train the model

python main.py [-t] [--data [data_path]] [--hparams [hyperparams]]
              [--epochs] [--learning_rate] [--batch_size]

--data                  Data folder that contains training and validation files
--train                 True when training
--hparams               True when changing the hyperparameters
--epochs                Number of epochs
--learning_rate         Learning rate value
--batch_size            Training/validation batch size

To validate the model

python visualize.py [-t] [-c] [--data [data_path]] [--model [model_path]]

--data                  Data folder that contains test images and test CSV file
--model                 Path to pretrained model
--test_cc               Calculate the test accuracy
--cam                   Test the model in real-time with webcam connected via USB

Prediction Samples

```

deep-emotion's People

Contributors

omarsayed7 avatar shaoliu089 avatar shubhamkashyap1601 avatar tekyaygilfethi 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.