• Stars
    star
    282
  • Rank 145,641 (Top 3 %)
  • Language
    Python
  • Created about 6 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[MM'18] Beyond Narrative Description: Generating Poetry from Images by Multi-Adversarial Training

Beyond Narrative Description: Generating Poetry from Images by Multi-Adversarial Training

An implementation of the image-to-poem model described in the paper: "Beyond Narrative Description: Generating Poetry from Images by Multi-Adversarial Training." Accepted as the best paper of ACM MM2018.

Bei Liu, Jianlong Fu, Makoto P. Kato, Masatoshi Yoshikawa

Full text available at: https://arxiv.org/abs/1804.08473

Contents

Model Overview

Introduction

The Img2poem model is a deep neural network that learns how to generate poems from images. For example:

Architecture

Getting Started

Install Required Packages

(It is recommended to install the dependencies under Conda environment.)

  • python2.7
  • tensorflow1.6
  • mxnet
  • opencv
  • tqdm
  • colorama
  • flask

Prepare the Training Data

Name #Poem #Line/poem #Word/line
MultiM-Poem 8,292 7.2 5.7
UniM-Poem 93,265 5.7 6.2
MultiM-Poem(Ex) 26,161 5.4 5.9

Both datasets are formatted in JSON files.

MultiM-Poem.json: image and poem pairs

[
    {
        "poem": str,
        "image_url": str,
        "id": int
    },
    ...
]

UniM-Poem.json: poem corpus

[
    {
        "poem": str,
        "id": int
    },
    ...
]

Download Trained Model

Please download models from https://1drv.ms/u/s!AkLgJBAHL_VFgSyyfpeGyGFZux56 and put it under "code/".

Generating Poems

The following command line will generate poem for an image.

python test.py

Type in the relative path to the test image in the console and the poem will be generated.

../images/test.jpg

Example output:

the sun is singing in the forest wind
and let us go to the wind of the sun
let the sun be free
let us be the storm of heaven
and let us be the slow sun
we keep our own strength together
we live in love and hate

Results

Here are some examples of poems generated by eight methods for an image.

Citation

If you find this repo useful in your research, please consider citing the following papers:

@inproceedings{liu2018beyond,
  title={Beyond narrative description: Generating poetry from images by multi-adversarial training},
  author={Liu, Bei and Fu, Jianlong and Kato, Makoto P and Yoshikawa, Masatoshi},
  booktitle={Proceedings of the 26th ACM international conference on Multimedia},
  pages={783--791},
  year={2018}
}

More Repositories

1

TTSR

[CVPR'20] TTSR: Learning Texture Transformer Network for Image Super-Resolution
Python
756
star
2

SiamDW

[CVPR'19 Oral] Deeper and Wider Siamese Networks for Real-Time Visual Tracking
Python
747
star
3

Stark

[ICCV'21] Learning Spatio-Temporal Transformer for Visual Tracking
Python
628
star
4

TracKit

[ECCV'20] Ocean: Object-aware Anchor-Free Tracking
Python
608
star
5

STTN

[ECCV'2020] STTN: Learning Joint Spatial-Temporal Transformations for Video Inpainting
Jupyter Notebook
462
star
6

AOT-GAN-for-Inpainting

[TVCG'2023] AOT-GAN for High-Resolution Image Inpainting (codebase for image inpainting)
Python
416
star
7

LightTrack

[CVPR21] LightTrack: Finding Lightweight Neural Network for Object Tracking via One-Shot Architecture Search
Python
387
star
8

MM-Diffusion

[CVPR'23] MM-Diffusion: Learning Multi-Modal Diffusion Models for Joint Audio and Video Generation
Python
354
star
9

PEN-Net-for-Inpainting

[CVPR'2019] PEN-Net: Learning Pyramid-Context Encoder Network for High-Quality Image Inpainting
Python
354
star
10

tasn

Trilinear Attention Sampling Network for Fine-grained Image Recognition
Python
218
star
11

soho

[CVPR'21 Oral] Seeing Out of tHe bOx: End-to-End Pre-training for Vision-Language Representation Learning
Python
205
star
12

TTVSR

[CVPR'22 Oral] TTVSR: Learning Trajectory-Aware Transformer for Video Super-Resolution
Python
197
star
13

FTVSR

[ECCV'22] FTVSR: Learning Spatiotemporal Frequency-Transformer for Compressed Video Super-Resolution
Python
151
star
14

DBTNet

Code for our NeurIPS'19 paper "Learning Deep Bilinear Transformation for Fine-grained Image Representation"
Python
105
star
15

generate-it

A collection of models for image<->text generation in ACM MM 2021.
Python
64
star
16

CKDN

[ICCV'21] CKDN: Learning Conditional Knowledge Distillation for Degraded-Reference Image Quality Assessment
Python
55
star
17

SariGAN

[NeurIPS'20] Learning Semantic-aware Normalization for Generative Adversarial Networks
Python
54
star
18

VOT2019

The Winner and Runner-up Trackers for VOT-2019 Challenges
Python
50
star
19

WSOD2

[ICCV'19] WSOD^2: Learning Bottom-up and Top-down Objectness Distillation for Weakly-supervised Object Detection
Python
46
star
20

CyDAS

Cyclic Differentiable Architecture Search
Python
34
star
21

VQD-SR

[ICCV'23] VQD-SR: Learning Data-Driven Vector-Quantized Degradation Model for Animation Video Super-Resolution
Python
34
star
22

NEAS

Python
19
star
23

2D-TAN

AAAI2020 - Learning 2D Temporal Localization Networks for Moment Localization with Natural Language
Python
16
star
24

AAST-pytorch

[MM'20] Aesthetic-Aware Image Style Transfer
Python
14
star
25

STTR

[ACCV'22] Fine-Grained Image Style Transfer with Visual Transformers
Python
12
star
26

davinci-videofactory

JavaScript
12
star
27

AI_Illustrator

[MM'22 Oral] AI Illustrator: Translating Raw Descriptions into Images by Prompt-based Cross-Modal Generation
Python
11
star
28

language-guided-animation

[TMM 2023] Language-Guided Face Animation by Recurrent StyleGAN-based Generator
Python
10
star