Git Product home page Git Product logo

image-captioning's Introduction

Image-Captioning

This is a model to generate caption for images. The dataset can be found here: https://forms.illinois.edu/sec/1713398, which contains 8000 image caption pairs. I split the samples into training, validation, test with a ratio of 6:1:1.

Methods

Here is the overall architecture of the model.

model architecture

Given a certain image, the model first uses an encoder to map the image to a lower dimension vector. Then the vector is added to the input of the LSTM model to generate the text. The image encoder used is based on Inception V3, and the last layer is removed to get the embedding. The generator model uses a bi-LSTM and a softmax layer to get the prediction. The caption starts with a <start> token. As long as the predicted token is not <end> or the sequence reaches its maximum length, the predicted token is added to the previous input and make another prediction. In the end, we have our predicted caption.

Results

Now, let's see our model performance! Here is one example of captions for the training images, which is pretty reasonable.

model architecture

Generated Caption: A dog and a dog are in the snow.

Here is one example of captions for the development images. Although not good as the training image, it still makes much sense.

model architecture

Generated Caption: A man in a blue shirt and a woman in a white shirt.

Thank you!

image-captioning's People

Contributors

noiper avatar

Watchers

 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.