This code is based on Aurelien Lucchi code, SSVM. It has been adapted to compile on MACOSX with CLANG.
Things are not all set yet. Any comment/remark is welcome --> [email protected]
- core contains the core classes
- lib contains the third party libraries used by the code
- opencv-dev
- libsvm (modified to be multi-thread)
- ITK 4.8.X (install with review flag ON)
- freeglut3-dev libglew1.5-dev libxmu-dev
- sudo apt-get install g++ make cmake doxygen graphviz libboost-dev libboost-graph-dev libboost-program-options-dev
- gnuplot
Windows will have to at least download cmake-gui, opencv and boost.
- libDAI
- slic
- auxiliary ITK classes
clone with
`git clone https://github.com/elPhasmoLoco/ilastik-ssvm
Install :
-
Install the code in $LOCALHOME/src/EM/superpixels/ or $HOME/src/EM/superpixels/
-
Compile third-party libraries (linux):
-
Go to slic/build and type
cmake .; make
(you might have to create the build directory) -
Go to libDAI024/build and type
cmake ..; make
-
ITK : Download version 4.80.1 from the web sitei and use
ccmake ..
to set review flag to ON. Then build -
Compile third-party libraries (windows):
-
Go to slic/build and type
cmake-gui ..
and thenMSBuild.exe supervoxel.sln /p:Configuratio=Release /m
-
Go to libDAI024/build and type
cmake-gui ..
-
ITK : Download version 3.20.1 from the web site and use
cmake-gui
to set review flag to ON. Then build. -
Main code
mkdir build
cd build
ccmake ..
make -j
You can edit CMakeLists_common.txt
or just change the flags with the ccmake interface.
You might want to turn off some of the dependencies. Look at the USE_???
flags (you might need to toggle advanced mode pressing t
key).
You can download a test volume and config file from dataset and config file. From the directory where the binaries are located, we would run:
./train sample_config.txt
./predict -c sample_config.txt -w parameter_vector0/iteration_400.txt -v 1 -g 12
./predict -c sample_config.txt -w parameter_vector0/iteration_400.txt -v 1 -g 12 > output_predict.txt 2>&1
change the paths where images are located accordingly on the config to run the algorithm on your dataset.
On windows, when building slic/superpixels might give the error "No Target Architecture". Solve by adding the definition SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_AMD64_")
to the CMakeLists.txt