Abstract
In this work we introduce a time- and memory-efficient method for structured prediction that couples neuron decisions across both space at time. We show that we are able to perform exact and efficient inference on a densely connected spatio-temporal graph by capitalizing on recent advances on deep Gaussian Conditional Random Fields (GCRFs). Our method, called VideoGCRF is (a) efficient, (b) has a unique global minimum, and (c) can be trained end-to-end alongside contemporary deep networks for video understanding. We experiment with multiple connectivity patterns in the temporal domain, and present empirical improvements over strong baselines on the tasks of both semantic and instance segmentation of videos. Our implementation is based on the Caffe2 framework and will be available at https://github.com/siddharthachandra/gcrf-v3.0.
Introduction
Semantic image segmentation aims to assign a class label to every pixel in an image. Extending this task to the video domain introduces significant challenges, primarily maintaining temporal consistency while managing computational cost. Standard frame-by-frame processing often results in "flickering" artifacts where object identification fails intermittently due to motion blur or occlusions. While existing solutions like Recurrent Neural Networks (RNNs) or optical flow-based methods address consistency, they are often computationally expensive, difficult to train, or rely on noisy external pre-computations.
The proposed VideoGCRF framework addresses these issues by coupling decisions across multiple frames using a mathematically clean and computationally efficient approach that integrates seamlessly into modern CNN architectures.
The VideoGCRF Framework
The core innovation is the VideoGCRF module, which treats pixels across multiple video frames as nodes in a large-scale graph. The method follows a structured pipeline:
- Unary Potentials ($B$): A standard Fully Convolutional Network (FCN) generates initial class scores for each pixel.
- Pairwise Affinities ($A$): The network learns low-dimensional embeddings for every pixel. The affinity between pixels—both within a frame (spatial) and across frames (temporal)—is calculated as the inner product of these embeddings.
- Inference as a Linear System: Unlike traditional CRFs that rely on approximate mean-field inference, the Gaussian formulation allows for exact inference by solving a linear system: $(A + \lambda I)x = B$.
To maintain efficiency, the authors utilize the Conjugate Gradient method. By decomposing matrix-vector products and employing caching, the computational complexity scales linearly with the number of pixels and embedding dimensions, avoiding the quadratic explosion typical of dense graphs. This differentiable solver enables end-to-end training without the memory overhead of Back-Propagation-Through-Time.
Experimental Evaluation
The method was evaluated on three major benchmarks: DAVIS (video object segmentation), DAVIS-Person (a manually augmented subset for semantic segmentation), and CamVid (road scene understanding).
Key Results
- Performance Gains: VideoGCRF achieved a 4.2% improvement in mean IoU over a ResNet-101 baseline on DAVIS-Person.
- Tracking Accuracy: Integrating the module into an OSVOS-style tracker improved performance from 85.6 to 86.5 mean IoU on the DAVIS validation set.
- Efficiency: Inference is highly optimized; a 4-frame spatio-temporal inference takes approximately 61ms on a GTX-1080 GPU, significantly faster than DenseCRF (~200ms for a single frame).
- Consistency: Qualitative analysis demonstrates that VideoGCRF effectively leverages temporal context to distinguish between similar-looking objects and correct errors caused by local ambiguities.
Discussion and Future Directions
A primary advantage of VideoGCRF is its global optimality; the convex objective ensures a unique global minimum, stabilizing training. Furthermore, the CRF acts as a feature diffusion mechanism, allowing high-confidence labels in one frame to inform and correct predictions in adjacent frames.
Current limitations include a constrained temporal window (typically ~7 frames) due to GPU memory limits when using deep backbones like ResNet-101. Future work may explore incorporating explicit optical flow or weighted temporal distances to refine affinities. The authors also suggest that this efficient linear-system approach could be extended to other dense video tasks such as depth estimation.
Summary updated