Abstract
Image stitching often suffers from ghosting and blurring due to parallax. Traditional seam-driven methods like GraphCut provide high quality but are computationally expensive, while Dynamic Programming is fast but lacks precision. This paper introduces DSeam, the first deep learning-based seam prediction approach. By utilizing a novel unsupervised Selection Consistency Loss and an edge-based encoder-decoder architecture, DSeam achieves high-quality results at 170 FPS, significantly outperforming classical methods in speed while maintaining competitive visual quality.
Introduction
When stitching multiple images into a panorama, perfect alignment is rarely possible due to parallax—the shift in object positions when viewed from different perspectives. Simple blending in overlapping regions often results in "ghosting" artifacts. To mitigate this, seam-driven stitching identifies an optimal path (a seam) through the overlap to transition between images.
Historically, this has been addressed by two primary algorithms: Dynamic Programming (DP), which is fast but often produces low-quality straight-line seams, and GraphCut (GC), which offers high quality at a high computational cost. DSeam bridges this gap by providing a deep learning framework that matches GC's quality with superior speed.
Methodology
Network Architecture
DSeam treats seam prediction as a binary mask prediction task. The network employs an encoder-decoder structure with skip connections, similar to a U-Net. A key design choice is the use of edge images as input rather than raw RGB data. By processing the difference between Sobel-filtered edge maps ($I^A_{edge} - I^B_{edge}$), the network focuses on structural misalignments while remaining invariant to lighting and color variations.
Selection Consistency Loss
Training a seam prediction network is challenging due to the lack of ground-truth "perfect" seams. The authors propose an unsupervised Selection Consistency Loss comprising two main components:
- Shape Constraint: This forces the network to output a binary mask where the boundary implicitly defines the seam. It ensures the seam is continuous and connects the appropriate boundary points of the overlapping region.
- Quality Constraint: This ensures the seam is placed in regions of high similarity. By using a patch-based similarity measure, the loss penalizes seams that pass through areas where the two images differ significantly, thereby avoiding potential ghosting.
Experimental Results
The model was evaluated on the UDIS-D dataset, which contains over 10,000 training pairs and 1,106 testing pairs featuring real-world parallax.
Performance and Speed
DSeam achieves a processing speed of 170 FPS on a GTX 1080 Ti for $256 \times 256$ images. This represents a 15x speedup over the standard OpenCV GraphCut implementation.
Visual and Quantitative Quality
Quantitative evaluation using the Zero Normalized Cross Correlation (ZNCC) metric shows that DSeam consistently outperforms both DP and GC. Qualitatively, DSeam demonstrates a superior ability to navigate complex structures, such as vehicles or architectural elements, ensuring the seam remains invisible even in challenging overlapping regions.
Conclusion
DSeam represents a significant milestone in image stitching, successfully transitioning seam prediction from classical energy-minimization techniques to the deep learning era. By combining an unsupervised consistency loss with an efficient edge-based architecture, it provides a real-time solution for high-quality panorama generation, suitable for mobile and video applications.
Summary updated