Coder Social home page Coder Social logo

codewithzichao / multimodal-transformers Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 21 KB

Our source code for EACL2021 workshop: Meme Classification for Tamil Language. We took first place in this task finally!๐Ÿฅณ

Python 97.89% Shell 2.11%
pytorch multimodal meme eacl transformer

multimodal-transformers's Introduction

Meme Classification for Tamil Language at EACL2021 Workshop

Our source code for EACL2021 workshop: Meme Classification for Tamil Language. We took first place in this task finally!๐Ÿฅณ

Updated: Source code is released!๐Ÿคฉ

I will release the code very soon.

Repository structure

โ”œโ”€โ”€ MyLoss.py                          # Impelmentation of some loss function 
โ”œโ”€โ”€ README.md                   
โ”œโ”€โ”€ __init__.py
โ”œโ”€โ”€ args.py                            # declare some argument
โ”œโ”€โ”€ ckpt
โ”‚ย ย  โ””โ”€โ”€ README.md
โ”œโ”€โ”€ data                               # store data
โ”‚ย ย  โ””โ”€โ”€ README.md       
โ”œโ”€โ”€ gen_data.py                        # generate Dataset
โ”œโ”€โ”€ install_cli.sh                     # install required package
โ”œโ”€โ”€ logfile                            # store logfile during training
โ”œโ”€โ”€ main.py                            # train model         
โ”œโ”€โ”€ model.py                           # define model
โ”œโ”€โ”€ multimodal_attention.py            # Implentation of multimodal attention layer
โ”œโ”€โ”€ pred_data
โ”‚ย ย  โ””โ”€โ”€ README.md
โ”œโ”€โ”€ preprocessing.py                   # preprocess the data
โ”œโ”€โ”€ pretrained_weights                 # store pretrained weights of resnet and xlm-roberta
โ”‚ย ย  โ””โ”€โ”€ README.md
โ”œโ”€โ”€ run.sh                             # run model
โ””โ”€โ”€ train.py                           # define training and validation loop             

Installation

Use the following command so that you can install all of required packages:

sh install_cli.sh

Preprocessing

The first step is to preprocess the data. Just use the following command:

python3 -u preprocessing.py

Training

The second step is to train our model. Use the following command:

nohup sh run.sh > run_log.log 2>&1 &

Inference

The final step is inference after training. Use the following command:

nohup python3 -u inference.py > inference.log 2>&1 &

Congralutions! You have got the final results!๐Ÿคฉ

If you use our code, please indicate the source.

multimodal-transformers's People

Contributors

codewithzichao avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

multimodal-transformers's Issues

dataset

When running the code I found that the json file for the label in the data processing file is missing, could you please upload a copy?

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.