Skip to main content

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

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

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

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).

# Stream events from a DVS camera over USB
with USBInput((640, 480)) as stream:
    while True:
        frame = stream.read() # A (640, 480) Numpy tensor
        ...
# 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):

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:

@misc{aestream,
  doi = {10.48550/ARXIV.2212.10719},
  url = {https://arxiv.org/abs/2212.10719},
  author = {Pedersen, Jens Egholm and Conradt, Jörg},
  title = {AEStream: Accelerated event-based processing with coroutines},
  publisher = {arXiv},
  year = {2022},
}

Metadata

Release files for aestream 0.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aestream 0.6.4
File Size Uploaded
aestream-0.6.4.tar.gz 241.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for aestream 0.6.4
File
aestream-0.6.4-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
aestream-0.6.4-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
aestream-0.6.4-cp39-cp39-manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64 Details
aestream-0.6.4-cp38-cp38-manylinux_2_28_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.28+ x86-64 Details

Total release size: 12.9 MB

Release files / aestream-0.6.4.tar.gz

Download URL aestream-0.6.4.tar.gz
Size 241.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2ce8f653bf7a3e44873ea9924a68bb696fbcfeb30fb10f8727362c8e095d99c5
BLAKE2b-256 checksum
How to use checksums
35db58bd11dd132c7dc00be004a101c637a6e9d07d600858462db96f2e0facb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / aestream-0.6.4-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL aestream-0.6.4-cp311-cp311-manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
59128d0270994700a6fba61480d526d2a05053d1102e11837bd0bcc114e3b176
BLAKE2b-256 checksum
How to use checksums
4ac7dcb7046f0f26e725a5de90cea1328ca35de70d280b70ca8552bac0d1d16a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / aestream-0.6.4-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL aestream-0.6.4-cp310-cp310-manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
0a2de3ce8bed8f8be94fd124eccc8f24b0c7cbe161b8a08727171ca25d612966
BLAKE2b-256 checksum
How to use checksums
57e747d82fda143b650b9e5273a7f81d1d567c5f4cf6133b81f39c2b2e749cda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / aestream-0.6.4-cp39-cp39-manylinux_2_28_x86_64.whl

Download URL aestream-0.6.4-cp39-cp39-manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b1454d64da4f36c3541a1e10af42d5766854b315ab6e5211743edb067c63e1e5
BLAKE2b-256 checksum
How to use checksums
3ec2c81b82a8380fe384e3c9766d6826b3a0726856a4570392a3ae7815ef76e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release files / aestream-0.6.4-cp38-cp38-manylinux_2_28_x86_64.whl

Download URL aestream-0.6.4-cp38-cp38-manylinux_2_28_x86_64.whl
Size 3.2 MB
Tags CPython 3.8 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c99edd99f7b4e9dc743bd793c1608f713d1d221355e3a042d7ac84ced6cc5fbd
BLAKE2b-256 checksum
How to use checksums
b17d03b727195dbc540eb0fbf73b06ae9fcf1c8229d045badfdb7b5395fea267
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.6.4 This release

5 release files

0.6.3

4 release files

0.6.2

4 release files

0.6.0

4 release files

0.5.1

1 release file

0.4.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page