From 38e5fd3e9fb61dc29db36e88ba52c670a16e5e27 Mon Sep 17 00:00:00 2001 From: Felix Reichenbach <38431269+felixreichenbach@users.noreply.github.com> Date: Tue, 12 Dec 2023 10:23:37 +0100 Subject: [PATCH] Configuration examples added --- README.md | 12 +++- viam_service_config.json.template | 65 ++++++++++++++++++++++ viam_transform_camera_config.json.template | 12 ++++ 3 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 viam_service_config.json.template create mode 100644 viam_transform_camera_config.json.template diff --git a/README.md b/README.md index 5d53ac9..6367dfb 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,17 @@ Navigate to the **Config** tab of your robot’s page in [the Viam app](https:// The following attributes are available for `directai:viamintegration:directai-beta` vision services: -### TODO: add overview of attributes +### Example Viam Configuration + +DirectAI module Viam vision service sample configuration: + +[DirectAI Viam Vision Service Config](viam_service_config.json.template) + + +Viam transform camera sample configuration: + +[Viam Transform Camera Config](viam_transform_camera_config.json.template) + ### Example Access JSON diff --git a/viam_service_config.json.template b/viam_service_config.json.template new file mode 100644 index 0000000..d197314 --- /dev/null +++ b/viam_service_config.json.template @@ -0,0 +1,65 @@ +{ + "access_json": "directai_credentials.json", + "deployed_detector": { + "nms_threshold": 0.1, + "detector_configs": [ + { + "name": "head", + "examples_to_include": [ + "head" + ], + "detection_threshold": 0.1 + }, + { + "name": "fist", + "examples_to_include": [ + "fist" + ], + "examples_to_exclude": [ + "open hand", + "hand" + ], + "detection_threshold": 0.1 + } + ] + }, + "deployed_classifier": { + "classifier_configs": [ + { + "name": "kitchen", + "examples_to_include": [ + "kitchen" + ], + "examples_to_exclude": [] + }, + { + "name": "living room", + "examples_to_include": [ + "living room" + ], + "examples_to_exclude": [] + }, + { + "name": "bedroom", + "examples_to_include": [ + "bedroom" + ], + "examples_to_exclude": [] + }, + { + "name": "office", + "examples_to_include": [ + "office" + ], + "examples_to_exclude": [] + }, + { + "name": "bathroom", + "examples_to_include": [ + "bathroom" + ], + "examples_to_exclude": [] + } + ] + } +} \ No newline at end of file diff --git a/viam_transform_camera_config.json.template b/viam_transform_camera_config.json.template new file mode 100644 index 0000000..51a4453 --- /dev/null +++ b/viam_transform_camera_config.json.template @@ -0,0 +1,12 @@ +{ + "source": "<-YOUR VIAM CAMERA NAME->", + "pipeline": [ + { + "type": "detections", + "attributes": { + "detector_name": "<-YOUR VIAM VISION SERVICE NAME->", + "confidence_threshold": 0.1 + } + } + ] +} \ No newline at end of file