In standard computer vision, images are treated as flat Euclidean planes. When we apply a convolution, we typically pad the edges with zeros to maintain the spatial dimensions. However, for data captured in 360-degree formats—such as equirectangular panoramas, LiDAR scans, or polar-transformed medical images—this "flat" assumption fails. In these domains, the left and right edges of the image are not boundaries; they are adjacent.
Treating these edges as independent leads to "seams" or discontinuities. An object moving across the 360° boundary would suddenly disappear on one side and reappear on the other, confusing models that expect spatial local consistency. Circular padding (also referred to as periodic or ring padding) resolves this by wrapping the data: the left side of the feature map is padded with pixels from the right, and vice versa. This simple architectural shift allows neural networks to respect the underlying spherical topology of the data.
Restoring Continuity in Convolutions
The most direct application of this idea is in convolutional layers. Standard zero-padding signals to the network that the image ends at the border. By contrast, circular padding ensures that the filters "see" the wrap-around context.
As Chong Mou et al. demonstrate in 360DVD, circular padding in convolutional layers maintains pixel-level continuity at the boundaries of panoramic video, treating the projection as a continuous surface. This is particularly vital for generative tasks. Cheng Zhang et al. show in PanFusion that this mechanism effectively solves the "loop closure" problem, ensuring that a generated 360-degree room is horizontally consistent.
This principle extends beyond photography to sensor data. In LiDARGen, Vlas Zyrianov applies circular convolutions to panoramic LiDAR scans. By treating the left and right edges as adjacent, the model maintains the topological integrity of the environment, preventing the artifacts that typically plague 2.5D range-image generation. Similarly, Bin Yang et al. utilize circular padding in TULIP to ensure geometric continuity across the full field of view of rotating sensors.
Circularity in Attention and Embeddings
While convolutions handle local continuity, Transformers require a different approach to understand global periodic structure. If a Transformer uses standard linear positional embeddings, it perceives the first and last tokens of a panoramic sequence as being at opposite ends of the world.
To fix this, the authors of HORIZON incorporate circular coordinate systems into positional embeddings. This allows the model to treat opposite edges as mathematically adjacent, eliminating boundary seams in high-resolution synthesis. Zhigang Jiang et al. take a similar approach in LGT-Net by implementing circular relative position embeddings, which ensure spatial continuity across the boundaries of indoor panoramic layouts.
Architectural adaptations also include window-shifting mechanisms. In PanoSwin, the authors adapt the Swin Transformer's window shifting to include horizontal wrap-around shifts. This ensures that pixels near the edges of a panorama can attend to their true neighbors on the sphere, rather than being restricted by the arbitrary crop of the equirectangular image.
Dynamic Continuity via Latent Rotation
In the context of Diffusion Models, researchers have found that continuity can be enforced not just through padding, but through the denoising process itself. If a model only ever sees the seam at the edges, it may struggle to generate consistent content there.
Tianhao Walter Wu et al. propose a "progressive rotation" technique in PanoDiffusion. By incrementally rotating the latent representation during each step of the denoising process, the model is forced to treat every part of the image as a "center" at some point, ensuring seamless wraparound consistency. Tao Wu et al. employ a similar strategy in SphereDiffusion, arguing that periodic rotation effectively eliminates seams without requiring specialized architectural changes to the underlying U-Net.
Applications Beyond Panoramas
The intuition of circular padding applies whenever the data domain is periodic or closed:
- Tileable Textures: Milos Hasan et al. show that integrating circular padding directly into GAN convolutional layers makes the resulting textures inherently tileable, removing the need for post-hoc seam correction.
- Medical Imaging: In intravascular ultrasound (IVUS), images are often processed in polar coordinates. Yiming Chen et al. use wrap-padding in Geo-UNet to ensure that blood vessel segmentations are smooth and continuous across the 0°/360° angular boundary.
- Object Detection: For autonomous driving, objects often span the cut-line of a 360° camera rig. Grégoire Payen de La Garanderie et al. demonstrate that "ring-padding" prevents these objects from being detected as two separate, occluded entities.
- Scientific Modeling: From neutrino reconstruction in ARA to global weather forecasting in PEAR, periodic padding and spherical ring shifting allow models to respect the global topology of the Earth and the circular nature of angular sensor arrays.
By replacing the arbitrary boundary of the image grid with a circular wrap-around, these methods align the neural network's inductive biases with the true geometry of the physical world.