cuda cuts fast graph cuts on the gpu

8
CUDA Cuts: Fast Graph Cuts on the GPU Vibhav V ineet and P . J. Narayanan Centre for Visual Information Technology International Institute of Information Technology Hydera bad, 500032. India {vibhavvinet@students.,pjn@}iiit.ac.in Abstract Graph cuts has become a powerful and popular opti- mization tool for energies dened over an MRF and have  found applications in image segmentation, stereo vision, imag e restor ation, etc. The maxow/mincut algor ithm to comput e graph-c uts is computation ally heavy . The best- reported implementation of graph cuts takes over 100 mil- liseconds even on images of size  640 × 480  and cannot be used for real-time applications or when iterated applica- tions are needed. The commodity Graphics Processor Unit (GPU) has eme rged as an economical and fast computation co-processor recently . In this paper, we present an imple- mentation of the push-relabel algorithm for graph cuts on the GPU. We can perform over 60 graph cuts per second on 1024×1024 images and over 150 graph cuts per second on 640 ×480 images on an Nvidia 8800 GTX. The time for eac h comple te gra ph- cut is about 1 millis econd whe n onl y a  few weights change from th e previous graph, as on dynamic graphs resulting from videos. The CUDA code with a well- dened interface can be downloaded for anyone’s use. 1. Introduction Graph cuts have found applications in a large range of Comput er Vision proble ms as a tool to nd the optimal MAP estimation of images dened over an MRF lattice. Though the mincut/maxow algorithm was introduced into Compu ter Vis ion early [17, 14], thei r potent ial was ex- ploited only after the work of Boykov et al. [5, 6] and their characterization of functions that can be optimized using graph cuts [25] . Graph -cuts ha ve since then been applied to several Computer Vision problems like image and video segmentat ion [29, 27], ster eo and moti on [5, 31], multi - camera scene reconstruction [24, 20], etc. Kolmogorov and Zabih chara cteri zed the ene rgy funct ions which c an be min- imized via graph cuts [25]. Improving the computat ional pe rf or ma nce of the max ow alg ori thm has als o bee n an act iv e area of re- cent resea rch. Boyk ov and Kolmogor ov prese nted an al- gorithm to reuse the search trees [4]. Dynamic graph cut reparametrizes the graph and reuses the residual ow when only a few weights change from one minimization to the next [22, 23]. They could compute the graph cut on a new frame of a video in about 70 milliseconds by starting with the residua l ow of the previo us frame [23]. Acti ve graph cuts, reuse the  st-mincut solution corresponding to the pre- vious MRF instance to generate the initialization for the next MRF [21]. The best implementat ion of it take s about 100 milliseconds on a  512 ×512 image. The contemporary graphics processor unit (GPU) has huge computation power and can be very efcient on many data-parallel tasks. They have recently been used for many non-graphics applications [16] and many in Computer Vi- sion. OpenV idia [13] is an open source packa ge that im- plements different computer vision algorit hms on the GPUs using OpenGL and Cg. Sinha et al. implemented a featur e based tra cker to the GPU [30]. Sift GPU implements the SIFT descri ptor on the GPU [32]. The GPU, however , has had a difcult programming model that followed the tradi- tional graphics pipeline. This made it difcult to implement general graph algorithms on them. The potential of the GPU for non-graphic applications has resulted in more traditional parallel programming in- ter fa ces tha t treat the GPUs as mas si vel y par all el co- processors. The Compute Uni ed Devic e Arc hit ect ure (CUDA) from Nvidia [9] and the Close-To-Metal (CTM) from ATI/AMD [8] are such interfaces for modern GPUs. These enable the accel erat ion of algor ithms on irre gular graphs [18] and other application involving graphs. We present a fast implementation of the push-relabel al- gorithm for mincut/maxow algori thmfor graph-cuts in thi s paper using CUDA. Our impl ement ation of the basic gra ph- cut can perform over 60 graph-cuts per second on images of size 1024 ×1024 and over 150 graph-cuts per second on images of size  640 × 480  on an Nvidia 8800 GTX GPU. Each graph cut can be computed in about 1 millisecond on 978-1-4244-2340-8/08/$25.00 ©2008 IEEE

Upload: asdcdvfd

Post on 02-Jun-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CUDA Cuts Fast Graph Cuts on the GPU

8/11/2019 CUDA Cuts Fast Graph Cuts on the GPU

http://slidepdf.com/reader/full/cuda-cuts-fast-graph-cuts-on-the-gpu 1/8

Page 2: CUDA Cuts Fast Graph Cuts on the GPU

8/11/2019 CUDA Cuts Fast Graph Cuts on the GPU

http://slidepdf.com/reader/full/cuda-cuts-fast-graph-cuts-on-the-gpu 2/8

Page 3: CUDA Cuts Fast Graph Cuts on the GPU

8/11/2019 CUDA Cuts Fast Graph Cuts on the GPU

http://slidepdf.com/reader/full/cuda-cuts-fast-graph-cuts-on-the-gpu 3/8

Page 4: CUDA Cuts Fast Graph Cuts on the GPU

8/11/2019 CUDA Cuts Fast Graph Cuts on the GPU

http://slidepdf.com/reader/full/cuda-cuts-fast-graph-cuts-on-the-gpu 4/8

Page 5: CUDA Cuts Fast Graph Cuts on the GPU

8/11/2019 CUDA Cuts Fast Graph Cuts on the GPU

http://slidepdf.com/reader/full/cuda-cuts-fast-graph-cuts-on-the-gpu 5/8

Page 6: CUDA Cuts Fast Graph Cuts on the GPU

8/11/2019 CUDA Cuts Fast Graph Cuts on the GPU

http://slidepdf.com/reader/full/cuda-cuts-fast-graph-cuts-on-the-gpu 6/8

Page 7: CUDA Cuts Fast Graph Cuts on the GPU

8/11/2019 CUDA Cuts Fast Graph Cuts on the GPU

http://slidepdf.com/reader/full/cuda-cuts-fast-graph-cuts-on-the-gpu 7/8

Page 8: CUDA Cuts Fast Graph Cuts on the GPU

8/11/2019 CUDA Cuts Fast Graph Cuts on the GPU

http://slidepdf.com/reader/full/cuda-cuts-fast-graph-cuts-on-the-gpu 8/8