Skip to main content

PanoSAM

SAM3 segmentation for equirectangular panorama images.

Handles perspective projection, coordinate conversion, and mask deduplication.

https://github.com/user-attachments/assets/61a546ac-3fce-4c26-b87c-3e09b0e4c331

Installation

pip install panosam[sam3]   # Recommended: includes SAM3 dependencies
Extra Command Use Case
(none) pip install panosam Bring your own engine
[sam3] pip install panosam[sam3] SAM3 segmentation
[viz] pip install panosam[viz] Visualization
[full] pip install panosam[full] All features

SAM3 requires HuggingFace authentication:

huggingface-cli login

Usage

import panosam as ps
from panosam.engines.sam3 import SAM3Engine

engine = SAM3Engine()
client = ps.PanoSAM(engine=engine, views=ps.PerspectivePreset.DEFAULT)
result = client.segment("panorama.jpg", prompt="car")

for mask in result.masks:
    print(f"{mask.label}: yaw={mask.center_yaw:.1f}, pitch={mask.center_pitch:.1f}")

result.save_json("results.panosam.json")

Custom Engine

Any class with a matching segment() method works:

class MyEngine:
    def segment(
        self,
        image: Image.Image,
        text_prompt: str,
        threshold: float = 0.5,
        mask_threshold: float = 0.5,
        simplify_tolerance: float = 0.005,
    ) -> list[ps.FlatMaskResult]:
        ...

client = ps.PanoSAM(engine=MyEngine())

Perspective Presets

Preset FOV Resolution Perspectives
DEFAULT 45° 2048x2048 16
ZOOMED_IN 22.5° 1024x1024 32
ZOOMED_OUT 60° 2500x2500 12
WIDEANGLE 90° 2500x2500 8

Documentation

See yz3440.github.io/panosam for full API reference and examples.

License

MIT

Metadata

Release files for panosam 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for panosam 0.1.1
File Size Uploaded Provenance Actions
panosam-0.1.1.tar.gz 6.6 MB With provenance Details for panosam-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for panosam 0.1.1
File Interpreter ABI Platform Actions
panosam-0.1.1-py3-none-any.whl Python 3 none any Details for panosam-0.1.1-py3-none-any.whl

Total release size: 6.7 MB

Release files / panosam-0.1.1.tar.gz

Download URL panosam-0.1.1.tar.gz
Size 6.6 MB
Tags Source
SHA-256 checksum
How to use checksums
5bbadcbde1c85ffbb3697bb93d618b695f2f422480b4d98325b47cc1a74f0480
BLAKE2b-256 checksum
How to use checksums
3e36c39be1d3fef6a6696e1876b015bd8d45885d38c7d761c318cdabeec7709c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.

Transparency log

Release files / panosam-0.1.1-py3-none-any.whl

Download URL panosam-0.1.1-py3-none-any.whl
Size 29.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
829f25cdd97393825f0c2d7619fb7900ff7be5f9a9c326d828caf41dd7b8ffd0
BLAKE2b-256 checksum
How to use checksums
bdcebaefd029b36974356254d0c250be93a532c8c63d197742ff21f847248c99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.

Transparency log

Security for panosam 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for panosam-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page