PanoSAM#
SAM3 segmentation for equirectangular panorama images. Handles perspective projection, coordinate conversion, and mask deduplication.
Installation#
# Lightweight (bring your own engine)
pip install "panosam @ git+https://github.com/yz3440/panosam.git"
# With SAM3
pip install "panosam[sam3]"
# With visualization
pip install "panosam[full] @ git+https://github.com/yz3440/panosam.git"
SAM3 requires HuggingFace authentication. Accept the license at huggingface.co/facebook/sam3, then:
Quick Start#
import panosam as ps
from panosam.engines.sam3 import SAM3Engine
engine = SAM3Engine()
client = ps.PanoSAM(engine=engine)
result = client.segment("panorama.jpg", prompt="car")
result.save_json("results.panosam.json")
Demo#
The preview tool visualizes segmentation results on an interactive 3D sphere.
Open http://localhost:8000 and drag in the JSON result file and panorama image.
Next#
- Examples - Working scripts
- API Reference - Full documentation