PyAER - Low-level Python APIs for Accessing Neuromorphic Devices

Yuhuang Hu

GitHub release Build Status

Installation

  1. Install libcaer dependency
$ sudo apt-get install libusb-1.0-0-dev
$ git clone https://github.com/inilabs/libcaer.git
$ cd libcaer
$ cmake -DCMAKE_INSTALL_PREFIX=/usr .  # for Linux
# for macOS: cmake -DCMAKE_INSTALL_PREFIX=/usr/local .
$ make
$ make install

NOTE: For more information, see libcaer repo.

  1. Directly install from pip (RECOMMEND)

Download the compiled wheel file from the latest release and install it via pip

$ pip install pyaer-latest-release.whl

NOTE: The wheel file is built based on the bleeding-edge of libcaer. It’s recommended to install libcaer from source than from other packaging system.

NOTE: We will start shipping pypi release from beta release.

  1. Install from source
$ git clone https://github.com/duguyue100/pyaer-beta.git
$ make install

Got a Linux?

libcaer relies on libusb based driver, you won’t be able to access the camera unless fixing the udev rules. Refer details from here

$ sudo touch /etc/udev/rules.d/65-inilabs.rules

Append following contents in the file with sudo

# All DVS/DAVIS systems
SUBSYSTEM=="usb", ATTR{idVendor}=="152a", ATTR{idProduct}=="84[0-1]?", MODE="0666"
# eDVS 4337
SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6014", MODE="0666"

Updating rules

$ udevadm control --reload

Unplug and replug the camera.

Running Examples

The scripts folder provides some examples for you to play with:

  1. dvs128-test: you need OpenCV to run this example, note that if you are on Mac, OpenCV’s waitKey() function may cause delay of displaying frames.

  2. dvs128-glumpy: you need glumpy package to run this example. glumpy is a fast visualization library based on OpenGL. We found it’s very fast to render images. In our case, we use GLFW backend. If glumpy couldn’t find your installed GLFW on your system, make sure you set the GLFW_LIBRARY variable to /your/glfw/library/path/libglfw.so.

  3. dvs240-test: you need OpenCV to run this example.

  4. dvs346-test: you need OpenCV to run this example.

More examples are coming…

Read more at project readme

Contacts

Yuhuang Hu
Email: duguyue100@gmail.com