Skip to content

EN10/im2txt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

im2txt

A Neural Image Caption Generator.

Kite

Install

Bazel:

sudo add-apt-repository ppa:webupd8team/java

echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -

sudo apt update && sudo apt install bazel

Based on Installing Bazel on Ubuntu

Tensorflow

sudo pip install -U pip
sudo pip install tensorflow==1.0

Extract Model Checkpoint

sudo apt install p7zip-full
7z e model.7z.001

im2txt

svn export https://github.com/tensorflow/models/trunk/research/im2txt

CHECKPOINT_PATH="/home/ubuntu/workspace/im2txt/model.ckpt-2000000"
VOCAB_FILE="/home/ubuntu/workspace/im2txt/word_counts.txt"
IMAGE_FILE="/home/ubuntu/workspace/im2txt/image.jpg"

cd im2txt/
bazel build -c opt //im2txt:run_inference

Run:

bazel-bin/im2txt/run_inference \
  --checkpoint_path=${CHECKPOINT_PATH} \
  --vocab_file=${VOCAB_FILE} \
  --input_files=${IMAGE_FILE}

ERROR:

ERROR: python': double free or corruption (!prev)

sudo apt-get install libtcmalloc-minimal4
export LD_PRELOAD="/usr/lib/libtcmalloc_minimal.so.4"

About

A Neural Image Caption Generator.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published