Expand description
Neuron voxels in FEAGI represent spatial locations containing neural activity.
In FEAGI’s visualization (such as Brain Visualizer), neurons are represented as voxels
where each voxel can contain one or more neurons. This module provides structures for
handling neuron voxel representations in various formats and containers.
Class-id encoding for single-layer (W×H×1) class maps.
Object segmentation input, object segmentation output, and classifier
detection twins carry one voxel per pixel. The class is the potential:
(class_id + 1) / class_count, always in (0, 1]. Zero means unlabeled,
so the Misc codec’s [-1, 1] range and near-zero cutoff both hold.
@cursor:ffi-safe - pure arithmetic, no allocation.
Constants§
- MAX_
CLASS_ COUNT - Largest class count the encoding supports. Misc drops
|p| <= 1e-4, so the smallest encoded class1 / class_countmust stay above that cutoff.
Functions§
- decode_
class_ potential - Class id carried by
potential, orNonewhen it names no class. - encode_
class_ potential - Potential for
class_idin a map ofclass_countclasses. - validate_
class_ count - Class counts must be in
1..=MAX_CLASS_COUNT.