Closed guswnsxodlf closed 7 years ago
Can you try running our tests with run-tests.sh
and send the output? (It will give you an error the first time you run it with some instructions of files you need to download.) I have a test in there that checks if the classifier demo works as expected.
-Brandon.
Oh, there are 3 fails..
root@5560bfc87a3b:~/openface# ./run-tests.sh
tests.openface_api_tests.test_pipeline ... ok
tests.openface_batch_represent_tests.test_batch_represent ... FAIL
tests.openface_demo_tests.test_compare_demo ... ok
tests.openface_demo_tests.test_classification_demo_pretrained ... ok
tests.openface_demo_tests.test_classification_demo_pretrained_multi ... ok
tests.openface_demo_tests.test_classification_demo_training ... FAIL
tests.openface_neural_net_training_tests.test_dnn_training ... FAIL
======================================================================
FAIL: tests.openface_batch_represent_tests.test_batch_represent
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/root/openface/tests/openface_batch_represent_tests.py", line 39, in test_batch_represent
lfwSubset), "Get lfw-subset by running ./data/download-lfw-subset.sh"
AssertionError: Get lfw-subset by running ./data/download-lfw-subset.sh
======================================================================
FAIL: tests.openface_demo_tests.test_classification_demo_training
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/root/openface/tests/openface_demo_tests.py", line 69, in test_classification_demo_training
assert os.path.isdir(lfwSubset), "Get lfw-subset by running ./data/download-lfw-subset.sh"
AssertionError: Get lfw-subset by running ./data/download-lfw-subset.sh
======================================================================
FAIL: tests.openface_neural_net_training_tests.test_dnn_training
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/root/openface/tests/openface_neural_net_training_tests.py", line 37, in test_dnn_training
lfwSubset), "Get lfw-subset by running ./data/download-lfw-subset.sh"
AssertionError: Get lfw-subset by running ./data/download-lfw-subset.sh
----------------------------------------------------------------------
Ran 7 tests in 10.550s
FAILED (failures=3)
Thank you for your answer!
I commanded ./data/download-lfw-subset.sh
as the assertionError and re-tested.
root@5560bfc87a3b:~/openface# ./run-tests.sh
tests.openface_api_tests.test_pipeline ... ok
tests.openface_batch_represent_tests.test_batch_represent ... ok
tests.openface_demo_tests.test_compare_demo ... ok
tests.openface_demo_tests.test_classification_demo_pretrained ... ok
tests.openface_demo_tests.test_classification_demo_pretrained_multi ... ok
tests.openface_demo_tests.test_classification_demo_training ... ok
tests.openface_neural_net_training_tests.test_dnn_training ... ok
----------------------------------------------------------------------
Ran 7 tests in 224.863s
OK
All passed and I trained images again, but the result is still wrong..
Thanks! At least that looks good, I'm not sure what's going on in your case. Let me know if you find out anything else.
-Brandon.
Thanks :)
I did the same as @guswnsxodlf and here are my result:
=== images/examples/carell.jpg ===
Predict lennon with 0.98 confidence.
=== images/examples/adams.jpg ===
Predict lennon with 0.95 confidence.
=== images/examples/lennon-1.jpg ===
Predict clapton with 1.00 confidence.
=== images/examples/lennon-2.jpg ===
Predict clapton with 1.00 confidence.
As said in http://cmusatyalab.github.io/openface/demo-3-classifier/#classifying-new-images the "celeb-classifier.nn4.small2.v1.pkl" was trained with 6000 images from 10 persons (600 per person).
Maybe the problem is the lower number of images used in the training process?
Yep I think so :/
Just an update... I was doing some tests and got the following result:
./demos/classifier.py infer ...
was not able to identify correctly anyone in the images../demos/classifier.py infer ...
increassed about 15% in the confidence.Another worrisome behaivor that i noticed is that running the ./demos/classifier.py train ...
on the same features folder(without change the images), several times, without erasing the previous results, the "classifier.pkl" generated by the training produce a prediction with a different confidence every time you use the new classifier.
That's weird ..
@guswnsxodlf @bamos
The problem seems to be with scikit learn's predict_proba. Probabilities are predicted from SVM using Platt Scaling. For less number of samples per class it gives wrong results because of platt scaling.
Please look into this issue for more details about the problem.
while i was running this
./demos/classifier.py train ./generated-embeddings/
ian getting this error
Traceback (most recent call last):
File “./demos/classifier.py”, line 294, in
please help me in debugging it
I set the environment with docker.
And I followed the demo command at
Minimal Working Example to Extract Features
.It went well, and I trained features and tried it.
./demos/classifier.py train classify-test/features
./demos/classifier.py infer classify-test/features/classifier.pkl classify-test/raw/lennon/lennon-1.jpg
But the result was
Why the result is clapton? Is it right?