From 6850d3347be9f424908e3d6a94e3df6e64791bda Mon Sep 17 00:00:00 2001 From: Calvin <179209347@qq.com> Date: Tue, 1 Nov 2022 16:59:43 +0800 Subject: [PATCH] no message --- .../src/main/java/me/aias/example/utils/FaceDetection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4_video_sdks/rtsp_face_sdk/src/main/java/me/aias/example/utils/FaceDetection.java b/4_video_sdks/rtsp_face_sdk/src/main/java/me/aias/example/utils/FaceDetection.java index 9c9132a5..ab5ede8a 100644 --- a/4_video_sdks/rtsp_face_sdk/src/main/java/me/aias/example/utils/FaceDetection.java +++ b/4_video_sdks/rtsp_face_sdk/src/main/java/me/aias/example/utils/FaceDetection.java @@ -77,7 +77,7 @@ public final class FaceDetection { Shape shape = array.getShape(); array = NDImageUtils.resize(array, (int) (shape.get(1) * shrink), (int) (shape.get(0) * shrink)); - array = array.transpose(2, 0, 1).flip(0); // HWC -> CHW BGR -> RGB + array = array.transpose(2, 0, 1).flip(0); // HWC -> CHW RGB -> BGR NDArray mean = manager.create(new float[] {104f, 117f, 123f}, new Shape(3, 1, 1)); array = array.sub(mean).mul(0.007843f); // normalization array = array.expandDims(0); // make batch dimension