diff --git a/csrc/mmdeploy/preprocess/transform/normalize.cpp b/csrc/mmdeploy/preprocess/transform/normalize.cpp index 2e0e4b3b2b..b0e48d71fc 100644 --- a/csrc/mmdeploy/preprocess/transform/normalize.cpp +++ b/csrc/mmdeploy/preprocess/transform/normalize.cpp @@ -102,8 +102,8 @@ class Normalize : public Transform { } else if (to_rgb_) { auto src_mat = to_mat(tensor, PixelFormat::kBGR); Mat dst_mat; - OUTCOME_TRY(cvt_color_.Apply(src_mat, dst_mat, PixelFormat::kBGR)); - dst = to_tensor(src_mat); + OUTCOME_TRY(cvt_color_.Apply(src_mat, dst_mat, PixelFormat::kRGB)); + dst = to_tensor(dst_mat); } data[key] = std::move(dst);