Package: aestream
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 withPyTorch, andJax.
We support reading and writing from files,event cameras, network protocols, and visualization tools.Read more about the inner workings of the library inthe AEStream publication.InstallationRead more in ourinstallation guideThe fastest way to install AEStream is by using pip:pip install aestream.SourceInstallationDescriptionpippip install aestreampip install aestream --no-binaryStandard installationCompilation with support forevent-camerasand CUDA kernels*nixnix run github:aestream/aestreamnix develop github:aestream/aestreamCommand-line interfacePython environmentdockerSeeInstallation documentationContributions to support AEStream on additional platforms are always welcome.Usage (Python): Load event filesRead more in ourPython usage guideAEStream can process.csv,.dat,.evt3, and.aedat4files like so.
You can either directly load the file into memoryFileInput("file.aedat4",(640,480)).load()or stream the file in real-time to PyTorch, Jax, or NumpywithFileInput("file.aedat4",(640,480))asstream:whileTrue:frame=stream.read("torch")# Or "jax" or "numpy"...Usage (Python): stream data from camera or networkStreaming data is particularly useful in real-time scenarios.
We currently supportInivation,Prophesee, andSynSensedevices over USB, as well as theSPIFprotocol over UDP.
Note: requires local installation of drivers and/or SDKs (seeinstallation guide).# Stream events from a DVS camera over USBwithUSBInput((640,480))asstream:whileTrue:frame=stream.read()# A (640, 480) Numpy tensor...# Stream events from UDP port 3333 (default)withUDPInput((640,480),port=3333)asstream:whileTrue:frame=stream.read("torch")# A (640, 480) Pytorch tensor...More examples can be found inour example folder.
Please note the examples may require additional dependencies (such asNorsefor spiking networks orPySDLfor rendering). To install all the requirements, simply stand in theaestreamroot directory and runpip install -r example/requirements.txtExample: real-time edge detection with spiking neural networksWe stream events from a camera connected via USB and process them on a GPU in real-time using thespiking neural network library, Norseusing 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 inexample/usb_edgedetection.pyUsage (CLI)Read more in ourCLI usage documentation pageInstalling AEStream also gives access to the command-line interface (CLI)aestream.
To useaestraem, simply provide aninputsource and an optionaloutputsink (defaulting to STDOUT):aestreaminput<inputsource>[output<outputsink>]Supported Inputs and OutputsInputDescriptionExample usageDAVIS, DVXPlorerInivationDVS Camera over USBinput inivationEVK CamerasPropheseeDVS camera over USBinput propheseeFileReads.aedat,.aedat4,.csv,.dat, or.rawfilesinput file x.aedat4SynSense SpeckStream events via ZMQinput speckUDP networkReceives stream of events via theSPIF protocolinput udpOutputDescriptionExample usageSTDOUTStandard output (default output)output stdoutEthernet over UDPOutputs to a given IP and port using theSPIF protocoloutput udp 10.0.0.1 1234File:.aedat4Output to.aedat4formatoutput file my_file.aedat4File:.csvOutput to comma-separated-value (CSV) file formatoutput file my_file.csvViewerView live event streamoutput viewCLI examplesExampleSyntaxView live stream of Inivation camera (requires Inivation drivers)aestream input inivation output viewStream Prophesee camera over the network to 10.0.0.1 (requires Metavision SDK)aestream input output udp 10.0.0.1Convert.datfile to.aedat4aestream input example/sample.dat output file converted.aedat4AcknowledgmentsAEStream is developed by (in alphabetical order):Cameron Barker (@GitHubcameron-git)Juan Pablo Romero Bermudez(@GitHubjpromerob)Alexander Hadjivanov (@Githubcantordust)Emil Jansson (@GitHubemijan-kth)Jens E. Pedersen(@GitHubjegp)Christian Pehle(@GitHubcpehle)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 toPhilipp Mondorffor interfacing with Metavision SDK and preliminary network code.CitationPlease citeaestreamif 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},}