nyoki-mtl / keras-facenet

Facenet implementation by Keras2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Different probability predictions everytime

abhishekgupte94 opened this issue · comments

Hi folks,
I added a predict_proba function to the clf SVC object to estimate the probability of prediction and it goes something like this:

`

                    pred = le.inverse_transform(clf.predict(embs))
                    pred1 = clf.predict_proba(embs)
                    pred1 = max(max(pred1.tolist()))
                    
                    if pred1>0.71:
                        print(pred[0],' detected with probability ', pred1)

`

The problem I'm facing is that it gives me different probabilities for the same trained face with the same lighting conditions etc everytime for my built-in DELL laptop webcam feed. Also when an untrained face is made to stand infront of it, the probability of a trained face is always greater than that untrained face. Do you guys think the problem is arising because I'm using an inferior 0.3 MP 640x480 feed as compared to training on higher-res higher-quality dataset of images? Does the dataset and the feed from the webcam have to be of same resolution? I really need help as this is a major cause of headache.

I this is because the matching of faces to see if face A is face B needs some work.
I've tried this library for months and the results are always wild off, totally random at times. I think because the 1m faces of celebrities is not a good dataset to use, too many duplicates faces and not enough variation.