Wednesday, December 21, 2016

opencv: Install opencv CentOS

sudo yum install opencv opencv-python opencv-devel-docs 

sudo yum install -y python-devel gtk2-devel libdc1394-devel libv4l-devel ffmpeg-devel gstreamer-plugins-base-devel
sudo yum install -y libpng-devel libjpeg-turbo-devel jasper-devel openexr-devel libtiff-devel libwebp-devel
sudo yum install -y gcc  cmake  git gtk2-devel pkgconfig  numpy  ffmpeg

If your using virtual environment, copy the relevant cv files to the virtual environment.

 cp /usr/lib64/python2.7/site-packages/cv* .venv/lib/python2.7/site-packages/

Tuesday, December 20, 2016

Caffe: Visualizing Caffe Network prototxt file using GraphViz:

Visualizing Caffe Net topology/ntwork/prototxt file using GraphViz
From the Caffe root directory, you can generate a graph in image format from a .prototxt model file:

$ make pycaffe
$ pip install pydotplus
$ yum install graphviz

Visualize a CNN in left-to-right:

$ python/ mynetwrk.prototxt mynetwrk.png

Output formats could be : PNG, PDF, DOT or other GraphViz supported formats.
Visualize a CNN in top-to-bottom:

$ python/ --rankdir TB mynetwrk.prototxt mynetwrk.png

Following errors can be eliminated if you install the PRE-REQS (pip install pydotplus; yum install graphviz)

pydotplus.graphviz.InvocationException: GraphViz's executables not found
Exception: "dot" not found in path.
ImportError: No module named pydot

Monday, December 12, 2016

Github: Merging two branches

git remote add remote-name remote-github-url 
git fetch remote-name 
git merge remote-name/branch-name 
git status

Github: Update a GitHub forked repository;

git remote add upstream github-URL
git fetch upstream 
git merge upstream/master master 
git pull upstream master 
git push