Solving the Graph Cut Problem Via L1 Norm Minimization
Total Page:16
File Type:pdf, Size:1020Kb
University of Pennsylvania ScholarlyCommons Technical Reports (CIS) Department of Computer & Information Science 1-1-2007 Solving the Graph Cut Problem via l1 Norm Minimization Arvind Bhusnurmath University of Pennsylvania, [email protected] Camillo J. Taylor University of Pennsylvania, [email protected] Follow this and additional works at: https://repository.upenn.edu/cis_reports Part of the Theory and Algorithms Commons Recommended Citation Arvind Bhusnurmath and Camillo J. Taylor, "Solving the Graph Cut Problem via l1 Norm Minimization", . January 2007. University of Pennsylvania Department of Computer and Information Science Technical Report No. MS-CIS-07-10. This paper is posted at ScholarlyCommons. https://repository.upenn.edu/cis_reports/132 For more information, please contact [email protected]. Solving the Graph Cut Problem via l1 Norm Minimization Abstract Graph cuts have become an increasingly important tool for solving a number of energy minimization problems in computer vision and other fields. In this paper, the graph cut problem is reformulated as an unconstrained l1 norm minimization. This l1 norm minimization can then be tackled by solving a sequence of sparse linear systems involving the Laplacian of the underlying graph. The proposed procedure exploits the structure of these linear systems and can be implemented effectively on modern parallel architectures. The paper describes an implementation of the algorithm on a GPU and discusses experimental results obtained by applying the procedure to graphs derived from image processing problems. Disciplines Theory and Algorithms Comments University of Pennsylvania Department of Computer and Information Science Technical Report No. MS- CIS-07-10. This technical report is available at ScholarlyCommons: https://repository.upenn.edu/cis_reports/132 Solving the Graph Cut Problem via l1 Norm Minimization Arvind Bhusnurmath Camillo J Taylor GRASP Lab GRASP Lab CIS, University of Pennsylvania CIS,University of Pennsylvania [email protected] [email protected] Abstract Graph cuts have become an increasingly important tool for solving a number of energy minimization problems in computer vision and other fields. In this paper, the graph cut problem is reformulated as an unconstrained l1 norm minimization. This l1 norm minimization can then be tack- led by solving a sequence of sparse linear systems involv- ing the Laplacian of the underlying graph. The proposed procedure exploits the structure of these linear systems and can be implemented effectively on modern parallel archi- tectures. The paper describes an implementation of the al- gorithm on a GPU and discusses experimental results ob- tained by applying the procedure to graphs derived from image processing problems. Figure 1. The figure shows the typical grid-like graph found in 1. Introduction vision problems. The dotted curve indicates the min cut. Over the past decade graph cuts have emerged as an important tool for solving a number of energy minimiza- tion problems encountered in computer vision and ma- the graphs that are encountered in vision problems tend to chine learning. In their seminal paper, Kolmogorov and have an extremely structured form - that of a grid. Boykov Zabih [15] show that any energy function that satisfies a and Kolmogorov [4], exploit this fact and tune the Ford- property called regularity can be minimized by finding the Fulkerson algorithm to obtain better performance. The ba- minimum cut of a graph whose edge weights are related to sic idea is to employ two search trees, one emanating from the energy function. The energy functions that are encoun- the source and one from the sink, which are updated over tered in many computer vision problems satisfy this condi- the course of the algorithm. Parallel implementations of the tion which helps to explain the popularity of the approach. push relabel approach on a GPU have also been described Problems like image restoration [5], segmentation [3, 20] by Dixit, Keriven and Paragios [8]. and stereo [10, 14, 21] have all been reduced to graph cut In many cases it is possible to use the solution obtained problems. Figure 1 shows the typical structure of the re- from some prior graph to efficiently compute the mincut of sulting graphs. Here the nodes s and t correspond to class a similar graph. Kohli and Torr [13] use this idea while solv- labels while the interior nodes correspond to the pixels in ing the object-background segmentation problem on video the image. The graph cut methodology can also be ap- sequences. Instead of creating a graph and computing the plied to problems on 3D grids such as surface reconstruc- mincut for each frame, the residual graph from the previous tion [19, 22, 23]. frame is updated with the few edge weights that change and Graph cut problems are usually solved using the equiv- a dynamic maxflow algorithm is used to compute the new alent maxflow formulation with Ford-Fulkerson or Push- maximum flow. Juan and Boykov [11] use an initial par- relabel methods which can be found in standard algorithms tition of the image pixels as a starting cut and then update textbooks such as Cormen et al. [7]. However, most of this solution to obtain the final optimal cut. An initial non- 1 feasible flow is created from the initial cut and this solution The goal of the optimization problem is to maximize the is then driven towards feasibility. This method, known as inner product cTx where c Rm is a binaryvector with +1 Active Cuts can be employed in a coarse to fine scheme entries for all of the edges∈ emanating from s and 0 entries where the cut on a coarse level is used as an initial solution elsewhere; this inner product effectively computes the net for a finer level. The scheme has also been applied to video flow out of node s. segmentation. In order to express the constraint that the net flow asso- Lombaert et al.[17] also solve image segmentation in a ciated with each of the interior nodes in the graph should hierarchical manner by first finding the minimum cut on a be zero we introduce the node edge incidence matrix A coarser graph and then using this cut to build narrow banded Rn×m whose rows and columns correspond to interior∈ graphs at higher resolution that consist of nodes around nodes and graph edges respectively. Each column of this the boundary of the currently segmented objects. In other matrix corresponds to an edge in the graph and will contain words, the coarser level provides an estimate of the seg- at most two non-zero entries, a +1 entry in the row corre- mentation and later stages are used to refine the location of sponding to the node at the head of the arrow associated the boundary. with that edge and a -1 for the node at the other end of This paper describes an alternative approach to solving the edge. Note that those columns corresponding to edges the graph cut problem. Here the graph cut problem is re- starting at s or terminating at t will only contain a single formulated as an unconstrained l1 norm minimization prob- non-zero entry since the A matrix does not contain rows lem. This convex optimization problem can be solved using corresponding to the s and t nodes. the barrier method which effectively reduces the orginal op- The product Ax Rn denotes the sum of the flows im- timization problem to the problem of solving a sequence of pinging upon each of∈ the interior nodes due to the flow as- sparse linear systems involving the graph Laplacian. The signment x. The constraint Ax = 0 reflects the fact that resulting procedure can be implemented using vector op- the net flow at each of the interior nodes should be zero. erations and is well suited for implementation on parallel The vector w Rm represents the non-negative weights architectures. associated with∈ each of the edges in the graph. The inequal- The remainder of the paper is organized as follows: Sec- ities w x and x w reflect the capacity constraints tions 2 and 3 describe the underlying theory and the pro- associated− ≤ with each of≤ the edges. posed implementation. Section 4 presents experimental re- sults obtained with the procedure and Sections 5 and 6 dis- cuss conclusions drawn and future work. cTx maxx 2. Theory st Ax = 0 w x w. (1) The goal of the min-cut problem is to divide the nodes − ≤ ≤ in the graph shown in Figure 1 into two disjoint sets, one A careful reader will note that this formulation differs containing s and the other containing t, such that the sum of slightly from the one presented by Zabih and Kolmogorov the weights of the edges connecting these two sets is min- [15] which makes use of a directed graph. However, it can imized. In the sequel n will denote the number of interior be shown that this formulation allows us to represent pre- nodes in the graph while m will represent the total number cisely the same set of objective functions as the ones de- of edges. This min-cut problem is typically solved by con- scribed in that work. sidering the associated max-flow problem. That is, if we Instead of tackling the linear program described in Equa- view the edges as pipes and the associated edge weights as tion 1 directly, we proceed by formulating the associated capacities, we can consider the problem of maximizing the dual problem. More specifically, the Lagrangian of the lin- total flow between the source node, s, and the sink node, ear program described in Equation 1 has the following form t, subject to the constraint that each of the interior nodes is neither a sink nor a source of flow.