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.
- package/android/src/main/java/com/visioncamerafacedetection/FaceHelper.kt +1 -1
- package/android/src/main/java/com/visioncamerafacedetection/VisionCameraFaceDetectionModule.kt +1 -1
- package/android/src/main/java/com/visioncamerafacedetection/VisionCameraFaceDetectionPlugin.kt +1 -1
- package/ios/FaceHelper.swift +2 -2
- package/package.json +1 -1
package/android/src/main/java/com/visioncamerafacedetection/VisionCameraFaceDetectionModule.kt
CHANGED
|
@@ -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(
|
|
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()) {
|
package/android/src/main/java/com/visioncamerafacedetection/VisionCameraFaceDetectionPlugin.kt
CHANGED
|
@@ -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(
|
|
331
|
+
val output: FloatBuffer = FloatBuffer.allocate(512)
|
|
332
332
|
interpreter?.run(input, output)
|
|
333
333
|
|
|
334
334
|
for (i: Float in output.array()) {
|
package/ios/FaceHelper.swift
CHANGED
|
@@ -9,8 +9,8 @@ import TensorFlowLite
|
|
|
9
9
|
|
|
10
10
|
let batchSize = 1
|
|
11
11
|
let inputChannels = 1
|
|
12
|
-
let inputWidth =
|
|
13
|
-
let inputHeight =
|
|
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
|