Ask Your Question
0

what predict function returns in createEigenFaceRecognizer()?

asked 2019-09-02 00:26:45 -0500

TheCoder gravatar image

rec=cv2.createEigenFaceRecognizer(); sns,conf=rec.predict(Test_Image); One of the values it returns is sns the ID number of face detected and the other value it returns (conf) lies in range 1000 to 2000 .Does it returns 100*Error percentage (conf) ?

rec=cv2.createLBPHFaceRecognizer(); sns,conf=rec.predict(Test_Image); In case of createLBPHFaceRecognizer it returns id number (sns) and error percentage (conf) .

My questions is what does predict function of createEigenFaceRecognizer() returns ?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2019-09-02 04:03:35 -0500

berak gravatar image

One of the values it returns is the ID number of face detected

correct. (that was simple)

the other value it returns (conf)

that's not so simple. it''s the (L2) distance to the nearest image in the database, it's more the opposite of a "confidence" (less is better) and it'S entirely non-linear, so you won't find an easy formula to make it a percentage or such.

lies in range 1000 to 2000

that's arbitrary, it depends on your local database.

in the end, you'll probably set a threshold value from the worst true and the best false recognition.

edit flag offensive delete link more

Comments

How to find percentage or confidence using it , if i need to test how accurate results the algorithm gives ?

TheCoder gravatar imageTheCoder ( 2019-09-02 07:00:42 -0500 )edit

so how i know that if this algorithm(PCA or EigenFace) is better than the LBPH ?

TheCoder gravatar imageTheCoder ( 2019-09-02 07:10:58 -0500 )edit

berak i studied that EigenFace algorithm gives better result compared to LBPH , how i prove it if i cannot get error percentage ?I read your answer and it is helpful .Thanks for it .

TheCoder gravatar imageTheCoder ( 2019-09-02 07:13:51 -0500 )edit

i studied that EigenFace algorithm gives better result compared to LBPH

that's nice, but probably only with your current data, and may change with different images.

so how i know that if this algorithm(PCA or EigenFace) is better than the LBPH ?

you do tests with ground truth data, correct prediction or not. measure accuracy, confusion matrix.

berak gravatar imageberak ( 2019-09-02 11:29:43 -0500 )edit

What is confusion matrix ? @berak

TheCoder gravatar imageTheCoder ( 2019-09-02 13:53:09 -0500 )edit

@berak i am doing self project and not HW .But you answer helped me , hence i accept it

TheCoder gravatar imageTheCoder ( 2019-09-03 08:19:08 -0500 )edit

apologies for the rudeness, sorry.

berak gravatar imageberak ( 2019-09-03 08:59:43 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-09-02 00:26:45 -0500

Seen: 65 times

Last updated: Sep 02 '19