UniStitch Fuses Classical and Deep AI to Beat Both at Panoramic Stitching
A new framework fuses hand-crafted keypoints with deep semantic features, closing a long-standing split in image stitching research and outperforming prior state of the art.
ProTakeaways
- UniStitch is the first framework to jointly fuse hand-crafted keypoints and learned semantic features for image stitching, paper here.
- A Neural Point Transformer projects sparse keypoints (via PointNeXt) onto grids aligned with ResNet-18 semantic maps.
- An Adaptive Mixture of Experts dynamically weights semantic, geometric, and joint experts based on modality reliability.
- Achieves 25.07 mPSNR on UDIS-D, beating RopStitch (24.70) and StabStitch++ (24.63) with even larger margins out of distribution.
- FFD-based TPS warping cuts VRAM roughly in half and enables stitching at 2448x3264 where vanilla TPS runs out of memory.
- Code, keypoint extraction tools, and training recipes are open source on GitHub.
Panoramic image stitching has quietly split into two camps that rarely talk to each other. Classical pipelines lean on hand-crafted keypoints like SIFT, while modern deep methods learn semantic feature maps end-to-end. A new paper called UniStitch argues that both sides have been leaving performance on the table, and shows what happens when you actually fuse them.
The authors from CQUPT, PolyU, NTU, NUS, and BJTU frame the problem bluntly. Traditional stitching methods estimate warps from hand-crafted geometric features, whereas recent learning-based solutions leverage semantic features from neural networks instead, and these two lines of research have largely diverged along separate evolution, with virtually no meaningful convergence to date. Geometric pipelines dominate structured, texture-rich scenes but collapse in low-texture or repetitive environments. Deep semantic methods handle those hard cases better, but they underperform classical methods on well-structured scenes and generalize poorly out of distribution.

Turning sparse points into dense maps
The core engineering problem is that these two modalities live in incompatible representations. Keypoints are a sparse, unordered 1D set. Semantic features from a CNN are dense, ordered 2D grids. You cannot just concatenate them.
UniStitch solves this with a Neural Point Transformer (NPT) that follows a transformation-then-projection strategy. It first transforms shallow keypoints into high-dimensional point features, and then projects them into a structured latent space by explicitly reorganizing their spatial relationships. Concretely, keypoints and descriptors get encoded by PointNeXt, then requantized onto a zero-initialized grid at the same spatial resolution as the semantic feature maps (1/8 and 1/16 scales). When multiple keypoints land in the same grid cell, max pooling picks the most salient one.
The semantic branch is a straightforward ResNet-18 backbone extracting hierarchical features at matching scales, so the two streams end up spatially aligned and ready to fuse.
An MoE that knows which modality to trust
Fusion is handled by an Adaptive Mixture of Experts (AMoE) with three residual experts: semantic, geometric, and a heterogeneous expert that takes the concatenation of both. A linear gated router produces a softmax weight vector over the three, so the model can dynamically shift focus when one modality is unreliable, like in a low-texture scene where keypoints are scarce.
Training uses a two-stage recipe. The first 100 epochs train everything from scratch. The second 100 freeze the alignment branches and add a Modality Robustifier: random modality dropout or Gaussian noise applied inside the latent expert branches, both with probability 0.25. The point is to force the network to survive when keypoints get sparse or noisy at inference time.
A memory trick for high-res TPS
Warping follows the StabStitch++ playbook: global homography first, then a local Thin-Plate Spline for parallax. TPS is expensive at high resolution because the projection matrix blows up in memory. UniStitch reformulates it as compress-then-restore, computing the TPS flow on a low-resolution meshgrid and interpolating back with cubic B-spline Free-Form Deformation, using the local support property so each pixel only needs a 4x4 neighborhood.
The efficiency numbers are notable. At 2448x3264, vanilla TPS runs out of memory entirely, while FFD-based TPS completes in 0.386s using 22.62 GB. At 1329x2000 it cuts peak GPU memory from roughly 14 GB to 8.6 GB with no loss in alignment quality.
Benchmarks
Training uses the UDIS-D dataset, with the 147-pair classical set collected by RopStitch as an out-of-distribution test. Metrics are masked PSNR and SSIM computed only over the overlap region.
| Method | UDIS-D mPSNR | Classic mPSNR |
|---|---|---|
| APAP (traditional) | 22.39 | 18.92 |
| UDIS++ | 23.41 | 17.36 |
| StabStitch++ | 24.63 | 17.91 |
| RopStitch | 24.70 | 18.44 |
| UniStitch | 25.07 | 18.80 |
An interesting pattern in the classic benchmark: learning-based baselines underperform classical geometry-based APAP out of distribution, confirming that pure semantic features lack structural robustness. UniStitch is the first learning method in the table to beat the classical baseline on OOD data.

What it does and does not do
The framework is agnostic to which keypoint extractor you use. Ablations show consistent gains with SIFT, SURF, ORB, and SuperPoint, though learning-based keypoints matched with LightGlue give the best results. Descriptors matter too, not just coordinates, since they disambiguate similar-looking points.
Limitations worth flagging:
- It still leans on a preprocessing step to extract and match keypoints, adding a dependency the pure-deep pipelines avoid.
- Inference is slightly slower than the fastest deep baselines (0.20s vs 0.19s at 1329x2000), though far faster than RopStitch with retrieval (1.74s).
- Regression targets and shape losses are inherited from StabStitch++, so it does not rethink the warp parameterization itself.
Code, the LightGlue-based keypoint extraction tooling, and training scripts are on GitHub, with a project page at mmelodyv.github.io/projects/unistitch. If you have been building stitching pipelines and treating classical and learned features as an either-or choice, this is worth a look.