Coder Social home page Coder Social logo

ml-lab / reco-rl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from junjiehu/reco-rl

0.0 2.0 0.0 89.28 MB

Codes of AAAI 2020 paper "What Makes A Good Story? Designing Composite Rewards for Visual Storytelling"

License: MIT License

Shell 5.75% Python 94.25%

reco-rl's Introduction

What Makes A Good Story? Designing Composite Rewards for Visual Storytelling

ReCo-RL Model Implemented by Junjie Hu

Contact: [email protected]

If you use the codes in this repo, please cite our AAAI2020 paper.

@inproceedings{hu20aaai,
    title = {What Makes A Good Story? Designing Composite Rewards for Visual Storytelling},
    author = {Junjie Hu and Yu Cheng and Zhe Gan and Jingjing Liu and Jianfeng Gao and Graham Neubig},
    booktitle = {Thirty-Fourth AAAI Conference on Artificial Intelligence (AAAI)},
    address = {New York, USA},
    month = {February},
    url = {https://arxiv.org/abs/1909.05316},
    year = {2020}
}

Installation

Please use the following Anaconda environment.

  • python=3.6
  • pytorch=1.0.1
  • pytorch_pretrained_bert=0.6.2
  • spacy, nltk, numpy, scipy, h5py, json, pickle
conda env create --file conda-env.txt

Downloads

The preprocessed data and pre-trained models can be found here. Extract data.zip under the ReCo-RL/data directory. Extract reco-rl-model.zip under the ReCo-RL/outputs/rl/ directory. Extract bert-base-uncased.zip under ReCo-RL/bert-weight/ directory.

  • data.zip: train/dev/test data including image features, VIST captions and entities preprocessed by spacy.
  • reco-rl-model.zip: model file (model.bin) and vocab file (vocab.bin).
  • bert-base-uncased.zip: BERT's next sentence predictor model and its vocab file.

Demo

  • Decode the test set using pre-trained model. We recommend to use our pre-trained model for further comparison in your paper. After decoding, you would expect to see the decoding automatic scores as follows (improved scores over those reported in the paper).
Score SPICE BLEU-4 ROUGE-L CIDEr METEOR
ReCo-RL 11.2 13.5 29.5 11.8 35.8
bash scripts/test.sh [GPU id]
  • Train a MLE model from scratch
bash scripts/train_mle.sh [GPU id]
  • Train the model initialized by the MLE-trained model
bash scripts/train_rl.sh [GPU id]

reco-rl's People

Watchers

 avatar  avatar

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.