willard-yuan / SeetaFaceLib

:peach: SeetaFace for Xcode and Qt
GNU General Public License v3.0
76 stars 36 forks source link

'falconn/eigen_wrapper.h' file not found #2

Open dudullz opened 7 years ago

dudullz commented 7 years ago

HI Willard, Interesting project and thanks for sharing! I've got some problems when trying to build it.

~/SeetaFaceLib/CocsoFace/mainwindow.cpp:14: error: 'falconn/eigen_wrapper.h' file not found

include "falconn/eigen_wrapper.h"

     ^

FALCONN was not included in '3rd' folder.

I cloned FALCONN from 'https://github.com/FALCONN-LIB/FALCONN' but there is no such file as 'eigen_wrapper.h' - can you please help?

Thanks.

willard-yuan commented 7 years ago

Hi dudullz, Thank you for your interest of this project. The FALCONN lib was not included when I pushed it to github.

As far as I know, FALCONN has done much chances recently. I think there are two ways to solve the problem: one is to delete the FALCONN lib and use brute search instead. The project has included the brute search. Another is to upload the FALCONN lib to the project. I think the first one is a good option since you can use faiss lib (facebook) instead of FALCONN lib.

I'm busy on the company work, and I will solve the problem tonight.

willard-yuan commented 7 years ago

I have included the FALCONN in the 3rd directory. So you just need to untar it and it's will be OK to fix the problem.

Another method is using brute force search instead of LSH method based on FALCONN, and you just need to uncomment the code in L512.

Hope this can solve your problem.

dudullz commented 7 years ago

Thanks for prompt replies Willard!

  1. I've advanced with the problem on my side too, by just download the previous version of FALCONN (version 1.2.2). It's all compiled now but I've hitting a more fundamental problem now which I've been fighting for a few hours...

MacBook-Pro:MacOS leon$ lldb ./CocsoFace (lldb) target create "./CocsoFace" Current executable set to './CocsoFace' (x86_64). (lldb) run Process 2023 launched: './CocsoFace' (x86_64) Process 2023 stopped

  • thread #1: tid = 0x29666, 0x00007fff83b1809e libsystem_c.dylibflockfile + 4, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x68) frame #0: 0x00007fff83b1809e libsystem_c.dylibflockfile + 4 libsystem_c.dylib`flockfile: -> 0x7fff83b1809e <+4>: movq 0x68(%rdi), %rdi 0x7fff83b180a2 <+8>: addq $0x8, %rdi 0x7fff83b180a6 <+12>: popq %rbp 0x7fff83b180a7 <+13>: jmp 0x7fff83b6144a ; symbol stub for: pthread_mutex_lock (lldb)
  1. As to the other method, by simply uncommenting the codes for brute force search, the compiler spat out the following error: CocsoFace/mainwindow.cpp:519:77: error: use of undeclared identifier 'query_feat'

where query_feat is defined locally in do_LSH_search() as float query_feat[2048];

  1. Also will it switch to brute force search (not using FALCONN) by simply uncommenting the code? It seems all FALCONN codes (namespace etc.) are still there... e.g. do_LSH_search() co-exists with brute force search part...
willard-yuan commented 7 years ago

Ops, the first problem seems terrible and I have no idea to find out what wrong with it. You can leave you email address and I will send you my QT project to you tonight.

dudullz commented 7 years ago

can you please send to lifechoose@gmail.com, many thanks!

Also, what about the brute force? would declare float query_feat[2048]; at the beginning of on_queryButton_clicked() be enough to use brute force search? (I'm not so sure...) How to circumvent FALCONN to only use brute force search?

sorry for questions...:)

dudullz commented 7 years ago

willard, I've advanced one step further and now it's almost there!

The above problem is really simply - you've hard coded the model files in your codes with absolute path apparently only works on your machine, e.g. face_detector = new seeta::FaceDetection("/Users/willard/codes/cpp/face/SeetaFaceLib/model/seeta_fd_frontal_v1.0.bin");

Now I can see the program GUI and load image folder etc. However whenever I do query the program will crash... The error report suggests the problem is inside do_LSH_search but again, I have no idea how to debug into the GUI application....

Can you send me your full project files to lifechoose@gmail.com? Thanks!

willard-yuan commented 7 years ago

dudullz, Sorry for getting back to you so late since I'm very busy these days.

I have uploaded my full project to baiduyun, you can download it by the link. You should carefully check the code before run since some file paths such as the models are hard coded.

I have update the project to OpenCV3 and MacOS 12.16 (QMAKE_MAC_SDK = macosx10.13), so make sure to satisfy these dependences.