Skip to content

【活体检测】detectVideo函数总是只返回第一次的检测结果 #17

Description

@MayBlock

依赖版本:1.0.27
环境: JVM (JDK21)

private fun isLiveFaceByVideo(video: ByteArray): Boolean =
        video.inputStream().use { stream ->
            livenessDetModel.detectVideo(stream).takeIf { it.isSuccess }?.data?.let {
                println("Liveness detection status: ${it.status}, size: ${video.size}")
                it.status == LivenessStatus.LIVE
            }
        } ?: false

detectVideo函数的LivenessStatus总是只返回第一次的检测结果,只有第一次调用正常工作(活体或非活体)
后续即使输入视频或帧发生变化,返回值也始终为第一次的检测结果,疑似存在缓存未失效

活体和人脸检测用的模型都是SEETA_FACE6_MODEL

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions