FaceLivenessDetection icon indicating copy to clipboard operation
FaceLivenessDetection copied to clipboard

Mac pro 编译成功,在build目录运行./FaceLivenessDetection报如下错误

Open zzzkk2009 opened this issue 6 years ago • 8 comments

OpenCV(3.4.1) Error: Assertion failed (type == (((6) & ((1 << 3) - 1)) + (((2)-1) << 3))) in gemmImpl, file /tmp/opencv-20180504-71644-brjrbc/opencv-3.4.1/modules/core/src/matmul.cpp, line 1218

libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(3.4.1) /tmp/opencv-20180504-71644-brjrbc/opencv-3.4.1/modules/core/src/matmul.cpp:1218: error: (-215) type == (((6) & ((1 << 3) - 1)) + (((2)-1) << 3)) in function gemmImpl

请问有人碰到过吗?

zzzkk2009 avatar May 16 '18 02:05 zzzkk2009

我也遇到了同样的问题....

Reading the CLNF landmark detector/tracker from: /Users/liuyan/Code/FaceLivenessDetection/FaceLivenessDetection/model/main_clnf_general.txt Couldn't open the model file, aborting Attempting to capture from device: 0 Device or file opened Starting tracking OpenCV(3.4.1) Error: Assertion failed (type == (((6) & ((1 << 3) - 1)) + (((2)-1) << 3))) in gemmImpl, file /tmp/opencv-20180504-71644-brjrbc/opencv-3.4.1/modules/core/src/matmul.cpp, line 1218 libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(3.4.1) /tmp/opencv-20180504-71644-brjrbc/opencv-3.4.1/modules/core/src/matmul.cpp:1218: error: (-215) type == (((6) & ((1 << 3) - 1)) + (((2)-1) << 3)) in function gemmImpl

[1] 69083 abort ./FaceLivenessDetection

同求解答。

猜测一下,会不会是因为 ‘Reading the CLNF landmark detector/tracker from: /Users/liuyan/Code/FaceLivenessDetection/FaceLivenessDetection/model/main_clnf_general.txt Couldn't open the model file, aborting’ 读取这个文件失败导致的?

pengshiqi avatar May 28 '18 08:05 pengshiqi

@pengshiqi

原因应该是 LBFaceLivenessDetection/lib/local/LandmarkDetector/src/LandmarkDetectorParameters.cpp 文件里面的路径配置的都是绝对路径,需要按照自己电脑修改才行。

118行 : model_location = std::string("/path/to/your/FaceLivenessDetection/model/main_clnf_general.txt");

135行: face_detector_location = std::string("/path/to/your/FaceLivenessDetection/classifiers/haarcascade_frontalface_alt.xml"); // std::cout << "face_detector_location = " << face_detector_location << std::endl;

138行:
seetaface_detector_location = std::string("/path/to/your/FaceLivenessDetection/lib/local/seetaFace/model/seeta_fd_frontal_v1.0.bin");

zzzkk2009 avatar Jun 02 '18 07:06 zzzkk2009

@zzzkk2009 你改了这些就可以成功运行了吗...?

我改完了还是有错误,看起来像是open-cv的错误,不知道你有没有遇到?

OpenCV(3.4.1) Error: Assertion failed (s >= 0) in setSize, file /tmp/opencv-20180529-55469-97fkx6/opencv-3.4.1/modules/core/src/matrix.cpp, line 235 libc++abi.dylib: terminating with uncaught exception of type cv::Exception: OpenCV(3.4.1) /tmp/opencv-20180529-55469-97fkx6/opencv-3.4.1/modules/core/src/matrix.cpp:235: error: (-215) s >= 0 in function setSize

Reading the landmark validation module....[1] 54972 abort ./FaceLivenessDetection

pengshiqi avatar Jun 03 '18 03:06 pengshiqi

编译成功了,但是运行出现错误,报段错误,有解决么? 运行如下: Reading the CLNF landmark detector/tracker from: ../model/main_clnf_general.txt Reading the landmark detector module from: ../model/clnf_general.txt clnf_location = ../model/clnf_general.txt Reading the PDM module from: ../model/pdms/In-the-wild_aligned_PDM_68.txt....Done Reading the Triangulations module from: ../model/tris_68.txt....Done Reading the intensity CCNF patch experts from: ../model/patch_experts/ccnf_patches_0.25_general.txt....Done Reading the intensity CCNF patch experts from: ../model/patch_experts/ccnf_patches_0.35_general.txt....Done Reading the intensity CCNF patch experts from: ../model/patch_experts/ccnf_patches_0.5_general.txt....Done Reading part based module....inner Reading the CLNF landmark detector/tracker from: ../model/model_inner/main_clnf_inner.txt Reading the landmark detector module from: ../model/model_inner/clnf_inner.txt clnf_location = ../model/model_inner/clnf_inner.txt Reading the PDM module from: ../model/model_inner/pdms/pdm_51_inner.txt....Done Reading the intensity CCNF patch experts from: ../model/model_inner/patch_experts/ccnf_patches_1.00_inner.txt....Done Done Reading part based module....left_eye_28 Reading the CLNF landmark detector/tracker from: ../model/model_eye/main_clnf_synth_left.txt Reading the landmark detector module from: ../model/model_eye/clnf_left_synth.txt clnf_location = ../model/model_eye/clnf_left_synth.txt Reading the PDM module from: ../model/model_eye/pdms/pdm_28_l_eye_3D_closed.txt....Done Reading the intensity CCNF patch experts from: ../model/model_eye/patch_experts/left_ccnf_patches_1.00_synth_lid_.txt....Done Reading the intensity CCNF patch experts from: ../model/model_eye/patch_experts/left_ccnf_patches_1.50_synth_lid_.txt....Done Done Reading part based module....right_eye_28 Reading the CLNF landmark detector/tracker from: ../model/model_eye/main_clnf_synth_right.txt Reading the landmark detector module from: ../model/model_eye/clnf_right_synth.txt clnf_location = ../model/model_eye/clnf_right_synth.txt Reading the PDM module from: ../model/model_eye/pdms/pdm_28_eye_3D_closed.txt....Done Reading the intensity CCNF patch experts from: ../model/model_eye/patch_experts/ccnf_patches_1.00_synth_lid_.txt....Done Reading the intensity CCNF patch experts from: ../model/model_eye/patch_experts/ccnf_patches_1.50_synth_lid_.txt....Done Done Reading the landmark validation module....Done Attempting to capture from device: 0 Device or file opened Starting tracking 段错误 (核心已转储)

SueeH avatar Dec 14 '18 10:12 SueeH

编译成功了,但是运行出现错误,报段错误,有解决么? 运行如下: Reading the CLNF landmark detector/tracker from: ../model/main_clnf_general.txt Reading the landmark detector module from: ../model/clnf_general.txt clnf_location = ../model/clnf_general.txt Reading the PDM module from: ../model/pdms/In-the-wild_aligned_PDM_68.txt....Done Reading the Triangulations module from: ../model/tris_68.txt....Done Reading the intensity CCNF patch experts from: ../model/patch_experts/ccnf_patches_0.25_general.txt....Done Reading the intensity CCNF patch experts from: ../model/patch_experts/ccnf_patches_0.35_general.txt....Done Reading the intensity CCNF patch experts from: ../model/patch_experts/ccnf_patches_0.5_general.txt....Done Reading part based module....inner Reading the CLNF landmark detector/tracker from: ../model/model_inner/main_clnf_inner.txt Reading the landmark detector module from: ../model/model_inner/clnf_inner.txt clnf_location = ../model/model_inner/clnf_inner.txt Reading the PDM module from: ../model/model_inner/pdms/pdm_51_inner.txt....Done Reading the intensity CCNF patch experts from: ../model/model_inner/patch_experts/ccnf_patches_1.00_inner.txt....Done Done Reading part based module....left_eye_28 Reading the CLNF landmark detector/tracker from: ../model/model_eye/main_clnf_synth_left.txt Reading the landmark detector module from: ../model/model_eye/clnf_left_synth.txt clnf_location = ../model/model_eye/clnf_left_synth.txt Reading the PDM module from: ../model/model_eye/pdms/pdm_28_l_eye_3D_closed.txt....Done Reading the intensity CCNF patch experts from: ../model/model_eye/patch_experts/left_ccnf_patches_1.00_synth_lid_.txt....Done Reading the intensity CCNF patch experts from: ../model/model_eye/patch_experts/left_ccnf_patches_1.50_synth_lid_.txt....Done Done Reading part based module....right_eye_28 Reading the CLNF landmark detector/tracker from: ../model/model_eye/main_clnf_synth_right.txt Reading the landmark detector module from: ../model/model_eye/clnf_right_synth.txt clnf_location = ../model/model_eye/clnf_right_synth.txt Reading the PDM module from: ../model/model_eye/pdms/pdm_28_eye_3D_closed.txt....Done Reading the intensity CCNF patch experts from: ../model/model_eye/patch_experts/ccnf_patches_1.00_synth_lid_.txt....Done Reading the intensity CCNF patch experts from: ../model/model_eye/patch_experts/ccnf_patches_1.50_synth_lid_.txt....Done Done Reading the landmark validation module....Done Attempting to capture from device: 0 Device or file opened Starting tracking 段错误 (核心已转储)

Same issue here! Have you found any solutions for it?

ZhenyuYangGithub avatar Jan 07 '19 21:01 ZhenyuYangGithub

Never mind, solved the problem by adding seetaFace Folder.

ZhenyuYangGithub avatar Jan 07 '19 21:01 ZhenyuYangGithub

Never mind, solved the problem by adding seetaFace Folder. pardon,where to add seetaFace? need compile? could you show the details? TX

SueeH avatar Jan 08 '19 02:01 SueeH

Never mind, solved the problem by adding seetaFace Folder. Thanks for your reply,I checked the code and found the right way. copy ./lib/local/seetaFace/model/seeta_fd_frontal_v1.0.bin to ./model/

SueeH avatar Jan 08 '19 03:01 SueeH