Skip to content

Commit

Permalink
tflite: disable NNAPI by default #17
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham0204 committed Dec 19, 2024
1 parent 7213198 commit 6810097
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ https://github.com/serengil/deepface/blob/master/deepface/models/spoofing/FasNet
*/
@Single
class FaceSpoofDetector(context: Context, useGpu: Boolean = false, useXNNPack: Boolean = false) {
class FaceSpoofDetector(context: Context, useGpu: Boolean = false, useXNNPack: Boolean = false, useNNAPI: Boolean = false) {

data class FaceSpoofResult(val isSpoof: Boolean, val score: Float, val timeMillis: Long)

Expand Down Expand Up @@ -64,7 +64,7 @@ class FaceSpoofDetector(context: Context, useGpu: Boolean = false, useXNNPack: B
numThreads = 4
}
useXNNPACK = useXNNPack
useNNAPI = true
this.useNNAPI = useNNAPI
}
firstModelInterpreter =
Interpreter(FileUtil.loadMappedFile(context, "spoof_model_scale_2_7.tflite"), interpreterOptions)
Expand Down

0 comments on commit 6810097

Please sign in to comment.