项目作者: anilknayak

项目描述 :
Image captioning
高级语言: Jupyter Notebook
项目地址: git://github.com/anilknayak/ImageCaptioning.git
创建时间: 2018-05-21T21:08:22Z
项目社区:https://github.com/anilknayak/ImageCaptioning

开源协议:

下载


Image Capitioning

Download pre trained model and pickle files

Download model and pickle file from following folder [it has two folders ‘model’ and ‘pkl’]
https://drive.google.com/open?id=1gLhixTjhBkpeZkJ6DsYKzMdyCVkZUrtF

Download Flickr8k dataset

Send a request in the below link to download Flickr_8k_dataset
https://illinois.edu/fb/sec/1713398

You will be receiving an email to download the dataset. There are two zip file

  1. Flickr8k_Dataset.zip [Images] place all the images into data/images folder
  2. Flickr8k_text.zip [captions] place all the captions into data/caption folder

Project Directory Structure

After you download all the required files, your directory structure will look like

  1. .
  2. ├── ImageCaptioning
  3. ├── data # data directory
  4. ├── images # All the images from flickr8k dataset
  5. └── caption # captions from flickr8k dataset
  6. ├── pkl # Pickle Files
  7. ├── details.pkl # Details pickle has max description length
  8. └── features.pkl # all image feature embedding
  9. └── tokenizer.pkl # tokenizer for description
  10. └── description.pkl # captions for each image
  11. └── model
  12. ├── model-ep002-loss3.670-val_loss3.849.h5 # model saved after epoch 2
  13. └── model-ep005-loss3.226-val_loss3.783.h5 # model saved after epoch 5
  14. └── ipython
  15. ├── ImageCaptioning.ipynb # ipython notebook
  16. └── model.png # network model diagram
  17. ├── captioning.py # training module
  18. ├── gui.py # gui module
  19. ├── prepare.py # helper module
  20. └── test_images.py # testing module

How to run

  1. First Run the captioning.py for training
  2. Run test_images.py and provide a image path to test images
  3. Run gui.py for real world testing

GUI

image GUI