mirror of
https://gitee.com/mymagicpower/AIAS.git
synced 2024-11-29 18:58:16 +08:00
no message
This commit is contained in:
parent
8d30de3c53
commit
6850d3347b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user