qualia_plugin_snn.preprocessing.IntegrateEventsByFixedDuration module
Provide a preprocessing module to construct fixed-duration frames from event data.
- class qualia_plugin_snn.preprocessing.IntegrateEventsByFixedDuration.IntegrateEventsByFixedDuration[source]
Bases:
Preprocessing
[EventDataModel
,RawDataModel
]Preprocessing module to construct fixed-duration frames from event data.
- __init__(duration: int) None [source]
Construct
qualia_plugin_snn.preprocessing.IntegrateEventsByFixedDuration.IntegrateEventsByFixedDuration
.- Parameters:
duration (int) – Duration of frame
- Return type:
None
- __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 SpikingJelly’s implementation of
spikingjelly.datasets.integrate_events_segment_to_frame()
- Parameters:
datamodel (EventDataModel) – The input event-based dataset
- Returns:
The new frame dataset
- Return type: