diff --git a/docs/data-ai/ai/act.md b/docs/data-ai/ai/act.md index 7a01ca971a..a8f461b9c3 100644 --- a/docs/data-ai/ai/act.md +++ b/docs/data-ai/ai/act.md @@ -15,6 +15,20 @@ At the end of each step, you'll learn how to apply the step to a fictional examp ## Prerequisites +{{% expand "A running machine connected to Viam." %}} + +{{% snippet "setup-both.md" %}} + +{{% /expand%}} + +{{< expand "A configured camera and vision service." >}} + +Follow the instructions to [configure a camera](/operate/reference/components/camera/) and [run inference](/data-ai/ai/run-inference/). + +{{< /expand >}} + +{{% expand "The Viam CLI." %}} + {{< table >}} {{% tablestep start=1 %}} **Install the CLI.** @@ -47,6 +61,8 @@ Organizations for "user@viam.com": {{% /tablestep %}} {{< /table >}} +{{% /expand%}} + ## Create a module To program your machine's behavior based on the output of a vision service, create a resource that makes use of the vision service as input and controls the resources that should actuate based on the input. diff --git a/docs/data-ai/ai/alert.md b/docs/data-ai/ai/alert.md index 5354cfda73..a5a5a06122 100644 --- a/docs/data-ai/ai/alert.md +++ b/docs/data-ai/ai/alert.md @@ -5,36 +5,45 @@ weight: 60 layout: "docs" type: "docs" description: "Use machine learning and send alerts when an inference meets certain criteria." +date: "2025-10-10" --- -Triggers can send alerts in the form of email notifications or webhook requests when a new data is synced to the cloud. -If you then configure a filtered camera or another modular resource that uploads data only when a specific detection or classification is made, you get a notification. +Triggers can send alerts in the form of email notifications or webhook requests when new data syncs to the cloud. + +This guide shows you how to set up an alert system that notifies you when specific objects or classifications are detected in your camera feed. +The process involves three resources: + +1. **Filtered Camera**: Filters images passed to the data management service +2. **Data Management**: Syncs filtered images to the cloud +3. **Triggers**: Sends alerts when data syncs For example, a trigger could alert you when a camera feed detects an anomaly. ### Prerequisites +Before setting up alerts, you need: + {{% expand "A running machine connected to Viam." %}} {{% snippet "setup-both.md" %}} -{{% /expand%}} +{{% /expand %}} {{< expand "A configured camera and vision service." >}} +You'll need a working vision service that can detect objects or classifications. +The filtered camera will use this service to determine which images to capture. Follow the instructions to [configure a camera](/operate/reference/components/camera/) and [run inference](/data-ai/ai/run-inference/). {{< /expand >}} ## Configure a filtered camera -You can use a camera and vision service to sync only images where an inference is made with the [`filtered-camera`](https://app.viam.com/module/viam/filtered-camera) {{< glossary_tooltip term_id="module" text="module" >}}. -This camera module takes the vision service and applies it to your webcam feed, filtering the output. -With this filtering, you can save only images that contain people who match your filtering criteria. +The [`filtered-camera`](https://app.viam.com/module/viam/filtered-camera) {{< glossary_tooltip term_id="module" text="module" >}} functions as a normal camera unless used with the data management service. +When you configure the data management service to capture and sync images from the camera, the camera will only pass images to the data management service if they meet the defined criteria. +The camera module takes a vision service and applies it to a camera feed using the generated predictions to filter the output for the data management service. -Configure the camera module with classification or object labels according to the labels your ML model provides that you want to alert on. - -Complete the following steps to configure your module: +Configure the filtered camera module to capture images when specific predictions occur: 1. Navigate to your machine's **CONFIGURE** tab. @@ -49,24 +58,26 @@ Complete the following steps to configure your module: {{< tabs >}} {{% tab name="Template" %}} - Replace the `` and `` placeholders with values for your use case: + Replace the `` and `` values with the names of your camera and vision service. + + **Choose your detection type**: + + - For **object detection** (bounding boxes around objects): Use the `objects` configuration with the label you want to alert on and remove `classifications` + - For **classification** (image-level labels): Use the `classifications` configuration with the label you want to alert on and remove `objects` + + The confidence threshold (0.0-1.0) determines how certain the vision model must be before capturing photos. + For example, a confidence threshold of `0.6` only captures photos when the vision model is at least 60% sure that it has correctly identified the desired label. ```json {class="line-numbers linkable-line-numbers"} { - "camera": "", - "vision_services": [ - { - "vision": , - "classifications": ..., - "objects": ... - }, - { - "vision": , - "classifications": ..., - "objects": ... - } - ], - "window_seconds": , + "camera": "", + "vision_services": [ + { + "vision": "", + "classifications": { "