Open vahid-dan opened 7 years ago
Hi Vahid,
What is happening is that the system is attempting to read the data used to generate the classification model before the data is accessible. The labels and representations for each face image are generated by a python subprocess which in this case has actually not finished writing all the data. The data is stored in the 'system/generated-embeddings' directory in the 'labels.csv' and 'reps.csv' files.
These two files are used to train a linear SVM classifier which is stored in the 'classifier.pkl' file. The reason you are not being recognised is due to the fact that the new classifier.pkl file cannot be generated without the labels.csv and reps.csv being completed. So in a nutshell, the system should be waiting for the python subprocess to terminate before it attempts to read from the labels.csv and reps.csv files.
I actually thought I had fixed this issue it seemed to work perfectly when I tested it. Line 190 in FaceReogniser.py uses self.p.communicate() which is supposed to ensure the subprocess terminates before the program continues.
I have also tried using self.p.wait() which should, in fact, do the same thing but also did not work as expected. So I'm gonna try another combination. Could you please replace line 190 in FaceReogniser.py 'self.p.communicate()' with the two lines of code below.
self.p.stdin.close() self.p.wait()
I just tested on my system and seemed to work perfectly.
Let me know if you still receive the same error or if it comes right!
Thanks, Brandon
Hi Brandon;
Thanks a lot for your reply. I applied the changes to system/FaceRecogniser.py
as follows:
- outs, errs = self.p.communicate()
+ self.p.stdin.close()
+ self.p.wait()
It still throws the same error.
Vahid
Hi Brandon;
Do you have any solution for this?
Thanks, Vahid
Hi @gauravkaila ;
I still couldn't train the classifier myself. Could you please kindly train the classifier using my photos and send me the system/generated-embeddings/labels.csv
and system/generated-embeddings/reps.csv
files? I guess that's enough for the application to recognize my face.
I've uploaded my photos here:
https://drive.google.com/drive/folders/0B9nFNSX2ttVtbUNRZ2RFcG5FaWM?usp=sharing
That'd be a great help and I'd be more than thankful. :-)
Cheers, Vahid
Hi @BrandonJoffe;
Could you please do me this favor?
I still couldn't train the classifier myself. Could you please kindly train the classifier using my photos and send me the system/generated-embeddings/labels.csv and system/generated-embeddings/reps.csv files? I guess that's enough for the application to recognize my face. I've uploaded my photos here: https://drive.google.com/drive/folders/0B9nFNSX2ttVtbUNRZ2RFcG5FaWM?usp=sharing
Thanks, Vahid
Hi @vdaneshmand,
so sorry I haven't been able to get back to you!
Unfortunately I don't have much time on my hands to work on this project.
I have trained the classifier with your images and you can find the model and the respective files here: https://drive.google.com/open?id=0Bxl3BQa8iqkoS1Nhbnp1bXhYMXc
It should be able to recognise your face, ping me if you still having issues and I'll get back to you as soon as I can.
Cheers, Brandon
Hi @BrandonJoffe and thanks a lot for the files. It works fine.
Cheers, Vahid
Hi;
I am trying to train the classifier for face detection. First, I have added a directory with my name under
system/training-images
containing tens of photos of me. Then clicked the "Retrain Database" button. Based on what I saw in the log messages on the screen, it seemed it could detect my face in the photos in the process of training:But at the end, it threw this error and won't actually detect me in the application:
Besides that, I have deleted all the predefined persons and their photos from the directories; But still it recognizes me as other ones. It seems their data is still in the database.
I really appreciate your help.
Thanks, Vahid