Spatial¶
3D spatial representations for spike-domain processing.
VoxelGrid,PointCloud,SpatialTransformer3D
from sc_neurocore.spatial import VoxelGrid, PointCloud
sc_neurocore.spatial
¶
sc_neurocore.spatial -- Tier: research (experimental / research).
VoxelGrid
dataclass
¶
A 3D Voxel Grid representation for SC. Each voxel stores a probability of being 'occupied'.
Source code in src/sc_neurocore/spatial/representations.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | |
get_as_bitstream(length=256)
¶
Converts the voxel grid to a 4D bitstream (X, Y, Z, Length).
Source code in src/sc_neurocore/spatial/representations.py
32 33 34 35 36 37 | |
PointCloud
dataclass
¶
A Point Cloud representation. Each point has (x, y, z) coordinates and an associated probability/intensity.
Source code in src/sc_neurocore/spatial/representations.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
SpatialTransformer3D
dataclass
¶
A transformer block specialized for 3D spatial data. Processes voxel grids using SC attention.
Source code in src/sc_neurocore/spatial/transformer_3d.py
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
forward(voxel_grid)
¶
Input: voxel_grid (res, res, res) We flatten the spatial dims to (res^3, 1) or similar to apply attention. For simplicity, we treat each voxel as a 'token'.
Source code in src/sc_neurocore/spatial/transformer_3d.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |