Skip to main content
A Lens is a software interface that allows developers to configure and interact with Newton. Lenses define how sensor data flows in and out of Newton and specify how Newton should interpret that data for a given use case.

Parameter Categories

Lens parameters fall into two categories:
  • Basic Parameters control core behavior like analysis focus, timing, and output format. These are the primary settings you’ll adjust for your use case.
  • Advanced Parameters fine-tune performance characteristics like buffering, model replicas, and token limits. Default values work well for most applications.

Activity Monitor Lens

The Activity Monitor Lens analyzes camera data to identify activities, movements, or events within a scene. It detects human and object behaviors for applications like workflow monitoring, interaction tracking, and space usage analysis.

Basic Parameters

ParameterDescriptionDefaultNotes
instructionDefines the lens’s role, objective, and output formatAnswer the following question about the video:Include role context, target behaviors, and response formatting
focusSteers what the model prioritizes in the sensor streamDescribe the video.Narrow analysis to specific behaviors or conditions without retraining
temporal_focusControls how video frames are sampled over time5Temporal focus is defined as an integer in the number of seconds” This means over 5 seconds, 5 samples 5 frames are analyzed; higher values distribute frames across longer windows

Instruction Format

Structure your instruction with these components:
[ROLE] You are a smart camera monitoring a conveyor belt in a manufacturing facility.
[OBJECTIVE] Detect complete work stoppages that require human intervention.
[OUTPUT FORMAT] ALERT: [reason in 5-7 words].

Advanced Parameters

ParameterDescriptionDefaultNotes
camera_buffer_sizeNumber of frames kept in buffer before processing5Buffer size of 5 means model sees 5 frames per inference
camera_buffer_step_sizeStep size for frame sampling5Step of 5 frames means next window starts 5 frames later
memory_prompt_buffer_sizePrevious lens responses kept in prompt history0Keep default for best results
max_new_tokensMaximum tokens generated during inference512Keep default for best results
min_replicasMinimum model replicas maintained1Keep default for best results
max_replicasMaximum model replicas allowed1Keep default for best results

Activity Monitor Lens

Full documentation and configuration examples for the Activity Monitor Lens

Machine State Lens

The Machine State Lens classifies operational states of machines using sensor measurements. It distinguishes between normal operation, stressed conditions, and anomaly or failure modes like overheating, mechanical wear, or misalignment. The lens supports one-shot and few-shot classification, allowing adaptation to new machines without retraining.

Basic Parameters

ParameterDescriptionDefaultNotes
input_n_shotLabeled CSV examples for each machine stateAt least one example required per state; format must match incoming data
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

CSV Configuration Parameters

ParameterDescriptionNotes
timestamp_columnColumn containing time informationUsed to order and label predictions
data_columnsSensor columns to analyzeUpdate to match your CSV structure; maximum 4 variates supported

Advanced Parameters

ParameterDescriptionDefaultNotes
buffer_sizeTime points kept in buffer per variate1024
min_replicasMinimum model replicas maintained1Keep default for best results
max_replicasMaximum model replicas allowed1Keep default for best results

KNN Configuration Parameters

ParameterDescriptionDefault
n_neighborsNumber of neighbors for classification5
metricDistance metricmanhattan
weightsWeight functiondistance
algorithmAlgorithm for neighbor computationball_tree
normalize_embeddingsWhether to normalize embeddingsfalse

Machine State Lens

Full documentation and configuration examples for the Machine State Lens