Skip to content

Files

Latest commit

6bfee09 · Jan 15, 2020

History

History
This branch is up to date with researchmm/img2poem:master.

code

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Oct 25, 2018
Jan 15, 2020
Oct 19, 2018
Oct 24, 2018

img2poem

images/: test images

model/: pretrained models, including image feature extraction model (object.params, scene.params, Sentiment.params) and poem generation model (ckpt/)

src/: code for testing

  • test.py

To test how much time it cost to generate a poem for an image

def get_poem(image_file):
    """Generate a poem from the image whose filename is `image_file`

    Parameters
    ----------
    image_file : str
        Path to the input image

    Returns
    -------
    str
        Generated Poem
    """