Final project for CMPT419: Neural Poetry Generation with Visual Inspiration
python download_image.py
Dataset from link
python extract_feature -s poem
python extract_feature -s img
Output will be a dictionary of (id, feature) pairs where feature is a 512 dimension numpy vector.
Output will be saved to data/poem_features.plk
or
data/img_features.plk
Before training, build vocabulary file, the vocabulary file will be saved to data/vocab.pkl
python vocab_builder.py
python train_adversarial.py
python train_adversarial.py --source multim
Use -h
flag to see more options
Beyond Narrative Description: Generating Poetry from Images by Multi-Adversarial Training