Wide field-of-view panorama stitching is important for computational photography and immersive visual applications, but often faces some challenges like severe geometric disparities. The typical "warp-and-blend" stitching technique only works with limited parallax and fails on large-parallax scenes, due to its inherent restriction to 2D geometric transformations that cannot resolve underlying 3D structures. To break this limitation, we present AnyStitch, a generative framework that can merge multiple reference images with large parallax into a seamless panorama. Unlike previous methods, we formulate the stitching problem as a reference-based image generation process, which naturally avoids stitching artifacts. Specifically, we propose a Hierarchical Projected Rotary Positional Encoding (HPRoPE) based on a 3D feed-forward model to establish accurate geometric relationships between the inputs and the panoramic canvas while preserving fidelity. Given that the resolution of the generated image varies with the number of inputs, we design a spatial autoregressive generation strategy to generate visually coherent panoramas at flexible resolutions. Finally, to enable the supervised fine-tuning of the proposed model, we construct a paired dataset utilizing 3D Gaussian Splatting (3DGS) scenes. Experiments demonstrate that AnyStitch can seamlessly stitch a variable number of inputs (like 22 views in teaser) with large camera motion, support flexible control of target view and projection type, and handle simple dynamic scenes. Project page: https://cecret3350.github.io/AnyStitch/.
Sam: A seamless panorama does not have to come from stretching and blending photographs. AnyStitch generates it instead, using estimated scene geometry to guide how photos from different positions fit together. The authors report better results when camera movement makes conventional stitching struggle.
Alex: That sounds useful for photographs taken while walking, rather than carefully rotating in place. But generating a convincing scene is not necessarily the same as preserving the photographed scene. Which problem are they claiming to solve?
Sam: Visually coherent stitching, with an explicit warning about measurement fidelity. This is a method paper by Zixuan Chen and colleagues, mainly at the Chinese University of Hong Kong. For computational photography and image-generation researchers, it offers a way to combine casual captures despite substantial camera movement. We’ll unpack what makes it work, the comparisons supporting it, and why seamless does not mean survey-grade.
Alex: Start with the camera movement. Why does walking along a street cause trouble even when the photographs overlap?
Sam: Because of parallax: nearby objects shift against distant objects as the camera changes position. Traditional stitching generally warps images into alignment, then blends them. With substantial depth differences, aligning one part can leave another stretched, doubled, or displaced.
Alex: So overlap alone is not enough. Had previous methods already tried using generation to repair those failures?
Sam: Yes. SRStitcher uses a pretrained generator to refine results obtained from already aligned images. GPIS also relies on that kind of alignment and generates the panorama patch by patch. The authors argue that their dependence on two-dimensional pre-alignment leaves them vulnerable to large parallax.
Alex: Then “use a generator” cannot be the main novelty. What information does AnyStitch give the generator that those approaches lack?
Sam: A geometric account of where each input belongs. A pretrained reconstruction model, Depth Anything Three, estimates camera information and a depth map for each photograph. Those estimates let AnyStitch locate image patches on a target panoramic canvas, for a chosen viewpoint and projection.
Alex: If you already know where the patches belong, why not project their pixels onto that canvas and repair the gaps?
Sam: That is a relevant alternative, but estimated depth contains errors. Projecting pixels directly can distort structures and lose image content before generation begins. AnyStitch instead changes the patches’ positional labels, leaving the source content unwarped.
Alex: So the geometry says where to look for a piece of evidence, rather than physically stretching that evidence into place. How does a positional label influence the generated image?
Sam: Through rotary positional encoding, a coordinate-based way of representing spatial relationships inside the model’s attention mechanism. Attention relates pieces of image information to one another. Giving source patches coordinates on the panorama helps it connect those patches to the appropriate output locations.
Alex: But those coordinates still come from uncertain depth. Does this just move the same error from pixels into the model?
Sam: That is the next problem the authors tackle. Their Hierarchical Projected Rotary Positional Encoding combines detailed depth with a simpler approximation. The simpler version treats each input as a plane at that image’s median depth, avoiding local depth fluctuations.
Alex: A plane sounds like the assumption that caused trouble earlier. Why bring it back?
Sam: As complementary guidance, not the only geometry. Half the attention heads—the parallel components relating image pieces—use detailed depth coordinates. The rest use median-depth coordinates. The model gets detailed spatial alignment alongside a steadier reference that is less sensitive to local estimation errors.
Alex: What concrete example shows why they need both kinds of guidance?
Sam: The paper examines a statue on a roof. Detailed-depth guidance alone distorts the statue when the estimated geometry is inaccurate. Removing detailed guidance also changes content, because the simpler approximation cannot capture the scene’s geometry. Combining them preserves the statue in that example.
Alex: That explains alignment. But a panorama can be much wider than the images a generator normally handles. How do they keep the whole output coherent?
Sam: They generate local patches, starting near the panorama’s center and expanding outward. Each step receives relevant source-image patches and memory from overlapping regions already generated. That memory anchors the new patch to its neighbours instead of letting every region develop independently.
Alex: Local patches reduce the immediate workload. Do they also solve the problem of coordinates becoming unfamiliar far across a wide image?
Sam: Not alone. The method also makes positions relative within each local generation context. It shifts spatial coordinates and input-image indices into a familiar range. Their ablations show artifacts when either adjustment is removed, and overlay artifacts when memory is removed.
Alex: Let’s turn to the evidence. Where do they get a correct target panorama for photographs taken from different places?
Sam: They construct synthetic training data using three-dimensional Gaussian Splatting, a scene representation that renders images from chosen viewpoints. They render displaced camera views as inputs and a panorama from an intermediate target viewpoint. The training set contains roughly twenty-two hundred input pairs, with targets in several projections.
Alex: Synthetic targets make comparison possible, but ideal geometry could make the task artificially easy. What happens during evaluation?
Sam: The main synthetic comparison uses a hundred held-out test pairs. Crucially, AnyStitch estimates the geometry from the images rather than receiving the renderer’s exact geometry. Evaluation covers the non-black region shared by each method’s output and its target.
Alex: And how much better is the result than the strongest alternative in that comparison?
Sam: On a learned perceptual-distance measure, AnyStitch scores about point-three-two, compared with RopStitch’s point-five-one. Lower means closer to the target under that measure. AnyStitch also leads on structural similarity, so the synthetic result is not based solely on a subjective preference judgment.
Alex: Does the advantage survive outside those rendered scenes?
Sam: The authors also compare methods on public large-parallax photo datasets. AnyStitch leads their reported image-quality scores, with human pairwise judgments favouring it too. Those scores assess visual properties such as seams, distortion, and abnormal content. They do not establish exact physical accuracy.
Alex: You mentioned direct geometric projection as an alternative. Was that comparison against the actual competing systems?
Sam: Not their official implementations, which were unavailable. The authors reproduce a pipeline in the style of PIS3R and LiftProj, then apply a restoration model fine-tuned on their synthetic dataset. They label that distinction explicitly. Also, the controlled geometry ablation uses ground-truth geometry, unlike the main comparison.
Alex: So the evidence supports the overall method, but those comparisons answer slightly different questions. What about combining more than an image pair?
Sam: They demonstrate panoramas using as many as twenty-two views, and show qualitative comparisons against a multi-view stitching method. They also handle simple isolated human motion. But crowded dynamic scenes can still produce duplicated people and ghosting, so that tolerance has clear limits.
Alex: Even for static scenes, what would stop a researcher from using this as a routine stitching tool?
Sam: Cost and fidelity. The authors report approximately five minutes for a two-K panorama on an A-eight-hundred-equivalent graphics processor. It requires about forty gigabytes of GPU memory. More fundamentally, they warn that generation can be risky for measurement-critical work such as mapping or satellite imagery.
Alex: Given those trade-offs, who should read the full document, and where should they start?
Sam: Researchers in stitching or geometry-guided generation should start with Hierarchical Projected RoPE and the geometric-injection ablation. Compare guidance through positional encoding against projecting the source pixels directly. Then read the evaluation setup carefully, especially which comparisons use estimated versus ground-truth geometry, before turning to the limitations.
Alex: And for someone who only needs the central idea, rather than an implementation?
Sam: Geometry can tell a generator where evidence belongs without stretching the evidence itself. That is the useful move here. But keep the boundary attached: a panorama can look seamless without being safe to measure.
Alex: Keep that distinction in view.