All Projects → mjhucla → Tf Mrnn

mjhucla / Tf Mrnn

Re-implementation of the m-RNN model using TensorFLow

Projects that are alternatives of or similar to Tf Mrnn

Cs570
Code for CS570, Essentials of Data Science
Stars: ✭ 106 (-0.93%)
Mutual labels:  jupyter-notebook
Penkit
Tools for pen plotting in Python
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook
Clothing Recommender
ML
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook
Reinforcement learning
Reinforcement Learning research
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook
Bilibli notes2
攻城狮之家B站视频课程课件合集2,1号仓库https://github.com/JokerJohn/bilibili_notes.git
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook
Capsnet
CapsNet (from "Dynamic Routing Between Capsules") implemented in pytorch.
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook
Cs224d
CS224D Assignments
Stars: ✭ 106 (-0.93%)
Mutual labels:  jupyter-notebook
Examples
Useful RadioML Examples
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook
Amazon Sagemaker Stock Prediction Archived
Workshop to demonstrate how to apply NN based algorithms to stock market data and forecast price movements.
Stars: ✭ 106 (-0.93%)
Mutual labels:  jupyter-notebook
Selfdrivingcar
A collection of all projects pertaining to different layers in the SDC software stack
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook
Tensorflow2.0
学习笔记代码
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook
Bingham Rotation Learning
A Smooth Representation of SO(3) for Deep Rotation Learning with Uncertainty.
Stars: ✭ 106 (-0.93%)
Mutual labels:  jupyter-notebook
Skincancer
Skin cancer detection project
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook
Beymani
Hadoop, Spark and Storm based anomaly detection implementations for data quality, cyber security, fraud detection etc.
Stars: ✭ 106 (-0.93%)
Mutual labels:  jupyter-notebook
Numba Examples
Example Numba implementations of functions
Stars: ✭ 108 (+0.93%)
Mutual labels:  jupyter-notebook
Cnn Yelp Challenge 2016 Sentiment Classification
IPython Notebook for training a word-level Convolutional Neural Network model for sentiment classification task on Yelp-Challenge-2016 review dataset.
Stars: ✭ 106 (-0.93%)
Mutual labels:  jupyter-notebook
Bayesian Methods For Ml
Materials for "Bayesian Methods for Machine Learning" Coursera MOOC
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook
Texas Hold Em Ai
Research on Texas Hold'em AI
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook
Numba tutorial scipy2017
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook
Aws Ai Bootcamp Labs
This library holds a collection of Notebooks and code examples for AWS AI Bootcamps.
Stars: ✭ 107 (+0%)
Mutual labels:  jupyter-notebook

TF-mRNN: a TensorFlow library for image captioning.

Created by Junhua Mao

Introduction

This package is a re-implementation of the m-RNN image captioning method using TensorFlow. The training speed is optimized with buckets of different lengths of the training sentences. It also support the Beam Search method to decode image features into sentences.

Citing m-RNN

If you find this package useful in your research, please consider citing:

@article{mao2014deep,
  title={Deep Captioning with Multimodal Recurrent Neural Networks (m-RNN)},
  author={Mao, Junhua and Xu, Wei and Yang, Yi and Wang, Jiang and Huang, Zhiheng and Yuille, Alan},
  journal={ICLR},
  year={2015}
}

Requirements

Basic installation (sufficient for the demo)

  1. install MS COCO caption toolkit

  2. Suppose that toolkit is install on $PATH_COCOCap and this package is install at $PATH_mRNN_CR. Create a soft link to COCOCap as follows:

cd $PATH_mRNN_CR
ln -sf $PATH_COCOCap ./external/coco-caption
  1. Download necessary data for using a trained m-RNN model.
bash setup.sh

Demo

This demo shows how to use a trained model to generate descriptions for an image. Run demo.py or view demo.ipynb

The configuration of the trained model is: ./model_conf/mrnn_GRU_conf.py.

The model achieves a CIDEr of 0.890 and a BLEU-4 of 0.282 on the 1000 validation images used in the m-RNN paper. It adopts a transposed weight sharing strategy that accelerates the training and regularizes the network.

Training your own models on MS COCO

Download or extract image features for images in MS COCO.

Use the following shell to download extracted image features (Inception-v3 or VGG) for MS COCO.

# If you want to use inception-v3 image feature, then run:
bash ./download_coco_inception_features.sh
# If you want to use VGG image feature, then run:
bash ./download_coco_vgg_features.sh

Alternatively, you can extract image features yourself, you should download images from MS COCO dataset first. Please make sure that we can find the image on ./datasets/ms_coco/images/ (should have at least train2014 and val2014 folder). After that, type:

python ./exp/ms_coco_caption/extract_image_features_all.py

Generate dictionary.

python ./exp/ms_coco_caption/create_dictionary.py

Train and evaluate your model.

python ./exp/ms_coco_caption/mrnn_trainer_mscoco.py

In the training, you can see the loss of your model, but it sometimes very helpful to see the metrics (e.g. BLEU) of the generated sentences for all the checkpoints of the model. You can simply open another terminal:

python ./exp/ms_coco_caption/mrnn_validator_mscoco.py

The trained model, and the evaluation results, are all shown in ./cache/models/mscoco/

Training your models on other datasets

You should arrange the annotation of the other datasets in the same format of our MS COCO annotation format. See ./datasets/ms_coco/mscoco_anno_files/README.md for details.

TODO

  1. Allow end-to-end finetuning of the vision network parameters.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].