Skip to content

Commit c460b47

Browse files
SineYuanlvhan028
authored andcommitted
fix normalization to_rgb option (#1792)
1 parent ed9a00b commit c460b47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

csrc/mmdeploy/preprocess/transform/normalize.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ class Normalize : public Transform {
103103
} else if (to_rgb_) {
104104
auto src_mat = to_mat(tensor, PixelFormat::kBGR);
105105
Mat dst_mat;
106-
OUTCOME_TRY(cvt_color_.Apply(src_mat, dst_mat, PixelFormat::kBGR));
107-
dst = to_tensor(src_mat);
106+
OUTCOME_TRY(cvt_color_.Apply(src_mat, dst_mat, PixelFormat::kRGB));
107+
dst = to_tensor(dst_mat);
108108
data[key] = std::move(dst);
109109
}
110110

0 commit comments

Comments
 (0)