An extremely nice material to introduce i image processing kernels


Very good materials for docker beginners

My target of using Docker: To build a docker container which contains all the prevalent deep learning libraries and frameworks for both GPU and CPU.

  1.  Docker到底是什么?为什么它这么火!
  2. What is Docker and why is it so darn popular?
  3. 初探Docker
  4. Deep learning: All in one docker
  5. How to Use Docker: Creating Your First Docker Container
  6. Code for deep learning docker


For my opencv version is 3.0+, somehow have conflict with Caffe when makefile.

When install yolo:

In /.bashrc comment out like:

#export LD_LIBRARY_PATH=/home/kaku/anaconda3/lib:$LD_LIBRARY_PATH
#export LD_LIBRARY_PATH=”/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH”

When install caffe:

In /.bashrc comment like:

export LD_LIBRARY_PATH=/home/kaku/anaconda3/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=”/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH”

Video detection:

./darknet detector demo cfg/ cfg/yolo.cfg yolo.weights ./data/IMG_5954.MOV thresh -0.1




The reason I wanna use Chainer:

  1. I am confused the way of install Caffe
  2. I wanna use the available Fast-CNN code

Chainer is really easy to install, just follow the home-page

If wanna use gpu in the mnist example:

  1. mnist$ python –gpu=0      GPU using
  2. mnist$ python                       CPU using


  1. Try the sample can not from chainer import training
    solution: reinstal chainer
  2. To use Cudnn and CUDA
    1. Need cudnn.h

To check it use CUDA or not

>>> from chainer import cuda
>>> cuda.check_cuda_available()

I hope to have a deep understanding of Chainer in the near future!


I almost spent(waisted) one week to configure caffe on Ubuntu 14.04, the reason why it too time consuming is that I am using the newest version of Opencv Python and anaconda. Here I want to share my experience.

  1. Makefile.config
    • # cuDNN acceleration switch (uncomment to build with cuDNN).
      USE_CUDNN := 1
      # Uncomment if you’re using OpenCV 3
      # CUDA directory contains bin/ and lib/ directories that we need.
      CUDA_DIR := /usr/local/cuda
      # CUDA architecture setting: going with all of them.
      # For CUDA < 6.0, comment the *_50 lines for compatibility.
      CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
      -gencode arch=compute_20,code=sm_21 \
      -gencode arch=compute_30,code=sm_30 \
      -gencode arch=compute_35,code=sm_35 \
      -gencode arch=compute_50,code=sm_50 \
      -gencode arch=compute_50,code=compute_50
      # BLAS choice: atlas for ATLAS (default)
      BLAS := atlas
      # We need to be able to find Python.h and numpy/arrayobject.h.
      ANACONDA_HOME := $(HOME)/anaconda3
      PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
      $(ANACONDA_HOME)/include/python3.5m \
      $(ANACONDA_HOME)/lib/python3.5/site-packages/numpy/core/include \
      # Uncomment to use Python 3 (default is Python 2)
      PYTHON_LIBRARIES := boost_python3 python3.5m
      # We need to be able to find or .dylib.
      # Whatever else you find you need goes here.
      INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
      LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
      # N.B. both build and distribute dirs are cleared on `make clean`
      BUILD_DIR := build
      DISTRIBUTE_DIR := distribute
      # The ID of the GPU that ‘make runtest’ will use to run unit tests.
      TEST_GPUID := 0
      # enable pretty build (comment to see full commands)
      Q ?= @
  2. ./bashrc.
    • #Caffemake
      export PYTHONPATH=~/caffe/python/:$PYTHONPATH#Opencv
      export LD_LIBRARY_PATH=/home/kaku/anaconda3/lib:$LD_LIBRARY_PATH
      export LD_LIBRARY_PATH=”/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH”


  1. library must be installed:
    1. libboost-all-dev, although in some tutorial mentioned must install libboost1.55-all-dev.
    2. or upper one or upper one

  2. Debug:
    1. Opencv3.1
      • In my computer I installed two versions Opencv, 2.4 and 3.1
      • 2.4 in the route: /usr/lib/x86_64-linux-gnu/
      • 3.1 in the route /home/kaku/anaconda3/lib/ and  /home/kaku/anaconda3/pkgs/opencv3-3.1.0-py35_0/lib/
      • If in the .bashrc I export opencv path as: /usr/lib/x86_64-linux-gnu/, or the path contain both 3.1 and 2.4, will be conflict, as follows:
        1. /usr/bin/ld: warning:, needed by /home/kaku/anaconda3/lib/, may conflict with
        2. .build_release/tools/caffe: error while loading shared libraries: cannot open shared object file: No such file or directory
          make: *** [runtest] Error 127
      • Solution:
        • In .bashrc
          1. export LD_LIBRARY_PATH=/home/kaku/anaconda3/lib:$LD_LIBRARY_PATH
          2. export LD_LIBRARY_PATH=”/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH”
        • In Makefile.config
          • Delete: PYTHON_LIB := /usr/lib
    2. fatal error: Python.h: No such file or directory
      • Actually I have python.h, but in the following files:
        • /media/kaku/Work/software/study software/Anaconda/include/Python.h
      • Solution:
        • In .bashrc add:
          • ANACONDA_HOME := $(HOME)/anaconda3
            PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
            $(ANACONDA_HOME)/include/python3.5m \
          • PYTHON_LIBRARIES := boost_python3 python3.5m
        • Can not contain route: /usr/include/python2.7/
    3. Thanks to: