Permalink
Browse files

add readme and download script

  • Loading branch information...
1 parent 663a01f commit 3c5fd844dc583d8e7691eb8649ffb429b609cd4d @ry committed Nov 14, 2015
Showing with 34 additions and 1 deletion.
  1. +3 −0 .gitignore
  2. +7 −0 Makefile
  3. +23 −0 README.md
  4. +1 −1 caffe_to_tensorflow.py
View
@@ -1 +1,4 @@
*.pyc
+*.swp
+VGG_ILSVRC_16_layers.caffemodel
+vgg16.tfmodel
View
@@ -0,0 +1,7 @@
+vgg16.tfmodel: VGG_ILSVRC_16_layers.caffemodel
+ python caffe_to_tensorflow.py
+
+VGG_ILSVRC_16_layers.caffemodel:
+ curl -O http://www.robots.ox.ac.uk/~vgg/software/very_deep/caffe/VGG_ILSVRC_16_layers.caffemodel
+
+
View
@@ -0,0 +1,23 @@
+# TensorFlow VGG-16 pre-trained model
+
+VGG-16 is my favorite image classification model to run
+because of its simplicity. The creators of this model
+published a pre-trained binary that can be used in Caffe.
+
+https://gist.github.com/ksimonyan/211839e770f7b538e2d8#file-readme-md
+
+This project is to convert it to TensorFlow and check its
+correctness.
+
+Just run `make` to download the original caffe model and convert it.
+`tf_forward.py` has an example of how to use the generated `vgg16.tfmodel`
+file.
+
+I modified the prototxt file slightly for debugging purposes.
+(Renaming a couple of the blobs.)
+
+Obviously it would be great to have a general purpose caffemodel
+-> TensorFlow graph program. This is only a first step in that
+direction. I'm not sure I need any other pre-trained models, so I
+might not generalize it-feel free to use any of this code if you
+do that work.
@@ -20,7 +20,7 @@ def imshow(image):
skimage.io.show()
#caffe.set_mode_cpu()
-net_caffe = caffe.Net("VGG_2014_16.prototxt", "VGG_2014_16.caffemodel", caffe.TEST)
+net_caffe = caffe.Net("VGG_2014_16.prototxt", "VGG_ILSVRC_16_layers.caffemodel", caffe.TEST)
caffe_layers = {}

0 comments on commit 3c5fd84

Please sign in to comment.