Instructions for: Linux, Windows or Mac OS
IDE instructions: Eclipse
Speeding up code using external libraries(SSE, IPP, OpenMP): Optimizations
svn co svn://svn.code.sf.net/p/eblearn/code/trunk/ eblearn
sudo apt-get install subversion cmake g++ imagemagick
cd eblearn/core && make && sudo make install
sudo apt-get install subversion cmake g++ libatlas-base-dev libboost-filesystem-dev imagemagick libboost-regex-dev libqt4-core libqt4-dev libqt4-gui libcppunit-dev libxml++2.6-dev doxygen mplayer mencoder
cd eblearn/tools && make && sudo make install
make test
./bin/tester
Or
make test
./bin/detect tools/data/face/best.conf
The MNIST handwritten digit database is used by the tester to unit-test the learning algorithms.
The tester offers an automatic download of MNIST (you can also download it manually here. Note: when decompressing the MNIST archives, it happens that a dash is replaced by a point by the extractor. Symply rename the extracted file to its original name, e.g.: 't10k-images.idx3-ubyte' should be 't10k-images-idx3-ubyte').
make libs
make release
make debug
make train
or
make metarun metaparse
make detect_debug
make test
make NOOPENCV=1 NOQT=1
or
export NOOPENCV=1 && make
export EBLFLAGS="-D__DUMP_STATES__" && make
sudo apt-get install ccache
/usr/lib/ccache
in front of it, e.g. export PATH=/usr/lib/ccache:$PATH
– Compiler: /usr/lib/ccache/c++
sudo make install
make install DIR="your-install-dir"
or
export DIR="your-install-dir" && make install
sudo apt-get install cmake g++ libatlas-base-dev imagemagick
sudo apt-get install libboost-filesystem-dev libboost-regex-dev libqt4-core libqt4-dev libqt4-gui libcppunit-dev libxml++2.6-dev mplayer mencoder
sudo apt-get install valgrind electric-fence doxygen
If not, one can edit the scripts/FindCustom.cmake script which is called by FindAll.cmake. This script is called after every other script, thus can override other dependencies if other non-desired versions were detected. To add a new dependency in the custom script, one usually only needs to specify the include and library paths and set the “found” variable. For example, setting the Intel IPP variables:
SET(IPP_FOUND TRUE) INCLUDE_DIRECTORIES("/opt/intel/ipp/current/em64t/include") LINK_DIRECTORIES("/opt/intel/ipp/current/em64t/lib") MESSAGE(STATUS "Found Intel IPP")
To pass a symbol to your code, you can use the following command, for example the __IPP__
symbol to let the code know it should use the IPP related code if given:
SET (CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -D__IPP__”)
If packages are not available through apt-get or port, one can manually download and install sources. Here is a guide for some of the required packages.
tar xzvf cppunit-1.12.1.tar.gz && cd cppunit-1.12.1
./configure && make && sudo make install
make install DESTDIR=my_cppunit_directory
If you installed cppunit in a non-standard directory, add your path in scripts/FindCustom.cmake as described earlier, e.g:
SET(CPPUNIT_FOUND TRUE) INCLUDE_DIRECTORIES("my_cppunit_directory/include") LINK_DIRECTORIES("my_cppunit_directory/lib") MESSAGE(STATUS "Found CPPUNIT")
tar xzvf boost_1_43_0.tar.gz && cd boost_1_43_0
./bootstrap.sh –prefix=${HOME}/installed/boost && ./bjam install –with-filesystem –with-regex
SET(Boost_FOUND TRUE) SET(Boost_INCLUDE_DIRS "$ENV{HOME}/installed/boost/include") SET(Boost_LIBRARY_DIRS "$ENV{HOME}/installed/boost/lib") SET(Boost_MINOR_VERSION 35)
sudo apt-get install libboost-mpi-dev libopenmpi-dev
libboost-serialization libboost-mpi
mpiexec -np N ./mpidetect
http://sourceforge.net/projects/matio/files/latest/download
export CC=/usr/bin/gcc ./configure --prefix=$HOME/matio --enable-mat73=yes --with-default-file-ver=7.3 make && make install
SET(MATIO_FOUND TRUE) SET(MATIO_INCLUDE_DIR "$ENV{HOME}/matio/include") SET(MATIO_LIBRARIES "$ENV{HOME}/matio/lib/libmatio.so")
For sample usage of the wrappers, look at an example usage over here
Note: On windows, eblearn no longer compiles with VS2008 or earlier because of using some implementation features of VC++ 2010 in our new svector class. Hence, ideally, use VS2010 or VS2010 Express editions to compile eblearn from sources.
bin/Release/tester
- To test face detection demo, call: bin/Release/detect tools/data/face/best.conf
==== Database installation ====
The MNIST handwritten digit database is used by the tester to unit-test the learning algorithms.
You can download MNIST from the following website and specify its path to the tester via the MNIST_PATH variable in CMake:
http://yann.lecun.com/exdb/mnist/ Note:when decompressing the MNIST archives, it happens that a dash is replaced by a point by the extractor. Symply rename the extracted file to its original name, e.g.: 't10k-images.idx3-ubyte' should be 't10k-images-idx3-ubyte'.
==== Compilation ====
- To exclude some components such as QT or OpenCV from being used, export the following environment variables with 0 or 1: NOBOOST, NOOPENCV, NOXML, NOQT, NOIPP, NOCBLAS. For example to compile without OpenCV and QT, use NOOPENCV=1 NOQT=1.
- To add extra flags to the compilation, export the EBLFLAGS variable. For example, to dump the states of each layer, add the __DUMP_STATES__
flag as follow: EBLFLAGS=”-D__DUMP_STATES__”
==== CMake hints ====
- When installing an external dependency manually, it may be detected automatically by the existing CMake “find” scripts or not.
If not, one can edit the scripts/FindCustom.cmake script which is called by FindAll.cmake. This script is called after every other script, thus can override other dependencies if other non-desired versions were detected.
- To add a new dependency in the custom script, one usually only needs to specify the include and library paths and set the “found” variable. For example, setting the Intel IPP variables:SET(CPPUNIT_FOUND TRUE)
SET(CPPUNIT_INCLUDE_DIR “B:/windows/cppunit-1.12.1/include”)
SET(CPPUNIT_LIBRARY “B:/windows/cppunit-1.12.1/lib/cppunitd.lib”)
MESSAGE(STATUS “Found CPPUNIT”)
__IPP__
symbol to let the code know it should use the IPP related code if given:
SET (CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -D__IPP__”)
==== Open-source third-party installation ====
=== TortoiseSVN ===
- Download from http://sourceforge.net/projects/tortoisesvn/
- Install, then click 'export' with the eblearn link (svn:svn.code.sf.net/p/eblearn/code/trunk/) to download the eblearn repository.
SET(PTHREAD_FOUND TRUE)
SET(PTHREAD_INCLUDE_DIR “\pthread\Pre-built.2\include”)
SET(PTHREAD_LIBRARY “\pthread\Pre-built.2\lib\pthreadVC2.lib”)
If you are using VC++ 2010 or VC++ 2010 Express,
https://skydrive.live.com/redir.aspx?cid=62ec12f129a50654&resid=62EC12F129A50654!205&parid=62EC12F129A50654!130&authkey=!ABmsE09OCIC88Xw
SET(CPPUNIT_FOUND TRUE) SET(CPPUNIT_INCLUDE_DIR "c:/cppunit-1.12.1/include") SET(CPPUNIT_LIBRARY "c:/cppunit-1.12.1/lib/cppunit.lib") MESSAGE(STATUS "Found CPPUNIT")
For older versions of VC++
SET(CPPUNIT_FOUND TRUE)
SET(CPPUNIT_INCLUDE_DIR “B:/windows/cppunit-1.12.1/include”)
SET(CPPUNIT_LIBRARY “B:/windows/cppunit-1.12.1/lib/cppunitd.lib”)
MESSAGE(STATUS “Found CPPUNIT”)
sudo port install subversion cmake imagemagick boost qt4-mac cppunit doxygen wget
svn co svn:svn.code.sf.net/p/eblearn/code/trunk/ eblearn
-
cd eblearn/tools && make && sudo make install
-
cd eblearn/tools && make test
==== Download ====
- Sources via SVN:
svn co svn:svn.code.sf.net/p/eblearn/code/trunk/ eblearn
sudo port install subversion cmake imagemagick
cd core && make && sudo make install
sudo port install subversion cmake imagemagick boost qt4-mac cppunit doxygen wget
cd tools && make && sudo make install
cd tools && make test
./bin/tester
(Or make test
)./bin/detect tools/data/face/best.conf
The MNIST handwritten digit database is used by the tester to unit-test the learning algorithms.
The tester offers an automatic download of MNIST (you can also download it manually here. Note: when decompressing the MNIST archives, it happens that a dash is replaced by a point by the extractor. Symply rename the extracted file to its original name, e.g.: 't10k-images.idx3-ubyte' should be 't10k-images-idx3-ubyte').
make libs
make release
make debug
make train
or
make metarun metaparse
make detect_debug
make test
make NOOPENCV=1 NOQT=1
or
export NOOPENCV=1 && make
export EBLFLAGS="-D__DUMP_STATES__" && make
sudo make install
make install DIR=“your-install-dir”
or export DIR=“your-install-dir” && make install
sudo port install cmake imagemagick
sudo port install boost cppunit qt4-mac
sudo port install valgrind doxygen
If not, one can edit the scripts/FindCustom.cmake script which is called by FindAll.cmake. This script is called after every other script, thus can override other dependencies if other non-desired versions were detected.
To add a new dependency in the custom script, one usually only needs to specify the include and library paths and set the “found” variable. For example, setting the Intel IPP variables:
SET(IPP_FOUND TRUE)
INCLUDE_DIRECTORIES(”/opt/intel/ipp/current/em64t/include”)
LINK_DIRECTORIES(”/opt/intel/ipp/current/em64t/lib”)
MESSAGE(STATUS “Found Intel IPP”)
To pass a symbol to your code, you can use the following command, for example the __IPP__
symbol to let the code know it should use the IPP related code if given:
SET (CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -D__IPP__”)
If packages are not available through apt-get or port, one can manually download and install sources. Here is a guide for some of the required packages.
./bootstrap; make; sudo make install
configure && make && sudo make install
will do.
How to work with eblearn from within Eclipse:
cmake -G”Eclipse CDT4 - Unix Makefiles
. For more info, see http://www.cmake.org/Wiki/Eclipse_CDT4_Generator