人脸识别Android离线SDK常见问题和解答
置顶
littergang 发布于2018-08 浏览:85377 回复:101
3
收藏
最后编辑于2023-10

1.咱们离线安卓sdk有没有windows的这个最多识别5个人脸的功能?

答:离线SDK不直接支持最多识别人数,有内部方法

2:同一台安卓设备程序更新 重新安装后,设备硬件指纹信息和原来的不一样了
导致同一个序列号 不能激活?

答:下载使用最新的SDK:版本变更1.0.1
1、修复设备指纹发生变化bug
2、替换近红外活体模型,优化效果
3、修复批量注册人脸到人脸库,失败问题
4、修复注册、图片人脸检测、视频返回图片抽取特征失败,经常出现检测不到人脸问题。

3.离线SDK,目前我使用的是离线激活的方式,按照步骤在序列号那里输入对应的硬件指纹,然后得到了license.zip这个授权文件,之后文档说:将该文件放到SDK指定位置即可,我完全不太明白你们说的"指定位置"是哪里?请问android版本的该如何操作?

答:android暂时不支持完全离线授权。

4:在demo里面,视频vs人脸库的特征抽取耗时与图片vs图片特征抽取耗时有差异,
视频流中提取耗时:500ms
图片当中提取耗时:700ms
请问是否符合预期呢?

答:图片提取包含了人脸检测的时间,视频流提取耗时应该只是特征提取的时间。

5:脸识别离线sdk可以识别其他平台人脸采集的信息吗
业务场景:Windows端拿到用户的一张人脸照片,Windows端对这张照片进行人脸采集和人脸注册的工作,接着Android端通过摄像头捕捉到人脸图片,调用在线API进行人脸识别比对的工作。这样子可以吗?

答:调在线的不行,目前发布的window和android可以互通。

6:人脸特征在windows端提取,建立人脸库,然后Android端可以进行人脸对比么?

答:是可以的。

7;示例中打开前置摄像头黑屏的,没有图像?

答:可以修改下代码:

8:人脸注册如果已经有这张人脸的数据就更新数据,不要重复添加,应该调用哪个方法?

答:

9.离线SDK,目前我使用的是离线激活的方式,按照步骤在序列号那里输入对应的硬件指纹,然后得到了license.zip这个授权文件,之后文档说:将该文件放到SDK指定位置即可,我完全不太明白你们说的"指定位置"是哪里?请问android版本的该如何操作?

答:android暂时不支持完全离线授权。

10.使用Android离线SDK,成功激活后,重装app后再输入序列号就报错license has actived on other device,是什么原因?

答:这个是由于硬件指纹变化导致的,目前已升级新版本1.0.1,。可以在官网下载最新的SDK,新的SDK激活不能使用以前旧的序列码激活,可以重新申请新的序列码重新激活设备。

11.在“人脸采集SDK”中,设置人脸回调
public void onDetectFace(final int retCode, FaceInfo[] infos, ImageFrame frame)
后infos里面是人脸的信息,我想 了解infos里面具体都有哪些信息?

答:

12.同一设备系统还原后再次激活离线sdk失败
一开发板硬件首次正常激活离线人脸识别sdk后,系统恢复出厂设置,离线sdk(永久、正式版)激活失败。
更新最新版 SDK也无法解决。换成sdk 1.0.1的人脸识别后,离线激活时,同一个设备原来的激活码用不了……显示已使用,该现象是否正常,应该如何处理?

答:这个是正常的,使用新的SDK后以前的序列码不能再使用,可以换个新的序列码重新激活。

13.离线的android-SDK
调用:getFeature接口
在使用Android-SDK时,对图片进行特征提取时,经常会出现特征提取失败的情况,错误码为6

答:应该是在人脸检测的过程中没有检测到人脸,建议调整设置下人脸的大小set_min_face_size的值。

14.TexturePreviewView我设置成match_parent 显示大小是1920*1080就可以,可是设置成指定大小320dp*180dp就显示不正确呢?预览大小还是setPreferredPreviewSize(640, 480);?

答:previewsize不是随便设置的,要是camera支持的才行,camera.getPreviewSize()确认下。

15.能解释下SDK参数配置的一些详细的说明吗?

答:

收藏
点赞
3
个赞
共101条回复 最后由用户已被禁言回复于2023-10
#62hanyongqingok回复于2019-10

怎么大学都没有的课程?

0
#61一个老好人sky回复于2019-10

怎么提取图片中的人脸特征值

1
#60liu49738回复于2019-10

或者说有办法实现一边识别摄像头数据,一边后台加载人脸特征数据吗

0
#59liu49738回复于2019-10

百度离线的sdk,能开启两条线程同时提取特征吗?我现在遇到的问题是,开启两条线程同时提取特征,会出现a线程拿到b线程提取到的特征现象

0
#58rose20135188回复于2019-09

谢谢楼主的分享。

0
#57margnus_回复于2019-09

linux版本sdk(v1.0.0)提取的特征值长度和android版本(v2.0.1)的不一样,一个是float类型的512字节,一个是byte类型的512字节,现在这两套sdk已经不能通用了吗?

0
#56瓜小渣回复于2019-08

识别失败后不让跳转页面是什么玩意

0
#55186******70回复于2019-07

离线采集SDK什么时候更新?

Android studio 3.0之后useDeprecatedNdk宣告废弃使用,只有Cmake 和 ndk-build,错误信息如下:

WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported

3
#54容易网2019回复于2019-07

将Facesdk2.0导入android studio报错:

Unsupported method: NativeArtifact.getSourceFolders().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.

 

Android Studio版本3.2.1

gradle版本3.2.2

 

请问gradle要用什么版本?

0
#53容易网2019回复于2019-07

将Facesdk2.0导入android studio报错:

Unsupported method: NativeArtifact.getSourceFolders().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.

 

Android Studio版本3.2.1

gradle版本3.2.2

 

请问gradle要用什么版本?

0
#52瓜小渣回复于2019-07

能出个混淆文档吗?加了人验核证就增加了8M,不知情要混淆放行的还容易报错。

0
#51zmedumpw回复于2019-07

请问下,有没有大佬知道,服务器收集了图片,如何提取人脸特征码到一个人脸库中,并实现能把人脸库下发到其他Android机器中

1
#50willywuchen回复于2019-05

版本2.0.2集成测试,检测几次后报以下信息无法运行:

05-27 14:53:36.151 20999-20999/? W/linker: /data/app/com. /lib/arm64/libFaceSDK.so: unused DT entry: type 0x6ffffffe arg 0x23348

05-27 14:53:36.151 20999-20999/? W/linker: /data/app/com. /lib/arm64/libFaceSDK.so: unused DT entry: type 0x6fffffff arg 0x3
请问是什么原因?

0
#49tempAccountAD回复于2019-04

 

 

04-10 10:45:38.339 949-1656/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 1656 (CameraCmdThread)
04-10 10:45:38.522 1435-1435/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.android.camera2, PID: 1435
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.camera2/com.android.camera.CameraActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.android.camera.util.PhotoSphereHelper$PanoramaViewHelper.onStart()' on a null object reference
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2345)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2407)
        at android.app.ActivityThread.access$800(ActivityThread.java:151)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1319)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5289)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.android.camera.util.PhotoSphereHelper$PanoramaViewHelper.onStart()' on a null object reference
        at com.android.camera.CameraActivity.onStartTasks(CameraActivity.java:1890)
        at com.android.camera.util.QuickActivity.onStart(QuickActivity.java:111)
        at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1236)
        at android.app.Activity.performStart(Activity.java:6238)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2307)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2407) 
        at android.app.ActivityThread.access$800(ActivityThread.java:151) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1319) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:135) 
        at android.app.ActivityThread.main(ActivityThread.java:5289) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at java.lang.reflect.Method.invoke(Method.java:372) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:963) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:758) 
04-10 10:45:38.998 516-550/system_process E/WindowState: getStack: Window{32177dd3 u0 Starting com.android.camera2} couldn't find taskId=164 Callers=com.android.server.wm.WindowState.getDisplayContent:1138 com.android.server.wm.WindowState.getWindowList:1778 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2958 com.android.server.wm.WindowManagerService.removeWindowLocked:2831 
04-10 10:45:38.999 516-550/system_process E/WindowState: getStack: Window{32177dd3 u0 Starting com.android.camera2} couldn't find taskId=164 Callers=com.android.server.wm.WindowState.getDisplayContent:1138 com.android.server.wm.WindowManagerService.removeWindowInnerLocked:2963 com.android.server.wm.WindowManagerService.removeWindowLocked:2831 com.android.server.wm.WindowManagerService.removeWindow:2753 
04-11 17:00:05.295 1660-1695/? E/CameraHal: initDefaultParameters(486): initDefaultParameters(486): mCamDriverCapability.card is error!
04-11 17:00:05.315 516-534/system_process E/SensorService: Error activating sensor 0 (Operation not permitted)

你好,我这边采用百度人脸离线识别,app开了几天后就崩溃了,请问怎么解决

0
#48宝驾网络公司回复于2019-04

Demo 能运行,移植到项目就报错!

 

java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.util.concurrent.ForkJoinTask.getThrowableException(ForkJoinTask.java:593)
at java.util.concurrent.ForkJoinTask.reportException(ForkJoinTask.java:677)
at java.util.concurrent.ForkJoinTask.join(ForkJoinTask.java:720)
at java.util.ArrayList.forEach(ArrayList.java:1251)
at com.android.builder.dexing.DxDexArchiveMerger.mergeMultidex(DxDexArchiveMerger.java:266)
at com.android.builder.dexing.DxDexArchiveMerger.mergeDexArchives(DxDexArchiveMerger.java:133)
at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:97)
at com.android.build.gradle.internal.transforms.ExternalLibsMergerTransform.transform(ExternalLibsMergerTransform.kt:121)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:222)
at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:218)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102)
at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:213)
at sun.reflect.GeneratedMethodAccessor937.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:97)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$ExecuteTaskAction.execute(DefaultTaskExecutionGraph.java:262)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$ExecuteTaskAction.execute(DefaultTaskExecutionGraph.java:246)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:136)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.execute(DefaultTaskPlanExecutor.java:201)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.executeWithTask(DefaultTaskPlanExecutor.java:192)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1431)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:72)
at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:36)
at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
... 4 more
Caused by: com.android.dex.DexException: Multiple dex files define Lcom/baidu/idl/facesdk/FaceTracker;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:661)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:616)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:598)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:198)
at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:61)
... 6 more

 

0
#47没心没肺de笑sc回复于2019-04
#41 yh23202回复
Process: com.pashanhu.pashanhueducationandroid:pushcore, PID: 14644 java.lang.NoSuchFieldError: no "J" field "index" in class "Lcom/baidu/idl/facesdk/FaceTracker;" or its superclasses at com.baidu.idl.facesdk.FaceTracker.create(Native Method) at com.baidu.idl.facesdk.FaceTracker.<init>(SourceFile:59) at com.baidu.idl.face.platform.c.d(SourceFile:47) at com.pashanhu.pashanhueducationandroid.app.App.onCreate(SourceFile:85) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5546) at android.app.ActivityThread.-wrap2(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1626) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6388) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:901) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:791) 打不了正式包,一点击就报这个错,请问各位该怎么混淆,百度里面没有相关介绍
展开

方便聊聊吗,咨询一下离线识别sdk的问题

0
#46Liudm880913回复于2019-03

一,armeabi架构下的so能不能提供下,性能差不要紧;二,targetSdkVersion=25能不能适配到26以上,不然还要对百度的sdk单独做兼容

0
#45dodododo2385回复于2019-03

03-25 10:36:32.853 22755-22755/com.dover.www.intelligentfuel W/SQLiteConnectionPool: The connection pool for database '/data/data/com.dover.www.intelligentfuel/databases/face.db' has been unable to grant a connection to thread 1 (main) with flags 0x6 for 1110.025 seconds.
Connections: 0 active, 1 idle, 0 available.
03-25 10:37:02.853 22755-22755/com.dover.www.intelligentfuel W/SQLiteConnectionPool: The connection pool for database '/data/data/com.dover.www.intelligentfuel/databases/face.db' has been unable to grant a connection to thread 1 (main) with flags 0x6 for 1140.025 seconds.
Connections: 0 active, 1 idle, 0 available.
03-25 10:37:32.853 22755-22755/com.dover.www.intelligentfuel W/SQLiteConnectionPool: The connection pool for database '/data/data/com.dover.www.intelligentfuel/databases/face.db' has been unable to grant a connection to thread 1 (main) with flags 0x6 for 1170.026 seconds.
Connections: 0 active, 1 idle, 0 available.
03-25 10:38:02.853 22755-22755/com.dover.www.intelligentfuel W/SQLiteConnectionPool: The connection pool for database '/data/data/com.dover.www.intelligentfuel/databases/face.db' has been unable to grant a connection to thread 1 (main) with flags 0x6 for 1200.0271 seconds.
Connections: 0 active, 1 idle, 0 available.

 

 

实在搞不明白2.0中的 DBManager 该咋用

0
#44smile坤坤star回复于2019-03

人脸识别获取的图片为啥是倾斜的

1
#43菜心傻猪猪回复于2019-03
#38 梅沙科技回复
移植DEMO后可以调试,打正式包就会报错。

我的也是,,  新的人脸DEMO打正式包报错

0
TOP
切换版块