fix some errors (#1309)

This commit is contained in:
Chen Xin 2022-11-04 22:38:28 +08:00 committed by GitHub
parent d8e6229dc5
commit 940fffa075
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 6 deletions

View File

@ -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<PyImage>& imgs,
const std::pair<int, int>& info) {
return self->Apply(std::vector{imgs}, std::vector{info})[0];
})
const std::pair<int, int>& info) { return self->Apply({imgs}, {info})[0]; })
.def("batch", &PyVideoRecognizer::Apply);
}};

View File

@ -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

View File

@ -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

View File

@ -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: