【问题标题】:ML Kit FaceDetectionProcessor not detecting the ears landmarksML Kit FaceDetectionProcessor 未检测到耳朵标志
【发布时间】:2019-03-20 18:22:14
【问题描述】:

问题详情

我尝试了来自 here 的 ML Kit 人脸检测示例应用,但在运行 LiveDataPreviewActivity 时无法接收耳朵的地标数据。

对于 FirebaseVisionFaceLandmark.LEFT_EAR 和 FirebaseVisionFaceLandmark.RIGHT_EAR,调用 face.getLandmark 始终返回 null。所有其他地标都被突出显示并很好地检索。

(在 Google Pixel 和三星 S6 上测试)

还有其他人遇到过这个问题吗?检测耳朵是否需要一些额外的设置? ...我还在 repo 中添加了一个 github issue,但我认为 stackoverflow 社区更加活跃。

相关代码

drawLandmarkPosition(canvas, face, FirebaseVisionFaceLandmark.LEFT_EAR)
drawLandmarkPosition(canvas, face, FirebaseVisionFaceLandmark.RIGHT_EAR)
...
private fun drawLandmarkPosition(canvas: Canvas, face: FirebaseVisionFace, landmarkID: Int) {
        val landmark = face.getLandmark(landmarkID)
        landmark?.let {
            val point = landmark.position
            canvas.drawCircle(
                    translateX(point.x),
                    translateY(point.y),
                    10f, idPaint)
        }
    }

... landmark 值始终为空。

代码来自:https://github.com/firebase/quickstart-android/blob/master/mlkit/app/src/main/java/com/google/firebase/samples/apps/mlkit/kotlin/facedetection/FaceGraphic.kt#L115

【问题讨论】:

    标签: android firebase-mlkit


    【解决方案1】:

    我收到了来自 firebase 技术支持的答复(再次感谢),缺少的是 app/build.gradle 中的这一行: 实施 'com.google.firebase:firebase-ml-vision-face-model:17.0.2'

    已经在 github 上创建了一个拉取请求,希望它会被接受。 干杯! ;)

    【讨论】:

      猜你喜欢
      • 2020-12-26
      • 1970-01-01
      • 2020-05-23
      • 2014-03-03
      • 2021-01-12
      • 1970-01-01
      • 2019-08-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多