evt3 โ fast EVT3 decoder for Prophesee event cameras
Read Prophesee and Metavision event camera
recordings into NumPy, CSV, or Rust. evt3 decodes the EVT3 (EVT 3.0)
encoding used by Prophesee event-based vision sensors, from .raw and
optionally HDF5 files. It ships as a command-line tool, a Python package, and
a Rust library.
1.62x faster than the optimized C++ reference in a like-for-like full-CSV benchmark, with byte-identical checked output.
Built for event-based vision, neuromorphic engineering, and DVS data analysis
when you need event streams as plain x, y, p, t arrays without
installing a full camera SDK.
Features
- ๐ High Performance - 55M events/second for Python decode-only and 1.62x faster than C++ for full CSV output
- ๐ฆ Multiple Interfaces - CLI tool, Python bindings, Rust library
- ๐ NumPy-native Python - stable
Eventsarrays for analysis without clone-on-access surprises - ๐ญ AugurRS Ingress - publish decoded or transformed NumPy event arrays into AugurRS for interactive preview, 3D inspection, viewer tools, and plugin workflows
- ๐งช Optional HDF5 Input -
.h5and.hdf5support behind a cargo feature - โ Validated - Checked CSV output matches the C++ reference byte for byte
- ๐ง Customizable - Configurable output field order
Quick Start
Install with Cargo
The evt3-cli crate installs a binary named evt3. To use the decoder as a
Rust library instead, depend on the evt3 crate:
One-Line Install (Linux/macOS)
|
This downloads the binary to ~/.local/bin/evt3. You may need to add it to your PATH:
# Add to ~/.bashrc or ~/.zshrc
Download Pre-built Binary
Download from Releases:
| Platform | Binary |
|---|---|
| Linux x64 | evt3-linux-x64 |
| Linux ARM64 | evt3-linux-arm64 |
| macOS Intel | evt3-macos-x64 |
| macOS Apple Silicon | evt3-macos-arm64 |
| Windows | evt3-windows-x64.exe |
# Example for macOS Apple Silicon
Python Package
Using uv (recommended):
Or with pip:
Published wheels target CPython 3.9 through 3.14, including the free-threaded CPython 3.14 build.
Note: The pip package supports
.rawfiles only. HDF5 (.h5/.hdf5) requires building from source โ see HDF5 Inputs below.
Build from Source
# Clone repository
# Build CLI (requires Rust)
# The binary is at: ./target/release/evt3
# Optional HDF5 support
HDF5_DIR=""
# Optional: Install to PATH
# Build Python package (requires Python 3.9+, uv + Rust 1.83+)
Usage
CLI
# Decode to CSV (default: x,y,p,t)
# Timestamp-first format
# Binary output (more efficient)
# Include trigger events
# Quiet mode
Python
# Decode a .raw or .h5 file โ format is auto-detected by extension
=
= # requires hdf5 feature at build time
# Access as NumPy arrays (zero-copy)
= # np.ndarray[uint16]
= # np.ndarray[uint16]
= # np.ndarray[uint8]
= # np.ndarray[uint64] (microseconds)
# Repeated access returns stable array objects
assert is
assert is
assert is
assert is
# Basic analysis
# Create pandas DataFrame
=
# Existing decode_file code stays unchanged and now uses the optimized
# columnar decoder internally. Process bounded batches when the full recording
# does not need to stay in memory:
# Preserve external trigger events in the bounded-memory workflow:
# Preserve decoder state across arbitrary live-input chunk borders:
=
Python To AugurRS
evt3 can publish decoded or transformed NumPy event arrays into a running
AugurRS session. This makes Python a
lightweight analysis and filtering environment while AugurRS provides the
interactive event-camera application: live-style preview, 3D raw-event
inspection, viewer tools, exports, and plugins.
=
# Optional Python-side filtering or analysis.
=
=
=
=
You can also create an Events container from existing NumPy arrays:
=
For repeated sends, reuse the loopback session:
The first ingress stage is deliberately copy-based and bounded: event chunks
are packed into AugurRS' 14-byte packed_xypt_v1 decoded-event transport and
sent over loopback TCP. The connector validates dtype, shape, geometry, and
timestamp ordering before sending so mistakes fail close to the Python code.
Rust Library
use Evt3Decoder;
let mut decoder = new;
let result = decoder.decode_file?;
println!;
for event in result.cd_events.iter.take
For live camera pipelines or embedded integrations, you can stream raw USB
packet bytes directly into the decoder without converting to Vec<u16> first:
use Evt3Decoder;
let mut decoder = new;
let mut cd_events = Vecnew;
let mut trigger_events = Vecnew;
for chunk in usb_packet_chunks
decoder.finish_stream?;
This keeps evt3 usable in incremental preview paths while preserving the
existing file and word-based APIs.
Notes:
decode_bufferstill expects 16-bit EVT3 words, not raw bytes.decode_bytesexpects little-endian EVT3 payload bytes and can be called with odd-sized chunks.- Call
finish_stream()only when the stream is complete so a trailing half-word is reported as an error instead of being buffered for the next chunk. .h5and.hdf5decoding is available when the crate or binary is built with thehdf5feature.decode_fileremains source-compatible and returns the sameEventsAPI. It now decodes directly into NumPy's columnar layout and releases the Python GIL.decode_file_batchesis the bounded-memory option for large recordings. Usedecode_file_batches_with_triggerswhen external trigger edges are also required. The arrays in a batch remain valid after the iterator advances, but retaining all batches naturally retains the full recording.
HDF5 Inputs
Important: HDF5 support requires
libhdf5(a native C library) and is not included inpip install evt3or pre-built CLI binaries. It must be built from source. See docs/features/hdf5-file-support.md for the full limitations table.
# macOS
HDF5_DIR=""
# Ubuntu / Debian
Most Prophesee HDF5 files use the ECF compression codec, which requires an additional runtime plugin:
# Build and install the ECF plugin (one-time, macOS/Linux/Windows)
# Then set the plugin path before running
Notes:
- Builds without
--features hdf5return a clear error rather than silently failing. - Real-data integration tests that skip still show as
ok. Run with-- --show-outputto see[SKIP]reasons. - Full plugin and dependency documentation: docs/features/hdf5-file-support.md
Benchmarks
Tested on Apple Silicon macOS with laser.raw (325 MB, 116,300,447 events).
Both CLI implementations decoded the complete file, formatted the same CSV,
and wrote it to /dev/null. Each mean uses five alternating measured runs
after one warm-up per implementation.
| Decoder | Mean time | Events/sec | Speedup |
|---|---|---|---|
| Rust CLI | 7.414 s | 15.69M/s | 1.62x |
C++ reference (-O3 -DNDEBUG) |
12.028 s | 9.67M/s | 1.00x |
An instrumented run measured 63.3 MB maximum RSS for Rust and 28.3 MB for C++. Rust is faster in this workload; the C++ reference uses less memory. The CSV outputs had the same SHA-256 hash on an 8-MiB input prefix. Python's 2.108-second full-memory decode is reported separately because it does not format CSV and is not directly comparable with this table.
Run benchmarks yourself:
Output Formats
CSV
Human-readable, with optional geometry header:
%geometry:1280,720
642,481,1,10960097
783,415,1,10960139
...
Binary (.bin)
Efficient packed format for programmatic access:
- 8-byte magic header:
EVT3BIN\0 - 24-byte metadata: version, width, height, event count
- Events: 14 bytes each (x:u16, y:u16, polarity:u8, pad:u8, timestamp:u64)
EVT 3.0 Format
EVT 3.0 is a 16-bit vectorized event encoding from Prophesee. This decoder supports:
| Event Type | Code | Description |
|---|---|---|
| EVT_ADDR_Y | 0x0 | Y coordinate |
| EVT_ADDR_X | 0x2 | Single event (X + polarity) |
| VECT_BASE_X | 0x3 | Base X for vectors |
| VECT_12 | 0x4 | 12-event vector |
| VECT_8 | 0x5 | 8-event vector |
| EVT_TIME_LOW | 0x6 | Lower 12 bits of timestamp |
| EVT_TIME_HIGH | 0x8 | Upper 12 bits of timestamp |
| EXT_TRIGGER | 0xA | External trigger |
For full specification: Prophesee EVT 3.0 Documentation
Project Structure
evt3/
โโโ evt3-core/ # Rust decoder library -> crate `evt3`
โโโ evt3-cli/ # Command-line tool -> crate `evt3-cli`, binary `evt3`
โโโ evt3-python/ # Python bindings (PyO3) -> PyPI package `evt3`
โโโ benchmarks/ # Performance benchmarks
โโโ test_data/ # Sample EVT3 files
Contributing
See CONTRIBUTING.md for development setup and guidelines.
License
Licensed under the MIT License - see LICENSE-MIT for details.