Skip to content
forked from sange1104/OSANet

Code for paper "OSANet: Object Semantic Attention Network for Visual Sentiment Analysis"

Notifications You must be signed in to change notification settings

dxlabskku/OSANet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OSANet

This repository contains the implementation code for the paper "OSANet: Object Semantic Attention Network for Visual Sentiment Analysis".

Overview😎

  • data/ is the top level data directory. Here we assume it consists of different kinds of dataset. Also, each dataset folder is divided into train, validation and test set folder. The data directory is expected to consist as follows.
data
├── FI
│   ├── train
│   ├── val
│   └── test
├── flickr
│   ├── train
│   ├── val
│   └── test
└── instagram
    ├── train
    ├── val
    └── test

Model Architecture

model_architecture_v3

Setup

Environment setup

For experimental setup, requirements.txt lists down the requirements for running the code on the repository. Note that a cuda device is required. The requirements can be downloaded using,

pip install -r requirements.txt

Usage

  1. Clone the repository

    git clone https://github.com/sange1104/OSANet.git
    
  2. Download dataset and split into train, val, and test set.

  3. Set up the object_detection folder. We used pre-trained object detection model from the Faster R-CNN with model pretrained on Visual Genome. For the object_detection folder, you better follow the guideline of this repository.

  4. Train the model with arguments from config/train_config.yaml. You can train the model as follows:

    python train.py
    
  5. The checkpoints of the best validation performance will be saved in checkpoints directory. You can further train model or use for inference with this checkpoint.

About

Code for paper "OSANet: Object Semantic Attention Network for Visual Sentiment Analysis"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 77.7%
  • Cuda 9.4%
  • C 8.7%
  • C++ 2.0%
  • Cython 1.9%
  • MATLAB 0.2%
  • Shell 0.1%