OAID / FaceDetection

C++ project to implement MTCNN, a perfect face detect algorithm, on different DL frameworks. The most popular frameworks: caffe/mxnet/tensorflow, are all suppported now
Apache License 2.0
272 stars 108 forks source link

mac make issue #14

Open chaeyoun opened 5 years ago

chaeyoun commented 5 years ago

i'm using mac v10.14.4 i build tensorflow with the command shown on readme(bazel build --config=opt //tensorflow/tools/lib_package:libtensorflow) and when i do 'make -j4' i get ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) this error.

i have opencv v4.1.0 and tensorflow v1.12

exact output is ***

g++ -Wall -O2 -ggdb -std=c++11 -I/Users/angie/Desktop/FaceDetection/include pkg-config --cflags /usr/local/Cellar/opencv/4.1.0_1/lib/pkgconfig/opencv4.pc -I/Users/angie/Desktop/vision-2d/tf_standalone/include -c camera.cpp -o camera.o g++ -fpic -shared -o libmtcnn.so mtcnn.os comm_lib.os utils.os tensorflow_mtcnn.os g++ -Wall -O2 -ggdb -std=c++11 -I/Users/angie/Desktop/FaceDetection/include pkg-config --cflags /usr/local/Cellar/opencv/4.1.0_1/lib/pkgconfig/opencv4.pc -I/Users/angie/Desktop/vision-2d/tf_standalone/include -c mtcnn.cpp -o mtcnn.o g++ -Wall -O2 -ggdb -std=c++11 -I/Users/angie/Desktop/FaceDetection/include pkg-config --cflags /usr/local/Cellar/opencv/4.1.0_1/lib/pkgconfig/opencv4.pc -I/Users/angie/Desktop/vision-2d/tf_standalone/include -c comm_lib.cpp -o comm_lib.o Undefined symbols for architecture x86_64: "_TF_CloseSession", referenced from: tf_mtcnn::~tf_mtcnn() in tensorflow_mtcnn.os "_TF_DeleteGraph", referenced from: tf_mtcnn::~tf_mtcnn() in tensorflow_mtcnn.os "_TF_DeleteSession", referenced from: tf_mtcnn::~tf_mtcnn() in tensorflow_mtcnn.os "_TF_DeleteStatus", referenced from: tf_mtcnn::~tf_mtcnn() in tensorflow_mtcnn.os tf_mtcnn::load_model(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in tensorflow_mtcnn.os tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os "_TF_DeleteTensor", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::__1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "_TF_Dim", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "_TF_GetCode", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&) in tensorflow_mtcnn.os tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "_TF_GraphImportGraphDef", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&) in tensorflow_mtcnn.os "_TF_GraphOperationByName", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::__1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "_TF_ImportGraphDefOptionsSetPrefix", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&) in tensorflow_mtcnn.os "_TF_Message", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&) in tensorflow_mtcnn.os "_TF_NewGraph", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&) in tensorflow_mtcnn.os "_TF_NewImportGraphDefOptions", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&) in tensorflow_mtcnn.os "_TF_NewSession", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::__1::allocator > const&) in tensorflow_mtcnn.os "_TF_NewSessionOptions", referenced from: tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&) in tensorflow_mtcnn.os "_TF_NewStatus", referenced from: tf_mtcnn::~tf_mtcnn() in tensorflow_mtcnn.os tf_mtcnn::load_model(std::1::basic_string<char, std::1::char_traits, std::1::allocator > const&) in tensorflow_mtcnn.os tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::__1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "_TF_NewTensor", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::__1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "_TF_SessionRun", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os "_TF_TensorData", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_RNet(cv::Mat const&, std::1::vector<face_box, std::1::allocator >&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os tf_mtcnn::run_ONet(cv::Mat const&, std::1::vector<face_box, std::__1::allocator >&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "cv::copyMakeBorder(cv::_InputArray const&, cv::OutputArray const&, int, int, int, int, int, cv::Scalar const&)", referenced from: copy_one_patch(cv::Mat const&, face_box&, float, int, int) in tensorflow_mtcnn.os "cv::Mat::deallocate()", referenced from: set_input_buffer(std::1::vector<cv::Mat, std::1::allocator >&, float, int, int) in comm_lib.os std::1::split_buffer<cv::Mat, std::1::allocator&>::~split_buffer() in comm_lib.os tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os copy_one_patch(cv::Mat const&, face_box&, float*, int, int) in tensorflow_mtcnn.os tf_mtcnn::detect(cv::Mat&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os cv::MatExpr::~MatExpr() in tensorflow_mtcnn.os "cv::Mat::updateContinuityFlag()", referenced from: set_input_buffer(std::1::vector<cv::Mat, std::1::allocator >&, float, int, int) in comm_lib.os copy_one_patch(cv::Mat const&, face_box&, float, int, int) in tensorflow_mtcnn.os "cv::Mat::copySize(cv::Mat const&)", referenced from: set_input_buffer(std::1::vector<cv::Mat, std::1::allocator >&, float, int, int) in comm_lib.os void std::1::vector<cv::Mat, std::1::allocator >::push_back_slow_path<cv::Mat const&>(cv::Mat const&&&) in comm_lib.os std::1::vector<cv::Mat, std::1::allocator >::swap_out_circular_buffer(std::1::split_buffer<cv::Mat, std::__1::allocator&>&) in comm_lib.os "cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)", referenced from: copy_one_patch(cv::Mat const&, face_box&, float, int, int) in tensorflow_mtcnn.os "cv::error(int, std::1::basic_string<char, std::__1::char_traits, std::1::allocator > const&, char const, char const, int)", referenced from: set_input_buffer(std::1::vector<cv::Mat, std::1::allocator >&, float, int, int) in comm_lib.os copy_one_patch(cv::Mat const&, face_box&, float, int, int) in tensorflow_mtcnn.os "cv::resize(cv::_InputArray const&, cv::OutputArray const&, cv::Size, double, double, int)", referenced from: tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os copy_one_patch(cv::Mat const&, face_box&, float*, int, int) in tensorflow_mtcnn.os "cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)", referenced from: tf_mtcnn::detect(cv::Mat&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "cv::fastFree(void*)", referenced from: set_input_buffer(std::1::vector<cv::Mat, std::1::allocator >&, float*, int, int) in comm_lib.os std::1::split_buffer<cv::Mat, std::1::allocator&>::~split_buffer() in comm_lib.os tf_mtcnn::run_PNet(cv::Mat const&, scale_window&, std::__1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os copy_one_patch(cv::Mat const&, face_box&, float, int, int) in tensorflow_mtcnn.os tf_mtcnn::detect(cv::Mat&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os cv::MatExpr::~MatExpr() in tensorflowmtcnn.os "cv::operator-(cv::Mat const&, cv::Scalar const&)", referenced from: tf_mtcnn::detect(cv::Mat&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os "cv::operator(cv::MatExpr const&, double)", referenced from: tf_mtcnn::detect(cv::Mat&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os "cv::Mat::t() const", referenced from: tf_mtcnn::detect(cv::Mat&, std::1::vector<face_box, std::1::allocator >&) in tensorflow_mtcnn.os "cv::Mat::convertTo(cv::_OutputArray const&, int, double, double) const", referenced from: tf_mtcnn::detect(cv::Mat&, std::1::vector<face_box, std::__1::allocator >&) in tensorflow_mtcnn.os ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[1]: [libmtcnn.so] Error 1 make[1]: Waiting for unfinished jobs.... camera.cpp:101:71: warning: implicit conversion from 'double' to 'int' changes value from 1.8 to 1 [-Wliteral-conversion] box.landmark.y[l]), 1, cv::Scalar(0, 0, 255), 1.8); ^~~ 1 warning generated. make: *** [libs] Error 2