Zero in on Shape: A Generic 2D-3D Instance Similarity Metric learned from Synthetic Data

Maciej Janik, Niklas Gard, Anna Hilsmann, Peter Eisert · DOI

Abstract

We present a network architecture which compares RGB images and untextured 3D models by the similarity of the represented shape. Our system is optimised for zero-shot retrieval, meaning it can recognise shapes never shown in training. We use a view-based shape descriptor and a siamese network to learn object geometry from pairs of 3D models and 2D images. Due to scarcity of datasets with exact photograph-mesh correspondences, we train our network with only synthetic data. Our experiments investigate the effect of different qualities and quantities of training data on retrieval accuracy and present insights from bridging the domain gap. We show that increasing the variety of synthetic data improves retrieval accuracy and that our system's performance in zero-shot mode can match that of the instance-aware mode, as far as narrowing down the search to the top 10% of objects.

Introduction

In computer vision, 3D models serve as the "gold standard" for object reference, offering a representation invariant to lighting, occlusion, or camera viewpoints. However, matching a 2D photograph to a 3D mesh remains a significant challenge due to the domain gap between synthetic renderings and real-world photography, the scarcity of paired datasets, and the lack of scalability in instance-aware systems. This work addresses these challenges by learning a generic shape similarity metric for zero-shot retrieval, enabling the recognition of novel shapes without retraining.

Methodology

The core of our approach is a Siamese CNN architecture based on ResNet-34, designed to map both 2D images and 3D models into a shared latent space where geometric similarity corresponds to proximity.

The Siamese network architecture utilizes partially shared weights to bridge the domain gap between 3D models and 2D images.

3D and 2D Representations

To process 3D models, we utilize a view-based descriptor ($CNN_{view}$). The system renders 12 textureless, grayscale views from the vertices of an icosahedron surrounding the object. These views are processed through the network, and their features are aggregated via max-pooling to create a compact shape descriptor. Simultaneously, the 2D RGB photograph is processed by a parallel branch ($CNN_{img}$).

Partial Weight Sharing

A key innovation is the use of partial weight sharing. The two branches of the Siamese network share parameters only from the 7th layer onwards. This allows early layers to specialize in domain-specific low-level features—grayscale views for 3D and colorful, noisy pixels for 2D—while deeper layers converge on high-level geometric features. The network is optimized using contrastive loss and cosine distance.

Experimental Setup

Training was conducted exclusively on synthetic data to circumvent the lack of real-world paired datasets. We utilized ShapeNet for 3D models and generated synthetic images using BlenderProc for photorealism and NDDS for randomized backgrounds and textures. Evaluation was performed on real-world images from the Pix3D and Toyota-Light datasets, testing the system's ability to retrieve the correct 3D model from a set of 50 candidates.

Results and Discussion

Our findings highlight that the diversity of synthetic training data is more critical than sheer volume. Mixing photorealistic renders with highly randomized ones proved most effective at bridging the domain gap.

Retrieval accuracy improves with the number of training objects, with zero-shot performance approaching instance-aware levels at Top-5 metrics.

As shown in the results, the system's performance in zero-shot mode scales with the variety of training shapes, plateauing at approximately 600 unique models. While instance-aware models maintain an edge in Top-1 accuracy, our zero-shot metric matches their performance at Top-5 accuracy (reaching ~90%). This demonstrates the metric's robustness in narrowing down searches to a small set of likely candidates for previously unseen objects.

Conclusion

We have demonstrated a generic 2D-3D similarity metric capable of zero-shot retrieval by training solely on synthetic data. The "split" Siamese strategy and the emphasis on data variety are key to overcoming the domain gap. Future work will explore more advanced shape descriptors and explainability techniques to further refine the shape extraction process and understand the network's decision-making.

Summary updated

BibTeX
@inproceedings{janik2021zero,
  author = {Maciej Janik and Niklas Gard and Anna Hilsmann and Peter Eisert},
  title = {{Zero in on Shape: A Generic 2D-3D Instance Similarity Metric learned from Synthetic Data}},
  booktitle = {ICIP},
  year = {2021},
  doi = {10.1109/icip42928.2021.9506436},
}
Figure