Created
February 21, 2017 06:22
-
-
Save bhautikj/e8041dd4b8c6cb3e38f1c548ba19958e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Style Transfer setup (pycaffe based approach) | |
== | |
1. Fetch, install CUDA: https://developer.nvidia.com/cuda-downloads | |
2. Install opencv: | |
brew install homebrew/science/opencv | |
3. edit opencv, reinstall | |
brew edit opencv | |
3.1 replace the following lines: | |
args << "-DPYTHON#{py_ver}_LIBRARY=#{py_lib}/libpython2.7.#{dylib}" | |
args << "-DPYTHON#{py_ver}_INCLUDE_DIR=#{py_prefix}/include/python2.7" | |
3.2 with: | |
args << "-DPYTHON_LIBRARY=#{py_prefix}/lib/libpython2.7.dylib" | |
args << "-DPYTHON_INCLUDE_DIR=#{py_prefix}/include/python2.7" | |
3.3 Install snappy, leveldb, gflags, glog, szip, lmdb and opencv. | |
brew install -vd snappy leveldb gflags glog szip lmdb homebrew/science/opencv | |
3.4 Install protobuf. | |
brew install --build-from-source --with-python --fresh -vd protobuf | |
3.5 Install boost, boost-python | |
brew install --build-from-source --fresh -vd boost boost-python | |
3.6 install blas | |
brew uninstall openblas; brew install --fresh -vd openblas | |
3.7 install hdf5 | |
brew install hdf5 | |
4 get caffe | |
git clone https://github.com/BVLC/caffe.git | |
cd caffe | |
5 setup makefile.config | |
6 edit Makefile | |
LDFLAGS += -framework vecLib | |
to | |
LDFLAGS += -framework Accelerate | |
7 edit makefile.config | |
PYTHON_INCLUDE := /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/include/python2.7 \ | |
8 make pycaffe | |
9 git clone https://github.com/fzliu/style-transfer | |
10 pip install numpy scipy scikit-image progressbar | |
11 sh scripts/download_models.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment