sinabs icon indicating copy to clipboard operation
sinabs copied to clipboard

Make it easy to record events from hardware

Open ssinhaleite opened this issue 2 years ago • 2 comments

Currently it is not straightforward to record data from hardware (either from the vision sensor or layer outputs) without providing any input.

For example, if I just want to record data from the speck sensor for a given duration, I would not know how to do this with sinabs-dynapcnn (without writing lower-level samna code).

ssinhaleite avatar Dec 05 '23 13:12 ssinhaleite

There is a way that is probably not documented, nor tested:

  1. Instantiate a DynapcnnNetwork with a sequential that only contains a DVSLayer.
  2. Deploy that network onto chip with the to method, passing monitor_layers = ["dvs"]
  3. To record, call the forward method of the DynapcnnNetwork instance. As argument pass a list with one single dummy event that has as timestamp the desired recording duration (in microseconds).
  4. The return value will be a list of all events recorded from the DVS within the specified duration.

This issue could probably be solved by adding proper documentation to the procedure above and a unit test that ensures it works.

bauerfe avatar Nov 12 '24 11:11 bauerfe

Good place to add to the docs: https://sinabs.readthedocs.io/en/v2.0.0/speck/the_basics.html

bauerfe avatar Nov 14 '24 12:11 bauerfe