Skip to content

api: add compatible models in the app brick details #89

@dido18

Description

@dido18

Motivation

When a brick is assigned to an app, the FE must show the list of other compatible models for the installed brick.
For example when a new model is selected for a given brick installed into an app.

Proposal

 curl 127.0.0.1:8800/v1/apps/ZXhhbXBsZXM6dmlkZW8tZmFjZS1kZXRlY3Rpb24/bricks/arduino:video_object_detection 
{
  "id": "arduino:video_object_detection",
  "name": "Video Object Detection",
  "author": "Arduino",
  "category": "",
  "status": "installed",
  "variables": {
    "CUSTOM_MODEL_PATH": "/home/arduino/.arduino-bricks/ei-models/",
    "EI_OBJ_DETECTION_MODEL": "/models/ootb/ei/yolo-x-nano.eim",
    "VIDEO_DEVICE": "/dev/video1"
  },
  "config_variables": [
    {
      "name": "CUSTOM_MODEL_PATH",
      "value": "/home/arduino/.arduino-bricks/ei-models/",
      "description": "path to the custom model directory",
      "required": false
    },
    {
      "name": "EI_OBJ_DETECTION_MODEL",
      "value": "/models/ootb/ei/yolo-x-nano.eim",
      "description": "path to the model file",
      "required": false
    },
    {
      "name": "VIDEO_DEVICE",
      "value": "/dev/video1",
      "description": "",
      "required": false
    }
  ],
  "model": "face-detection"

   // the list of compatible models for the brick with minimal info.
   "models":[
       {
        "id": "yolox-object-detection",
        "name": "General purpose object detection - YoloX",
        "description": "",
  
         // TODO: what to show in the  "more info" button? Maybe only the "url"? 
      },
      {
        "id": "face-detection",
        "name": "Lightweight-Face-Detection",
        "description": "Face bounding box detection. This model is trained on the WIDER FACE dataset and can detect faces in images.",
      },
    },
    {
      "id": "arduino:web_ui",
      "name": "WebUI - HTML",
      "author": "Arduino",
      "category": "ui",
      "status": "installed"
    }
  ]
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions