Skip to content

Commit

Permalink
fix normalization to_rgb option (#1771)
Browse files Browse the repository at this point in the history
  • Loading branch information
SineYuan authored Feb 21, 2023
1 parent 4bb8920 commit c941045
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions csrc/mmdeploy/preprocess/transform/normalize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit c941045

Please sign in to comment.