-
Notifications
You must be signed in to change notification settings - Fork 9
/
README
123 lines (88 loc) · 3.68 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
SOPNET
===========
Submodules
----------
If you haven't done so already, make sure that all submodules are up-to-date:
$ git submodule update --init
Build System
------------
Create a build directory (e.g., ./build), change into it and type
$ cmake [path_to_sopnet_directory (e.g. '..')]
Dependencies
------------
cmake will try to find the required packages and tell you which ones are
missing. All packages except for the vigra library and the Gurobi solver can be
installed using the default Ubuntu repositories:
• libboost-all-dev (make sure libboost-timer-dev is included)
• liblapack-dev
• libfftw3-dev
• libx11-dev
• libx11-xcb-dev
• libxcb1-dev
• libxrandr-dev
• libxi-dev
• freeglut3-dev
• libglew1.6-dev
• libcairo2-dev
• libpng12-dev
• libtiff4-dev
• libhdf5-serial-dev (optional)
To get a recent version of vigra, perform the following steps:
Vigra
-----
Get vigra from
$ git clone git://github.com/ukoethe/vigra.git
or
http://hci.iwr.uni-heidelberg.de/vigra/vigra-1.8.0-src.tar.gz
and build it
(http://hci.iwr.uni-heidelberg.de/vigra/doc/vigra/Installation.html). Set the
Vigra_BUILD_DIR to the directory where you built it.
Gurobi Solver
-------------
Download and unpack the Gurobi solver, request a licence (academic licences
are free). Run
$ ./grbgetkey <you-licence-id>
in the gurobi bin directory from an academic domain to download the licence
file (gurobi.lic). Make sure the environment variable GRB_LICENCE_FILE points
to it. Set the cmake variable Gurobi_ROOT_DIR to the path containing the lib
and bin directory.
After cmake finished without errors, run
$ make
Usage
=====
After successful compilation, two executables have been created: 'sopnet' and
'graphcut'.
graphcut
--------
Use this binary to create a set of segmentation hypotheses from membrane
probability images. When started, this binary expects a sequence of membrane
probability images in a directory "./membranes". You can play with the
parameters by adjusting the sliders and walk through the stack by pressing 'a'
and 'd'.
When invoked with the argument 'createSequence' (either via command line or
config file, see ./graphcut --help), 'graphcut' will create a sequence of
segmentations for varying values of the foreground prior. Each segmentation is
put in a directory "./sequence" and an average of all sequences for each
membrane probability image is put into "./slices". The latter version contains
all the relevant information about the extracted hypotheses in its component
tree and is the input to 'sopnet'.
sopnet
------
Sopnet expects four versions of the image stack in four directories:
'./membranes' for the membrane probability images, './slices' for the
segmentation hypotheses (created by a sequence of graph-cuts), './raw' for the
original intensity images, and './groundtruth' for same-intensity-is-same-neuron
ground-truth segmentation.
When invoked with the argument 'train' (either via command line or config file,
see ./sopnet --help), 'sopnet' will use the ground-truth to train a random
forest on neuron slice assignments. The classifier will be stored in
'segment_rf.hdf'. Without the argument, 'sopnet' will reconstruct neurons using
the trained classifier. For both operations, you can specify a subset of the
sections to use from the stack.
Configuration
=============
All program options can be set either by command line or a config file (for a
listing of all available options, type '[name_of_executable] --help'). The
default name of the config file is [name_of_executable].conf. Hence, a symlink
'sopnet-train' to the binary 'sopnet' will read its configuration from
sopnet-train.conf.