Implementation of "Visualize Before You Write: Imagination-Guided Open-Ended Text Generation".

Related tags

Admin Panels iNLG
Overview

iNLG

This is the implementation code for Visualize Before You Write: Imagination-Guided Open-Ended Text Generation.

Environment Setup

Step 1: Download repo

git clone [email protected]:VegB/iNLG.git
cd iNLG/
for dataset in activitynet commongen rocstories
do
    mkdir -p log/${dataset}
done

Step 2: Setup conda environment

conda env create -f env.yml
conda activate inlg
python -m spacy download en

Step 3: Download datasets & checkpoints

python scripts/download_data_and_checkpoint.py

Text Generation

For Concept2Text

# text-only
bash scripts/run_concept2text_text_only.sh

# with images
bash scripts/run_concept2text_with_image.sh

For Sentence Completion

# text-only
bash scripts/run_sentence_completion_text_only.sh

# with images
bash scripts/run_sentence_completion_with_image.sh

For Story Generation

# text-only
bash scripts/run_story_generation_text_only.sh

# with images
bash scripts/run_story_generation_with_image.sh
You might also like...

A huggingface transformers implementation of "Transformer Memory as a Differentiable Search Index"

A huggingface transformers implementation of

DSI-transformers A huggingface transformers implementation of Transformer Memory as a Differentiable Search Index, Yi Tay, Vinh Q. Tran, Mostafa Dehgh

Jan 2, 2023

This repository consists of a drowsiness detection based on YOLOv5 implementation.

This repository consists of a drowsiness detection based on YOLOv5 implementation.

Drowsiness-Detection-with-YoloV5 This repository consists of a drowsiness detection based on YOLOv5 implementation. You can reach the base repo here 1

Jul 17, 2022

Implementation of our paper 'On Metric Learning For Audio-Text Cross-Modal Retrieval'

On Metric Learning for Audio-Text Cross-Modal Retrieval Set up environment Clone the repository: git clone https://github.com/XinhaoMei/audio-text_ret

Dec 3, 2022

This is an unofficial PyTorch implementation of Meta Pseudo Labels.

Meta Pseudo Labels This is an unofficial PyTorch implementation of Meta Pseudo Labels. The official Tensorflow implementation is here. Results CIFAR-1

Mar 31, 2022

Implementation of the Hybrid Perception Block and Dual-Pruned Self-Attention block from the ITTR paper for Image to Image Translation using Transformers

Implementation of the Hybrid Perception Block and Dual-Pruned Self-Attention block from the ITTR paper for Image to Image Translation using Transformers

ITTR - Pytorch Implementation of the Hybrid Perception Block (HPB) and Dual-Pruned Self-Attention (DPSA) block from the ITTR paper for Image to Image

Dec 23, 2022

The official implementation of "Bayesian Image Super-Resolution with Deep Modeling of Image Statistics" via TensorFlow

BayeSR The official implementation of "Bayesian Image Super-Resolution with Deep Modeling of Image Statistics" which has been accepted by IEEE Transac

Dec 13, 2022

Python3 Implementation for 'Visual Rhythm and Beat' SIGGRAPH 2018

visbeat3 This is a migration of visbeat from Python2 to Python3. All credits belong to the original author. Note: This repo is under development, for

Dec 27, 2022

A Flask Sentiment Analysis API, with visual implementation

A Flask Sentiment Analysis API, with visual implementation

The Sentiment Analysis Api was created using python flask module,it allows users to parse a text or sentence throught the (?text) arguement, then view the sentiment analysis of that sentence. It can be implementable into a web application.

Jul 17, 2022

Tensorflow 2 implementation of MASK-RCNN

Mask R-CNN for Object Detection and Segmentation using TensorFlow 2 (2.7.0) Introduction The mask-rcnn-tf2-us project edits the original Mask_RCNN pro

Jan 4, 2023
Comments
  • How to get image features of my own dataset

    How to get image features of my own dataset

    Thanks for contributing such interesting and meaningful work!

    Your codes work great, and I wonder how I can use the code for my own dataset. I noticed you have processed vitb32.hdf5 for each dataset, which contains a 512-dimensional ViT feature for each image. So could you give some official instructions to create a vitb32.hdf5 for my own dataset?

    opened by StevenTang1998 5
Owner
Wanrong Zhu
PhD student at UCSB
Wanrong Zhu
A Python event implementation similar to the C# implementation

pyEventHook A Python event implementation similar to the C# implementation. Examples Create an event and suscribe handlers. def wake_up(name): pri

Ariel Alfonso Triana PĂ©rez 1 May 19, 2022
An implementation of channel pruning using the latest torch.FX feature

EfficientPyTorch This is an implementation of channel pruning using the latest torch.FX feature. This is also a reimplementation of the paper EagleEye

zhaoxiandong 6 Dec 4, 2022
Implementation of some unbalanced loss like focal_loss, dice_loss, DSC Loss, GHM Loss et.al

Implementation of some unbalanced loss for NLP task like focal_loss, dice_loss, DSC Loss, GHM Loss et.al Summary Here is a loss implementation reposit

null 121 Jan 1, 2023
An implementation for "Federated Learning with Non-IID Data via Local Drift Decoupling and Correction"

Federated Learning on Non-IID Data with Local-drift Decoupling and Correction Code for paper - [Federated Learning on Non-IID Data with Local-drift De

null 40 Dec 12, 2022
From scratch implementation of DDPG (Actor Critic w/ state value estimator)

policy-gradient-from-scratch From scratch implementation of Online DDPG (Actor Critic w/ state value estimator) Both models are implemented in Pytorch

Leonard D. Vorbeck 1 Mar 21, 2022
A simple implementation of a GatewayBot that interacts with a separate FastAPI instance

fastapi-bot A simple implementation of a GatewayBot that interacts with a separate FastAPI instance. What is this project? A demonstration of how you

Jonxslays 2 Mar 25, 2022
A pure Tensorflow2.0 implementation of EfficientDet. Run on PascalVOC or your own datasets too!

Tensorflow2.0 EfficientDet A pure WORKING Tensorflow2.0 implementation of EfficientDet for object detection. There are too many non-working versions o

Thomas Chia 4 Jul 2, 2022
Implementation of our paper "Super-resolution with adversarial loss on the feature maps of the generated high-resolution image" (IET Electronics Letters 2022)

Adversarial Feature Maps Super Resolution This repository is the Implementation of our paper: Imanuel, I. and Lee, S. (2022), Super-resolution with ad

null 2 Oct 26, 2022
Implementation of the Transformer variant proposed in "Transformer Quality in Linear Time"

FLASH - Pytorch Implementation of the Transformer variant proposed in the paper Transformer Quality in Linear Time Install $ pip install FLASH-pytorch

Phil Wang 208 Dec 16, 2022
This is an unofficial implementation of BOAT: Bilateral Local Attention Vision Transformer

BOAT: Bilateral Local Attention Vision Transformer This is an unofficial implementation of the paper BOAT: Bilateral Local Attention Vision Transforme

null 45 Dec 14, 2022