lava
lava copied to clipboard
Processes for Event-based data loading and pre-processing
Issue Number:
Objective of pull request: This PR adds Processes for Event-based data loading and pre-processing.
Pull request checklist
Your PR fulfills the following requirements:
- [ ] Issue created that explains the change and why it's needed
- [x] Tests are part of the PR (for bug fixes / features)
- [ ] Docs reviewed and added / updated if needed (for bug fixes / features)
- [ ] PR conforms to Coding Conventions
- [x] PR applys BSD 3-clause or LGPL2.1+ Licenses to all code files
- [ ] Lint (
flakeheaven lint src/lava tests/) and (bandit -r src/lava/.) pass locally - [ ] Build tests (
pytest) passes locally
Pull request type
Please check your PR type:
- [ ] Bugfix
- [x] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation changes
- [ ] Other (please describe):
What is the current behavior?
- No standard Processes for handling Event-based data.
What is the new behavior?
Standard Processes for handling Event-based data (loading and pre-processing) would become available.
- Currently supported Event IO Processes:
- AedatStream : Streams event data loaded from aedat4 files.
- DvStream : Streams event data from the DV software for INIvation cameras, through a TCP connection
- Currently supported Event pre-processor Processes:
- BinaryToUnaryPolarity : Converts binary polarity events (0 for negative events, 1 for positive events) to unary polarity events (1 for both negative and positive events)
- EventsToFrame : Transforms sparsely represented list of Events into a densely represented frame of Events. Two modes of operation supported:
- 2D Output (shape (W, H, 1)) : In this case, input is assumed to be unary. Output is of shape (W, H, 1) where 0 means no Event and 1 means Event (positive or negative) in the unique channel. Negative and positive polarities are both encoded as 1.
- 3D Output (shape (W, H, 2)) : In this case, input is assumed to be binary. Output is of shape (W, H, 2) where 0 means no Event and 1 means negative Event in the first channel and 0 means no Event and 1 means positive Event in the second channel.
- Other Process that is more general but could be used as an Event pre-processor:
- MaxPooling: Applies the max-pooling operation on incoming data with shape (W, H, C) where C is not necessarily 1 or 2.
Does this introduce a breaking change?
- [ ] Yes
- [x] No