vision-camera-face-detection 2.2.6 → 2.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@ import java.nio.ByteBuffer
15
15
  import kotlin.math.ceil
16
16
 
17
17
  var interpreter: Interpreter? = null
18
- const val TF_OD_API_INPUT_SIZE = 112
18
+ const val TF_OD_API_INPUT_SIZE = 160
19
19
 
20
20
  class FaceHelper {
21
21
 
@@ -86,7 +86,7 @@ class VisionCameraFaceDetectionModule(private val reactContext: ReactApplication
86
86
  matrix.postScale(sx, sy)
87
87
  cvFace.drawBitmap(bmpStorageResult, matrix, null)
88
88
  val input: ByteBuffer = FaceHelper().bitmap2ByteBuffer(bmpFaceStorage)
89
- val output: FloatBuffer = FloatBuffer.allocate(192)
89
+ val output: FloatBuffer = FloatBuffer.allocate(512)
90
90
  interpreter?.run(input, output)
91
91
  val arrayData = Arguments.createArray()
92
92
  for (i: Float in output.array()) {
@@ -328,7 +328,7 @@ class VisionCameraFaceDetectionPlugin(
328
328
  matrix.postScale(sx, sy)
329
329
  cvFace.drawBitmap(bmpFrameResult, matrix, null)
330
330
  val input: ByteBuffer = FaceHelper().bitmap2ByteBuffer(bmpFaceResult)
331
- val output: FloatBuffer = FloatBuffer.allocate(192)
331
+ val output: FloatBuffer = FloatBuffer.allocate(512)
332
332
  interpreter?.run(input, output)
333
333
 
334
334
  for (i: Float in output.array()) {
@@ -9,8 +9,8 @@ import TensorFlowLite
9
9
 
10
10
  let batchSize = 1
11
11
  let inputChannels = 1
12
- let inputWidth = 112
13
- let inputHeight = 112
12
+ let inputWidth = 160
13
+ let inputHeight = 160
14
14
 
15
15
  // TensorFlow Lite `Interpreter` object for performing inference on a given model.
16
16
  var interpreter: Interpreter? = nil
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vision-camera-face-detection",
3
- "version": "2.2.6",
3
+ "version": "2.2.7",
4
4
  "description": "Plugin Face Detection for Vision Camera 4",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",