Skip to content

Commit

Permalink
DOCS-2558: Update how service models are displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel committed Jun 20, 2024
1 parent 410ad69 commit 0bb5927
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 41 deletions.
9 changes: 2 additions & 7 deletions docs/services/generic/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,9 @@ If you want to use most of an existing API but need just a few other functions,

## Supported models

### Built-in models
{{<resources_svc api="rdk:service:generic" type="generic">}}

For configuration information, click on the model name:

<!-- prettier-ignore -->
| Model | Description |
| ----- | ----------- |
| [`fake`](fake/) | A model used for testing a generic service. |
{{< readfile "/static/include/create-your-own-mr.md" >}}

## Control your machine with Viam's client SDK libraries

Expand Down
13 changes: 1 addition & 12 deletions docs/services/ml/deploy/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,7 @@ For example, you can configure an [`mlmodel` vision service](/services/vision/)

## Supported models

### Built-in models

You can use the following built-in model of the service:

<!-- prettier-ignore -->
| Model | Description |
| ----- | ----------- |
| [`tflite_cpu`](./tflite_cpu/) | Runs a TensorFlow Lite model that you have [trained](/services/ml/train-model/) or [uploaded](/services/ml/upload-model/) on the CPU of your machine. |

### Modular resources

{{<modular-resources api="rdk:service:mlmodel" type="ML model">}}
{{<resources_svc api="rdk:service:mlmodel" type="ML model">}}

{{< alert title="Add support for other models" color="tip" >}}
If none of the existing models of the ML model service fit your use case, you can create a {{< glossary_tooltip term_id="modular-resource" text="modular resource" >}} to add support for it.
Expand Down
22 changes: 1 addition & 21 deletions docs/services/vision/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,7 @@ Any camera that can return 3D pointclouds can use 3D object segmentation.

## Supported models

To use a vision service with Viam, check whether one of the following [built-in models](#built-in-models) or [modular resources](#modular-resources) supports your use case.

{{< readfile "/static/include/create-your-own-mr.md" >}}

### Built-in models

For configuration information, click on the model name:

<!-- prettier-ignore -->
| Model | Description <a name="model-table"></a> |
| ----- | -------------------------------------- |
| [`mlmodel`](./mlmodel/) | A detector or classifier that uses a model available on the machine’s hard drive to draw bounding boxes around objects or returns a class label and confidence score. |
| [`color_detector`](./color_detector/) | A heuristic detector that draws boxes around objects according to their hue (does not detect black, gray, and white). |
| [`obstacles_pointcloud`](./obstacles_pointcloud/) | A segmenter that identifies well-separated objects above a flat plane. |
| [`detector_3d_segmenter`](./detector_3d_segmenter/) | A segmenter that takes 2D bounding boxes from an object detector and projects the pixels in the bounding box to points in 3D space. |
| [`obstacles_depth`](./obstacles_depth/) | A segmenter for depth cameras that returns the perceived obstacles as a set of 3-dimensional bounding boxes, each with a Pose as a vector. |
| [`obstacles_distance`](./obstacles_distance/) | A segmenter that takes point clouds from a camera input and returns the average single closest point to the camera as a perceived obstacle. |

### Modular resources

{{<modular-resources api="rdk:service:vision" type="vision">}}
{{<resources_svc api="rdk:service:vision" type="vision">}}

{{< readfile "/static/include/create-your-own-mr.md" >}}

Expand Down
2 changes: 1 addition & 1 deletion layouts/_default/list.typesense.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@

{{- $.Scratch.Set "id" (printf "builtin:rdk:service:%s:%s" (strings.Replace (strings.ToLower .Parent.LinkTitle) " " "_" ) (strings.ToLower .LinkTitle) ) -}}
{{- if eq .Parent.LinkTitle "Deploy Model" -}}
{{- $.Scratch.Set "api" (printf "rdk:service:ml" ) -}}
{{- $.Scratch.Set "api" (printf "rdk:service:mlmodel" ) -}}
{{- else -}}
{{- if eq .Parent.LinkTitle "Generic Service" -}}
{{- $.Scratch.Set "api" (printf "rdk:service:generic" ) -}}
Expand Down
21 changes: 21 additions & 0 deletions layouts/shortcodes/resources_svc.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<p>To use your {{.Get "type" }} service, check whether one of the following models supports it.
</p>
<p>For configuration information, click on the model name:
</p>
<div id="searchbox"></div>
<div id="searchstats"></div></p>
<div class="mr-component" id="{{ .Get "api" }}">
<div class="modellistheader">
<div class="name">Model</div>
<div>Description</div>
</div>
<div id="hits" class="modellist">
</div>
<div id="pagination"></div>
</div>
<noscript>
<div class="alert alert-caution" role="alert">
<h4 class="alert-heading">Javascript</h4>
<p>Please enable javascript to see and search models.</p>
</div>
</noscript>

0 comments on commit 0bb5927

Please sign in to comment.