Ask Your Question

ev3670's profile - activity

2019-08-19 09:22:25 -0600 received badge  Nice Answer (source)
2019-08-19 09:14:19 -0600 marked best answer Avoid retraining a model when executing a program?

I've started using OpenCV for some image processing projects and I'm wondering if there's a way to save time when it comes to processing test images against a database of faces.

Issue: 10 pictures of each subject A, B, and C exist in folders on the desktop and each subject has their own identifier as to who the subject is in a list. The program navigates to the first subject folder, trains on their face and name from the list, then moves to the next subject, rinse and repeat until complete. Once the training process is done, a test image is then given to the program to see who it thinks the subject is (Person A, B, or C). The test image is the only thing that changes each time the script is run.

So far it's fairly successful at predicting who each subject is, but the training time alone makes up a fair bit of the execution time.

Question: Is there a way to make it so the model doesn't have to retrain every single time? I figured this is what the cascade files (haarcascade_frontalface_default.xml,lbpcascade_frontalface.xml, etc.) are for in terms of prediction accuracy, but I haven't been able to find a clear cut answer for a newbie like myself. Would each subject need their own .xml cascade file?

I'm fairly new to ML and image processing so even pointing me to a similar post, forum, or book would be awesome. Thanks!

Edit: I should mention that I currently use the EigenFaceRecognizer on the test images in the prediction stage after the model has been trained on the images of each of the subjects.

2019-08-15 14:37:05 -0600 commented question Avoid retraining a model when executing a program?

I reread the documentation and saw this. Thank you for pointing me in the right direction! I suppose this can be closed

2019-08-15 14:23:01 -0600 commented question Avoid retraining a model when executing a program?

We're getting there. I want to save the trained facerecognizer to avoid having to run it every time the script is execut

2019-08-15 14:12:16 -0600 commented question Avoid retraining a model when executing a program?

Yes, I made the edit just a few minutes ago to include this.

2019-08-15 14:06:48 -0600 received badge  Editor (source)
2019-08-15 14:06:48 -0600 edited question Avoid retraining a model when executing a program?

Avoid retraining a model when executing a program? I've started using OpenCV for some image processing projects and I'm

2019-08-15 13:06:51 -0600 asked a question Avoid retraining a model when executing a program?

Avoid retraining a model when executing a program? I've started using OpenCV for some image processing projects and I'm

2019-08-15 02:34:35 -0600 received badge  Teacher (source)
2019-08-14 18:26:50 -0600 answered a question What is wrong in this Opencv Face Recognition code?

faces = face_cascade.detectmultiScale(gray, 1.3, 5); The line above should be: faces = face_cascade.detectMultiScale(