standalone
mode and, as such, follow the same structure without being able to pass a directory or file directly to your scripts. Please see the custom blocks overview page for more details.
Custom AI labeling block structure
Variable | Passed | Description |
---|---|---|
EI_API_ENDPOINT | Always | The API base URL: https://studio.edgeimpulse.com/v1 |
EI_API_KEY | Always | The organization API key with member privileges: ei_2f7f54... |
EI_INGESTION_HOST | Always | The host for the ingestion API: edgeimpulse.com |
EI_ORGANIZATION_ID | Always | The ID of the organization that the block belongs to: 123456 |
EI_PROJECT_ID | Always | The ID of the project: 123456 |
EI_PROJECT_API_KEY | Always | The project API key: ei_2a1b0e... |
requiredEnvVariables
key in the metadata section of the parameters.json
file. You will then be prompted for the associated values for these keys when pushing the block to Edge Impulse using the CLI. Alternatively, these values can be added (or changed) by editing the block in Studio.
parameters.json
file will be passed as command line arguments to the script you defined in your Dockerfile as the ENTRYPOINT
for the Docker image. Please refer to the parameters.json documentation for further details about creating this file, parameter options available, and examples.
In addition to the items defined by you, specific arguments will be automatically passed to your AI labeling block.
AI labeling blocks are an extension of transformation blocks operating in standalone
mode, the arguments that are automatically passed to transformation blocks in this mode are also automatically passed to AI labeling blocks. Please refer to the custom transformation blocks documentation for further details on those parameters.
Along with the transformation block arguments, the following AI labeling specific arguments are passed as well.
Argument | Passed | Description |
---|---|---|
--data-ids-file <file> | Always | Provides the file path for id.json as a string. The ids.json file lists the data sample IDs to operate on as integers. See ids.json. |
--propose-actions <job-id> | Conditional | Only passed when the user wants to preview label changes. If passed, label changes should be staged and not directly applied. Provides the job ID as an integer. See preview mode. |
Label preview data
within an AI labeling action configuration. When a user is previewing label changes, the changes are staged and not applied directly.
For preview mode, the --propose-actions <job-id>
argument is passed into your block. When you see this option, you should not apply changes directly to the data samples (e.g. via raw_data_api.set_sample_bounding_boxes
or raw_data_api.set_sample_structured_labels
) but rather use the raw_data_api.set_sample_proposed_changes
API call.
edge-impulse-blocks runner
CLI toolai-labeling-<description>
. As such, they can be found by going to the Edge Impulse account and searching the repositories for ai-labeling
.
Below are direct links to some examples: