Skip to content

Commit

Permalink
remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ccen-stripe committed Mar 16, 2023
1 parent 794f4f2 commit 2dbf991
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ internal class FaceDetectorAnalyzer(
private val modelPerformanceTracker: ModelPerformanceTracker
) : Analyzer<AnalyzerInput, IdentityScanState, AnalyzerOutput> {

// private val tfliteInterpreter = Interpreter(modelFile)
// private val interpreterApi: InterpreterApi

private val interpreterApi: InterpreterWrapper = InterpreterWrapperImpl(
modelFile, InterpreterOptionsWrapper.Builder().build()
)
Expand Down Expand Up @@ -63,18 +60,15 @@ internal class FaceDetectorAnalyzer(

val inferenceStat = modelPerformanceTracker.trackInference()
// inference - input: (1, 128, 128, 3), output: (1, 4), (1, 1)

val boundingBoxes = Array(1) { FloatArray(OUTPUT_BOUNDING_BOX_TENSOR_SIZE) }
val score = FloatArray(OUTPUT_SCORE_TENSOR_SIZE)

interpreterApi.runForMultipleInputsOutputs(
arrayOf(tensorImage.buffer),
mapOf(
OUTPUT_BOUNDING_BOX_TENSOR_INDEX to boundingBoxes,
OUTPUT_SCORE_TENSOR_INDEX to score
)
)

inferenceStat.trackResult()

// FaceDetector outputs (left, top, right, bottom) with absolute value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ internal class IDDetectorAnalyzer(
) :
Analyzer<AnalyzerInput, IdentityScanState, AnalyzerOutput> {

// private val interpreterApi: InterpreterApi
private val interpreterApi: InterpreterWrapper = InterpreterWrapperImpl(
modelFile, InterpreterOptionsWrapper.Builder().build()
)
Expand Down

0 comments on commit 2dbf991

Please sign in to comment.