TemplateNet for Depth-Based Object Instance Recognition

Ujwal Bonde, Vijay Badrinarayanan, Roberto Cipolla, Minh-Tri PhamarXiv 2015

TL;DR

TemplateNet is a novel deep learning architecture for depth-based object instance recognition that builds prior 3D geometric knowledge directly into a neural network. By introducing a parameter-free "template layer," the network enforces structured sparsity on its feature maps, acting as a powerful regularizer that yields cleaner filters, interpretable feature visualizations, and state-of-the-art recognition performance.

What Problem Does This Paper Address?

Recognizing specific object instances and estimating their 3D pose from 2.5D depth images is a foundational challenge in robotics and computer vision. While Convolutional Neural Networks (CNNs) excel at general image classification, applying them directly to depth-based instance recognition often leads to overfitting. Standard CNNs are heavily over-parameterized and lack the inductive biases needed to handle geometric data efficiently, frequently resulting in noisy, unstructured filters.

Traditional methods like LineMod use manually designed geometric templates to match shapes, which are highly interpretable but struggle in heavy clutter due to a lack of discriminative learning. Conversely, standard sparsity techniques for deep networks (like $L_1$ regularization) produce unstructured feature maps and require complex, non-end-to-end optimization schemes. TemplateNet bridges this gap by bringing the geometric intuition of traditional template matching into an end-to-end trainable deep learning framework.

Methods

TemplateNet splits the standard CNN pipeline into three distinct modules, as illustrated in the block diagram below:

Figure 1. Top pane: A block diagram view of our proposed architecture. TemplateNet contains three modules (see section 3): (a) Base network: extracts the feature masks; (b) Template layer: introduces sparsity to the feature masks using prior knowledge; (c) Classification network: outputs the final predictions. TemplateNet allows us to visualize these intermediate feature masks giving an intuition of the learnt features. For more visualization results please see figure 3. Bottom pane: The final architecture that we use in our experiments. The numbers quoted correspond to the image/feature map dimensions and the number of channels used.
  1. Base Network: Takes a normalized 3-channel surface normal image (derived from an "OrthoPatch" to maintain physical scale) and extracts intermediate feature masks.
  2. Template Layer: This is the core innovation. It is an element-wise multiplicative layer whose weights are fixed and determined by the 3D surface normals of the object viewed from 45 different pre-computed viewpoints. Because these templates possess rigid spatial structures, they force the network's activations to be sparsely distributed in a highly structured, geometrically meaningful way.
  3. Classification Network: Processes these structured sparse maps to output final predictions.

Multi-Task Learning & End-to-End Training

The authors derive exact weight-update equations using the chain rule, allowing the entire network to be trained end-to-end despite the multiplicative template layer. To optimize both localization and orientation, they implement a two-headed architecture trained on a mixed cross-entropy loss function:

  • One head predicts foreground vs. background (invariant to viewpoint).
  • The second head predicts a soft-labeled pose distribution across 16 quantized pose classes.

Datasets

The architecture was evaluated on two prominent depth datasets:

  • Desk3D: A dataset containing 6 distinct objects across 400–500 test scenes. It features controlled scenarios specifically designed to isolate challenges like similar-looking distractors, low clutter with high pose variation, high clutter, and occlusion.
  • ACCV3D: A larger benchmark containing 15 objects and over 1,100 test scenes. The authors evaluated TemplateNet on the 9 largest objects (bounding box > 1000cc), as low sensor resolution prevents smaller objects from providing sufficient discriminative features.

Key Insights and Ideas

  • Zero-Parameter Regularization: The template layer introduces no additional trainable parameters, yet it drastically improves performance. By constraining the feature space using fixed 3D shapes, it acts as an implicit regularizer.
  • Structured vs. Unstructured Sparsity: Unlike standard dropout or $L_1$ penalties that zero out random neurons, TemplateNet enforces spatial structure. This forces the first-layer filters to learn clean, recognizable geometric primitives rather than random noise.
Figure 5. First layer filters of different networks. Left pane shows the filters learnt by a five-layered network using surface nor- mals from depth images which look random and lack structure. Right pane compares the filters learnt by the templateNet. Due to stronger regularisation in templateNet most of the resulting filters have better structure.
  • Built-in Interpretability: Because the template layer acts as a geometric mask, visualizing its outputs provides an intuitive look at what the network has actually learned (e.g., highlighting specific edge or surface orientations), bypassing the need for complex post-hoc visualization techniques.

Key Results

TemplateNet significantly outperformed standard CNN baselines and traditional state-of-the-art methods on non-occluded scenes:

  • Desk3D Benchmark: TemplateNet (using 45 templates) achieved an overall Location+Pose accuracy of 80.13%, substantially beating the traditional LineMod baseline (65.64%) and the discriminative slRF method (73.64%). A standard 5-layer CNN without the template layer performed poorly (65.90%), proving the necessity of the template-based regularization.
  • ACCV3D Benchmark: TemplateNet achieved the highest average accuracy across the dataset (92.50% for Location, 78.01% for Location+Pose), securing top performance in 6 out of the 9 object categories.

Limitations and Future Work

Despite its strong performance, the authors note two primary limitations:

  1. Vulnerability to Occlusion: Because the fixed templates assume a complete view of the object's shape, TemplateNet's performance drops sharply in heavily occluded scenes. Incorporating explicit occlusion modeling or part-based spatial transformers is suggested as a remedy.
  2. Scalability Constraints: The current implementation requires training a separate network for every individual object instance because bottom-level features are not shared. The authors propose that future iterations could use multiple parallel template layers combined with group sparsity penalties to allow feature reuse across different objects.

Summary updated

Abstract

We present a novel deep architecture termed templateNet for depth based object instance recognition. Using an intermediate template layer we exploit prior knowledge of an object's shape to sparsify the feature maps. This has three advantages: (i) the network is better regularised resulting in structured filters; (ii) the sparse feature maps results in intuitive features been learnt which can be visualized as the output of the template layer and (iii) the resulting network achieves state-of-the-art performance. The network benefits from this without any additional parametrization from the template layer. We derive the weight updates needed to efficiently train this network in an end-to-end manner. We benchmark the templateNet for depth based object instance recognition using two publicly available datasets. The datasets present multiple challenges of clutter, large pose variations and similar looking distractors. Through our experiments we show that with the addition of a template layer, a depth based CNN is able to outperform existing state-of-the-art methods in the field.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
Desk3DtemplateNet (Mix-45)Location+Pose accuracy80.13+6.49 vs baselineObject Recognition · compressed · subset=non-occluded scenes · templates=45 · aggregation=average across six objects
Source quote
L540: Average │ 49.29 │ 65.64 │ 73.64 │ 59.31 │ 63.49 │ 65.90 │ 80.13
Desk3DtemplateNet (Mix-128)Location+Pose accuracy82.39+8.75 vs baselineObject Recognition · split: test · subset=non-occluded scenes · templates=128 · aggregation=average across six objects
Source quote
L541: 82.39
Reported baseline / comparator measurements (3)
BenchmarkMethodMetricScoreProtocol / Evidence
Desk3DslRF (Normals) baselineLocation+Pose accuracy73.64Object Recognition · split: test · method=slRF · subset=non-occluded scenes · features=normals · aggregation=average across six objects
Source quote
L540: Average │ 49.29 │ 65.64 │ 73.64 │ 59.31 │ 63.49 │ 65.90 │ 80.13
Desk3DLineMod (depth-based) baselineLocation+Pose accuracy65.64Object Recognition · split: test · input=depth-based · method=LineMod · subset=non-occluded scenes · aggregation=average across six objects
Source quote
L540: Average │ 49.29 │ 65.64 │ 73.64 │ 59.31 │ 63.49 │ 65.90 │ 80.13
Desk3DCNN5 (Mix) baselineLocation+Pose accuracy65.90Object Recognition · split: test · subset=non-occluded scenes · dropout=none · architecture=CNN5 · cost-setting=mixed
Source quote
L540: Average │ 49.29 │ 65.64 │ 73.64 │ 59.31 │ 63.49 │ 65.90 │ 80.13
BibTeX
@misc{bonde2015templatenet,
  author = {Ujwal Bonde and Vijay Badrinarayanan and Roberto Cipolla and Minh-Tri Pham},
  title = {{TemplateNet for Depth-Based Object Instance Recognition}},
  year = {2015},
  eprint = {1511.03244},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1511.03244},
}
Figure