Download twitter-2015 dataset and twitter-2017 dataset and put them into datasets/ .
Download pretrained models and put them into models/ .
Dataset source: You can find download links in paper "Joint Multi-modal Aspect-Sentiment Analysis with Auxiliary Cross-modal Relation Detection".
pip install -r requirements.txt
If raise no module error, install module by yourself
python utils/TrainInputProcess.py \
--dataset_type '2015' \
--text_model_type 'roberta' \
--image_model_type 'vit'
Other parameters introduced in code. There are other preprocess for other use, no need to pay attention.
python main.py \
--dataset_type '2015' \
--text_model_type 'roberta' \
--image_model_type 'vit'
or
sh run.sh
other training parameters introduced in code
Implementation in code model/modeling_dtca.py
Set alpha = 0 or beta = 0