如何实施Google脸部检测API等微笑概率方法? 现在我有三个口点
这是使用Google API的概率
for (int index = 0; index < faces.size(); ++index) {
Face face = faces.valueAt(index);
double x = face.getIsSmilingProbability();}
答案 0 :(得分:0)
您需要创建一个字段变量:
private static final double SMILE_PROB = 0.4;
在循环中获取布尔值然后处理它:
boolean smiling = face.getIsSmilingProbability()&gt; SMILING_PROB;