Spherical Ops: control the operation

Choose Spherical Ops when the computation itself must be sphere-aware. These operations work on the ERP lattice using longitude wrapping, tangent-frame neighbourhoods, explicit masks and grid transforms rather than treating the ERP as an ordinary flat image.

Surface

Stability

Canonical import

Contract

Public components or entries

spherical-region-analysis-ops

Stable

panorai.ops.spherical

panorai-spherical-region-analysis/v1

ConnectedComponents, FillHoles, GeodesicDistanceTransform, RegionBoundaries, Skeletonize, connected_components, extract_boundaries, fill_holes, geodesic_distance_transform, measure_regions, region_adjacency_graph, region_boundaries, skeletonize, trace_contours, watershed, panorai.ops.spherical.functional.connected_components, panorai.ops.spherical.functional.extract_boundaries, panorai.ops.spherical.functional.fill_holes, panorai.ops.spherical.functional.geodesic_distance_transform, panorai.ops.spherical.functional.measure_regions, panorai.ops.spherical.functional.region_adjacency_graph, panorai.ops.spherical.functional.region_boundaries, panorai.ops.spherical.functional.skeletonize, panorai.ops.spherical.functional.trace_contours, panorai.ops.spherical.functional.watershed

supported-blenders

Stable

panorai.blenders

panorai-blenders/v1

BlenderRegistry, BaseBlender, AverageBlender, FeatheringBlender, GaussianBlender, ClosestBlender, OverlapCounterBlender, OverlapStdBlender, OverlapStdFeatheredBlender, HuberBlender, average, gaussian, feathering, closest, huber, counter, std, std_feathered

spherical-image-processing

Experimental

panorai.image_processing

panorai-spherical-image-processing/v1

SphericalGradient, native_filter_available, reconstruct_laplacian_pyramid, spherical_bilateral_filter, spherical_box_blur, spherical_canny, spherical_equalize_histogram, spherical_filter2d, spherical_gaussian_blur, spherical_gaussian_pyramid, spherical_gradient, spherical_laplacian, spherical_laplacian_pyramid, spherical_median_blur, spherical_resize, spherical_rotate, spherical_sobel

spherical-image-processing-slic

Stable

panorai.image_processing

panorai-spherical-slic/v1

spherical_slic

research-blenders

Experimental

panorai.blenders

panorai-research-blenders/v1

HuberNoConfidenceBlender, HuberSpatialBlender, BundleAdjustmentBlender, huber_no_confidence, huber_spatial, bundle_adjustment

spherical-core-numpy

Experimental

panorai.core.numpy

panorai-core-operations/v1

Module, Sequential, SphericalAreaMean, SphericalAreaSum, SphericalAvgPool2d, SphericalConv2d, SphericalConvTranspose2d, SphericalFilter2d, SphericalGaussianBlur2d, SphericalGradient, SphericalLaplacian, SphericalMaxPool2d, SphericalNeighborhoodMax, SphericalNeighborhoodMin, SphericalResize, SphericalScaleExtrema, native_filter_available, spherical_bilateral_filter, spherical_box_blur, spherical_filter2d, spherical_gaussian_blur, spherical_gradient, spherical_laplacian, spherical_median_blur, spherical_resize, spherical_rotate, spherical_sobel, spherical_solid_angle_weights

spherical-model-workflow-numpy

Experimental

panorai.workflow.numpy

panorai-spherical-model-workflow/v1

SphericalImageModule

spherical-ops-core

Stable

panorai.ops.spherical

panorai-spherical-ops/v1

AreaAverage, AreaHistogram, BilateralFilter, BoxBlur, Canny, Filter2D, GaussianBlur, Gradient, Laplacian, MedianBlur, Resample, Resize, Rotate, Sobel, GaussianPyramid, LaplacianPyramid, SphericalNMS, functional, area_average, area_histogram, bilateral_filter, box_blur, canny, filter2d, gaussian_blur, gradient, laplacian, median_blur, resample, resize, rotate, sobel, panorai.ops.spherical, panorai.ops.spherical.functional.area_average, panorai.ops.spherical.functional.area_histogram, panorai.ops.spherical.functional.bilateral_filter, panorai.ops.spherical.functional.box_blur, panorai.ops.spherical.functional.canny, panorai.ops.spherical.functional.filter2d, panorai.ops.spherical.functional.gaussian_blur, panorai.ops.spherical.functional.gradient, panorai.ops.spherical.functional.laplacian, panorai.ops.spherical.functional.median_blur, panorai.ops.spherical.functional.resample, panorai.ops.spherical.functional.resize, panorai.ops.spherical.functional.rotate, panorai.ops.spherical.functional.sobel

spherical-ops-morphology

Stable

panorai.ops.spherical

panorai-spherical-morphology/v1

Closing, Dilate, Erode, GeodesicDisk, Opening, closing, dilate, erode, opening, panorai.ops.spherical.functional.closing, panorai.ops.spherical.functional.dilate, panorai.ops.spherical.functional.erode, panorai.ops.spherical.functional.opening

spherical-ops-slic

Stable

panorai.ops.spherical

panorai-spherical-slic/v1

SLIC

spherical-ops-dog-detector

Experimental

panorai.ops.spherical

panorai-spherical-dog-detector/v2

DoGDetector

spherical-algorithms-general

Stable

panorai.ops.spherical

panorai-spherical-ops/v1

Canny, GaussianPyramid, LaplacianPyramid, SphericalNMS

spherical-algorithms-slic

Stable

panorai.ops.spherical

panorai-spherical-slic/v1

SLIC

spherical-algorithms-dog-detector

Experimental

panorai.ops.spherical

panorai-spherical-dog-detector/v2

DoGDetector

spherical-ops-auto-experimental

Experimental

panorai.ops.spherical

panorai-spherical-ops/auto-experimental

—

Surface

Stability

Canonical import

Contract

Public components or entries

spherical-internimage-portability

Experimental

panorai.experimental.deep_learning

panorai-spherical-internimage/v1

DenseInternImageOutput, InternImageGAssets, InternImageGDenseClassifier, InternImageShardSpec, InternImageTermsNotAcceptedError, LoadedInternImageG, SphericalDCNv3, SphericalDCNv3Record, SphericalInternImagePortReport, acquire_internimage_g, attention_pool_class_contributions, load_pretrained_internimage_g, port_internimage_to_spherical, spherical_dcnv3_core, panorai.experimental.deep_learning.internimage.SPHERICAL_INTERNIMAGE_INTERFACE, panorai.experimental.deep_learning.internimage.INTERNIMAGE_G_REPOSITORY, panorai.experimental.deep_learning.internimage.INTERNIMAGE_G_REVISION, panorai.experimental.deep_learning.internimage.INTERNIMAGE_G_SHARDS, panorai.experimental.deep_learning.internimage.DenseInternImageOutput, panorai.experimental.deep_learning.internimage.InternImageGAssets, panorai.experimental.deep_learning.internimage.InternImageGDenseClassifier, panorai.experimental.deep_learning.internimage.InternImageShardSpec, panorai.experimental.deep_learning.internimage.InternImageTermsNotAcceptedError, panorai.experimental.deep_learning.internimage.LoadedInternImageG, panorai.experimental.deep_learning.internimage.SphericalDCNv3, panorai.experimental.deep_learning.internimage.SphericalDCNv3Record, panorai.experimental.deep_learning.internimage.SphericalInternImagePortReport, panorai.experimental.deep_learning.internimage.acquire_internimage_g, panorai.experimental.deep_learning.internimage.attention_pool_class_contributions, panorai.experimental.deep_learning.internimage.load_pretrained_internimage_g, panorai.experimental.deep_learning.internimage.port_internimage_to_spherical, panorai.experimental.deep_learning.internimage.spherical_dcnv3_core

deep-learning-support

Experimental

panorai.experimental.deep_learning

panorai-deep-learning-support/v1-experimental

DA3Assets, DA3METRIC_LARGE, DA3TermsNotAcceptedError, DA3_CANONICAL_FOCAL_PX, DA3_CHECKPOINT_REVISION, DA3_MODEL_ID, DA3_PATCH_SIZE, DA3_SOURCE, DA3_SOURCE_COMMIT, DenseFCNOutput, DenseSemanticEvidence, ExternalArtifactRecord, ExternalArtifactSpec, IMAGENET_PROXY_VOCABULARY, INTERNIMAGE_G_REPOSITORY, INTERNIMAGE_G_REVISION, INTERNIMAGE_G_SHARDS, ImageNetFCN, ImageNetWeightRecord, LoadedDA3MetricModel, LoadedImageNetModel, LoadedSphericalDepthModel, METRIC3D_CHECKPOINT_REVISION, METRIC3D_CONVNEXT_LARGE_V1, METRIC3D_CONVNEXT_TINY_V1, METRIC3D_SOURCE, METRIC3D_SOURCE_COMMIT, Metric3DAssets, PortedLayer, SPHERICAL_DA3_METRIC_DEPTH_INTERFACE, SPHERICAL_INTERNIMAGE_INTERFACE, SPHERICAL_METRIC_DEPTH_INTERFACE, SPHERICAL_PROXY_SEGMENTATION_INTERFACE, SPHERICAL_SEMANTIC_SEGMENTATION_INTERFACE, SPHERICAL_TORCH_CONVOLUTION_INTERFACE, SUPPORTED_IMAGENET_MODELS, Sam21Assets, Sam21HieraLargeSegmenter, Sam21TermsNotAcceptedError, SemanticProxyConcept, SphericalBinaryMask, SphericalConv2d, SphericalConvTranspose2d, SphericalResizeConv2d, SphericalMaskProposal, SphericalMaskProposalSet, SphericalMaxPool2d, SphericalPortReport, SphericalProxySegmenter, SphericalSeed, SphericalSegment, SphericalSegmentationConfig, SphericalSegmentationResult, SphericalSemanticSegmenter, UpstreamTermsNotAcceptedError, acquire_metric3d_convnext_large_v1, acquire_sam21_hiera_large, class_activation_map, concept_evidence_from_imagenet, fibonacci_coverage_seeds, load_pretrained_imagenet_model, load_sam21_hiera_large, load_spherical_metric3d_convnext_large_v1, merge_proposals, port_module, port_module_with_report, prefetch_imagenet_weights, resolve_panoptic_map, select_semantic_seeds, spherical_area_average, sphericalize, mask_rcnn, panorai.experimental.deep_learning.pretrained.SUPPORTED_IMAGENET_MODELS, panorai.experimental.deep_learning.pretrained.ImageNetWeightRecord, panorai.experimental.deep_learning.pretrained.LoadedImageNetModel, panorai.experimental.deep_learning.pretrained.load_pretrained_imagenet_model, panorai.experimental.deep_learning.pretrained.prefetch_imagenet_weights

spherical-core-torch

Stable

panorai.core.torch

panorai-core-operations/v1

SPHERICAL_TORCH_CONVOLUTION_INTERFACE, PortedLayer, Sequential, SphericalAreaMean, SphericalAreaSum, SphericalAvgPool2d, SphericalConv2d, SphericalConvTranspose2d, SphericalResizeConv2d, SphericalFilter2d, SphericalGaussianBlur2d, SphericalGradient, SphericalLaplacian, SphericalMaxPool2d, SphericalNeighborhoodMax, SphericalNeighborhoodMin, SphericalPortReport, SphericalResize, SphericalScaleExtrema, port_module, port_module_with_report, spherical_area_average, panorai.core.torch.porting.PortedLayer, panorai.core.torch.porting.SphericalPortReport, panorai.core.torch.porting.port_module, panorai.core.torch.porting.port_module_with_report, panorai.image_processing.torch.SPHERICAL_TORCH_CONVOLUTION_INTERFACE, panorai.image_processing.torch.PortedLayer, panorai.image_processing.torch.Sequential, panorai.image_processing.torch.SphericalAreaMean, panorai.image_processing.torch.SphericalAreaSum, panorai.image_processing.torch.SphericalAvgPool2d, panorai.image_processing.torch.SphericalConv2d, panorai.image_processing.torch.SphericalConvTranspose2d, panorai.image_processing.torch.SphericalResizeConv2d, panorai.image_processing.torch.SphericalFilter2d, panorai.image_processing.torch.SphericalGaussianBlur2d, panorai.image_processing.torch.SphericalGradient, panorai.image_processing.torch.SphericalLaplacian, panorai.image_processing.torch.SphericalMaxPool2d, panorai.image_processing.torch.SphericalNeighborhoodMax, panorai.image_processing.torch.SphericalNeighborhoodMin, panorai.image_processing.torch.SphericalPortReport, panorai.image_processing.torch.SphericalResize, panorai.image_processing.torch.SphericalScaleExtrema, panorai.image_processing.torch.port_module, panorai.image_processing.torch.port_module_with_report, panorai.image_processing.torch.spherical_area_average

spherical-model-workflow-torch

Experimental

panorai.workflow.torch

panorai-spherical-model-workflow/v1

SphericalImageModule

spherical-ops-torch

Stable

panorai.ops.spherical.nn

panorai-spherical-ops-torch/v1

AdaptiveAvgPool2d, AvgPool2d, Closing, Conv2d, ConvTranspose2d, Dilate, Erode, GlobalAveragePool, Interpolate, MaxPool2d, Opening, PlanarSpatialOperationError, Resize, Rotate, SphericalConv2d, SphericalConvTranspose2d, SphericalMaxPool2d, SphericalValidationReport, ValidatedLayer, from_planar, execute_with_masks, spherical_area_average, transform_grid, transform_mask, validate

1. Start with a function

Functional calls are concise for one operation. Configured immutable objects carry the same parameters into Pipeline and safe topology persistence.

import numpy as np  # noqa: F811 - repeated so the included example stands alone
from panorai.ops.spherical import GaussianBlur, area_average, sobel

gray = np.linspace(0.0, 1.0, 18 * 36, dtype=np.float32).reshape(18, 36)
blur = GaussianBlur(ksize=3, sigma=0.8, backend="numpy")
smooth = blur(gray)
east = sobel(gray, direction="east", backend="numpy")
spherical_mean = area_average(gray)

assert smooth.shape == east.shape == gray.shape
assert np.isfinite(spherical_mean)

sobel(..., direction="east") differentiates in the local tangent frame, not along a planar image axis. area_average weights the ERP by spherical surface area rather than raw pixel count.

2. Put an operation in a Pipeline

Pass an immutable operation such as GaussianBlur to OnSphere. The operation transforms values, support, validity and RasterGrid together. Shape-changing operations record anchor and stride history; a reduced lattice cannot masquerade as canonical ERP without explicit regridding.

For binary-mask cleanup, compose GeodesicDisk with Dilate, Erode, Opening or Closing. Their radius is a great-circle angle and the finite neighbour relation preserves the standard morphology laws. Continue with the spherical morphology tutorial.

3. Build Torch networks with spherical layers

panorai.ops.spherical.nn provides convolution, transposed convolution, pooling, resize and interpolation for torch.nn.Sequential. Run validate(model, input_shape=...) before execution: planar spatial layers, opaque containers and unverifiable functional spatial calls fail closed.

The Stable device contract covers CPU float32 and float64. CUDA and MPS may work through Torch but are not yet compatibility guarantees. Learned convolution propagates validity strictly; arbitrary learned weights are never renormalized as though they were an averaging kernel.

4. Distinguish general operations from algorithms

General filters, transforms and reductions are Stable. SLIC has its own Stable contract. DoG and the mixed algorithms gateway remain Experimental. Always check the imported symbol’s stability instead of inferring it from the module.

Read Sphere-aware operations for the mathematical distinction from planar ERP processing and Operations API for the full inventory. The detailed image-processing tutorial includes Canny, pyramids and equal-area histogram processing.