Registry / ai-ml / pyequilib

pyequilib

JSON →
library0.5.8pypypi✓ verified 86d ago

A Python library for equirectangular image processing with minimum dependencies. Current version 0.5.8 supports numpy and PyTorch tensors, providing transforms like equi2pers, pers2equi, equi2cube, cube2equi, and horizontal/vertical shift. Release cadence is irregular; last release Dec 2022.

pip install pyequilib
INSTALL
IMPORT
SIG · PYEQUILIB
P
pyequilib
ai-mlpythonv0.5.8
Install
3.8s avg
Import
Disk
90MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 90.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.000s · 87MB
90MB installed
● package 90MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

equi2pers
from equilib import equi2pers
Common mistake is importing from equilib.numpy or equilib.torch directly.
Equi2Pers
from equilib import Equi2Pers
Class-based API also available, same import path.

Converts an equirectangular image to a perspective (rectilinear) view. The rots and fovs are in degrees.

import numpy as np from equilib import equi2pers # Create a sample equirectangular image (height, width, channels) equi_img = np.random.rand(512, 1024, 3).astype(np.float32) # Parameters for perspective view h_fov = 90 # horizontal field of view in degrees v_fov = 60 # vertical field of view in degrees yaw = 0 # rotation around y-axis pitch = 0 # rotation around x-axis roll = 0 # rotation around z-axis height = 256 width = 256 # Generate perspective image pers_img = equi2pers( equi_img, rots=[yaw, pitch, roll], # in degrees fovs=[h_fov, v_fov], # in degrees height=height, width=width, ) print(pers_img.shape) # (256, 256, 3)
Debug
Known issues
breakingIn version 0.5.0, the signature of grid_sample changed significantly. If upgrading from older versions (e.g., 0.3.x), code relying on the old grid_sample arguments will break.
fix
Update calls to use the new grid_sample interface; see release notes for details.
affects: < 0.5.0
deprecatedFunctions that automatically detect input type (numpy vs torch) may be deprecated in favour of explicit module imports from equilib.numpy or equilib.torch.
fix
Use from equilib.numpy import equi2pers or from equilib.torch import equi2pers for clarity and future compatibility.
affects: >= 0.5.0
gotchaDefault clipping (clip_output=True) clamps output to [0,1] for float images. If your input has values outside that range, set clip_output=False. This is especially important for HDR or raw data.
fix
Pass clip_output=False to functions like equi2pers or equi2cube to disable clamping.
affects: >= 0.5.8
gotchaThe coordinate system is z-axis up (right-hand rule). Older versions (pre-0.3.0) had z-axis down. This affects rotation directions. Ensure your yaw/pitch/roll match the z-up convention.
fix
Review the docs for the coordinate convention. For conversions from earlier versions, negate pitch or roll accordingly.
affects: >= 0.3.0
Errors
Common errors & fixes
AttributeError: module 'equilib' has no attribute 'equi2pers'
The library version is too old (<0.2.0) or incorrectly installed.
fix
Upgrade to the latest version: pip install --upgrade pyequilib
ModuleNotFoundError: No module named 'torch'
Attempting to use PyTorch-specific functions when PyTorch is not installed.
fix
Install PyTorch: pip install torch, or use numpy-only functions: from equilib.numpy import equi2pers
ValueError: Unknown input type: <class 'list'>
Functions expect numpy arrays or torch tensors, not lists.
fix
Convert input to numpy array: np.array(your_list)
Upgrade
Version history
0.5.8latest on PyPI · released Jan 17, 2024
Audit
Dependencies
numpyrequiredCore dependency for array operations
torchoptionalOptional for PyTorch tensor support
Agent activity
8 hits · last 30 days
node
6
OpenAI (training)
1
Resources
pyequilib — pip install pyequilib · libregistry