大変お世話になっております。
AMBLの木下です。
題記の通り、EmCustomへのオプション値伝達方法についてご教示いただけますと幸いです。
■環境
AIBox NX, toolkit v2.3
■やりたいこと
EmCustom (Primary, Secondary) へ、ユーザの設定値を伝達することを考えています。
その実装として、以下のように emi_stream_config.json へ記述しました。
"pipeline_configuration": {
...
"primary": [
{
"nvinfer": {...}
},
{
"emcustom": {
"custom-lib": "hoge.so",
"in-place": "true",
"format": "RGBA",
"process-interval": 0,
"options": {"person_class_id": 2},
"libraries": ["fuga.so"]
}
}
],
...
}
■手元での症状
上記のような記述とすると、アプリが強制終了し、以下のようなエラーログが得られました。
custom-lib、librariesのメイン処理はコメントアウトしています。
2023-08-23 16:06:52,871 ERROR
VideoAI Configuration Error
2023-08-23 16:06:52,871 ERROR
Failed to configure videoai entities
2023-08-23 16:06:52,873 ERROR
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/edgestream/controller/videoai.py", line 127, in configure
stream_config, app_config, peer_connection)
File "/usr/lib/python3/dist-packages/edgestream/controller/dsprimary.py", line 153, in configure
options_json = json.dumps(
NameError: name 'json' is not defined
Secondaryのみに配置した場合、dssecondary.py で同じエラーです。
■解決したいこと
① Primary/Secondaryに配置した EmCustomにオプション値を伝達する具体的な実装をご教示願います。
上記の例ではPrimaryだけですが、Primary & Secondary へのオプション設定を考えています。
もし、達成のため、こちらの記述から変更が必要な場合は、そちらもご教示いただけますと幸いです。
https://edgestreamsdk-tutorial.readthedocs.io/en/v2.3/emcustom.html#emcustom-options② Primary & Secondaryへオプション設定を追加した際の、デバイスコンソールのOption設定から設定できるようにする場合の記述もご教示いただけますと幸いです。
以下フォーラムの通りでしょうか?
https://groups.google.com/a/edgematrix.com/g/edgematrixstreamtoolkit/c/yuFjp5ATpU4/m/I_Vu1J0nBAAJ