fix sdk export pipeline.json (#1391)

pull/1395/head
Chen Xin 2022-11-18 16:46:58 +08:00 committed by GitHub
parent 115ca470dd
commit a59b17259d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -245,8 +245,9 @@ def get_pipeline(deploy_cfg: mmengine.Config, model_cfg: mmengine.Config,
task = get_task_type(deploy_cfg)
input_names = preprocess['input']
output_names = postprocess['output']
if task == Task.CLASSIFICATION or task == Task.SUPER_RESOLUTION \
or Task.VIDEO_RECOGNITION:
if task in [
Task.CLASSIFICATION, Task.SUPER_RESOLUTION, Task.VIDEO_RECOGNITION
]:
postprocess['input'] = infer_info['output']
else:
postprocess['input'] = preprocess['output'] + infer_info['output']