Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./faced ../face.jpg core #1

Closed
Bepartofyou opened this issue Jan 19, 2018 · 4 comments
Closed

./faced ../face.jpg core #1

Bepartofyou opened this issue Jan 19, 2018 · 4 comments

Comments

@Bepartofyou
Copy link

请问您是什么系统?
我是centos7,按照Build and Usage执行了make faced,core了,如下

[root@localhost FaceDetectionServer]# make faced
cd libfaced && g++ -std=c++11 faced.cpp -g -fPIC -shared -o libfaced.so pkg-config opencv --cflags --libs
-I/home/bepartofyou/work/code/c_c++/facedetect/SeetaFaceEngine/FaceDetection/include/
-L/home/bepartofyou/work/code/c_c++/facedetect/SeetaFaceEngine/FaceDetection/build
-lseeta_facedet_lib -ljsoncpp
cd libfaced && cp libfaced.so /lib64/libfaced.so
cd libfaced && g++ -std=c++11 faced_cmd.cpp -o faced
-I/home/bepartofyou/work/code/c_c++/facedetect/SeetaFaceEngine/FaceDetection/include
-L/home/bepartofyou/work/code/c_c++/facedetect/SeetaFaceEngine/FaceDetection/build
-L. -lfaced -g
cd libfaced && ./faced ../face.jpg
/bin/sh: line 1: 3695 Segmentation fault (core dumped) ./faced ../face.jpg
core在seeta里
backtrace:
#0 0x00007ff03e365691 in seeta::fd::FuStDetector::Detect(seeta::fd::ImagePyramid*) () at /lib64/libseeta_facedet_lib.so
#1 0x00007ff03e362867 in seeta::FaceDetection::Detect(seeta::ImageData const&) () at /lib64/libseeta_facedet_lib.so
#2 0x00007ff041ced502 in FaceDetect(char*) (path=0x7fffda9367ef "../face.jpg") at faced.cpp:40
#3 0x00000000004009af in main(int, char**) (argc=2, argv=0x7fffda9352f8) at faced_cmd.cpp:7

@mohanson
Copy link
Owner

mohanson commented Jan 19, 2018

我使用的是 centos7.3, 你能进入 libfaced 手动执行一下 ./faced ../face.jpg 吗? 如果出现问题, 可以更新一下三个编译器 gcc gcc-c++ 和 g++ 重新编译, 因为 seetaface 用了 c++11 的语法. 希望对你有帮助.

@Bepartofyou
Copy link
Author

多谢回复!
我使用的OS如下:
CentOS Linux release 7.3.1611 (Core)
Package gcc-4.8.5-16.el7_4.1.x86_64 already installed and latest version
Package gcc-c++-4.8.5-16.el7_4.1.x86_64 already installed and latest version

在libfaced手动执行了,也是core。。。

@mohanson
Copy link
Owner

mohanson commented Jan 19, 2018

嗯, 我发现你将 SeetaFaceEngine 安装在了你自己的用户目录下, 请打开 libfaced/faced.cpp, 将其中的

seeta::FaceDetection detector("/src/SeetaFaceEngine/FaceDetection/model/seeta_fd_frontal_v1.0.bin"); 路径修改为 /home/bepartofyou/work/code/c_c++/facedetect/SeetaFaceEngine/FaceDetection/model/seeta_fd_frontal_v1.0.bin, 应该可以解决你的问题(记得重新 make faced) :)

@Bepartofyou
Copy link
Author

额,应该再看一眼代码的。是这个问题,没想到代码里面也用到了这个路径。。。。
多谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants