Spherical-Implicit-Neural-Representation
Spherical-Implicit-Neural-Representation unifies Fourier features (SIREN) [1], pure Spherical Harmonics (SphericalSirenNet) [3], and our learnable Herglotz‐map encodings [2] into a single PyTorch toolbox. Build implicit neural representations on:
- $\mathbb{S}^2$ (HerglotzNet, SphericalSirenNet)
- Volumetric data in $\mathbb{R}^3$ with radial basis (solid harmonics)
- Generic $\mathbb{R}^d$ inputs via FourierPE, HerglotzPE
Coordinate conventions:
- Angles: $\theta \in [0,\pi], \varphi \in[0,2\pi)$ in radians.
- Full spherical: $(r, \theta, \varphi)$.
📦 Installation
pip install spherical-inr
OR for development:
git clone https://github.com/yourusername/spherical_inr.git
cd spherical_inr
pip install -e .
🚀 Quickstart
import torch
from spherical_inr import HerglotzNet
# Create a HerglotzNet: harmonic order L → num_atoms=(L+1)**2
model = HerglotzNet(
num_atoms = 50, # spherical-harmonic degree
mlp_sizes=[64,64], # two hidden layers of width 64
output_dim=1, # scalar output per direction
)
# Random spherical angles (θ,φ)
x = torch.rand(16,2) * torch.tensor([torch.pi, 2*torch.pi])
y = model(x)
📚 References
- Sitzmann, M., Martel, J., Berg, R., Lindell, D. B., & Wetzstein, G. (2021). Implicit Neural Representations with Periodic Activation Functions (SIREN). Advances in Neural Information Processing Systems (NeurIPS). https://arxiv.org/abs/2006.09661
- Hanon, T., et al. (2025). Herglotz-NET: Implicit Neural Representation of Spherical Data with Harmonic Positional Encoding. arXiv preprint arXiv:2502.13777. https://arxiv.org/abs/2502.13777
- Rußwurm, M., Klemmer, K., Rolf, E., Zbinden, R., & Tuia, D. (2024). Geographic Location Encoding with Spherical Harmonics and Sinusoidal Representation Networks. arXiv preprint arXiv:2310.06743. https://arxiv.org/abs/2310.06743
Metadata
Release files for spherical-inr 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spherical_inr-1.0.1.tar.gz | 64.2 kB | With provenance | Details for spherical_inr-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spherical_inr-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for spherical_inr-1.0.1-py3-none-any.whl |
Total release size: 129.8 kB
Release files / spherical_inr-1.0.1.tar.gz
| Download URL | spherical_inr-1.0.1.tar.gz |
|---|---|
| Size | 64.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce546f5c003ac025041c3114c14d32cf4293074c6c870b0594f1e000fa595141
|
|
BLAKE2b-256 checksum How to use checksums |
3fca0917bd5de978903dbc76f410a8677e28850dd34f1f6226c8c506fb6c6000
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 16, 2026.
Transparency logRelease files / spherical_inr-1.0.1-py3-none-any.whl
| Download URL | spherical_inr-1.0.1-py3-none-any.whl |
|---|---|
| Size | 65.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af5e3dca3935282b883e7e7b8c11106447e6142678bc42ca3062fb2acdbcdcf8
|
|
BLAKE2b-256 checksum How to use checksums |
b76fed5224fd3fa1fd63b79dde903fbe2facf0fb7c0b2157d8edcca3fd5261e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 16, 2026.
Transparency logSecurity for spherical-inr 1.0.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
Both files in this release have been uploaded with provenance metadata.
Attestation for spherical_inr-1.0.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 Sep 16, 2026.
Transparency logA 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.