Skip to content

Commit ac7e80b

Browse files
AllentDanlvhan028
authored andcommitted
Fix the performance test for RKNN (#1583)
1 parent 841a938 commit ac7e80b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

mmdeploy/apis/inference.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def inference_model(model_cfg: Union[str, mmengine.Config],
4242
from mmdeploy.apis.utils import build_task_processor
4343
task_processor = build_task_processor(model_cfg, deploy_cfg, device)
4444

45-
model = task_processor.build_backend_model(backend_files)
45+
model = task_processor.build_backend_model(
46+
backend_files, task_processor.update_data_preprocessor)
4647

4748
input_shape = get_input_shape(deploy_cfg)
4849
model_inputs, _ = task_processor.create_input(img, input_shape)

tools/test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ def main():
122122
dataloader = task_processor.build_dataloader(test_dataloader)
123123

124124
# load the model of the backend
125-
model = task_processor.build_backend_model(args.model)
125+
model = task_processor.build_backend_model(
126+
args.model, task_processor.update_data_preprocessor)
126127
destroy_model = model.destroy
127128
is_device_cpu = (args.device == 'cpu')
128129

0 commit comments

Comments
 (0)