Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ public NDList processInput(TranslatorContext ctx, Image input) {
// Resize to (168, 48)
NDArray array = input.toNDArray(manager, Image.Flag.COLOR);
array = NDImageUtils.resize(array, 168, 48);

// RGB → BGR,与 cv2 对齐
array = array.flip(2);
// Normalize
array = array.toType(DataType.FLOAT32, false)
.div(255f)
Expand Down