Introduction
Standard convolutional neural networks (CNNs) are notoriously "texture-biased," relying heavily on color, shading, and local patterns to identify objects. While effective for standard photography, this bias causes failure in scenarios where these cues are missing or misleading, such as in sketches, stylized artwork, or extreme illumination changes. This paper, presented at ECCV 2018, addresses this by teaching CNNs to focus on the underlying geometry of an image, creating a representation that captures shape—the one feature that remains consistent across a sketch, a painting, and a photograph of the same object.
Methodology
The authors propose a two-stage process to create a geometry-focused image descriptor, termed EdgeMAC.
1. Edge Map Generation and Filtering
Instead of feeding raw RGB images into a network, the system first converts them into edge maps using a standard edge detector (e.g., Dollar & Zitnick). To ensure robustness against noise, the authors introduce a novel, differentiable Edge Filtering Layer. This layer learns to "clean up" edge maps by applying soft thresholding, effectively suppressing background noise while highlighting structural contours.
2. Unsupervised Training via SfM
Crucially, the model does not rely on human-labeled sketches. Instead, it leverages a Structure-from-Motion (SfM) pipeline. By automatically reconstructing 3D models of landmarks from large photo collections, the system identifies different views of the same physical structure. These pairs serve as "positives" for training a Siamese network (based on VGG16), which is optimized to minimize the distance between descriptors of the same object and maximize the distance between different ones.
Key Insights: Shape as a Universal Language
By forcing the network to look only at edges, the authors create a "bridge" between modalities. A sketch of a shoe and a photo of a shoe look very different in RGB space, but their edge maps are remarkably similar. Furthermore, using 3D reconstructions provides a richer source of "shape truth" than simple category labels. Two different buildings might both be "churches," but their unique shapes are captured by the SfM data, allowing the network to learn specific geometric nuances.
Experimental Results
The EdgeMAC descriptor was evaluated across several challenging benchmarks, demonstrating superior generalization with a single, generic network.
Sketch-Based Image Retrieval (SBIR)
On the Flickr15k dataset, EdgeMAC achieved 46.1 mAP, significantly outperforming previous CNN-based methods. When combined with global diffusion for re-ranking, performance reached 68.9 mAP. The model also excelled in fine-grained retrieval for specific instances of shoes, chairs, and handbags.
Domain Generalization
On the PACS dataset (Photos, Art, Cartoons, Sketches), the model showed a massive improvement in cross-domain recognition. When trained on photos and tested on sketches, it achieved ~55% accuracy, compared to just ~25% for a standard ImageNet-pretrained model.
Conclusion
"Deep Shape Matching" demonstrates that a single, modality-invariant network can outperform specialized multi-branch architectures. By prioritizing geometry over texture and leveraging unsupervised 3D data, the authors provide a scalable and efficient solution for cross-domain image matching and retrieval. Future work may involve integrating edge detection directly into the end-to-end learning process to further enhance performance.
Summary updated