Ask Your Question

Agustin Haller's profile - activity

2014-02-13 01:43:21 -0600 asked a question LinAlgError numpy

This is weird.

Im having this error in the production environment but not in my local environment. image description

image description

image description

Does anyone know what may be the error? Why i'm getting those "nan's"?

You can check this at http://ec2-54-200-156-31.us-west-2.compute.amazonaws.com/

Thank you very much!

Comparing both outputs (from local and prod environments) i notice the error is produced in features.py (from facerec python library) in this portion of the code:

    # calculate the within and between scatter matrices
    Sw = np.zeros((d, d), dtype=np.float32)
    Sb = np.zeros((d, d), dtype=np.float32)
    for i in range(0,c):
        Xi = XC[:,np.where(y==i)[0]]
        meanClass = np.mean(Xi, axis = 1).reshape(-1,1)
        Sw = Sw + np.dot((Xi-meanClass), (Xi-meanClass).T)
        Sb = Sb + Xi.shape[1] * np.dot((meanClass - meanTotal), (meanClass - meanTotal).T)

That code is being processed differently in prod and local environments.

By the way, I'm running python 2.7.6 using GCC 4.2.1 on osx in my local environment. And i'm running python 2.7.3 using GCC 4.6.3 on ubuntu 12.04 in my prod environment. (in an amazon ec2 micro instance)

Does anyone know which may be the difference in the numpy behavior? Any help is appreciated!

2014-02-13 00:53:35 -0600 received badge  Student (source)
2014-02-12 22:22:01 -0600 asked a question k-nearest neighbor classifier

Hi,

What does it mean a k-nearest neighbor classifier? I mean, using Fisherfaces, if i predict a model using a 3-nearest neighbor classifier i would get something like this:

{

'labels' : [ 0, 0, 1 ],

'distances' : [ 10.132, 10.341, 13.314 ]

}

Does this mean that for the first region or component of the Fisherfaces the predicted label is 0 and the distance 10.132? For the seccond region or component of the Fisherfaces the predicted label is 0 and the distance 10.341?

Am i correct? or i'm interpreting the results wrong?

Any help is appreciated, thank you!

2014-02-12 22:06:01 -0600 asked a question Fisherfaces components and regions

Hi,

I want to use face recognition using the different regions (or components) that the Fisherfaces identify. For example, some regions or components of a Fisherface may describe the eyes. I want to compare against the same regions of other Fisherfaces. I mean, try to recognize who has eyes similar to mine for example.

I know here in this post (http://bytefish.de/blog/fisherfaces/) there are some example using celebrities. They try to determine which celebrity you resemble the most.

I want to know how to get the Fisherfaces components and how to interpret them (as the author of this post [http://bytefish.de/blog/fisherfaces/] does in the plots he made). image description

Any help is welcomed. Thank you very much!

2014-01-21 11:44:44 -0600 asked a question facerec KFoldCrossValidation error

Hi, i'm trying the validation algorithms from facerec lib (http://bytefish.de/blog/validating_algorithms/). I'm following the procedure shown in that blog post but i'm getting this error.

integer division or modulo by zero

Any help is appreciated, thanks in advance!

image description

2014-01-19 16:27:24 -0600 received badge  Supporter (source)
2014-01-13 00:17:25 -0600 commented question facerec_demo.py confidence issue

(3/3)

This way i can then perform a k-fold cross validation or another validation. My second question here is, which do you think is the best classifier to use in my use case of “face verification”? Also, do you think the way i’m doing it using two samples make’s sense? If you think there’s a better way of doing what i need, please let me know, i would really appreciate it. Thank you very much!

2014-01-13 00:15:59 -0600 commented question facerec_demo.py confidence issue

(2/3)

Suppose that i have a set of photos of one person (X) and a sample image (Y). What i want to do is to compare if the person in the sample image (Y) is the same person of whom i have the set of photos (X). It’s like a face verification use case. In order to use the facerec library for face verification what i’m doing is to consider the single image as another sample, so i have:

|-- s01 | |-- 01.jpg | |-- 02.jpg | |-- 03.jpg | [...] |-- s02 | |-- 01.jpg

Where s01 is the person whom i have the set of photos (X), and s02 represents the sample image (Y).

2014-01-13 00:15:12 -0600 commented question facerec_demo.py confidence issue

(1/3)

After reading both the documentation of the facerec python framework and the article at http://www.bytefish.de/blog/fisherfaces/ i have some questions about the accuracy. I understand that the “confidence” before performing a k-fold cross validation represents the euclid distance to the next nearest face found in the db. And i also understand that getting an accuracy on the form of X% is hard having the euclid distance. What i don’t completely understand is, what does it mean an accuracy after performing the k-fold cross validation? Is the accuracy of identifying the person between the faces trained in the set?

2014-01-09 19:38:25 -0600 commented question facerec_demo.py confidence issue

Thanks!, how do I interpret the confidence? If the person is in the trained model then the confidence is near 0, and if not is higher (for example 2567.02). What i mean is how can i translate this to a X% of confidence? Do i explain myself? Thank you again!

2014-01-07 19:34:59 -0600 received badge  Editor (source)
2014-01-07 17:18:45 -0600 asked a question facerec_demo.py confidence issue

Hi, i'm trying to run the facerec_demo.py example (from here: https://github.com/Itseez/opencv/blob/2.4/samples/python2/facerec_demo.py), but im getting always

Predicted label = 0 (confidence=0.00)

Can anyone help me understand why i'm getting this? I hope to get a real predicted label and confidence. Thank you very much!