Metadata-Version: 2.4
Name: talon-io
Version: 0.0.1
Summary: TALON IO: Streaming I/O, event processing, and sensor integration for TALON hardware
Author-email: Anurag Daram <anurag@type1compute.com>, Subham Kumar Das <subham@type1compute.com>
Maintainer-email: Type 1 Compute <dev@type1compute.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/type1compute/talonio
Project-URL: Documentation, https://type1compute.github.io/docs/talon-ecosystem/introduction
Project-URL: Repository, https://github.com/type1compute/talonio.git
Project-URL: Issues, https://github.com/type1compute/talonio/-/issues
Project-URL: Changelog, https://github.com/type1compute/talonio/-/releases
Keywords: talon,neuromorphic,spiking-neural-network,event-streaming,spike-encoding,type1compute
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy<3,>=1.24.0
Provides-Extra: h5
Requires-Dist: h5py>=3.8.0; extra == "h5"
Provides-Extra: metavision
Requires-Dist: metavision_core; extra == "metavision"
Provides-Extra: inivation
Requires-Dist: dv-processing; extra == "inivation"
Provides-Extra: tonic
Requires-Dist: tonic>=1.6.0; extra == "tonic"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
Requires-Dist: Cython>=3.0; extra == "dev"
Requires-Dist: inline-snapshot>=0.31.0; extra == "dev"
Dynamic: license-file

# TALON I/O

Streaming I/O, event processing, and neural encoding for TALON neuromorphic systems. Provides vectorized event streaming, spike encoding, and format conversion for spike-based inference pipelines.

## Installation

```bash
uv add talon-io
```

Optional extras for vendor camera file import:
```bash
uv add talon-io[metavision]  # EVT2/EVT3 file import
uv add talon-io[tonic]       # Numba-accelerated transforms
```

## Features

- **Event Streaming**: Buffered zero-copy event reading (23M+ events/sec)
- **Neural Encoding**: Rate (Poisson), temporal (time-to-first-spike), delta, latency encoding
- **Frame Conversion**: Events to dense frames and spike rasters (vectorized)
- **Multi-Sensor Sync**: Temporal alignment across multiple event sources
- **Network Streaming**: UDP event receiver for real-time hardware inference
- **Vendor Format Import** (optional): EVT2/EVT3, AEDAT4 file adapters

## Quick Start

```python
from talon.io import streaming, encoding, formats
import numpy as np

# Stream events from binary file
reader = streaming.BufferedEventReader("events.bin", chunk_size=10000)
for chunk in reader:
    print(f"Chunk: {len(chunk)} events")

# Encode static images as spike trains for SNN inference
image = np.random.rand(28, 28).astype(np.float32)
spikes = encoding.rate_encode(image, n_steps=100, rate_scale=1.0)
print(f"Spike train shape: {spikes.shape}")

# Convert events to dense frames
events = streaming.generate_random_events(50000, sensor_size=(640, 480))
frames = formats.events_to_frames(events, sensor_size=(640, 480), n_frames=10)
print(f"Frames shape: {frames.shape}")
```

## License

MIT
