Aedat
AEDAT 3.1 and AEDAT 4.0 address event decoding in C++
Install / Use
/learn @cpehle/AedatREADME
aedat - address event encoding library
aedat contains unofficial decoders for the AEDAT 3.1 and 4.0 formats used by the dynamic vision sensors of iniVation. In addition it provides support for converting polarity events into pytorch sparse tensors, thereby providing a building block for using dynamic vision sensors in conjunction with pytorch based machine learning algorithms.
Dataset viewer
The viewer requires SDL2 and libtorch is needed to build the converter.
To build the viewer and converter binaries
export CMAKE_PREFIX_PATH=`absolute path to libtorch/`
mkdir build/
cd build/
cmake -GNinja ..
The viewer can then be used to view the example data
./viewer ../example_data/ibm/user01_natural.aedat
or to view data from the gesture dataset
./viewer ../example_data/ibm/user01_natural.aedat ../example_data/ibm/user01_natural_labels.csv
Python bindings
In order to build and install the python bindings run
python setup.py install
this assumes that you have pytorch 1.5.1 installed.
A minimal example of using the AEDAT3.1 import functionality is then
import torch # Needs to be first otherwise you will encounter an error
import aedat
data = aedat.AEDAT("example_data/ibm/user01_natural.aedat")
events = aedat.convert_polarity_events(data.polarity_events)
An example working with the gesture dataset is
import torch
import aedat
dvs = aedat.DVSGestureData(
"example_data/ibm/user01_natural.aedat",
"example_data/ibm/user01_natural_labels.csv"
)
for element in dvs.datapoints
label = element.label
events = aedat.convert_polarity_events(element.events)
To use the AEDAT4 formatted data you can try the following:
import torch
import aedat
import numpy as np
import mathplotlib.pyplot as plt
data = aedat.AEDAT4("example_data/kth/example.aedat4")
# display the first frame
pixels = data.frames[0].pixels
width, height = data.frames[0].width, data.frames[0].height
im = np.array(pixels).reshape(height, width, 3)
plt.imshow(im)
plt.show()
# convert the polarity events to a sparse pytorch tensor
events = aedat.convert_polarity_events(data.polarity_events)
Related Skills
node-connect
352.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
