this work was supported bu eu projects fp7-ict-247870 nifti and fp7-ict-247525 humavips and the...
TRANSCRIPT
This work was supported bu EU projects FP7-ICT-247870NIFTi and FP7-ICT-247525 HUMAVIPS and the Czech project 1M0567 CAK
25-27 July, 2011EMMCVPR
Center for Machine Perception
Czech Technical University in Prague
A Distributed Mincut/Maxflow Algorithm Combining Path Augmentation and Push-Relabel
Alexander Shekhovtsov and Václav Hlaváč
2/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Overview
Goals
Main Results
Preliminary results presented on workshop 2010 in Kiev (not entirely correct)
3/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Mincut in Computer Vision
Test Problems (University of Western Ontario)
4/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Mincut in Computer Vision
Discrete Energy Minimization via Mincut
5/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Mincut
Capacitated network
6/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Mincut
Minimum s-t Cut
7/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Augmenting Path Approach
Path Augmentation
8/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Augmenting Path Approach
Residual Network
9/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Augmenting Path Approach
Costs of all cuts are changed by a constant
10/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Augmenting Path Approach
Augment next path
11/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Augmenting Path Approach
Minimum Cut in Residual Network
12/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Push-Relabel Approach
Extended transformation
excess
excess
13/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Push-Relabel Approach
14/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Push-Relabel Approach
15/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Push-Relabel Approach
16/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Push-Relabel Approach
17/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Push-Relabel Approach
18/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Distributed Algorithms
CPU CPU
Memory
CPU
Mem
CPU
Mem
Quick
Slow
Distributed Sequential
CPU
Mem
Quick
Slow
Disk
Distributed Parallel
Shared Memory Parallel
CPU
Memory
Sequential
Distributed Model – Divide Computation AND Memory
19/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Existing Distributed Algorithms
Push-Relabel [Goldberg ‘94]
Region Discharge [Delong and Boykov, CVPR‘08]
t
20/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Existing Distributed Algorithms Adaptive Bottom-up Merging [Liu and J. Sun, CVPR‘10]
t
21/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Existing Distributed Algorithms Dual Decomposition for Mincut [Strandmark and Kahl, CVPR‘10]
¡ 1
2
2
1 ¡ 3
1 2
2
1
1
¡ 1
2
2
1
1
¡ 3
0 21
2
2
¡ 12
¡ 1
2
1¡ ¸1 1+¸1
1¡ ¸2 0+¸2
v v0 v00M N
¡ 1
2
2
1
1
¡ 3
1
0 21
1
1
0
1
1
2
2
¡ 1
v0 v00
22/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Existing Distributed Algorithms Dual Decomposition for Mincut [Strandmark and Kahl, CVPR‘10]
23/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
New Algorithm New Distance Function The Algorithm Parallel Version Complexity Bound Experimental Confirmation
24/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
New Distance Function
length of the path = number of boundary edges
distance = length of a shortest path to the sink
d¤B(u) = 2
d¤B(v) = 0
tValid Labeling – distance underestimate
25/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
The Algorithm: Augmenting Path Region Discharge
t
1. Augment paths to the sink
2. Augment paths the boundary with label 0
3. Augment paths the boundary with label 1
...
Relabel the interior vertices
sweep
estimate ofthe shortestway to the sink
26/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Parallel Version
t
parallel sweep
Conflicts are resolved by canceling one of the flows (similar to asynchronous parallel push-relabel [Goldberg and Tarjan 88])
all regions discharged concurrently
27/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Complexity Bound
28/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Experimental Confirmation
S-PRD details: highest label first push-relabel (HI-PR), region-gap heuristic, region-relabel heuristic, global gap heuristicS-ARD details: global gap heuristic
S-PRD: Sequential Push-Relabel Region DischargeS-ARD: Sequential Augmenting path Region Discharge
Test problems: 2D grid with regular connectivity and random costs
29/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Efficient Implementation Standard Heuristics: global relabel and global gap Boundary Relabel Partial Discharges Boundary Search Trees
30/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Efficient Implementation Global Relabel Heuristic = compute exact distance, O(m) time
Global Gap Heuristic (sufficient condition of sink unreachability)
t
… cannot reach sink
cannot be in the sink set of a minimum cut
“decided nodes”
31/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
not possible
Efficient Implementation
Boundary Relabel
0
211
2
1
1
1
12
2
1
1
0
1
21
2
2
1
1
0
31
42
2
33
A valid labeling ofboundary nodes
Group nodes by their label within each region
Compute exact distanceon the auxiliary graph
Add possible links (red)
Improve labeling, knowing only the information on the boundary?
do not know how the vertices linked inside
Result: a (better) valid labeling. In the limit of small regions = global relabel.
32/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Efficient Implementation
Partial Discharges
1. Augment paths to the sink
2. Augment paths the boundary with label 0
3. Augment paths the boundary with label 1
...
Relabel the interior vertices
execute only this step in sweep 0
33/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Efficient Implementation
Partial Discharges
1. Augment paths to the sink
2. Augment paths the boundary with label 0
3. Augment paths the boundary with label 1
...
Relabel the interior vertices
execute up to here in sweep 1
34/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Efficient Implementation
Partial Discharges
1. Augment paths to the sink
2. Augment paths the boundary with label 0
3. Augment paths the boundary with label 1
...
Relabel the interior vertices
execute up to here in sweep 2
Prevents sending the flow in a wrong direction (redundant work)
Boundary Relabel + Partial Discharges effect:
35/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
00
Efficient Implementation
Boundary Search Trees
0
0
1
t
0
0
1
t
0
0
1
t1 1 11
2 00
Residual region network
Search trees of thesink and boundaryvetices
Labels of the innervertices are determinedby their tree root
Tree with higher root cannot overtake lower
(¡ 1)
Saves computation between sweeps, Integrates region-relabel into augmentation.
Find augmenting paths and encode labeling.
36/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Results Dependence on Partition Sequential Competition Parallel Competition Local Problem Reduction
37/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Results: Dependence on Partition
BL06-gargoyle-smlcell complex32x45x32x24partitioned by vertex number
LB07-bunny-med3D 6-connected202x199x157sparse datasliced along dimensions
liver.n6.c103D 6-connected170x170x144sliced along dimensions
Stable over partitions
38/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Results: Sequential CompetitionBK – Augmenting Path [Boykov-Kolmogorov]HIPR – Highest level Push-Relabel [Goldberg-Tarjan, Cherkassky]S-ARD – Sequential Augmenting Path Region DischargeS-PRD – Sequential Push-Relable Region Discharge ([Delong-Boykov], our impl.)
39/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Results: Sequential CompetitionBK – Augmenting Path [Boykov-Kolmogorov]HIPR – Highest level Push-Relabel [Goldberg-Tarjan, Cherkassky]S-ARD – Sequential Augmenting Path Region DischargeS-PRD – Sequential Push-Relable Region Discharge ([Delong-Boykov], our impl.)
...
40/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Results: Parallel Competition (4 CPUs)DD – Dual Decomposition [ Strandmark and Kahl ’10] 2/4 Regions
RPR – Region Push-Relable [Delong and Boykov ‘08] impl. by Sameh Khamis
not applicable
not applicable
reduced graph
best parameters
P-ARD speed-up over BK: 0.8 – 4, robust method, few sweeps (message exchanges)
shared memory
Adaptive Bottom-up Merging [Liu and J. Sun ‘10] achieves near linear speed-up over BK
41/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Local Problem Reduction How many vertices can be decided optimally by considering
regions separately?
16 regions 64 regions
2D stereo problems are largely decided locally. Other problems are significantly harder.
s
t
BR
weak source
strong source
strong sink
undecided
42/9
Alexander Shekhovtsov & Vaclav Hlavac, 2011
Conclusion New distributed algorithm Terminates in at most B2+1 sweeps (few in practice)
Sequential Algorithm1) competitive with sequential solvers2) uses few sweeps (= loads/unloads of regions)3) suitable to run in the limited memory model
Parallel Algorithm 1) competitive with shared memory algorithms2) uses few sweeps (= rounds of message exchange)3) suitable for execution on a computer cluster
Implementation can be specialized for regular grids (less memory/faster)
(?) no good worst case complexity bound in terms of elementary operations
Thanks for you comments