Deep Shape-from-Template: Wide-Baseline, Dense and Fast Registration and Deformable Reconstruction from a Single Image

David Fuentes-Jimenez, David Casillas-Perez, Daniel Pizarro, Toby Collins, Adrien BartoliarXiv 2018

TL;DR

DeepSfT is a real-time, deep learning framework that performs 3D reconstruction and registration of deformable objects from a single monocular image. By encoding the object's template directly into the neural network's weights and utilizing a novel semi-supervised training pipeline, it achieves high-accuracy, wide-baseline reconstruction even under challenging conditions like blur, low texture, and significant occlusions.

What Problem Does This Paper Address?

Shape-from-Template (SfT) is a classic computer vision problem: given a single image and a known 3D model (template), how do you determine the object's current 3D deformation and its exact alignment with the image pixels?

This is notoriously difficult for several reasons:

  1. Wide-Baseline Challenges: Most existing methods require a "short-baseline" (a video sequence or a good initial guess). If the object moves significantly or the camera starts from a fresh frame, these methods often fail.
  2. Complexity and Topology: Previous Deep Neural Network (DNN) approaches were limited to simple, rectangular meshes (like a flat sheet of paper). They couldn't handle complex, "volumic" objects like a shoe or a stuffed animal.
  3. The Render Gap: Training on synthetic data is easy because you have perfect labels, but these models often fail on real-world images due to differences in lighting, noise, and camera response.
  4. Camera Dependency: Most DNN models are "locked" to the specific camera intrinsics used during training, making them impractical for general use.

Methods

The authors introduce DeepSfT, a fully convolutional residual encoder-decoder architecture based on ResNet50. Its key innovations include:

  • Object-Specific Encoding: Instead of passing the template as an input, the network "memorizes" the object's geometry in its weights during training. This allows it to handle arbitrary topologies and high-resolution meshes (e.g., >36,000 vertices) without increasing inference time.
  • Refinement Blocks: The architecture features dedicated blocks for refining depth and registration. This modularity allows for a sophisticated three-step training process.
  • Semi-Supervised Training:
    1. Global Training: Supervised learning using 60,000 synthetic renders (Blender).
  • Depth Refinement: Fine-tuning on real RGB-D data. Since RGB-D sensors provide depth but not registration labels, this step uses a supervised depth loss.
  • Registration Refinement: A self-supervised step using a "photo-consistency" loss. The network warps the template texture to match the input image; the better the match, the lower the loss.
  • Geometry Adaptation: To handle different cameras, the authors use a known affine transform ($A = K_{train}K_{test}^{-1}$) to warp the input image into a "canonical" geometry that matches the training camera's intrinsics.
  • Physics-Based Shape Completion: For volumic objects, the network only "sees" the visible side. The authors use an As-Rigid-As-Possible (ARAP) post-processing step to solve for the occluded parts of the object based on physics-based deformation constraints.

Datasets

The researchers evaluated DeepSfT on five distinct templates:

  • DS1, DS2, DS5: A4 paper sheets with varying levels of texture (from very poor to rich).
  • DS3: A volumic soft toy (dinosaur) with complex geometry (36,256 mesh faces).
  • DS4: A volumic adult sneaker.

Data Sources: * Synthetic: 60,000 images per object generated in Blender with random quasi-isometric deformations, viewpoints, and lighting. * Real: Captured using a Microsoft Kinect V2 (for training/testing), an Intel Realsense D435, and a GoPro Hero V3 (to test camera generalization).

Key Insights and Ideas

  • Dense Maps over Vertex Regression: Unlike previous DNNs that tried to predict the $(x, y, z)$ coordinates of every mesh vertex, DeepSfT predicts dense optical flow and depth maps. This makes the network independent of the mesh's resolution.
  • The Power of Photo-Consistency: By using the template's texture to "re-synthesize" the image, the model can learn accurate registration from real-world data without needing human-annotated labels.
  • Decoupling Visible and Hidden: By focusing the DNN on the visible surface and using a physics-based optimizer (ARAP) for the hidden parts, the system combines the speed of deep learning with the reliability of classical mechanics.

Key Results

  • Accuracy: DeepSfT achieved a reconstruction RMSE (Root Mean Square Error) of under 2mm on synthetic data and under 10mm on real data. This significantly outperformed classical methods (like CH17) and other DNN baselines (like IsMo-GAN).
  • Speed: The system runs at approximately 20 FPS on a single NVIDIA GTX 1080 GPU, making it viable for real-time Augmented Reality (AR) applications.
  • Robustness: The model successfully handled wide-baseline scenarios where the object was heavily deformed, partially occluded, or blurred—conditions that typically cause classical registration methods to fail catastrophically.
  • Generalization: The geometry adaptation module allowed the model to maintain high accuracy even when switching between a Kinect and a Realsense camera without retraining.

Limitations and Future Work

  • Object Specificity: Currently, a separate network must be trained for every new object. The authors suggest future work could involve using object detectors to select from a library of pre-trained networks or using the template as an explicit input.
  • Deformation Limits: The model is trained on "quasi-isometric" deformations (stretching/compressing is limited). It may struggle with highly elastic materials or topological changes (like tearing).
  • Training Data Requirements: While the semi-supervised approach helps, the model still requires a high-quality 3D scan (template) and a significant amount of synthetic data to start.

Overall, DeepSfT represents a major step toward bringing robust, real-time deformable tracking to consumer-grade hardware.

Summary updated

BibTeX
@misc{fuentesjimenez2018deep,
  author = {David Fuentes-Jimenez and David Casillas-Perez and Daniel Pizarro and Toby Collins and Adrien Bartoli},
  title = {{Deep Shape-from-Template: Wide-Baseline, Dense and Fast Registration and Deformable Reconstruction from a Single Image}},
  year = {2018},
  eprint = {1811.07791},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.07791},
}

Loading related content...

Figure