Ask Your Question

UncleSam's profile - activity

2018-05-22 02:27:30 -0600 received badge  Notable Question (source)
2018-05-16 02:08:42 -0600 received badge  Popular Question (source)
2017-02-26 00:20:41 -0600 received badge  Popular Question (source)
2017-02-10 09:19:21 -0600 received badge  Popular Question (source)
2015-11-24 01:47:43 -0600 received badge  Famous Question (source)
2015-11-19 23:02:26 -0600 received badge  Notable Question (source)
2015-11-19 23:02:26 -0600 received badge  Popular Question (source)
2014-06-28 09:05:58 -0600 asked a question Gender-Age recognition from webcam doesn't work

Hi everybody! I really need help.

I'm trying to develop a age-gender recognition system; but I can't have to work it right. My system detect face without false positive (skin mask applied) also using landmarks for eyes and mouth it's able to align and crop all the face in the same way in order to have them all aligned. I've computed my training samples (a db with 800 images, 50% male and 50% female; I'm trying to recognize only the gender for now) with an LBPH algorithm and with that I've trained an SVM classifier with 2 class.

The test faces are taken from a web cam stream and on a average of 3 frame, I compute the prediction on the face.

But the result it's really bad. The error rate is about 50%.

I know that my system is well defined because it's able to recognize me (my face is in the train db), but when it comes to other subject, it's always really unreliable

My last hypothesis are 2: - the webcam resolution in MP is too low in order to give me good images - I need to apply a face interpolation in order to precisely overlap my faces in order to match their features space

Someone's got some suggestion? Are my last hypothesis right?

Thanks to everyone!

2014-06-25 05:58:10 -0600 commented question Crop detected face using eye position as reference

That's what I call a Bible. Thanks! Where I can find the flandmark model? I can't find its link in it...

2014-06-25 05:50:40 -0600 commented question train memory error

I didn't find a proper answer. The problem is that I touched the limit of my RAM memory; the only way to avoid that was to reduce the number of images or switch to another machine with more RAM. By the way I suggest you to take a look to the hlbp recognizer as said before, I've found that it's way better, especially when it comes to deal with light variations.

2014-06-25 05:45:49 -0600 commented answer OpenCV on Udoo board

did you tried to perform action like matrix conversion or cvtColor conversion? do they work?

2014-06-25 05:43:11 -0600 asked a question Crop detected face using eye position as reference

Hi everybody! Does anybody know a method to crop a detected face using the eye position as a reference? I need to crop a detected face in a video stream in order to perform a face recognition with a better reliability. I've seen the haar cascade for the eye position but it's too chaotic and It needs filtering for the false positive (thing that I can't do without lowering the performance of my program)

Any ideas? Thanks!

2014-05-12 08:49:54 -0600 commented answer OpenCV on Udoo board

Sorry but I don't think that It'll be possible until the udoo's arm processor does not support the OpenCL full profile. Many function of the library needs float at 64bit, but the embedded profile of openCL doesn't support them (and many other features). You can install itby the way, and do some simple image manipulation; use the Udoo with ubuntu 12.04 and follow the install istruction on the opencv site

http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation

2014-05-09 14:20:31 -0600 received badge  Teacher (source)
2014-04-29 09:23:58 -0600 received badge  Supporter (source)
2014-04-29 09:22:40 -0600 commented answer PCA+SVM Explanation

So what I'm doing with my code is right I suppose! (or I am comparing apples with celsius?)

2014-04-29 08:46:23 -0600 asked a question PCA+SVM Explanation

I'm trying to apply a SVM classifier to a PCA projected matrix, but I've some doubt on how to perform it. After training a PCA obj, I've applied a back-projection. Then I've trained my SVM obj with this back-projection and the labels matrix.

But when I need to predict a new image, should I recreate a PCA obj, train it with the image only and back-project it? or should I apply the previous PCA obj?

Here's my piece of code

Mat values = asRowMatrix(labels, CV_32FC1);

Mat desc_mat = asRowMatrix(images_cropped, CV_32FC1);

Mat average = Mat();
PCA pca(desc_mat, average, CV_PCA_DATA_AS_ROW);


Mat mean = pca.mean.clone();
Mat eigenvalues = pca.eigenvalues.clone();
Mat eigenvectors = pca.eigenvectors.clone();

CvSVMParams params;
params.svm_type = CvSVM::C_SVC;
params.kernel_type = CvSVM::LINEAR;
params.term_crit = cvTermCriteria(CV_TERMCRIT_ITER, 100, 1e-6);

Mat data(desc_mat.rows, images_cropped.size(), CV_32FC1); //This Mat will contain all the Eigenfaces that will be used later with SVM for detection

for (int i = 0; i<images_cropped.size(); i++) {
    Mat projectedMat(1, images_cropped.size(), CV_32FC1);
    pca.project(desc_mat.row(i), projectedMat);
    projectedMat.row(0).copyTo(data.row(i));
}


CvSVM svm;
svm.train(data, values, Mat(), Mat(), params);

vector<Mat> images_cropped_t;
vector<int> labels_t;
//vectors with images and labels


int accuracy = 0;
Mat m_img = asRowMatrix(images_croppedt, CV_32FC1);
for (int i = 0; i < images_croppedt.size(); i++)
{
    Mat face = m_img.row(i);
    Mat projectedMat(1, images_croppedt.size(), CV_32FC1);
    pca.project(face, projectedMat);

    int predict = svm.predict(projectedMat);

    accuracy = ((predict < 51) && (labelst[i] == 0)) ? ++accuracy : (((predict > 51) && (labelst[i] == 1)) ? ++accuracy : accuracy);

}
cout << endl;
cout << "ACCURACY: " << accuracy << "/" << images_croppedt.size() << " : - " << accuracy * 100 / images_croppedt.size() << "%" << endl;
2014-04-24 08:17:03 -0600 commented question train memory error

Well seems like I have to make some trade of on my dataset. Nice info the one about lbp, 5 in parallel? sounds good!!!

thanks for the advice!

2014-04-24 07:46:57 -0600 asked a question train memory error

Hi everybody!

Does anybody know if there's a max number of images (ora space) for the train method in the eigenfaces model? I'm training it with 2000 images for a geneder recognizer, but It takes a lot of time and at the end it gives a memory error.

OpenCV Error: Insufficient memory (Failed to allocate 587520004 bytes) in cv::Ou
tOfMemoryError, file C:\builds\2_4_PackSlave-win32-vc12-shared\opencv\modules\co
re\src\alloc.cpp, line 52

I've also see from the docs that eigen and fisher can't perform and update of the model, so I'd like to know if there's a way to avoid this problem.

2014-04-23 16:29:19 -0600 received badge  Autobiographer
2014-04-23 16:25:49 -0600 commented answer How face recognition algorithms works

Thanks! now I understand! So it's always a KNN classifier, good to know. This mean that if I'd like to implement a PCA extractor with other classifier I need to write it down from the beginning I suppose...

2014-04-23 13:14:41 -0600 commented answer How face recognition algorithms works

I've already seen many articles and report about them, but they're a dimension reduction often use as a feature extractor (or even as classifier). My question may not be so clear, but what I'm asking for is the specific opencv implementation: the eigenfaces is the PCA reduction, but which classifier are they using? fisherface is an LDA reduction, but the classifier? same thing for HLBP. By the way I'll take a look anyway to your articles...read always help. (the first and the third link are broken)

2014-04-23 10:46:35 -0600 asked a question How face recognition algorithms works

Hi everybody!

Does somebody now where I can find an exaustive explanation of how the face recognition algorithms of opencv work? I'm developing a face recognizer and I would like to know which kind of features extractor and classifier the library use for all its methods. I've seen in the docs that the eigen method use a knn classifier, but for the fisher and lbp ones I didn't find anything.

Also does anybody know a good example for using a SVM as classifier in face recognition?

Thanks for the help!

2014-04-17 10:55:47 -0600 commented answer Features extraction via LBP with other classifiers

fantastic! thanks a lot!

2014-04-17 10:55:13 -0600 received badge  Scholar (source)
2014-04-09 05:04:55 -0600 received badge  Student (source)
2014-04-08 05:54:18 -0600 commented answer Features extraction via LBP with other classifiers

so you're telling me there's no implementation in opencv for such extraction right?!

2014-04-08 05:27:15 -0600 asked a question Features extraction via LBP with other classifiers

Hi everybody!

Is it possible to extract features with a LBP model in order to get a classification with other methods? I'd like to extract the lbp features from an image and classify them with KNN and SVM, how can I do that?

thanks for any type of help.

2014-03-31 03:53:33 -0600 commented answer OpenCV on Udoo board

I've tried to build it in both ways. buth as written in the docs, opencv needs opencl full profile. in the embedded one things like 64 bit floating point numbers are missing; maybe this give some problem with the definition of Mat.

2014-03-28 11:47:18 -0600 received badge  Self-Learner (source)
2014-03-28 11:33:54 -0600 answered a question OpenCV on Udoo board

Solved.

For anyone who will encounter the same problem trying to use Opencv on a Udoo quad with ubuntu 12.04; freescale doesn't provide a full profile Opencl for his processors i.mx6 but the full profile it STRICTLY requested from Opencv. So some operations will be allowed (open video stream it's ok) others no (BGR2GRAY conversion, haar training and detecting ...)

So, for now, until freescale wont fix this, face recognition on Udoo+ubuntu using opencv it's not possible.

2014-03-25 10:51:36 -0600 received badge  Editor (source)
2014-03-25 10:50:35 -0600 asked a question OpenCV on Udoo board

Hi guys,

I'm new in the forum and I'm playing with the opencv library from a month ago for some experiments...

Has anybody ever implemented some face recognition project on a udoo board quad with ubuntu? (http://shop.udoo.org/eu/udoo-quad.html) I'm trying to create a gender recognizer but I get some problem with the libopencl 1.2 embedded. It gives a symbol lookup error regarding the .so file with a undefined symbol in the gcoOS_AtomConstruct when I try to use cvtConvert or training a Haar classifier.

thanks in advance for any type of help...