Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleaning old learning table #22

Closed
mathieuduperre opened this issue Mar 7, 2017 · 6 comments
Closed

cleaning old learning table #22

mathieuduperre opened this issue Mar 7, 2017 · 6 comments

Comments

@mathieuduperre
Copy link
Contributor

hi,

i'm having problems cleaning the old learning table and injecting my own pretty face.

i've deleted what was in aligned-images and training-images (i left the unkown directory). I added one with my name and a few pics of me. That does not seems to do the trick. My name appears in the drop down but i get an error in the log when it tries to ingest about "alignment".

so i'm guessing the teaching picture has to have some sort of format. woudl it be the case? I also notice that sometimes when you click retrain databse the whole system crash. I'm running your docker in ubuntu 16.

Can you provide some feedback (or point me toward some doc) about the input format for learning and the whole ingest/retrain process please?

thanks

@vahid-dan
Copy link

Hi;

I never could add a camera or re-train the database using docker on Ubuntu or Mac and I ended up installing all the dependencies manually and running it without docker. Add camera functionality was resolved but, still, I'm not able to re-train the database.

Vahid

@mathieuduperre
Copy link
Contributor Author

as brandon pointed out, you need to select motion object segm and face reco for FPS to go up. there clearly something wrong with the other image processing.

face recognition is not working though. i was recognized as 6 different persons from the existing db !! will look at it tomorrow.

@vahid-dan
Copy link

I couldn't re-train the database myself; But sent about 20 photos of mine in different angles to Brandon and he re-trained the default database with them and sent me back the corresponding files and then I replaced the old ones. Now the application can recognize my face with a decent accuracy. My suggestion is that we use more than 20 photos for re-training the database and also remove the old data from the database. Then we should get pretty good results in face recognition.

Vahid

@mathieuduperre
Copy link
Contributor Author

ok I made some progress. The "training" process takes quite a while even though we don't have that many people in the db. I've added a ton of logging stuff (all sent in a log file instead of the console) and I'm getting closed at fixing the recognition problem.

Good thing you can try is to run "watch ls -al generated-embeddings" and click on "retrain db" in the user interface. You will see the csv files getting set to zero and slowing moving up in size. Thanks to Brandon and his thesis i'm now making much faster progress. I'll post here when my version is ready.

@mathieuduperre
Copy link
Contributor Author

hi Vahid, learning process will break IF some of the files are no longer there (some get deleted in the learning process, so if you stop the process while it runs, you are kinda ...) You need to make sure you still have cache.t7 file in system/aligned-images and in system/generated-embeddings make sure you have 2 csv file and 1 pkl file. (classifier.pkl and labels.csv and reps.csv)

if any of those files are not present your learning process is borked. you may actually have to redownload the repo at that stage. ( i tried making the sofware recreate those automatically but don't remember if i ever implemented that or not).

TO DELETE EXISTING DB:

-make sure you have the files listed above
-go in system/aligned-images and delete every directory but leave cache.t7
-go in system/training-imagse and delete everything ( leave unknown directory empty)
-create a directory with pictures of you (make sure you have many picturtes of your face like 20 or so)
-go in the ui and click "Retrain database"
-check in log directory to see what the log says

@AdmiralsAlan
Copy link

Have had similar issues with database not retraining but discovered the logger call in FaceRecogniser.py causing the program to halt.
logger.info("Loading labels " + fname + " csv size: " + str(os.path.getsize("/root/HSM/system/generated-embeddings/reps.csv")))
I have commented out these logger.info calls to labels.csv and reps.csv and system retrains the databasse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants