Skip to content
A neural image caption generator
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
img
scripts
src
.gitignore
LICENSE
README.md
requirements.txt

README.md

capgen

A Neural Image Caption Generator

Results

This model was trained on the MSCOCO train2014 dataset and obtains the following results

BLEU-1 BLEU-2 BLEU-3 BLEU-4 METEOR ROUGE-L CIDEr
0.651 0.467 0.322 0.218 0.212 0.479 0.690

Getting Started

  1. Clone the repo
$ git clone https://github.com/tazzaoui/capgen.git && cd capgen
  1. Download MS-COCO Training Data
$ cd scripts && ./get_data.sh
  1. Resize Training Images
$ ./resize.sh

Training the model

Use src/train.py to train the model

$ python src/train.py

Evaluate the Model

Use the eval.sh script to evaluate the model. The resulting captions can be found in data/results.json.

$ scripts/eval.sh

Inference

Use inference.py to test the model with an example image

$ python src/inference.py <img_path.png>

A Sample of Results

References

You can’t perform that action at this time.