Abstract
This paper introduces a high-performance system for real-time object tracking and segmentation in live video using NVIDIA’s CUDA platform. By combining a "focused" graph-cut strategy with a novel, SIMD-friendly parallel push-relabel algorithm, the authors achieve up to a 10x overall speedup over traditional CPU implementations. This advancement makes near-real-time segmentation of VGA-resolution video a practical reality for interactive applications.
Introduction
Image segmentation—the process of partitioning an image into multiple segments to isolate objects from their backgrounds—is a cornerstone of computer vision. It is essential for tasks ranging from gesture recognition to augmented reality. Graph cuts are considered the gold standard for this task because they provide a mathematically optimal way to minimize energy functions associated with pixel labeling.
However, graph-cut algorithms are computationally intensive. While offline segmentation can be accelerated by treating video as a 3D volume, live video tracking requires processing frames as they arrive without knowledge of future data. On standard CPUs, high-resolution video can take seconds per frame, rendering it useless for live interaction. This research addresses this bottleneck by leveraging the parallel processing power of GPUs.
Methodology
The proposed system utilizes a three-pronged approach to achieve real-time performance:
- Focused Graph Cuts: Rather than rebuilding the graph for the entire image every frame, the system identifies a "Region of Interest" (ROI) based on the object's location in the previous frame. By dilating this mask to account for potential motion, the algorithm drastically reduces the number of vertices and edges processed.
- Temporal Seeding via Distance Transforms: To maintain object continuity, the authors use a distance transform on the previous frame's mask. Pixels near the center of the object are assigned a high probability of remaining "object" pixels, while those near the edges are treated with more uncertainty. This creates a robust pixel probability map used to seed the next frame's graph.
GPU Parallelization and Optimization
The core technical innovation lies in the CUDA implementation of the push-relabel algorithm. Standard graph algorithms often involve heavy branching and irregular data structures, which are poorly suited for the Simple Instruction, Multiple Data (SIMD) architecture of GPUs.
To overcome this, the authors "regularize" the graph by adding null edges so that every vertex has the same degree. This allows for loop unrolling and avoids divergent code paths, ensuring that the GPU's thousands of cores remain fully utilized. The algorithm iteratively updates flow and labels until the optimal cut is found.
Key Results and Insights
The GPU implementation demonstrated significant performance gains over CPU-based methods:
- Overall Speedup: The system achieved a 9 to 10 times speedup for high-resolution video.
- Graph Construction: A critical finding was that building the graph (calculating edge weights) often consumes more time than the cut itself. Moving this phase to the GPU resulted in a 26x speedup for graph construction alone.
- Real-Time Benchmarks: For VGA resolution (640x480), the system reached approximately 15 frames per second (fps). While 1080p video improved from 0.3 fps to 3 fps, it remains a target for future hardware generations.
Conclusion and Future Work
By regularizing graph structures and focusing computation on relevant regions, this research demonstrates that graph-cut-based tracking can be moved from offline processing to live, interactive environments. While true 30 fps performance for 1080p video remains a challenge, the current 10x speedup represents a major leap in feasibility. Future work will explore more complex color models, such as Gaussian Mixture Models (GMMs), and further optimization for newer GPU architectures with improved atomic operation support.
Summary updated