Abstract
Deep learning models, including state-of-the-art foundation models like CLIP and Segment Anything (SAM), often exhibit brittleness when faced with out-of-distribution data. This vulnerability stems largely from "photographer’s bias"—the tendency for training data to feature objects that are centered, upright, and well-lit. We present FOCAL (Foundation mOdel guided CANonicalization), a test-time framework that enhances model robustness by transforming non-canonical inputs into their most recognizable forms. By leveraging the internal priors of foundation models to rank candidate views, FOCAL achieves significant performance gains across viewpoint, lighting, and rotation shifts without requiring architectural changes or retraining.
Introduction
Standard approaches to achieving robustness in computer vision typically rely on Data Augmentation (DA) or Equivariant Networks. While DA attempts to teach models invariance by exposing them to varied transformations during training, it rarely covers the near-infinite space of 3D viewpoints and environmental conditions. Equivariant designs, conversely, hard-code symmetries into the architecture but are often restricted to simple 2D transformations like translation or rotation.
FOCAL takes a different approach inspired by human cognitive processes, specifically "mental rotation." When humans encounter an object in an unusual orientation, we mentally transform it into a canonical pose to facilitate recognition. FOCAL implements this as a test-time optimization problem: rather than building a model that is invariant to all noise, we transform the input data to match the "typical" distribution the model expects.
The FOCAL Framework: Vary and Rank
FOCAL operates through a "Vary and Rank" strategy that utilizes the implicit knowledge embedded within large-scale foundation models. The process consists of three core stages:
- Vary: Given an input image, the system generates a set of candidate transformations. These can range from simple 2D rotations and color shifts to complex 3D viewpoint changes rendered via generative models like TRELLIS.
- Rank: The system evaluates these candidates using an energy function derived from pre-trained foundation models:
- CLIP Energy: Utilizes the model’s classification confidence (logits) to identify the version of the image that most strongly aligns with its semantic category.
- Diffusion Energy: Uses Stable Diffusion’s denoising error to determine which version appears most "natural" or visually typical according to internet-scale data distributions.
- Optimize: To navigate high-dimensional transformation spaces (such as 6-DoF camera poses) without exhaustive search, FOCAL employs Bayesian Optimization (BO). This allows the system to efficiently find the transformation that minimizes the total energy function.
The resulting "canonicalized" image is then passed to the downstream task model for final processing, such as classification or segmentation.
Experimental Evaluation
The authors evaluated FOCAL across a diverse array of benchmarks to test its versatility:
- Geometric Robustness: Tested on 2D rotations (CIFAR, ImageNet-1K) and 3D viewpoints using Objaverse-LVIS (46k assets) and CO3D (real-world multi-view sequences).
- Environmental Robustness: Evaluated on UrbanIR for day-to-night relighting and the RCC dataset for color constancy.
- Downstream Tasks: Applied to MS-COCO for segmentation and 3D virtual environments for active vision tasks.
Key Insights
Invariance as Optimization
FOCAL reframes invariance not as a static property of a neural network, but as a dynamic search problem. By treating the foundation model as a prior, FOCAL can "distill" general-purpose knowledge into specific task improvements without any fine-tuning.
Zero-Shot Superiority
One of the most striking findings is that FOCAL often outperforms task-specific canonicalizers (such as PRLC) that were explicitly trained on the target datasets. This suggests that the broad, general-purpose priors learned by CLIP and Stable Diffusion are more robust and transferable than specialized, narrow models.
Generative Models as Mental Simulators
In 3D and active vision experiments, FOCAL demonstrates the ability to use generative 3D models to "imagine" an object from alternative angles. This allows a system to virtually "move" its camera to a more advantageous position before attempting to process the scene.
Results and Performance
- 3D Viewpoint Gains: On the challenging Objaverse-LVIS dataset, FOCAL improved classification accuracy by 50% compared to a fine-tuned CLIP model.
- Environmental Adaptation: FOCAL improved CLIP’s accuracy by nearly 15% on extreme color-shifted images and successfully translated nighttime urban scenes into daytime equivalents to improve recognition.
- Active Vision: In 6-DoF settings, FOCAL successfully guided virtual cameras to focus on salient objects from canonical angles, highlighting its potential for robotics and autonomous systems.
Limitations and Future Directions
Despite its success, FOCAL faces a primary challenge in computational latency. Running multiple forward passes of large models like Stable Diffusion for every input is significantly slower than standard inference. The authors propose a "System 1 / System 2" architecture, where canonicalization (System 2) is only triggered when the primary model (System 1) expresses high uncertainty.
Additionally, the current implementation requires the user to specify the type of transformation (e.g., rotation vs. lighting). Future research may focus on automated transformation selection, where the model independently detects which environmental or geometric factor requires correction to achieve a canonical view.
Summary updated