Skip to main content
The Activity Monitor Lens analyzes camera data to identify the activities, movements, or events occurring within a scene. It can detect a wide range of human or object behaviors, making it useful for applications such as monitoring workflows, tracking interactions, or observing space usage patterns. These insights help developers understand what is happening in an environment in real time and build systems that respond to meaningful activity.

Configuration Example

Here is an example configuration for the Activity Monitor lens:
lens_name: Activity Monitor Lens
lens_parameters:
  instruction: |
    You are an intelligent dashcam attached to the front of a car,
    looking for safety hazards to keep your driver safe. 
    This includes reckless driving, people and also debris in the road 
    such as car parts.
    ONLY when you see something hazardous or unsafe, respond 
    with a notification in the following format {Alert: Description 
    of safety hazard}. Do not include brackets in your message.
    Respond in less than 8 words. You are an expert.
  focus: safety equipment, vehicle movement, potential hazards
  temporal_focus: 5
model_parameters:
  model_version: Newton::c2_1_250408d4362cc9

Running the Lens

Try the Activity Monitor Lens in the command line, or through the no-code workbench with the following example files.

Activity Monitor CLI Example

Step-by-step guide to running the Activity Monitor lens from the command line

Activity Monitor Workbench Example

Step-by-step guide to running the Machine State Lens in a no-code environment

Lens Inputs

The Activity Monitor Lens supports analysis on one-or-more input camera streams from either a live camera or pre-recorded video. See the following data streams on how to hook up a real-time or pre-recorded video:

Lens Parameters

The Activity Monitor Lens contains a set of basic and advanced parameters to tune based on your specific use cases.

Basic Parameters
  • Instructions define the Lens’s overall purpose and analysis behavior. They specify how the video should be interpreted, including:
    • The role and objective
    • Example situations or behaviors to analyze
    • Output logic and formatting
    • Here’s a simple example:[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].
  • Focus is a runtime control that steers what the model prioritizes within the sensor stream without requiring retraining. It allows you to narrow analysis to specific behaviors or conditions
  • Temporal Focus controls how video frames are sampled over time
    • Default (temporal_focus = 5): Samples 5 frames over 5 seconds
    • Higher values: Distribute the same number of frames across longer time windows
    • Example: temporal_focus = 5 samples 5 frames over 5 seconds.
Advanced Parameters (these are set to the best defaults)
  • Camera Buffer Size: Number of frames to keep in the camera buffer before processing. e.g., buffer size = 5 → model sees 5 frames per inference
  • Camera Buffer Step Size: Step size for camera buffer frame sampling. e.g., step size = 5 frames → next window starts 5 frames later
  • Memory Prompt Buffer Size: How many previous lens responses kept in prompt history (keep default 0 or 10 for best results).
  • Max New Tokens: Max number of new tokens to generate during model inference. (keep at default for best results).
  • Min Replicas: Minimum number of model replicas to maintain for the Lens. (keep at default for best results).
  • Max Replicas: Max number of model replicas allowed for the Lens. (keep at default for best results).

Lens Outputs

Like all Lenses, the Activity Monitor Lens outputs a continuous stream of Events. A developer can connect one-or-more output streams from a lens to allow them to consume the events.