neuromorphs.net

Download Report

Transcript neuromorphs.net

Basics of jAER
Tobi Delbruck, Christian Brandli,
Dan Neil
Inst. of Neuroinformatics
• This tutorial is for first-time users of jAER, the real-time
event-processing project for AER sensors and robots.
• See http://jaer.wiki.sourceforge.net for the main wiki of
the project.
What is AER?
•
•
Address Event Representation
Every event is coded by:
A time
o An address
o (extensible)
o
•
Why AER?
AE sensors have digital output and thus
can interface to any form of logic
PC INI jAER
Shorter development time
More “programmable”
Embedded DSP
FPGA
Higher unit cost, power
ARC (industry partners)
Univ. of Sevilla (CAVIAR)
AE
sensor
Synchronous systolic logic
Asynchronous logic
Longer development time
AER neuromorphic
CAVIAR project
Less “programmable”
Lower power
More long term payoff
Events gain extended interpretation
as they are processed
Types of event processors
• Filters remove noise, redundancy, or other
unwanted spikes
• Labelers add additional annotation to events
• Trackers use spikes to track objects
Filter examples
Tracker example
Labeler example
ABCs of jAER
Installation (JDK+netbeans)
• Download the combined JDK+netbeans
installer.
• You only need Java SE (Standard Edition). Not
EE (Enterprise Edition) etc.
• Install all of that
• Install TortoiseSVN (on Windows)
• Check out a working copy of jAER
Using subversion
• jAER is currently using Subversion.
• Subversion (SVN) is a version control system
• It’s being replaced by git gradually
• In SVN, you have a working copy. You start
every day with an update of your working
copy. You make changes, add new classes,
etc. When you are ready (usually at least
every day), you
• add your new files
• commit your changes, including an informative
comment. Tobi will ban you if you don’t.
Writing your own event processor
• See the jAER
wikihttp://jaer.wiki.sourceforge.net/
ABCs of jAER
An EventFilter2D example that computes
the mean event location
• Our filter receives events, computes a running
mean x and y location,
• It displays this location by drawing a box around
the mean x and y.
• It also can filter out events that are too far away
from this location.
• It has a property tauMs for the filter time constant.
ABCs of jAER
An EventFilter2D example
We add a tooltip to document the
property
• In the constructor
Events come in packets from
separate hardware IO thread
• The AEReader class that is part of the AEChip
HardwareInterface is running all the time,
collecting events in AEPacketRaw packets of
raw events.
• These raw packets are delivered to the main
loop in AEViewer, where the EventExtractor
forms the EventPacket that you process.
BasicEvent, PolarityEvent, etc
• Reminder
Iterating over EventPacket
• You iterate over the events in your packet:
• For each event, you must cast it to the type
you expect. Example:
• You are allowed to iterate EventPacket over
Object or BasicEvent. For any other event
type, you must cast.
The filterPacket method
Annotating graphics
• We use OpenGL graphics, via JOGL (Java
Bindings for OpenGL)
• To annotate, implement FrameAnnotator, and
your annotate method will be called with a
graphics context that has coordinates in pixels
(chip.getSizeX(),chip.getSizeY())
(0,0)
The annotate method
The mixingRate getter/setter
The resetFilter method
• Put initialization code here
Get a username at sf.net and send
tobi the username.
• You can then be given subversion commit
rights
• Rules for committing:
1. Your code builds clean after you update and
“Clean and Build All” (F11)
2. You’ve added all your classes
3. You’ve followed standard java convention
1. Packages are all lowercase
2. Classes start with a big letter
ABCs of jAER
Using jAER
In the FilterFrame, select View/Select Filters….
Enables filter
Hides/Shows controls
of this filter
Goes to jAER wiki page for this filter
Homework!
•
•
•
Extend MeanEventLocationTracker to change box size according to the standard deviation in x
and y
(Demo)
Hints:
o
xdev = x - xmean
o
Adding two new variables, xdev and ydev, could keep track of the standard deviation...