Skip to content

Commit 25e4a41

Browse files
committed
fix: input shape
1 parent 390130e commit 25e4a41

File tree

1 file changed

+1
-1
lines changed
  • ml/src/main/java/com/fpf/smartscansdk/ml/models/providers/detectors/face

1 file changed

+1
-1
lines changed

ml/src/main/java/com/fpf/smartscansdk/ml/models/providers/detectors/face/FaceDetector.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class FaceDetector(
4747

4848
override suspend fun detect(data: Bitmap): Pair<List<Float>, List<FloatArray>> = withContext(Dispatchers.Default) {
4949
val startTime = System.currentTimeMillis()
50-
val inputShape = longArrayOf(DIM_BATCH_SIZE.toLong(), DIM_PIXEL_SIZE.toLong(), IMAGE_SIZE_X.toLong(), IMAGE_SIZE_Y.toLong())
50+
val inputShape = longArrayOf(DIM_BATCH_SIZE.toLong(), DIM_PIXEL_SIZE.toLong(), IMAGE_SIZE_Y.toLong(), IMAGE_SIZE_X.toLong())
5151
val imgData: FloatBuffer = preProcess(data)
5252
val inputName = model.getInputNames()?.firstOrNull() ?: throw IllegalStateException("Model inputs not available")
5353
val outputs = model.run(mapOf(inputName to TensorData.FloatBufferTensor(imgData, inputShape)))

0 commit comments

Comments
 (0)