Skip to content

Getting started

Memo Akten edited this page Feb 22, 2017 · 22 revisions

##0. Download openFrameworks Get openframeworks (clone repo or download prepackaged).

##1. Download ofxMSATensorFlow source Get ofxMSATensorFlow (clone repo or prepackaged zip).

##2. Download binaries for the examples The source that you just downloaded above doesn't include any binaries (they're too big for a github repo). So for any examples that you'd like to try, download the associated example-XXX-data.tar.gz file from releases and extract to the corresponding folder.

e.g. from example-mnist-data.tar.gz / data --> ofxMSATensorFlow / example-mnist / bin / data

##3. Download precompiled tensorflow library Download lib_TFXX_XXX.tar.gz for your system/platform from releases. This contains the precompiled libtensorflow_cc.so library you need in the next step. NOPT vs OPT is Non-optimised vs Optimised (i.e. --config=opt). To use the GPU, you need the relevant library (with CUDA in the .tar.gz name) and make sure to have the appropriate versions of CUDA and cuDNN installed.

##4. Copy library and set search path Copy the libtensorflow_cc.so file --> ofxMSATensorFlow / libs / tensorflow / [linux64 or osx] / libtensorflow_cc.so

Note that the libtensorflow_cc.so file is a shared library, not a static library (as is the convention with openframeworks addons, making executables self-contained, and much easier to distribute). So when running an application that uses ofxMSATensorFlow, the operating system will need access to the libtensorflow_cc.so file, and will need to know where to find it. So you have two options:

Note that if you are distributing your ofxMSATensorFlow application to another computer, you will also need to distribute the libtensorflow_cc.so file, and repeat this step on that computer.

##5. Example Project files, QT Creator [optional] v XCode The ofxMSATensorFlow example project files are for QT Creator (currently my fav C++ IDE) and should work on both Linux and OSX. So the quickest way to get up and running would be to use QT Creator, even on OSX (instead of XCode). Follow instructions to download and set it up at http://openframeworks.cc/setup/qtcreator (you do not need Qt SDK. just the IDE). It shouldn't be too hard to setup a new projects for other IDEs.

The awesome ProjectGenerator bundled with openframeworks can create working xcode projects with the addon. (Note, right now the ProjectGenerator adds the non-existent ofApp.h, ofApp.cpp, main.cpp files to the project causing it to not compile, just remove them from the src group).

To use another IDE just add the one library and set the header include paths in ofxMSATensorFlow/libs.

##6. ???

##7. Profit

Clone this wiki locally