qualia_plugin_snn.preprocessing.IntegrateEventsByFixedFramesNumber module
Provide a preprocessing module to construct fixed number of frames from a sample of event data.
- class qualia_plugin_snn.preprocessing.IntegrateEventsByFixedFramesNumber.IntegrateEventsByFixedFramesNumber[source]
Bases:
IntegrateEventsByFixedDuration
Preprocessing module to construct fixed number of frames from a sample of event data.
- __call__(datamodel: EventDataModel) RawDataModel [source]
Construct frames from events of the same sample of a
qualia_plugin_snn.datamodel.EventDataModel.EventDataModel
.Relies on sample indices (begin, end) from the info array to only collect events from the same sample.
Input data should be 2D event data with (t, x, y, p) columns or 1D event data with (t, x, p) columns. Output data has [N, H, W, C] or [N, W, C] dimensions
Uses a derivative of SpikingJelly’s implementation of
spikingjelly.datasets.integrate_events_by_fixed_frames_number()
- Parameters:
datamodel (EventDataModel) – The input event-based dataset
- Returns:
The new frame dataset
- Return type: