Abstract
Processing 360° spherical signals using standard Convolutional Neural Networks (CNNs) is challenging due to projection distortions and the lack of rotation invariance in flat representations. We present the Spherical Transformer (SPHTR), a novel architecture that samples pixels directly from a sphere using regular polyhedrons like icosahedrons. By leveraging the inherent permutation equivariance of Transformers, SPHTR achieves rotation equivariance through simple sequence permutations, outperforming specialized spherical CNNs in both accuracy and parameter efficiency.
Introduction: The Distortion Dilemma
Standard computer vision models typically operate on flat, Euclidean planes. When applied to 360° images, these models require projecting the spherical signal onto a flat surface, such as an Equirectangular Projection (ERP). This process introduces two significant hurdles:
- Projection Distortion: Objects change shape and scale depending on their latitude, with extreme stretching near the poles.
- Rotation Distortion: A 3D rotation of the camera does not correspond to a simple 2D translation in the projected image, breaking the translation invariance that CNNs rely on.
Existing attempts to solve this often involve complex spherical convolutions that are computationally expensive and difficult to implement in standard frameworks.
Methodology: The Spherical Transformer (SPHTR)
The SPHTR architecture sidesteps geometric distortions by avoiding flat projections during the feature extraction phase.
Direct Spherical Sampling
Instead of flattening the image first, SPHTR samples points directly from the surface of the sphere. The researchers utilize an icosahedron—a 20-sided regular polyhedron—as a sampling guide. The icosahedron's high degree of symmetry is crucial; rotating the sphere by specific angles corresponding to the polyhedron's symmetry group simply reorders its faces.
Permutation Equivariance
Transformers treat input data as a sequence of patches. Because the self-attention mechanism is naturally permutation equivariant (it is agnostic to input order unless positional embeddings are added), a discrete 3D rotation of the icosahedral grid translates into a simple shuffle of the input sequence. This allows the model to recognize objects regardless of the camera's orientation without needing specialized kernels.
Uniformity and Performance
The authors established a mathematical link between sampling uniformity and model accuracy. Using a metric based on the Hausdorff distance, they demonstrated that more uniform sampling (like that provided by an icosahedron) reduces distortion and directly improves classification performance.
Experimental Results
The model was evaluated across three benchmarks: SPH-MNIST, SPH-CIFAR, and the SUN360 panorama dataset.
- SUN360: SPHTR achieved 70% accuracy, surpassing the previous state-of-the-art (SGCN at 67.5%) while using approximately 42% fewer parameters (251k vs 433k).
- SPH-MNIST: The model reached 95.09% accuracy, outperforming other specialized spherical models such as SpherePHD and S2CNN.
- Implementation Efficiency: Unlike spherical CNNs that require custom CUDA kernels, SPHTR uses standard Transformer components, making it highly compatible with existing deep learning frameworks like PyTorch.
Discussion and Future Work
A key insight of this work is that discrete rotation equivariance can be achieved "for free" by matching the sampling geometry to the Transformer's sequence-based nature. Furthermore, the researchers found that replacing the standard classification token ([cls]) with global average pooling better preserved orientation information across the spherical field.
However, limitations remain. SPHTR is currently equivariant to the 60 discrete rotations of the icosahedron rather than arbitrary continuous rotations. Additionally, like all Transformers, the model is data-hungry, and the current scarcity of high-quality 360° datasets limits its scaling potential. Future research will focus on continuous rotation handling and scaling to larger natural datasets.
Summary updated