Wednesday, June 29, 2016

Interface Caffe with Python

Being in Caffe root dir, Run the following command:



make pycaffe
make distribute

and add the path

echo export $PYTHONPATH=~/caffe/python:$PYTHONPATH >> ~/.bashrc

make sure it is aded to the system path by using os.sys.path.

TO create a graph of Network in ipython:

1.Make sure python-pydot is installed (else, install it using sudo apt-get install python-pydot)

It installs in addition: The following extra packages will be installed:
  

graphviz libcdt5 libcgraph6 libgvc6 libgvpr2 libpathplan4

Now run the following in ipython:

! python python/draw_net.py MyProgramms/conv.prototxt MyProgramms/conv.png
from IPython.display import Image
Image(filename='conv.png')

2. Trained caffe model is stored as .caffemodel



No comments:

Post a Comment