TL;DR
PhysMirror is an end-to-end generative pipeline that forces text-to-image diffusion models to respect the laws of physics when rendering mirror reflections. By lifting text prompts into 3D meshes and simulating an exact geometric mirror scene, it extracts precise 2D spatial priors (like depth and segmentation maps) to guide the image generation process. The authors also introduce the Mirror Consistency Score (MCS), a novel, reference-free automated metric to evaluate reflection accuracy based on projective geometry.
What Problem Does This Paper Address?
State-of-the-art text-to-image (T2I) diffusion models like FLUX.1 and Stable Diffusion produce stunningly realistic textures and lighting, but they frequently stumble when faced with strict physical and geometric constraints. A notorious failure mode is the generation of mirror reflections. These models often hallucinate, completely omitting reflections, ignoring the mirror entirely, or generating physically impossible object poses where the reflection's orientation contradicts the real object.
This lack of geometric fidelity is a major bottleneck for generating synthetic training data for embodied AI and robotics, where accurate depth perception, spatial mapping, and object manipulation depend heavily on consistent visual cues. Previous attempts have treated reflection generation as a 2D inpainting or completion task, which fails to explicitly enforce the underlying mathematical symmetry of a 3D scene.
Methods
PhysMirror addresses this by bridging the gap between semantic creativity and physical laws through a four-stage pipeline:
- 3D Mesh Generation: The input text prompt is parsed to identify primary objects, which are then converted into explicit 3D meshes using an off-the-shelf text-to-3D model (such as TRELLIS or Shap-E).
- Scene Composition: A mathematically exact 3D mirror scene is constructed within a simulated environment (using PyTorch3D). The objects are grounded on a floor plane in front of a virtual mirror, and their reflections are computed analytically in closed form using exact planar reflection equations.
- Spatial Conditioning Extraction: A virtual camera is placed off-axis to capture the scene from diverse viewpoints. From this perspective, the system renders precise 2D spatial conditioning maps: a layered depth map and a per-region segmentation map.
- Conditioning-Guided Generation: These 2D spatial maps are fed as structural guides into a downstream diffusion model (FLUX.1-dev) using zero-shot conditioning frameworks like OminiControl (for depth) or Seg2Any (for segmentation).
Mirror Consistency Score (MCS)
To evaluate performance without relying on expensive human annotations, the authors developed the Mirror Consistency Score (MCS). This metric automatically segments the real object and its reflection, extracts dense semantic features using DINOv2, and establishes point-to-point correspondences via Mutual Nearest Neighbor matching.
According to projective geometry, lines connecting points on a real object to their exact reflections must be parallel in 3D space, meaning they must converge at a single vanishing point when projected onto a 2D image. MCS measures the physical accuracy of a reflection by calculating how tightly these intersection points cluster around an effective vanishing point.
Datasets
The authors introduced a new benchmark dataset called the Mirror Object Benchmark (MirrOB). To ensure a wide variety of common items, it leverages 80 standard object categories from the MS COCO dataset.
MirrOB contains 360 structured prompts generated with the help of ChatGPT, divided into three difficulty tiers based on scene complexity:
- Single-Object Prompts (160 prompts): Simple and context-heavy backgrounds containing one object.
- Two-Object Prompts (100 prompts): Testing spacing and angles for pairs of objects.
- Three-Object Prompts (100 prompts): The highest difficulty tier, introducing multi-object occlusion.
Key Insights and Ideas
- 3D as a Universal Physical Prior: Instead of trying to force a 2D model to implicitly learn complex projective geometry through massive datasets, it is far more effective to explicitly construct the 3D geometry first and project it back down to 2D as a hard constraint.
- Geometry-Driven Automated Evaluation: The insight that parallel lines in 3D must converge to a single vanishing point in a 2D perspective projection allows for a mathematically rigorous, reference-free evaluation metric. This eliminates the need for ground-truth comparison images or human subjectiveness.
Key Results
- Superior Geometric Accuracy: PhysMirror achieved an overall MCS of 0.746, vastly outperforming unconditioned foundation models like SDXL (0.527), SD3.5-Large (0.614), and FLUX.1-dev (0.589). It proved particularly robust in complex multi-object scenes, scoring 0.744 in the three-object category where baseline models severely degraded.
- Preserved Semantic Alignment: While adding strict spatial constraints often hurts a model's adherence to the text prompt, PhysMirror maintained a highly competitive CLIP score of 28.914, successfully balancing physical realism with text-image consistency.
- Backbone Trade-offs: When comparing text-to-3D backbones, TRELLIS provided significantly higher shape fidelity and geometric accuracy (overall MCS of 0.746) compared to Shap-E (0.637), though Shap-E was faster, reducing inference time from 121.9 seconds to 96.4 seconds.
Limitations and Future Work
Currently, PhysMirror is restricted to planar (flat) reflective surfaces. It cannot yet model reflections on curved surfaces (like chrome spheres or side mirrors). Additionally, the pipeline does not currently account for complex lighting interactions (like inter-reflections or caustics) and is limited to static images. The authors note that extending this explicit 3D conditioning to non-planar surfaces and ensuring temporal geometric consistency for video generation are promising directions for future research.
Summary updated