Skip to main content
Lens processors are components within a lens’s model_pipeline that define how data is processed. They are configured in the lens_config when registering or modifying a lens.

Types of Lens Processors

The following processors are available:

Configuration Example

A processor can be selected by passing in the processor name key within the model pipeline in a lens configuration:
Note: The processor_config can be skipped if it is empty (it will automatically be added by the backend).

Processor Parameters

Camera Processor

Timeseries State Processor

Sensor Logs Processor

Output Writers

A lens’s model_pipeline ends with an output writer processor that decides where inference results are sent. Each lens uses exactly one output channel — outputs do not appear on both at once. The Activity Monitor lens and most cookbook lenses use server_sent_events_writer for output. To check which writer a specific lens uses, inspect its model_pipeline via GET /lens/metadata. If you are reading from session.read but seeing event_data: null while GET /lens/sessions/metadata reports non-zero num_outputs, the lens is writing to the SSE channel — switch to the consumer endpoint.

Best Practices

  • Always destroy sessions when done to free resources
  • Use appropriate buffer sizes for your data type
  • Match input data format to processor requirements
The documentation focuses more on Lenses as the primary interface, with processors being internal components. For troubleshooting, check session status via the API and ensure proper authentication.

Additional Resources: