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:
Processor NamePurposeFile Types
lens_camera_processorProcesses camera/video data for activity monitoring.mp4 videos
lens_timeseries_state_processorProcesses time-series sensor data for machine state classification.csv files
lens_sensor_logs_processorProcesses sensor logs.jsonl files

Configuration Example

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

Processor Parameters

Camera Processor

ParameterDescriptionDefaultNotes
camera_buffer_sizeNumber of frames kept in buffer before processing5Buffer size of 5 means the model sees 5 frames per inference
camera_buffer_step_sizeStep size for frame sampling5Step of 5 frames means the next window starts 5 frames later

Timeseries State Processor

ParameterDescriptionDefaultNotes
window_sizeNumber of rows analyzed together1024Smaller values (256) give more frequent predictions; larger values (2048) provide more context
step_sizeRows to advance between predictions1024Controls prediction frequency
input_n_shotLabeled CSV examples for each machine stateAt least one example required per state; format must match incoming data

Sensor Logs Processor

ParameterDescriptionDefaultNotes
sensor_buffer_sizeNumber of sensor log entries kept in the buffer5The processor waits until the buffer contains this many entries before running inference. When the buffer exceeds this size, older entries are removed.
input_buffer_step_sizeStep size for sampling incoming sensor events1Controls how many incoming events are skipped between samples. A value of 1 means every event is buffered; a value of 3 means only every 3rd event is buffered. Must be greater than 0.

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: