Giter Site home page Giter Site logo

rishusiva / emotion-classification Goto Github PK

View Code? Open in Web Editor NEW

This project forked from marreddysainikhilreddy/emotion-classification

0.0 0.0 0.0 8.4 MB

Advanced ML models for emotion classification in images and text.

Python 0.13% Jupyter Notebook 99.87%

emotion-classification's Introduction

Emotion Classification in Relation to Mental Health

Welcome to our project repository for CSCI-567, the Machine Learning graduate course at USC. This repository features advanced models for facial emotion classification in images and emotion classification in text. Dive into our final report for a detailed exploration of our project, including experiments and results.

Note: For tracking experiments, we use Comet ML. Follow the instructions here to get an API key. If not using Comet ML, ignore related code sections.

Repository Overview:

Image Emotion Classifier

  • Folders:
    • image-emotion-classifier: CNN-based models for image emotion classification.
      • cnn-architecture: Custom CNN models trained on the fer2013 dataset.
      • resnet50: Variations of ResNet50 with custom layers, also trained on fer2013.
      • vgg: VGG16 and VGG19 models with fine-tuning and custom layers. Specific files include vgg16_v1.ipynb, vgg16_v1_mtcnn.ipynb, and vgg19_fer.ipynb.

Text Emotion Classifier

  • Folders:
    • text-emotion-classifier: Transformer-based models for text emotion classification.
      • cleaning_augmentation: Data cleaning and augmentation code for text dataset.
      • roberta-base: Our high-performing RoBERTa model with complete training and testing code.
      • hybrid_models: Combining Bi-LSTM with attention layers and transformer models.
        • bi-lstm_attention_roberta and bi-lstm_attention_distilbert.
      • alternate_dataset_checkpoint_model: Finetuning models with the Self-Reported Emotion dataset.

Note: All models besides alternate_dataset_checkpoint_model use the GoEmotions dataset.

Getting Started with the Classifiers:

Image Classifier

  • Setup:
    1. Install Anaconda or create a virtual environment.
    2. Install dependencies: pip install -r requirements.txt (upgrade pip beforehand).
    3. Download the required dataset and adjust file paths in the code.
    4. Set up a .env file with Comet ML credentials (optional).

    Note: To reproduce vgg16_v1_mtcnn.ipynb, first download the mtcnn fer 2013 dataset from the link above. Then, execute all cells in the notebook, except those containing the preprocess_images function.

Text Classifier

  • Google Colab Usage:
    • Copy the code from .ipynb files in the text-emotion-classifier folder to a new Google Colab notebook to run code directly.
  • Local Setup:
    1. Create a virtual environment.
    2. Install dependencies: pip install -r requirements.txt (upgrade pip first).
    3. Run main.py.

    Note: cleaning_augmentation is the only code that needs to be run locally. The rest of the code can be run on Google Colab.

Workflow and Contribution Guidelines:

  • Before Starting:

    • Discuss work items in team meetings.
    • Ensure there's a GitHub issue for the task you're taking on.
  • Starting Work:

    • Assign yourself to the issue on GitHub.
    • Sync the latest changes from the main branch.
    • Create and switch to a new branch for your work.
  • Development Process:

    • Commit and push changes frequently, adhering to Conventional Commits.
    • Start a pull request early, marking it as a draft.
    • Write and run unit tests (if applicable).
    • Resolve merge conflicts promptly.
  • Finishing Up:

    • Clean and review your code.
    • Ensure all tests pass.
    • Finalize the pull request and request code reviews.
    • Implement review feedbacks and merge upon approval.

emotion-classification's People

Contributors

marreddysainikhilreddy avatar mkschulz9 avatar aaaaaiden avatar rishusiva 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.