Graphics Capsule: Learning Hierarchical 3D Face Representations from 2D Images

Chang Yu, Xiangyu Zhu, Xiaomei Zhang, Zhaoxiang Zhang, Zhen Lei

TL;DR

The paper introduces the Inverse Graphics Capsule Network (IGC-Net), a novel framework that learns hierarchical 3D face representations from unlabeled 2D images in an entirely unsupervised manner. By defining a new "graphics capsule" parameterized by explicit computer graphics properties (depth, albedo, and pose), the network successfully decomposes faces into semantically consistent 3D parts and reassembles them into a view-independent 3D object.

What Problem Does This Paper Address?

When humans look at an object, our brains naturally decompose it into a hierarchy of 3D parts (e.g., eyes, nose, and mouth making up a face), allowing us to recognize it from almost any angle. Replicating this intrinsic 3D perception in artificial neural networks remains a major challenge.

While previous capsule networks successfully achieved unsupervised part decomposition, they were restricted to 2D space. They operated via an "analysis-by-synthesis" approach that essentially treated image reconstruction like painting with 2D stickers. This works well for flat objects or perfectly frontal faces, but fails to handle the 3D geometric transformations caused by large head rotations and viewpoint changes. The authors bridge this gap by materializing David Marr’s classic vision theory—building observer-independent, object-centered 3D descriptions—directly within a capsule network architecture.

Methods

IGC-Net utilizes an unsupervised analysis-by-synthesis pipeline that forces the network to learn 3D geometry to accurately reconstruct 2D images.

Figure 1. Overview of the Inverse Graphics Capsule Network (IGC-Net). The input image is first encoded to global shape and albedo embeddings and then sent to a decomposition module to get the spatially-decoupled part-level graphics capsules. Afterward, these capsules are decoded to get the explicit 3D descriptions of parts, which are assembled by their depth to generate the object capsules as object-centered representations. Finally, the object capsules are illuminated, posed, and rendered to fit the input image. After training, the learned graphics capsules naturally build hierarchical 3D representations.

The architecture consists of several key components:

  1. Image Encoder: A CNN maps an input image into global shape and albedo embeddings.
  2. Graphics Decomposition Module (GDM): This module breaks down the global embeddings into distinct part-level embeddings. It uses cross-attention between the global embeddings and a set of learned "implicit part templates" (bases). To prevent information leakage between parts, a hard-softmax (one-hot) attention mechanism ensures each embedding dimension is strictly dedicated to a single part.
  3. Capsule Decoder: Decodes the part embeddings into explicit 3D graphics capsules. Each part capsule contains interpretable computer graphics (CG) parameters: a part-level depth map ($D$), an albedo map ($A$), and a 3D pose ($p$).
  4. Depth-Based Merge: The part capsules are assembled based on their depth values (closer parts obscure further parts) to form a unified, object-level 3D capsule.
  5. Differentiable Renderer: The final 3D object capsule is illuminated, posed, and rendered back into a 2D image.

The entire network is trained end-to-end using a combination of reconstruction loss, perceptual loss, a spatial sparsity constraint (to prevent a single capsule from absorbing the whole object), and a contrastive semantic loss to ensure that the same capsule consistently represents the same facial feature across different identities.

Datasets

The authors evaluated IGC-Net on three prominent face datasets:

  • CelebA: Over 200,000 "in-the-wild" face images, used to test performance under real-world variations and for unsupervised face segmentation.
  • BP4D: A controlled 3D facial expression database used to evaluate unsupervised part segmentation.
  • Multi-PIE: A dataset containing controlled pose (yaw variations from -60° to +60°) and illumination changes, ideal for testing view-independence and face recognition.
  • Extension: The authors also successfully tested the model on a collection of cat faces to demonstrate its adaptability to other object categories.

Key Insights and Ideas

  • 3D Means View Independence: By moving from 2D templates to 3D graphics capsules, the learned representations become inherently robust to viewpoint changes. The network learns what a nose or eye looks like in 3D canonical space, making its features highly consistent even when matching a profile view to a frontal view.
  • Opening the Black Box: Because the graphics capsules use explicit physical parameters, they allow researchers to probe how the network perceives faces. By applying attention weights to the learned embeddings, the authors discovered that albedo (texture) is significantly more critical for face recognition than shape (accounting for roughly 70% vs 34% of the importance weight).
  • Feature-Specific Importance: The interpretable capsules revealed that the albedo of the eyes is the single most vital component for identifying a face, while the shape of the nose holds more discriminatory power than the shape of any other facial part.

Key Results

Unsupervised Face Segmentation

The silhouettes of the discovered 3D parts were evaluated as segment maps against state-of-the-art unsupervised segmentation methods using Normalized Mean Error (NME). IGC-Net significantly outperformed existing methods by maintaining semantic consistency across large poses.

  • CelebA ($NME_L$): 11.84 (Ours) vs. 18.72 (SCOPS) vs. 21.25 (HP-Capsule)
  • BP4D ($NME_L$): 6.35 (Ours) vs. 9.10 (SCOPS) vs. 8.81 (HP-Capsule)

Cross-View Face Recognition

When part embeddings were fed into a linear classifier to recognize identities across different head rotations on the Multi-PIE dataset, the 3D representations demonstrated superior consistency over standard 2D autoencoders.

  • Cross-View Accuracy: 95.1% (IGC-Net) vs. 91.2% (2D Autoencoder)
Figure 5. The comparison of the representation consistency un- der different views between 2D representations and 3D represen- tations on Multi-PIE. (a) The recognition accuracy. The repre- sentations are sent to a linear classifier for classification. (b) The similarity matrices of the 2D and 3D representations are subtracted and shown as a heatmap. The score higher than 0 indicates 3D is better than 2D.

Limitations and Future Work

While not explicitly detailed in a dedicated limitations section, a few constraints are apparent from the methodology:

  • Symmetry Assumptions: The framework relies on the underlying bilateral symmetry of faces (inherited from its unsupervised 3D reconstruction baselines), which might struggle with asymmetric lighting, severe occlusions (e.g., hands over faces, sunglasses), or extreme expressions.
  • Fixed Part Count: The number of part capsules ($M=6$) must be manually predefined. Dynamically discovering the optimal number of parts for more complex, arbitrary objects remains an open area for future research.

Summary updated

BibTeX
@inproceedings{yu2023graphics,
  author = {Chang Yu and Xiangyu Zhu and Xiaomei Zhang and Zhaoxiang Zhang and Zhen Lei},
  title = {{Graphics Capsule: Learning Hierarchical 3D Face Representations from 2D Images}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
}
Figure