I'm wondering if there is any documentation about the shape_predictor_68_face_landmarks.datNOT in terms about "how to compile" or "how to use" more like how it is set up?, what are the training data (what kind of images, how many, ...)?, who did it? and stuff like this.
I was just able to find a lot code samples that are using the file more or less without questioning :D
I'm using dlib as stated in the headline, but it may be the case that its working with other library's as well?!
It's trained on the iBUG 300W dataset. There is some additional discussion about it on the dlib blog post: http://blog.dlib.net/2014/08/real-time-face-pose-estimation.html
Also, the primary dlib author (me) made it.
Related
I need to denoise nifti images using wavelet transform. I did it in MATLAB but I should write the code for my project in Python. I am new to Python.
Python has a neuroimaging community of practice that lives at http://nipy.org. In particular, they have a library called NiBabel (see their introduction and github) for reading nifti and other formats (this will replace MATLAB's niftiread). You may also be interested in the PyWavelets library, which can replace basic parts of the MATLAB wavelet toolbox. The Pillow library is probably the most up to date image editing/processing library for Python, but as far as I'm aware wavelets isn't something covered there.
Is that enough to get you started? A basic discussion of how Python packages work seems beyond the scope of this question, but you can do some reading at https://pypi.org/help/ if you are completely lost.
I am going to build a speech recognition program based on Hidden Markov Model. Unfortunately, I don't know how to get an input sound sequence, and, well, work with it. Can anyone tell me what is the general approach for reading values from a sound file format (i.e. .wav, .mp3, etc)and slicing a soundtrack into pieces in C++?
The general approach is to convert an input sound into the sequence of feature vectors (usually, MFCCs). This process is described in general in CMU Sphinx wiki, and described in details in HTK Book. You might also want to study the general-purpose openSMILE toolkit to see how it is done in C++.
I'd have thought that google could answer this question, but I've not had much luck.
Does anyone know of any open source C++ implementations of any face detection algorithms other than the Viola-Jones (boosted cascades of Haar-like features) method?
Also, does there exist an open source C++ implementation of Fisherfaces anywhere?
Thanks.
This post gets some attention, so I'd like to update it. I've contributed the face recognition library I wrote to OpenCV, which includes Eigenfaces, Fisherfaces and Local Binary Patterns Histograms at time of writing this. So OpenCV 2.4.2 now comes with everything to get started, see the very detailed documentation:
http://docs.opencv.org/trunk/modules/contrib/doc/facerec/
Now the original answer.
I am the author of the article linked in Kevin's post. Please note that you need to find the eigenvalues of the non-symmetric matrix S_{W}^{-1} S_{B} for the Fisherfaces, I didn't explicitly mention it in my blog. OpenCV only has a solver for symmetric matrices in its current version; since eigenvalues and singular values aren't equivalent for non-symmetric matrices you can't use a SVD either. For my project I have adapted the JAMA solver to C++ for solving the eigenvalue problem for non-symmetric matrices, so there's no need to use an external library for it. The CMakeLists.txt is configured, so Eigen can be used as well, so you have the choice.
Now I've finally found some minutes to implement the Fisherfaces method with the OpenCV2 C++ API and pushed the code into my github account at:
https://github.com/bytefish/opencv/blob/master/lda
The main.cpp shows you how to use the Fisherfaces class and how to use the Linear Discriminant Analysis with the same example as on: http://www.bytefish.de/wiki/pca_lda_with_gnu_octave. It comes as a CMake project, so compiling is as easy as typing:
philipp#mango:~/some/dir$ mkdir build; cd build
philipp#mango:~/some/dir/build$ cmake ..
philipp#mango:~/some/dir/build$ make
philipp#mango:~/some/dir/build$ ./lda
I don't know if it's the preferred Stackoverflow way to post code in the answer, but I think it's a bit too long to post.
Please note two things. (1) I read the images from a CSV file (just like this one), you don't have to care about the order of the labels. (2) I store the eigenvectors by column, while the PCA in OpenCV stores them by row. It's just a matter of personal taste to do so, but I've never seen that for any other solver and so I decided to store them by column.
I'd have thought that google could answer this question, but I've not had much luck.
Does anyone know of any open source C++ implementations of any face detection algorithms other than the Viola-Jones (boosted cascades of Haar-like features) method?
Also, does there exist an open source C++ implementation of Fisherfaces anywhere?
Thanks.
This post gets some attention, so I'd like to update it. I've contributed the face recognition library I wrote to OpenCV, which includes Eigenfaces, Fisherfaces and Local Binary Patterns Histograms at time of writing this. So OpenCV 2.4.2 now comes with everything to get started, see the very detailed documentation:
http://docs.opencv.org/trunk/modules/contrib/doc/facerec/
Now the original answer.
I am the author of the article linked in Kevin's post. Please note that you need to find the eigenvalues of the non-symmetric matrix S_{W}^{-1} S_{B} for the Fisherfaces, I didn't explicitly mention it in my blog. OpenCV only has a solver for symmetric matrices in its current version; since eigenvalues and singular values aren't equivalent for non-symmetric matrices you can't use a SVD either. For my project I have adapted the JAMA solver to C++ for solving the eigenvalue problem for non-symmetric matrices, so there's no need to use an external library for it. The CMakeLists.txt is configured, so Eigen can be used as well, so you have the choice.
Now I've finally found some minutes to implement the Fisherfaces method with the OpenCV2 C++ API and pushed the code into my github account at:
https://github.com/bytefish/opencv/blob/master/lda
The main.cpp shows you how to use the Fisherfaces class and how to use the Linear Discriminant Analysis with the same example as on: http://www.bytefish.de/wiki/pca_lda_with_gnu_octave. It comes as a CMake project, so compiling is as easy as typing:
philipp#mango:~/some/dir$ mkdir build; cd build
philipp#mango:~/some/dir/build$ cmake ..
philipp#mango:~/some/dir/build$ make
philipp#mango:~/some/dir/build$ ./lda
I don't know if it's the preferred Stackoverflow way to post code in the answer, but I think it's a bit too long to post.
Please note two things. (1) I read the images from a CSV file (just like this one), you don't have to care about the order of the labels. (2) I store the eigenvectors by column, while the PCA in OpenCV stores them by row. It's just a matter of personal taste to do so, but I've never seen that for any other solver and so I decided to store them by column.
I need to use the connected component labeling algorithm on an image in a C++ application. I can implement that myself, but I was trying to use Boost's union-find/disjoint sets implementation since it was mentioned in the union-find wiki article.
I can't figure out how to create the disjoint_sets object so that it'll work with the image data I have (unsigned shorts). What am I missing? The examples in the Boost documentation aren't making any sense to me. Do I need all the extra Graph mumbo-jumbo in those examples when I have an image? OR, is there already an OpenCV connected component labeling implementation. Currently we're using OpenCV 1.1pre1 and Boost 1.37.
Surprisingly, there is no CCL in OpenCV. However, there is a workaround that is described in the reference manual. See the example for cvDrawContours. When I tried to use it, I had some strange behaviour on first and last rows and columns of an image, but I probably did something wrong.
An alternative way is to use cvBlobs library.
We ended up writing the algorithms for CCL and Union-Find ourselves using the descriptions found on Wikipedia and elsewhere. It seemed easier and faster than adding another library to our application just for this purpose.
Another possibility is to use the source codes provided provided by Ali Rahimi, and you can have a look at this.
I was able to use disjoint_sets of the boost library for the connected component labeling.
But to test, I was trying to create an image with pixel intensities having the value same as its label.
This led to the problem which I haven't been able to handle yet. Have a look at the thread.