Skip to content

ngthanhtin/Memotion2_AAAI_WS_2022

Repository files navigation

Shared task @ AAAI 2022: First Workshop on Multimodal Fact-Checking and Hate Speech Detection

by Thanh Tin Nguyen *, Nhat Truong Pham, and Yong-Guk Kim.

Paper Conference

Create Tokenizer

python tokenizer.py, it will create a pth file, then put the generated file in tokenizers/ folder.

*Note that, create tokenizer before doing the next steps.

Create Pretrained Word Embedding

python utils/create_weights_matrix.py, it will create a npy file, then put the generated file in pretrained_embedding/ folder.

Trainning

As for Sentiment Task (Task A):
python image_text/train_sentiment.py
python unimodal_text/train_sentiment.py
python unimodal_image/train_sentiment.py
As for Emotion Task (Task B):
python image_text/train_emotion.py
python unimodal_text/train_emotion.py
python unimodal_image/train_emotion.py
As for Intensity of Emotion Task (Task C):
python image_text/train_intensity.py
python unimodal_text/train_intensity.py
python unimodal_image/train_intensity.py

Inference

As for Sentiment Task (Task A):
python image_text/inference_sentiment.py
python unimodal_text/inference_sentiment.py
python unimodal_image/inference_sentiment.py
As for Emotion Task (Task B):
python image_text/inference_emotion.py
python unimodal_text/inference_emotion.py
python unimodal_image/inference_emotion.py
As for Intensity of Emotion Task (Task C):
python image_text/inference_intensity.py
python unimodal_text/inference_intensity.py
python unimodal_image/inference_intensity.py

Result

Submission

When running inference, it will create a file in results/. After inferencing 3 tasks, there will be 3 files in results/, then run python utils/concat_submission.py to generate answer.txt, zip it as res.zip to submit.

Acknowledgement

Multihop Attention for Meme Affect Analysis

https://github.com/paritoshMahto07/Scene-Text-Detection-and-Recognition-