This repository contains PyTorch implementation of Show, Attend and Tell
To train model form scratch, use following command.
python main.py
To train model following existing checkpoint, use following command.
python main.py --model_path MODEL_PATH
To generate caption of an image, use following command.
python main.py --test --model_path MODEL_PATH --image_path IMAGE_PATH
Lastly, to download required data (Flickr8k and GloVe, for now), use '--download' argument.
Following examples are generated after training using Google Colaboratory for less than 7 hours. Training captions are lemmatized, and so are generated captions. Thus generated captions are not complete English sentences, but they are still interpretable. (Lemmatization helps training when resource is limited, because it reduces vocabulary size.)
(A lot of examples have dogs, because dogs are cute!)
- Correct examples
- Not 100% correct, but not totally wrong examples
- Wrong examples