Nested Pictorial Structures

Steve Gu, Ying Zheng, Carlo TomasiECCV 2012

Abstract

We propose a theoretical construct coined nested pictorial structure to represent an object by parts that are recursively nested. Three innovative ideas are proposed: First, the nested pictorial structure finds a part configuration that is allowed to be deformed in geometric arrangement, while being confined to be topologically nested. Second, we define nested features which lend themselves to better, more detailed accounting of pixel data cost and describe occlusion in a principled way. Third, we develop the concept of constrained distance transform, a variation of the generalized distance transform, to guarantee the topological nesting relations and to further enforce that parts have no overlap with each other. We show that matching an optimal nested pictorial structure of K parts on an image of N pixels takes O(NK) time using dynamic programming and constrained distance transform. In our MATLAB/C++ implementation, it takes less than 0.1 seconds to do the global optimal matching when K = 10 and N = 400 x 400. We demonstrate the usefulness of nested pictorial structures in the matching of objects of nested patterns, objects in occlusion, and objects that live in a context.

Introduction

Traditional computer vision frameworks often rely on "Pictorial Structures" (PS), which model objects as a collection of parts connected by flexible "springs." While effective for articulated objects like the human body—where the head, torso, and limbs are adjacent—these models struggle with patterns characterized by containment. In many real-world scenarios, parts are recursively nested: a pupil is inside an eye, which is inside a face, which is inside a person.

The "Nested Pictorial Structures" (NPS) framework, introduced by Steve Gu, Ying Zheng, and Carlo Tomasi, extends the classic PS model to handle these "Russian nesting doll" hierarchies. By explicitly modeling topological containment, the authors address two major hurdles in object detection: pixel "double-counting" and principled occlusion handling.

Problem Statement

Standard detection algorithms often fail when dealing with nested structures for two primary reasons:

  1. Over-counting: Sliding window detectors for a face and an eye will count the eye's pixels twice, distorting the statistical model and the final detection score.
  2. Occlusion: When one object partially hides another, standard models lack a structural way to account for the missing or replaced features.

NPS bridges this gap by treating topological containment as a fundamental property of the object model.

Methodology

The authors introduce three core innovations to the classic PS framework to enable efficient and accurate nested part matching.

1. The Nesting Graph

Instead of a simple tree of adjacent parts, NPS defines a "nesting forest." In this graph, edges represent an "is-contained-in" relationship. This ensures that while the geometric arrangement of parts can deform, the underlying topology—the "what is inside what"—remains invariant.

2. Nested Features

To solve the over-counting problem, the authors utilize the subtractive property of histograms. If part $B$ is nested within part $A$, the features for $A$ are calculated by taking the features of the entire window $A$ and subtracting the features of $B$. This allows for a precise accounting of pixel data, where each pixel contributes to exactly one part's cost.

The decomposition of a nested pictorial structure into its constituent parts, illustrating how complex hierarchies are broken down for feature calculation.

3. Constrained Distance Transform

Global optimization in traditional PS relies on the Generalized Distance Transform to find optimal part locations in $O(N)$ time. NPS introduces a Constrained Distance Transform that enforces two critical rules:

  • Containment: Child parts must remain within the boundaries of their parent.
  • Non-overlap: Sibling parts (parts at the same hierarchical level) are prohibited from overlapping.
The constrained distance transform ensures that parts remain within their parent boundaries and do not overlap with siblings, using a Voronoi-based approach in the $l_\infty$ metric.

Experimental Evaluation

The model was evaluated using the Caltech-256 dataset, focusing on 12 categories with clear nesting or context relations, such as pandas, surfers, clownfish, and the Sphinx.

  • Training: Hierarchies were defined through manual annotation of nested rectangular windows.
  • Testing: A linear SVM classifier combined with an image pyramid was used to match the NPS against test images, seeking the globally optimal configuration.

Results and Discussion

The NPS framework maintains the $O(NK)$ matching complexity of traditional PS, where $N$ is the number of pixels and $K$ is the number of parts. In practice, a MATLAB/C++ implementation achieved global optimal matching in less than 0.1 seconds for an image with 10 parts at $400 \times 400$ resolution.

Qualitatively, the model excelled at localizing complex nested patterns, such as a "clownfish in an anemone" or a "surfer against water." It proved particularly effective at separating objects from their immediate context, such as distinguishing the Sphinx from the surrounding desert and pyramids.

Conclusion and Future Work

The primary limitation of the current NPS approach is the requirement for manual definition of the nesting relations during training. Future research directions include developing algorithms for the automatic discovery of nesting hierarchies from raw data and scaling the annotation process for larger datasets. Despite these challenges, NPS provides a robust and efficient framework for modeling objects where topology is as important as geometry.

Summary updated

BibTeX
@inproceedings{gu2012nested,
  author = {Steve Gu and Ying Zheng and Carlo Tomasi},
  title = {{Nested Pictorial Structures}},
  booktitle = {European Conference on Computer Vision},
  year = {2012},
  url = {https://openreview.net/forum?id=BJZhVYZdbB},
}
Figure