DeepStream Configurator#
Overview#
The DeepStream Configurator (ds-configurator) is a lightweight Flask-based init-style service that runs before the DeepStream perception pipeline starts. It starts, waits for a configuration event (e.g. from SDR), updates the necessary DeepStream configuration files, then shuts down so that DeepStream can start with the updated settings.
Key Features:
Receives configuration events via HTTP POST
Extracts region, group, and topic-prefix metadata
Updates DeepStream configuration files with calibration and BEV group settings
Writes configuration data for downstream consumption by DeepStream pipelines
Architecture#
The DeepStream Configurator operates as an init-style service that:
Starts and listens for a configuration event
Processes the event and updates configuration files
Gracefully shuts down after completing the configuration
DS Configurator Architecture#
Configuration#
Environment Variables#
The following environment variables control the DS Configurator’s behavior:
Variable |
Default |
Description |
|---|---|---|
|
|
HTTP port the service listens on |
|
|
Path where the CSV configuration file is written (contains region, group, topic-prefix) |
|
|
Source YAML configuration file to read and update |
|
|
Target path where the updated YAML configuration is written |
|
|
Path to the calibration file (set in the output config.yaml) |
|
|
JSON field name containing the event data in the incoming payload |
|
|
JSON field name containing metadata within the event object |
API Reference#
POST /config#
Receives a configuration event and updates DeepStream configuration files.
Request:
Content-Type:
application/jsonMethod:
POST
Request Body Schema:
{
"event": {
"metadata": {
"region": "string",
"group": "string",
"topic-prefix": "string"
}
}
}
Example Request:
curl -X POST http://localhost:9002/config \
-H "Content-Type: application/json" \
-d '{
"event": {
"metadata": {
"region": "warehouse-zone-1",
"group": "bev-sensor-group-1",
"topic-prefix": "mdx"
}
}
}'
Response:
Returns the original JSON payload on success.
Behavior:
Extracts
region,group, andtopic-prefixfrom the event metadataWrites a CSV file with format:
region,group,topic-prefixUpdates the target YAML config with: -
calib_file_path: Set to the configured calibration file path -bev_group_name: Set to the group from the event metadataGracefully shuts down after sending the response
Output Files#
config.csv#
A comma-separated file containing the sensor assignment information:
warehouse-zone-1,bev-sensor-group-1,mdx
This file can be consumed by DeepStream pipelines or other services that need to know the current sensor group assignment.
config.yaml#
The updated YAML configuration file includes calibration and BEV settings. Key fields updated:
# Calibration file path (set by DS Configurator)
calib_file_path: /tmp/data/ds-configurator/calibration_grouped.json
# BEV group name (set from event metadata)
bev_group_name: bev-sensor-group-1
# Other DeepStream pipeline settings (preserved from source)
onnx_model_path: /root/sparse4d/sparse4d_model.onnx
batch_size: 1
# ... additional settings