mirror of
https://github.com/open-mmlab/mmdeploy.git
synced 2025-01-14 08:09:43 +08:00
fix normalization to_rgb option (#1771)
This commit is contained in:
parent
4bb8920b61
commit
c941045156
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user