react-native-vision-camera-spoof-detector 1.0.3 → 1.0.4
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/.cxx/Debug/2a1it684/arm64-v8a/.cmake/api/v1/reply/{codemodel-v2-6af431df2d09cde56941.json → codemodel-v2-390962e2784a6a84fa3e.json} +2 -2
- package/android/.cxx/Debug/2a1it684/arm64-v8a/.cmake/api/v1/reply/{index-2025-11-24T09-46-02-0941.json → index-2025-11-24T13-21-59-0659.json} +2 -2
- package/android/.cxx/Debug/2a1it684/arm64-v8a/.cmake/api/v1/reply/{target-yuv-Debug-d9c8b9c64fd8df9f1bcd.json → target-yuv-Debug-1e27b8a2bdcddd47b87d.json} +3 -3
- package/android/.cxx/Debug/2a1it684/arm64-v8a/.cmake/api/v1/reply/{target-yuv_shared-Debug-ffb5efa9f8837691d492.json → target-yuv_shared-Debug-ac9194487d1fc1268a87.json} +3 -3
- package/android/.cxx/Debug/2a1it684/arm64-v8a/.ninja_deps +0 -0
- package/android/.cxx/Debug/2a1it684/arm64-v8a/.ninja_log +99 -99
- package/android/.cxx/Debug/2a1it684/arm64-v8a/configure_fingerprint.bin +14 -14
- package/android/.cxx/Debug/2a1it684/armeabi-v7a/.ninja_deps +0 -0
- package/android/.cxx/Debug/2a1it684/armeabi-v7a/.ninja_log +92 -149
- package/android/.cxx/Debug/2a1it684/armeabi-v7a/configure_fingerprint.bin +14 -14
- package/android/.cxx/Debug/2a1it684/x86/.ninja_deps +0 -0
- package/android/.cxx/Debug/2a1it684/x86/.ninja_log +90 -143
- package/android/.cxx/Debug/2a1it684/x86/configure_fingerprint.bin +14 -14
- package/android/.cxx/Debug/2a1it684/x86_64/.ninja_deps +0 -0
- package/android/.cxx/Debug/2a1it684/x86_64/.ninja_log +88 -88
- package/android/.cxx/Debug/2a1it684/x86_64/configure_fingerprint.bin +14 -14
- package/android/build/.transforms/4ebf3dd0dca4f83fe1776360e21ded81/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/AntiSpoofingResult.dex +0 -0
- package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofFrameProcessor.dex +0 -0
- package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofingAdvanced$Companion.dex +0 -0
- package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofingAdvanced$EnvironmentAssessment.dex +0 -0
- package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofingAdvanced$SpoofDetectionResult.dex +0 -0
- package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/FaceAntiSpoofingAdvanced.dex +0 -0
- package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/ImageFormatEncoder$ImageFormat.dex +0 -0
- package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/ImageFormatEncoder$WhenMappings.dex +0 -0
- package/android/build/.transforms/c0a07cd9442d741ad3cef3760159211f/transformed/bundleLibRuntimeToDirDebug/bundleLibRuntimeToDirDebug_dex/com/faceantispoof/ImageFormatEncoder.dex +0 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/cxx/Debug/2a1it684/logs/arm64-v8a/build_stdout_targets.txt +51 -51
- package/android/build/intermediates/cxx/Debug/2a1it684/logs/arm64-v8a/generate_cxx_metadata_2655_timing.txt +9 -0
- package/android/build/intermediates/cxx/Debug/2a1it684/logs/armeabi-v7a/build_stdout_targets.txt +43 -43
- package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86/build_stdout_targets.txt +47 -47
- package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86_64/build_stdout_targets.txt +39 -39
- package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86_64/generate_cxx_metadata_2653_timing.txt +9 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -1
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/AntiSpoofingResult.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofFrameProcessor.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofingAdvanced$Companion.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofingAdvanced$EnvironmentAssessment.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofingAdvanced$SpoofDetectionResult.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/FaceAntiSpoofingAdvanced.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/ImageFormatEncoder$ImageFormat.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/ImageFormatEncoder$WhenMappings.class +0 -0
- package/android/build/intermediates/runtime_library_classes_dir/debug/bundleLibRuntimeToDirDebug/com/faceantispoof/ImageFormatEncoder.class +0 -0
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +1 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/AntiSpoofingResult.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofFrameProcessor.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofingAdvanced$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofingAdvanced$EnvironmentAssessment.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofingAdvanced$SpoofDetectionResult.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofingAdvanced.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/ImageFormatEncoder$ImageFormat.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/ImageFormatEncoder$WhenMappings.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/ImageFormatEncoder.class +0 -0
- package/android/src/main/java/com/faceantispoof/FaceAntiSpoofFrameProcessor.kt +5 -1
- package/android/src/main/java/com/faceantispoof/FaceAntiSpoofingAdvanced.kt +141 -26
- package/android/src/main/java/com/faceantispoof/ImageFormatEncoder.kt +247 -0
- package/package.json +1 -1
- package/android/build/intermediates/cxx/Debug/2a1it684/logs/arm64-v8a/generate_cxx_metadata_715_timing.txt +0 -9
- package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86_64/generate_cxx_metadata_714_timing.txt +0 -9
- /package/android/.cxx/Debug/2a1it684/x86_64/.cmake/api/v1/reply/{index-2025-11-24T09-46-22-0202.json → index-2025-11-24T13-22-20-0304.json} +0 -0
- /package/android/build/intermediates/cxx/Debug/2a1it684/logs/armeabi-v7a/{generate_cxx_metadata_716_timing.txt → generate_cxx_metadata_2653_timing.txt} +0 -0
- /package/android/build/intermediates/cxx/Debug/2a1it684/logs/x86/{generate_cxx_metadata_716_timing.txt → generate_cxx_metadata_2653_timing.txt} +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i
CHANGED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len
CHANGED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i
CHANGED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i
CHANGED
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
11
|
|
2
2
|
0
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream
CHANGED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len
CHANGED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofFrameProcessor.class
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/tmp/kotlin-classes/debug/com/faceantispoof/FaceAntiSpoofingAdvanced.class
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -132,7 +132,11 @@ class FaceAntiSpoofFrameProcessor : FrameProcessorPlugin() {
|
|
|
132
132
|
"neuralNetworkScore" to result.neuralNetworkScore.toDouble(),
|
|
133
133
|
"laplacianScore" to result.laplacianScore,
|
|
134
134
|
"combinedScore" to result.combinedScore.toDouble(),
|
|
135
|
-
"recognitionImageBase64" to result.recognitionImageBase64
|
|
135
|
+
"recognitionImageBase64" to result.recognitionImageBase64,
|
|
136
|
+
// Image format metadata
|
|
137
|
+
"imageFormat" to result.imageFormat,
|
|
138
|
+
"imageResolution" to result.imageResolution,
|
|
139
|
+
"imageQuality" to result.imageQuality
|
|
136
140
|
)
|
|
137
141
|
|
|
138
142
|
// Update the latest result for the next callback
|
|
@@ -15,6 +15,8 @@ import java.util.*
|
|
|
15
15
|
import android.util.Log
|
|
16
16
|
import kotlin.collections.ArrayList
|
|
17
17
|
import android.util.Base64
|
|
18
|
+
import com.faceantispoof.ImageFormatEncoder
|
|
19
|
+
import com.faceantispoof.ImageFormatEncoder.ImageFormat
|
|
18
20
|
|
|
19
21
|
class FaceAntiSpoofingAdvanced(private val assetManager: AssetManager) {
|
|
20
22
|
|
|
@@ -32,6 +34,12 @@ class FaceAntiSpoofingAdvanced(private val assetManager: AssetManager) {
|
|
|
32
34
|
const val ACCELERATOR_GPU = "GPU"
|
|
33
35
|
const val ACCELERATOR_NNAPI = "NNAPI"
|
|
34
36
|
|
|
37
|
+
// Image format configuration for face recognition systems
|
|
38
|
+
// Supported: JPEG (compressed), PNG (lossless), BMP (uncompressed)
|
|
39
|
+
const val DEFAULT_IMAGE_FORMAT = "JPEG" // Options: "JPEG", "PNG", "BMP"
|
|
40
|
+
const val DEFAULT_JPEG_QUALITY = 85 // 0-100, higher = better quality but larger
|
|
41
|
+
const val DEFAULT_OUTPUT_RESOLUTION = 640 // 640×640 for face recognition
|
|
42
|
+
|
|
35
43
|
// Advanced spoof detection constants
|
|
36
44
|
private const val HISTORY_SIZE = 10
|
|
37
45
|
private const val TEMPORAL_CONSISTENCY_THRESHOLD = 0.08f
|
|
@@ -48,6 +56,11 @@ class FaceAntiSpoofingAdvanced(private val assetManager: AssetManager) {
|
|
|
48
56
|
private var gpuDelegate: GpuDelegate? = null
|
|
49
57
|
private var currentAccelerator: String = ACCELERATOR_CPU
|
|
50
58
|
|
|
59
|
+
// Image format configuration for face recognition
|
|
60
|
+
private var outputImageFormat: String = DEFAULT_IMAGE_FORMAT
|
|
61
|
+
private var outputImageQuality: Int = DEFAULT_JPEG_QUALITY
|
|
62
|
+
private var outputImageResolution: Int = DEFAULT_OUTPUT_RESOLUTION
|
|
63
|
+
|
|
51
64
|
// Reusable buffers to avoid per-frame allocations
|
|
52
65
|
private val inputImageSize = INPUT_IMAGE_SIZE
|
|
53
66
|
private val inputBuffer: ByteBuffer = ByteBuffer.allocateDirect(4 * inputImageSize * inputImageSize * 3).order(ByteOrder.nativeOrder())
|
|
@@ -142,6 +155,57 @@ class FaceAntiSpoofingAdvanced(private val assetManager: AssetManager) {
|
|
|
142
155
|
|
|
143
156
|
fun getAccelerator(): String = currentAccelerator
|
|
144
157
|
|
|
158
|
+
/**
|
|
159
|
+
* Configure output image format for face recognition system.
|
|
160
|
+
* Supports JPEG (compressed), PNG (lossless), or BMP (uncompressed).
|
|
161
|
+
*
|
|
162
|
+
* @param format Image format: "JPEG" (default), "PNG", or "BMP"
|
|
163
|
+
* @param quality JPEG quality 0-100 (only applies to JPEG, ignored for PNG/BMP)
|
|
164
|
+
* @param resolution Output resolution in pixels (640 for 640×640, etc.)
|
|
165
|
+
*/
|
|
166
|
+
fun setImageFormatConfig(
|
|
167
|
+
format: String = "JPEG",
|
|
168
|
+
quality: Int = 85,
|
|
169
|
+
resolution: Int = 640
|
|
170
|
+
) {
|
|
171
|
+
val uppercaseFormat = format.uppercase()
|
|
172
|
+
outputImageFormat = if (uppercaseFormat in listOf("JPEG", "PNG", "BMP")) {
|
|
173
|
+
uppercaseFormat
|
|
174
|
+
} else {
|
|
175
|
+
"JPEG"
|
|
176
|
+
}
|
|
177
|
+
outputImageQuality = quality.coerceIn(1, 100)
|
|
178
|
+
outputImageResolution = resolution.coerceIn(64, 2048)
|
|
179
|
+
Log.d(TAG, "Image format config: $outputImageFormat quality=$outputImageQuality resolution=${outputImageResolution}×${outputImageResolution}")
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Get current image format configuration.
|
|
184
|
+
* @return Map containing format, quality, and resolution
|
|
185
|
+
*/
|
|
186
|
+
fun getImageFormatConfig(): Map<String, Any> {
|
|
187
|
+
return mapOf(
|
|
188
|
+
"format" to outputImageFormat,
|
|
189
|
+
"quality" to outputImageQuality,
|
|
190
|
+
"resolution" to outputImageResolution,
|
|
191
|
+
"estimatedSize" to estimateImageSize()
|
|
192
|
+
)
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Estimate output image size for current format configuration.
|
|
197
|
+
* Useful for memory and network planning.
|
|
198
|
+
*/
|
|
199
|
+
private fun estimateImageSize(): Long {
|
|
200
|
+
val pixelCount = outputImageResolution.toLong() * outputImageResolution
|
|
201
|
+
return when (outputImageFormat) {
|
|
202
|
+
"JPEG" -> (pixelCount * (100 - outputImageQuality) * 0.0012).toLong() // Quality-based estimation
|
|
203
|
+
"PNG" -> (pixelCount * 0.5).toLong() // PNG typically 2-4x larger than JPEG
|
|
204
|
+
"BMP" -> pixelCount * 3 // Uncompressed RGB
|
|
205
|
+
else -> (pixelCount * 0.12).toLong()
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
145
209
|
fun advancedAntiSpoofing(nv21: ByteArray, width: Int, height: Int): AntiSpoofingResult {
|
|
146
210
|
if (!isInitialized) {
|
|
147
211
|
return AntiSpoofingResult(
|
|
@@ -154,18 +218,23 @@ class FaceAntiSpoofingAdvanced(private val assetManager: AssetManager) {
|
|
|
154
218
|
isLive = false,
|
|
155
219
|
confidence = 0f,
|
|
156
220
|
label = "Not Initialized",
|
|
157
|
-
spoofType = "UNKNOWN"
|
|
221
|
+
spoofType = "UNKNOWN",
|
|
222
|
+
imageFormat = outputImageFormat,
|
|
223
|
+
imageResolution = outputImageResolution,
|
|
224
|
+
imageQuality = outputImageQuality
|
|
158
225
|
)
|
|
159
226
|
}
|
|
160
227
|
|
|
161
228
|
// Enhanced input validation
|
|
162
229
|
if (nv21.isEmpty()) {
|
|
163
|
-
return AntiSpoofingResult(0f, 0, 0, 0f, 0f, 0f, false, 0f, "Error: Invalid NV21 buffer", "INVALID_INPUT"
|
|
230
|
+
return AntiSpoofingResult(0f, 0, 0, 0f, 0f, 0f, false, 0f, "Error: Invalid NV21 buffer", "INVALID_INPUT",
|
|
231
|
+
imageFormat = outputImageFormat, imageResolution = outputImageResolution, imageQuality = outputImageQuality)
|
|
164
232
|
}
|
|
165
233
|
|
|
166
234
|
val expectedSize = width * height + (width * height) / 2
|
|
167
235
|
if (nv21.size < expectedSize) {
|
|
168
|
-
return AntiSpoofingResult(0f, 0, 0, 0f, 0f, 0f, false, 0f, "Error: Buffer size mismatch", "INVALID_INPUT"
|
|
236
|
+
return AntiSpoofingResult(0f, 0, 0, 0f, 0f, 0f, false, 0f, "Error: Buffer size mismatch", "INVALID_INPUT",
|
|
237
|
+
imageFormat = outputImageFormat, imageResolution = outputImageResolution, imageQuality = outputImageQuality)
|
|
169
238
|
}
|
|
170
239
|
|
|
171
240
|
return try {
|
|
@@ -201,14 +270,14 @@ class FaceAntiSpoofingAdvanced(private val assetManager: AssetManager) {
|
|
|
201
270
|
spoofDetection
|
|
202
271
|
)
|
|
203
272
|
|
|
204
|
-
// Generate
|
|
273
|
+
// Generate recognition image (JPEG/PNG/BMP) Base64 when face is live
|
|
205
274
|
var recognitionImageBase64: String? = null
|
|
206
275
|
val DEBUG_FORCE_BASE64 = false // Set to true to force Base64 generation for testing
|
|
207
276
|
|
|
208
277
|
if (isLive || DEBUG_FORCE_BASE64) {
|
|
209
|
-
Log.d(TAG, "🔍 isLive=$isLive (DEBUG_FORCE_BASE64=$DEBUG_FORCE_BASE64) - generating
|
|
278
|
+
Log.d(TAG, "🔍 isLive=$isLive (DEBUG_FORCE_BASE64=$DEBUG_FORCE_BASE64) - generating ${outputImageResolution}×${outputImageResolution} $outputImageFormat Base64...")
|
|
210
279
|
try {
|
|
211
|
-
recognitionImageBase64 =
|
|
280
|
+
recognitionImageBase64 = generateRecognitionImageBase64(nv21, width, height)
|
|
212
281
|
if (recognitionImageBase64 != null) {
|
|
213
282
|
Log.d(TAG, " Generated 640x640 JPEG Base64 for recognition API (size: ${recognitionImageBase64.length} bytes)")
|
|
214
283
|
} else {
|
|
@@ -233,11 +302,15 @@ class FaceAntiSpoofingAdvanced(private val assetManager: AssetManager) {
|
|
|
233
302
|
confidence = confidence,
|
|
234
303
|
label = if (isLive) "Live Face" else "Spoof Face: ${spoofDetection.type}",
|
|
235
304
|
spoofType = spoofDetection.type,
|
|
236
|
-
recognitionImageBase64 = recognitionImageBase64
|
|
305
|
+
recognitionImageBase64 = recognitionImageBase64,
|
|
306
|
+
imageFormat = outputImageFormat,
|
|
307
|
+
imageResolution = outputImageResolution,
|
|
308
|
+
imageQuality = outputImageQuality
|
|
237
309
|
)
|
|
238
310
|
} catch (e: Exception) {
|
|
239
311
|
Log.e(TAG, "Error in advancedAntiSpoofing", e)
|
|
240
|
-
AntiSpoofingResult(0f, 0, 0, 0f, 0f, 0f, false, 0f, "Error: ${e.message}", "PROCESSING_ERROR"
|
|
312
|
+
AntiSpoofingResult(0f, 0, 0, 0f, 0f, 0f, false, 0f, "Error: ${e.message}", "PROCESSING_ERROR",
|
|
313
|
+
imageFormat = outputImageFormat, imageResolution = outputImageResolution, imageQuality = outputImageQuality)
|
|
241
314
|
}
|
|
242
315
|
}
|
|
243
316
|
|
|
@@ -296,52 +369,90 @@ class FaceAntiSpoofingAdvanced(private val assetManager: AssetManager) {
|
|
|
296
369
|
}
|
|
297
370
|
|
|
298
371
|
/**
|
|
299
|
-
* Generate
|
|
300
|
-
*
|
|
372
|
+
* Generate image as Base64 string for face recognition API.
|
|
373
|
+
* Supports JPEG, PNG, and BMP formats with configurable resolution.
|
|
374
|
+
* Compatible with OpenCV cv2.imdecode() for face recognition systems.
|
|
301
375
|
*
|
|
302
376
|
* @param nv21 NV21 encoded YUV frame
|
|
303
377
|
* @param width Original frame width
|
|
304
378
|
* @param height Original frame height
|
|
305
|
-
* @return Base64 encoded
|
|
379
|
+
* @return Base64 encoded image string, or null if generation fails
|
|
306
380
|
*/
|
|
307
|
-
private fun
|
|
381
|
+
private fun generateRecognitionImageBase64(nv21: ByteArray, width: Int, height: Int): String? {
|
|
308
382
|
return try {
|
|
309
|
-
|
|
310
|
-
Log.d(TAG, "Starting 640x640 JPEG generation. Input: ${width}x${height}, NV21 size: ${nv21.size}")
|
|
383
|
+
Log.d(TAG, "Starting ${outputImageResolution}×${outputImageResolution} $outputImageFormat generation. Input: ${width}x${height}, NV21 size: ${nv21.size}")
|
|
311
384
|
|
|
312
|
-
// Convert NV21 to RGB byte array directly (
|
|
313
|
-
val rgbBytes = ByteArray(
|
|
385
|
+
// Convert NV21 to RGB byte array directly (configurable resolution)
|
|
386
|
+
val rgbBytes = ByteArray(outputImageResolution * outputImageResolution * 3)
|
|
314
387
|
Log.d(TAG, "Allocated RGB buffer: ${rgbBytes.size} bytes")
|
|
315
388
|
|
|
316
389
|
val startConvert = System.currentTimeMillis()
|
|
317
390
|
val convertedRgb = yuvConverter.nv21ToRgbByteArray(
|
|
318
391
|
nv21, width, height,
|
|
319
|
-
|
|
392
|
+
outputImageResolution, outputImageResolution,
|
|
320
393
|
rgbBytes
|
|
321
394
|
)
|
|
322
395
|
val convertTime = System.currentTimeMillis() - startConvert
|
|
323
396
|
Log.d(TAG, "YUV to RGB conversion completed in ${convertTime}ms. RGB data: ${convertedRgb.size} bytes")
|
|
324
397
|
|
|
325
|
-
// Encode RGB to JPEG
|
|
326
|
-
val
|
|
327
|
-
val
|
|
328
|
-
|
|
398
|
+
// Encode RGB to target format (JPEG, PNG, or BMP) and Base64
|
|
399
|
+
val startEncode = System.currentTimeMillis()
|
|
400
|
+
val format = when (outputImageFormat) {
|
|
401
|
+
"PNG" -> ImageFormatEncoder.ImageFormat.PNG
|
|
402
|
+
"BMP" -> ImageFormatEncoder.ImageFormat.BMP
|
|
403
|
+
else -> ImageFormatEncoder.ImageFormat.JPEG
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
val base64Result = ImageFormatEncoder.rgbToBase64(
|
|
407
|
+
convertedRgb,
|
|
408
|
+
outputImageResolution,
|
|
409
|
+
outputImageResolution,
|
|
410
|
+
format,
|
|
411
|
+
outputImageQuality
|
|
412
|
+
)
|
|
413
|
+
val encodeTime = System.currentTimeMillis() - startEncode
|
|
329
414
|
|
|
330
415
|
if (base64Result != null) {
|
|
331
|
-
Log.d(TAG, "
|
|
332
|
-
Log.d(TAG, " Generated
|
|
416
|
+
Log.d(TAG, "$outputImageFormat encoding completed in ${encodeTime}ms. Base64 size: ${base64Result.length} bytes")
|
|
417
|
+
Log.d(TAG, "✅ Generated ${outputImageResolution}×${outputImageResolution} $outputImageFormat Base64 for recognition API (total: ${convertTime + encodeTime}ms)")
|
|
418
|
+
val estSize = estimateImageSize()
|
|
419
|
+
Log.d(TAG, "Format: $outputImageFormat, Quality: $outputImageQuality, Estimated: ${estSize / 1024}KB")
|
|
333
420
|
} else {
|
|
334
|
-
Log.w(TAG, "
|
|
421
|
+
Log.w(TAG, "⚠️ ImageFormatEncoder returned null")
|
|
335
422
|
}
|
|
336
423
|
|
|
337
424
|
base64Result
|
|
338
425
|
} catch (e: Exception) {
|
|
339
|
-
Log.e(TAG, " Error generating
|
|
426
|
+
Log.e(TAG, "❌ Error generating ${outputImageResolution}×${outputImageResolution} $outputImageFormat Base64: ${e.message}", e)
|
|
340
427
|
e.printStackTrace()
|
|
341
428
|
null
|
|
342
429
|
}
|
|
343
430
|
}
|
|
344
431
|
|
|
432
|
+
/**
|
|
433
|
+
* Legacy method: Generate 640×640 JPEG image as Base64 string.
|
|
434
|
+
* Kept for backward compatibility. Use generateRecognitionImageBase64() for new code.
|
|
435
|
+
*/
|
|
436
|
+
@Deprecated("Use generateRecognitionImageBase64() instead", ReplaceWith("generateRecognitionImageBase64(nv21, width, height)"))
|
|
437
|
+
private fun generate640x640JpegBase64(nv21: ByteArray, width: Int, height: Int): String? {
|
|
438
|
+
// Temporarily set format to JPEG for backward compatibility
|
|
439
|
+
val savedFormat = outputImageFormat
|
|
440
|
+
outputImageFormat = "JPEG"
|
|
441
|
+
val savedQuality = outputImageQuality
|
|
442
|
+
outputImageQuality = 85
|
|
443
|
+
val savedResolution = outputImageResolution
|
|
444
|
+
outputImageResolution = 640
|
|
445
|
+
|
|
446
|
+
val result = generateRecognitionImageBase64(nv21, width, height)
|
|
447
|
+
|
|
448
|
+
// Restore original config
|
|
449
|
+
outputImageFormat = savedFormat
|
|
450
|
+
outputImageQuality = savedQuality
|
|
451
|
+
outputImageResolution = savedResolution
|
|
452
|
+
|
|
453
|
+
return result
|
|
454
|
+
}
|
|
455
|
+
|
|
345
456
|
private fun leafScore1(clssPred: Array<FloatArray>, leafNodeMask: Array<FloatArray>): Float {
|
|
346
457
|
var score = 0f
|
|
347
458
|
for (i in 0 until 8) {
|
|
@@ -643,5 +754,9 @@ data class AntiSpoofingResult(
|
|
|
643
754
|
val confidence: Float,
|
|
644
755
|
val label: String,
|
|
645
756
|
val spoofType: String,
|
|
646
|
-
val recognitionImageBase64: String? = null
|
|
757
|
+
val recognitionImageBase64: String? = null,
|
|
758
|
+
// Image format metadata
|
|
759
|
+
val imageFormat: String = "JPEG", // Format: JPEG, PNG, BMP
|
|
760
|
+
val imageResolution: Int = 640, // 640×640, 1280×720, etc.
|
|
761
|
+
val imageQuality: Int = 85 // Quality for JPEG (0-100)
|
|
647
762
|
)
|