This topic describes how to define a model input parameter for a custom task using the ENVIDeepLearningOnnxModel type.

ENVI Deep Learning supports custom task definitions that use ONNX models through the ENVIDeepLearningOnnxModel parameter type. The model parameter specifies the model input for a task. It supports the following deep learning models:

  • Object detection
  • Pixel segmentation
  • Grid classification

Task Parameter Definition


To define a model input parameter in your custom task, use the following structure:

{
"name": "INPUT_MODEL"
"display_name": "Input Model",
"type": "ENVIDeepLearningOnnxModel",
"options": {
  "filter": "object"
},
"direction": "INPUT",
"required": true,
"description": "Specify an ONNX object detection model."
}

Where:

name: is the model parameter's internal name

display_name: is the parameter label that displays in the user interface

type: ENVIDeepLearningOnnxModel specifies it is an ONNX model

options.filter specifies the type of deep learning model. Acceptable values are: object, pixel, and grid.

direction indicates the parameter is for INPUT

required: trueindicates the parameter is mandatory

description: describes the purpose of the INPUT_MODEL parameter

Supported Filter Types


Specify the options.filter in the task definition as follows.

Object

Use the object filter for models that detect and classify discrete objects in imagery, such as vehicles, buildings, and trees.

For example:

"options": {
  "filter": "object"
}

Pixel

Use the pixel filter for models that assign a class label to each pixel, such as land cover classification and pixel segmentation.

For example:

"options": {
  "filter": "pixel"
}

Grid

Use this filter for models that classify fixed-size grid cells or tiles, such as multi-class classification over regular grids.

For example:

"options": {
  "filter": "grid"
}

Best Practices


  • Always match the filter value to the type of model your task is designed to work with.
  • Provide a clear and concise description to help the task's users understand what kind of model to select.
  • If your task supports multiple model types, consider defining separate parameters or using logic within your task to handle each type appropriately.