aestream

Efficient streaming of sparse event data supporting files, network I/O, GPU peripherals (via Torch/Jax/Numpy) and neuromorphic protocols

https://github.com/aestream/aestream

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 7 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.3%) to scientific vocabulary

Keywords

coroutines event-camera gpu-acceleration neuromorphic pytorch
Last synced: 6 months ago · JSON representation ·

Repository

Efficient streaming of sparse event data supporting files, network I/O, GPU peripherals (via Torch/Jax/Numpy) and neuromorphic protocols

Basic Info
Statistics
  • Stars: 81
  • Watchers: 5
  • Forks: 12
  • Open Issues: 29
  • Releases: 9
Topics
coroutines event-camera gpu-acceleration neuromorphic pytorch
Created over 5 years ago · Last pushed 7 months ago
Metadata Files
Readme License Citation Authors

README.md

Test status chat on Discord DOI

AEStream sends event-based data from A to B. AEStream is both a command-line tool an a C++/Python library with built-in GPU-acceleration for use with PyTorch, and Jax. We support reading and writing from files, event cameras, network protocols, and visualization tools.

Read more about the inner workings of the library in the AEStream publication.

Installation

Read more in our installation guide

The fastest way to install AEStream is by using pip: pip install aestream.

| Source | Installation | Description | | -------------------- | --- | --- | | pip | pip install aestream
pip install aestream --no-binary aestream | Standard installation
Support for event-cameras and CUDA kernels (more info) | | nix | nix run github:aestream/aestream
nix develop github:aestream/aestream | Command-line interface
Python environment | | docker | See Installation documentation |

Contributions to support AEStream on additional platforms are always welcome.

Usage (Python): Load event files

Read more in our Python usage guide

AEStream can process .csv, .dat, .evt3, and .aedat4 files like so. You can either directly load the file into memory

python FileInput("file.aedat4", (640, 480)).load()

or stream the file in real-time to PyTorch, Jax, or Numpy

python with FileInput("file.aedat4", (640, 480)) as stream: while True: frame = stream.read("torch") # Or "jax" or "numpy" ...

Usage (Python): stream data from camera or network

Streaming data is particularly useful in real-time scenarios. We currently support Inivation, Prophesee, and SynSense devices over USB, as well as the SPIF protocol over UDP. Note: requires local installation of drivers and/or SDKs (see installation guide).

```python

Stream events from a DVS camera over USB

with USBInput((640, 480)) as stream: while True: frame = stream.read() # A (640, 480) Numpy tensor ... ```

```python

Stream events from UDP port 3333 (default)

with UDPInput((640, 480), port=3333) as stream: while True: frame = stream.read("torch") # A (640, 480) Pytorch tensor ... ```

More examples can be found in our example folder. Please note the examples may require additional dependencies (such as Norse for spiking networks or PySDL for rendering). To install all the requirements, simply stand in the aestream root directory and run pip install -r example/requirements.txt

Example: real-time edge detection with spiking neural networks

We stream events from a camera connected via USB and process them on a GPU in real-time using the spiking neural network library, Norse using fewer than 50 lines of Python. The left panel in the video shows the raw signal, while the middle and right panels show horizontal and vertical edge detection respectively. The full example can be found in example/usb_edgedetection.py

Usage (CLI)

Read more in our CLI usage documentation page

Installing AEStream also gives access to the command-line interface (CLI) aestream. To use aestraem, simply provide an input source and an optional output sink (defaulting to STDOUT):

bash aestream input <input source> [output <output sink>]

Supported Inputs and Outputs

| Input | Description | Example usage | | --------- | :----------- | ----- | | DAVIS, DVXPlorer | Inivation DVS Camera over USB | input inivation | | EVK Cameras | Prophesee DVS camera over USB | input prophesee | | File | Reads .aedat, .aedat4, .csv, .dat, or .raw files | input file x.aedat4 | | SynSense Speck | Stream events via ZMQ | input speck | | UDP network | Receives stream of events via the SPIF protocol | input udp

| Output | Description | Example usage | | --------- | ----------- | ----- | | STDOUT | Standard output (default output) | output stdout | Ethernet over UDP | Outputs to a given IP and port using the SPIF protocol | output udp 10.0.0.1 1234 | | File: .aedat4 | Output to .aedat4 format | output file my_file.aedat4 | | File: .csv | Output to comma-separated-value (CSV) file format | output file my_file.csv | | Viewer | View live event stream | output view

CLI examples

| Example | Syntax | | ------------- | ------------------------------| | View live stream of Inivation camera (requires Inivation drivers) | aestream input inivation output view | | Stream Prophesee camera over the network to 10.0.0.1 (requires Metavision SDK) | aestream input output udp 10.0.0.1 | | Convert .dat file to .aedat4 | aestream input example/sample.dat output file converted.aedat4 |

Acknowledgments

AEStream is developed by (in alphabetical order):

The work has received funding from the EC Horizon 2020 Framework Programme under Grant Agreements 785907 and 945539 (HBP) and by the Deutsche Forschungsgemeinschaft (DFG, German Research Fundation) under Germany's Excellence Strategy EXC 2181/1 - 390900948 (the Heidelberg STRUCTURES Excellence Cluster).

Thanks to Philipp Mondorf for interfacing with Metavision SDK and preliminary network code.

Citation

Please cite aestream if you use it in your work:

```bibtex @inproceedings{10.1145/3584954.3584997, author = {Pedersen, Jens Egholm and Conradt, Jorg}, title = {AEStream: Accelerated event-based processing with coroutines}, year = {2023}, isbn = {9781450399470}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, url = {https://doi.org/10.1145/3584954.3584997}, doi = {10.1145/3584954.3584997}, booktitle = {Proceedings of the 2023 Annual Neuro-Inspired Computational Elements Conference}, pages = {86–91}, numpages = {6}, keywords = {coroutines, event-based vision, graphical processing unit, neuromorphic computing}, location = {San Antonio, TX, USA, }, series = {NICE '23} }

```

Owner

  • Name: AEStream
  • Login: aestream
  • Kind: organization
  • Email: jens@jepedersen.dk

Efficient streaming of sparse event data supporting files, network I/O, GPU peripherals (via Torch) and neuromorphic protocols

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: AEStream
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - given-names: Jens Egholm
    family-names: Pedersen
    email: jens@jepedersen.dk
    affiliation: KTH Royal Institute of Technology
    orcid: 'https://orcid.org/0000-0001-6012-7415'
  - given-names: Jörg
    family-names: Conradt
    email: conr@kth.se
    affiliation: KTH Royal Institute of Technology
    orcid: 'https://orcid.org/0000-0001-5998-9640'
identifiers:
  - type: doi
    value: 10.1145/3584954.3584997
    description: >-
      NICE '23: Proceedings of the 2023 Annual
      Neuro-Inspired Computational Elements Conference
repository-code: 'https://github.com/aestream/aestream'
url: 'https://aestream.github.io'
abstract: >-
  Neuromorphic sensors imitate the sparse and event-based
  communication seen in biological sensory organs and
  brains. Today’s sensors can emit many millions of
  asynchronous events per second, which is challenging to
  process on conventional computers. To avoid bottleneck
  effects, there is a need to apply and improve concurrent
  and parallel processing of events.


  We present AEStream: a library to efficiently stream
  asynchronous events from inputs to outputs on conventional
  computers. AEStream leverages cooperative multitasking
  primitives known as coroutines to concurrently process
  individual events, which dramatically simplifies the
  integration with event-based peripherals, such as
  event-based cameras and (neuromorphic) asynchronous
  hardware. We explore the effects of coroutines in
  concurrent settings by benchmarking them against
  conventional threading mechanisms, and find that AEStream
  provides at least twice the throughput. We then apply
  AEStream in a real-time edge detection task on a GPU and
  demonstrate 1.3 times faster processing with 5 times fewer
  memory operations.
keywords:
  - event-based vision
  - neuromorphic computing
  - graphical processing unit
  - coroutines
license: MIT

GitHub Events

Total
  • Issues event: 1
  • Watch event: 13
  • Issue comment event: 3
  • Push event: 2
  • Pull request event: 2
Last Year
  • Issues event: 1
  • Watch event: 13
  • Issue comment event: 3
  • Push event: 2
  • Pull request event: 2

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 5 days
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 5 days
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Jegp (7)
  • SumanthJain2998 (2)
  • neworderofjamie (1)
  • jingyang-huang (1)
  • andreapignaz (1)
  • Huizerd (1)
Pull Request Authors
  • Jegp (9)
  • holesond (1)
  • Huizerd (1)
  • neural-loop (1)
Top Labels
Issue Labels
enhancement (4) help wanted (3) good first issue (1) bug (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 115 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 0
  • Total versions: 7
  • Total maintainers: 1
pypi.org: aestream

Streaming library for Address-Event Representation (AER) data

  • Versions: 7
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 115 Last month
Rankings
Dependent packages count: 4.7%
Stargazers count: 9.9%
Forks count: 11.9%
Downloads: 18.9%
Average: 22.6%
Dependent repos count: 67.4%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/build.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • cachix/install-nix-action v18 composite
.github/workflows/publish.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • pypa/cibuildwheel v2.10.2 composite
  • pypa/gh-action-pypi-publish v1 composite
example/requirements.txt pypi
  • matplotlib *
  • norse *
  • pysdl2 *
  • pysdl2-dll *
.github/workflows/documentation.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v3 composite
  • peaceiris/actions-gh-pages v3 composite
Dockerfile docker
  • ubuntu 20.04 build
pyproject.toml pypi
  • nanobind >=1.2
  • numpy *
  • pysdl2-dll *