ML Kit FaceDetectionProcessor 未检测到耳朵标志

ML Kit FaceDetectionProcessor not detecting the ears landmarks

问题详情

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

对 FirebaseVisionFaceLandmark.LEFT_EAR 和 FirebaseVisionFaceLandmark.RIGHT_EAR 的调用 face.getLandmark 始终 returns 为空。所有其他地标都突出显示并检索得很好。

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

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

相关代码

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

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

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