Giter Club home page Giter Club logo

uaic's Introduction

Uncertainty-aware Image Caption Generation

This repository contains the implementation of paper: Uncertainty-Aware Image Captioning (UAIC).

Our model consists of two module:

  1. Uncertainty Measurement: image conditioned bag-of-words

input: image regions

output: distribution of word vocabulary

  1. Caption Generation: unified Transformer-based image caption

input: image region, last stage sequence

output: next stage sequence

The main contirbutions:

  1. We propose a new uncertainty-aware model for image caption generation. Compared with previous work, our model allow difficulty control over generation and enjoy a siginificant reduction over emperical time complexity.

  2. We introduce a cross-modality uncertainty estimation model inspired on the idea of bag-of-word. Based on the token-level uncertainty estimation, a recursive algorithm is applied to contruct the training set.

  3. We devdelop a uncertainty-adopted beam search algorithm to improve the decoding effeciency.

  4. Experiments on MS COCO benchmark demonstrate the superiority of our UAIC model over strong baselines.

Data Preparation:

To run the code, annotations and detection features for the COCO dataset are needed. Please download the annotations file annotations.zip and extract it.

Detection features are computed with the code provided by [1]. To reproduce our result, please download the COCO features file coco_detections.hdf5 (~53.5 GB), in which detections of each image are stored under the <image_id>_features key. <image_id> is the id of each COCO image, without leading zeros (e.g. the <image_id> for COCO_val2014_000000037209.jpg is 37209), and each value should be a (N, 2048) tensor, where N is the number of detections.

Model Training:

  1. Uncertainty measurement and generate the data pair

  2. Uncertainty-aware image captioning model optimization

Model Inference:

generate candidate from saved ckpt and evalute the model performance

uaic's People

Contributors

feizc 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.