diff --git a/csrc/mmdeploy/apis/python/video_recognizer.cpp b/csrc/mmdeploy/apis/python/video_recognizer.cpp index 9cad3e6fa..7c70337e5 100644 --- a/csrc/mmdeploy/apis/python/video_recognizer.cpp +++ b/csrc/mmdeploy/apis/python/video_recognizer.cpp @@ -81,9 +81,7 @@ static PythonBindingRegisterer register_video_recognizer{[](py::module& m) { py::arg("model_path"), py::arg("device_name"), py::arg("device_id") = 0) .def("__call__", [](PyVideoRecognizer* self, const std::vector& imgs, - const std::pair& info) { - return self->Apply(std::vector{imgs}, std::vector{info})[0]; - }) + const std::pair& info) { return self->Apply({imgs}, {info})[0]; }) .def("batch", &PyVideoRecognizer::Apply); }}; diff --git a/docs/en/04-supported-codebases/mmaction2.md b/docs/en/04-supported-codebases/mmaction2.md index 31c43016c..fd3ac2c78 100644 --- a/docs/en/04-supported-codebases/mmaction2.md +++ b/docs/en/04-supported-codebases/mmaction2.md @@ -126,7 +126,6 @@ deploy_cfg = 'configs/mmaction/video-recognition/video-recognition_2d_onnxruntim model_cfg = 'tsn_r50_1x1x3_100e_kinetics400_rgb.py' device = 'cpu' backend_model = ['./mmdeploy_models/mmaction2/tsn/ort/end2end.onnx'] -backend_model = ['./work_dir/tsn/end2end.onnx'] image = 'tests/data/arm_wrestling.mp4' # read deploy_cfg and model_cfg diff --git a/docs/zh_cn/04-supported-codebases/mmaction2.md b/docs/zh_cn/04-supported-codebases/mmaction2.md index eaa293232..3e2e7caeb 100644 --- a/docs/zh_cn/04-supported-codebases/mmaction2.md +++ b/docs/zh_cn/04-supported-codebases/mmaction2.md @@ -128,7 +128,6 @@ deploy_cfg = 'configs/mmaction/video-recognition/video-recognition_2d_onnxruntim model_cfg = 'tsn_r50_1x1x3_100e_kinetics400_rgb.py' device = 'cpu' backend_model = ['./mmdeploy_models/mmaction2/tsn/ort/end2end.onnx'] -backend_model = ['./work_dir/tsn/end2end.onnx'] image = 'tests/data/arm_wrestling.mp4' # read deploy_cfg and model_cfg diff --git a/mmdeploy/codebase/mmaction/deploy/video_recognition.py b/mmdeploy/codebase/mmaction/deploy/video_recognition.py index 72ea8e304..fb1a4ed7b 100644 --- a/mmdeploy/codebase/mmaction/deploy/video_recognition.py +++ b/mmdeploy/codebase/mmaction/deploy/video_recognition.py @@ -320,7 +320,7 @@ class VideoRecognition(BaseTask): if key in transforms2index: index = transforms2index[key] if key == 'Normalize': - pipeline[index]['to_bgr'] = True + pipeline[index]['to_rgb'] = True if key == 'Resize' and 'scale' in pipeline[index]: value = pipeline[index].pop('scale') if len(value) == 2 and value[0] == -1: