HKUST's SAP Fixes 360° Panorama Segmentation With a +17 mIoU Gain
A new foundation model reformulates 360-degree segmentation as a fixed-trajectory perspective video, giving SAM2 a +17.2 mIoU zero-shot boost on 4K panoramas.
ProTakeaways
- SAP is a foundation model for promptable instance segmentation on native 4K 360 degree panoramas.
- It reframes panoramas as fixed-trajectory perspective videos so SAM2's memory works as intended (paper).
- A column-first zigzag scan avoids seam and pole distortions and supports arbitrary prompt starting points.
- Training uses 183,440 synthetic 4K panoramas with 6.4M instance masks generated via InfiniGen.
- Achieves +17.2 zero-shot mIoU average gain over vanilla SAM2 across four model sizes on PAV-SOD.
- Gains shrink under 3-click correction; inference cost grows with denser scanning trajectories.
Point-and-click segmentation models like SAM2 are trained almost entirely on flat perspective photos. Hand them a 360 degree panorama and things fall apart: masks fragment at the left-right seam, objects near the poles get warped into unrecognizable blobs, and fine detail vanishes when a 4096x2048 image gets crammed into a 1024x1024 input. A team from HKUST and LIGHTSPEED has released Segment Any 4K Panorama (SAP), a foundation model that fixes this by treating a panorama as a video the model already knows how to watch.
Why panoramas break perspective models
As 360 degree cameras become more prevalent in robotics, AR/VR, and embodied agents, there is growing demand for robust high-resolution instance segmentation on panoramic imagery, but the performance of segmentation foundation models degrades noticeably on these images. The paper pins the failure on three concrete issues:
- Equirectangular projection stretches pixels near the poles into severe distortion the model has never seen.
- The left and right edges of the image are actually adjacent on the sphere, so objects crossing the seam get split into two half-masks.
- SAM-series models only accept 1024 by 1024 inputs, so a 4K panorama gets aggressively downsampled and padded, wasting compute and throwing away small objects.
An earlier approach called OmniSAM tried to solve this by sliding a window across the panorama and feeding the patches into SAM2 as if they were video frames. The authors of SAP argue that this misses the deeper problem: SAM2's streaming memory assumes consecutive frames come from smooth camera motion, and naive sliding windows over an equirectangular grid violate that assumption, causing identity propagation to jitter.
Turning a sphere into a smooth camera path
The core idea is to reformulate panoramic segmentation as fixed-trajectory perspective video segmentation. Instead of chopping the equirectangular image into flat tiles, SAP simulates a virtual camera flying around the sphere on a predefined path, rendering each viewpoint as a distortion-free 1024x1024 perspective frame with a 90 degree field of view and 50% overlap between neighbors. That ordered sequence of frames is exactly the kind of input SAM2 was trained on.

The trajectory itself is a column-first zigzag: the camera sweeps down one longitudinal column, steps sideways in yaw, sweeps back up the next column, and repeats. This matters for a subtle reason. Between any two consecutive frames only one angular dimension changes, either yaw or pitch, yielding smooth video-like transitions. A row-first scan cannot loop cleanly back to an arbitrary starting point, but the column-first version can, so the sequence can start wherever the user's prompt point happens to land.
The inference loop is compact enough to sketch:
frames = [pano_to_persp(pano, v) for v in trajectory(N)]
visible = [(i, project(prompt, v)) for i, v in enumerate(trajectory(N))
if in_view(prompt, v)]
start = min(i for i, _ in visible)
video = frames[start:] + frames[:start]
masks = SAM2.propagate(video, prompts=visible)
erp_mask = fuse_back_to_panorama(masks) # element-wise max
183,440 synthetic panoramas
Retraining SAM2 for this trajectory needs ground-truth panoramic instance masks, which basically do not exist at scale. To enable large-scale supervision, the team synthesized 183,440 4K-resolution panoramic images with instance segmentation labels using the InfiniGen engine. The dataset burned 40,000 GPU hours to build, contains 6.4 million instance masks, and is split roughly evenly across small, medium, and large objects using COCO-style area thresholds rescaled to 4K.
Training freezes SAM2's Hiera-Large image encoder and only updates the memory attention, memory encoder, mask decoder, and prompt encoder. To avoid catastrophic forgetting, the original SA-1B and SA-V data are mixed back in. The ablations show all three ingredients matter: synthetic-only training underperforms, and dropping either the scanning strategy or the 50% frame overlap costs several mIoU points.
Numbers that back the claim
SAP is evaluated zero-shot on PAV-SOD, a real-world 4K panoramic video benchmark, and on HunyuanWorld-1.0, an 8K cartoon-style panorama benchmark. Under a single positive click prompt, the gap over vanilla SAM2 is dramatic:
| Model size | SAM2 (1-click mIoU) | SAP (1-click mIoU) | Delta |
|---|---|---|---|
| Tiny | 51.6 | 75.8 | +24.2 |
| Small | 54.0 | 72.0 | +18.0 |
| Base | 60.4 | 76.1 | +15.7 |
| Large | 66.3 | 77.3 | +11.0 |
The average zero-shot gain across model sizes is +17.2 mIoU on real-world 4K panoramas. The improvement is largest for tiny models, which suggests the fixed-trajectory reformulation is doing a lot of the heavy lifting that a bigger encoder would otherwise have to compensate for. On a curated subset of 76 objects that sit on the seam or near the poles, vanilla SAM2 scores 46.1 mIoU while SAP hits 68.2, confirming the qualitative claim that the seam and pole failures are largely fixed.

Where the gains stop
The results are less flattering under the three-click error correction protocol. Once a user is allowed to iteratively correct with additional positive and negative clicks, vanilla SAM2 already reaches 82 to 84 mIoU, and SAP's improvements shrink to roughly +1 to +2 points, sometimes going slightly negative on the large-object slice. In other words, SAP is most useful when you want a clean mask from a single click on a full-resolution panorama, which is exactly the interactive setting for AR headsets and embodied agents.
There are also practical costs. Each panorama is turned into a 24-frame pseudo-video at the default 45 degree step size, so inference is meaningfully slower than a single SAM2 forward pass, and denser trajectories quickly become GPU-bound. And because the training data is entirely synthetic, cartoon-style content in HunyuanWorld causes measurable drops on small objects, which the authors mitigate by mixing in SA-1B and SA-V but do not fully close.
What it unlocks
The paper is a useful template for anyone dealing with non-perspective imagery: fisheye, spherical medical scans, satellite mosaics. The lesson is that if you have a memory-based video model with strong priors, it can be worth designing a synthetic camera path that respects those priors instead of retraining from scratch. For 360 degree perception specifically, SAP is the first promptable instance segmentation model that operates at native 4K resolution across the full sphere, including the seam and poles where previous methods reliably broke. A natural follow-up flagged by the authors is extending SAP from single panoramas to panoramic videos, leveraging temporal coherence across time in addition to the intra-panorama scanning trajectory, which would matter for wearable AR and mobile robots that stream 360 degree footage continuously.