Thinking in Boxes: 3D Editing in Real Images Made Easy

Pradhaan S Bhat, Naveen Chandra R, Rishubh Parihar, Vaibhav Vavilala, Venkatesh Babu Radhakrishnan, David Forsyth, Anand BhattadNeurIPS 2026

TL;DR

Moving or rotating objects inside a 2D photograph is notoriously tricky because text prompts and 2D bounding boxes are fundamentally ambiguous about 3D space. Thinking in Boxes turns 3D image editing into a clean, intuitive geometry problem: fit simple 3D boxes around objects in a real photo, drag or rotate those boxes on a virtual floor, and let a fine-tuned diffusion model render the exact spatial transformation—complete with realistic lighting, shadows, and newly revealed object sides.

Figure 1: Thinking in boxes. Given a single source image (bottom left), the user fits 3D boxes around objects of interest, anchored on a depth-aligned floor (top left). Editing the boxes drives the corresponding edit in the image: from left to right, translation, rotation, combined translation and rotation, and a camera viewpoint change. The bottles’ and helmets’ appearance is preserved across all four edits, including regions of the object not visible in the source — note the back of the bottle and side view of the helmet revealed under rotation. Note that all qualitative figures are real images.

What Problem Does This Paper Address?

Suppose you want to take a photo of a living room and rotate an armchair by 90 degrees, or pan the camera slightly to the left. How do you tell an AI image editor to do that?

Text prompts ("rotate the chair a bit") are too vague. 2D interfaces like drag-points or flat bounding boxes lack depth—shrinking a 2D box could mean the object got smaller, or that it moved further away. Meanwhile, existing 3D-aware methods come with heavy trade-offs: some rely on fragile depth-warping and hole-filling (inpainting) pipelines that break under large rotations or on non-rigid objects (like animals), while others require per-image optimization or only work on synthetic, AI-generated images rather than real photographs. The authors set out to build a single, feed-forward system that gives users precise 3D control over both objects and camera viewpoints directly on real, in-the-wild photos.

Methods

Instead of reconstructing complex 3D meshes, the authors introduce a minimal, structured scene representation built on two clever visual cues:

  1. Color-Coded 3D Boxes: Users (assisted by off-the-shelf 3D detectors) fit 3D cuboids around objects of interest. Crucially, each of the six faces of a box is assigned a canonical color—red for front, green for back, pink for right, cyan for left, blue for top, and yellow for bottom. When projected back into 2D, these colors act as an unmistakable visual compass, telling the generator exactly how an object is oriented and which hidden sides are rotating into view.
  2. A Depth-Aligned Checkered Floor: Boxes alone have a classic relativity problem: if every box shifts left, did the objects slide left, or did the camera pan right? To break this tie, the system automatically estimates a ground plane from the lowest box vertices and renders a depth-shaded checkerboard floor. Under object motion, the floor stays put; under camera motion, the floor moves with the boxes.

To generate the final image, the authors build on FLUX-Kontext, a multimodal diffusion transformer (MMDiT). They encode the source photo, the 2D projection of the initial box layout, and the 2D projection of the edited target box layout into latent tokens, concatenating them spatially. Using parameter-efficient LoRA layers injected into the attention matrices, the image tokens attend to both layouts—learning to map object appearances from the source boxes and spatialize them into the target boxes in a single pass, without per-image tuning.

Datasets

  • Newly Introduced Synthetic Dataset: Using Blender Cycles, the authors built a calibrated dataset of 110,000 scenes (220,000 paired views). Each scene places two normalized 3D assets from Objaverse-XL onto a textured floor (from 3D-Fixer materials) under sampled HDRIs, applying random translations, uniform scaling, and rotations between views.
  • Real-World Fine-Tuning & Evaluation: After 50K training steps on synthetic data, the model is fine-tuned for 10K steps on a 50/50 mix of synthetic pairs and 10,000 real video frame pairs from Objectron. Evaluation uses held-out synthetic scenes, WildDet-3D (for real-world object edits), and held-out Objectron sequences (for real-world camera edits).

Key Insights and Ideas

  • Disambiguating Object vs. Camera Motion: Grounding floating 3D primitives onto a shared, depth-shaded checkerboard floor lets a single unified model handle both object manipulation and camera viewpoint changes without needing separate specialized video models.
  • Foundation Models Already "Get" 3D: Even though the model is trained predominantly on synthetic two-object renders, lightweight LoRA fine-tuning unlocks remarkable generalization. It handles complex real-world scenes, preserves metallic and fire reflections, hallucinates occluded backs of chairs and helmets, and even edits black-and-white line drawings—suggesting image foundation models already possess rich internal 3D object representations waiting for the right interface.
  • Sidestepping Rigid Mesh Assumptions: Because the boxes act as structured conditioning for a generative prior rather than explicit pixel-warping cages, the method effortlessly rotates deformable subjects like zebras, polar bears, and chickens where mesh-fitting and depth-warping baselines fall apart.

Key Results

  • Quantitative Wins: On real-world object editing (WildDet-3D), the method achieves state-of-the-art edit fidelity, slashing pixel-level Mean Distance error to 25.91 (down from 32.63 for DiffusionHandles and 35.49 for GeoDiffuser) and achieving the lowest Angular Error (92.05°) and Warp Error (0.136). On synthetic benchmarks, it sweeps every single metric across image quality, DINO consistency, and edit fidelity (e.g., 23.69 dB PSNR vs. 20.85 dB for FreeFine, and 76.74° angular error vs. >122° for all baselines).
  • Human Preference: In a 49-participant A/B user study evaluating object preservation, background preservation, and layout adherence, users preferred Thinking in Boxes between 68.2% and 93.2% of the time across head-to-head matchups against FreeFine, SAM-3D, and SpatialEdit.
  • Ablations: Removing the checkered floor spikes Mean Distance error on camera edits from 42.62 to 47.67; stripping away directional face colors jumps it to 57.62, proving both cues are vital.

Limitations and Future Work

  • Identical-Scale Ambiguity: Boxes encode pose and size, not object identity. If two different objects have similarly sized boxes and swap places or move ambiguously, the model doesn't know which box belongs to which object and defaults to changing nothing (an identity transformation). The authors suggest adding unique per-object color markers alongside face-orientation shading in future work.
  • Scene Constraints & Background Drift: The system struggles with tiny objects, non-planar ground surfaces, and floating (ungrounded) objects. Like other diffusion-based 3D editors, it can also introduce subtle, unintended pixel-level shifts in the unedited background—making strict background isolation an open target for future research.

Summary updated

Abstract

Text and 2D-conditioning interfaces provide weak, ambiguous control over spatial transformations in image editing -- particularly under large object motions and camera changes. Prior work has used 3D primitives such as boxes, but only as loose conditioning signals indicating approximate object location rather than specifying the transformation. We instead use 3D boxes as structured specifications: the user provides the input and output boxes of the edit, casting editing as a well-posed geometry problem. This ``thinking in boxes'' interface, where each box face is color-coded to convey 3D orientation, gives precise control over translation, rotation, scaling, and viewpoint changes in real images while preserving scene and object identity, and recovering previously unseen object regions. To ground transformations in scene appearance, we introduce a depth-aligned planar floor as a global reference frame, shaded with depth-aware cues. Conditioned on this structure, an image generator produces consistent results under large transformations. Trained in two stages -- on synthetic multi-object scenes and a small set of real-world videos from Objectron -- the system generalizes to complex, in-the-wild real images. Our method operates directly on real photographs and substantially outperforms recent state-of-the-art methods on large 3D edits.
BibTeX
@inproceedings{bhat2026thinking,
  author = {Pradhaan S Bhat and Naveen Chandra R and Rishubh Parihar and Vaibhav Vavilala and Venkatesh Babu Radhakrishnan and David Forsyth and Anand Bhattad},
  title = {{Thinking in Boxes: 3D Editing in Real Images Made Easy}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=8Qgiwfryfr},
}
Figure