This is the code for the paper:
Visual Sentiment Analysis for Review Images with Item-Oriented and User-Oriented CNN
Quoc-Tuan Truong and Hady W. Lauw
Presented at MM 2017
We provide:
- Code to train and evaluate the models
- Data used for the experiments
- Pre-trained weights of the base models
If you find the code and data useful in your research, please cite:
@inproceedings{vs-cnn,
title={Visual sentiment analysis for review images with item-oriented and user-oriented CNN},
author={Truong, Quoc-Tuan and Lauw, Hady W},
booktitle={Proceedings of the ACM on Multimedia Conference},
year={2017},
}
- Python 3
- Tensorflow > 1.0
- Tqdm
- Pre-trained weights of AlexNet for initialization
- Base model:
python train_base.py --dataset [user,business]
- Factor model:
To train the factor models, we need pre-trained weights from the base models for initialization. If you want to save time, the weights can be downloaded from here.
python train_factor.py --dataset [user,business] --factor_layer [conv1,conv3,conv5,fc7] --num_factors 16