tag:blogger.com,1999:blog-6061887630060661987.post754453959065098017..comments2019-01-17T10:58:15.812-05:00Comments on dlib C++ Library: High Quality Face Recognition with Deep Metric LearningDavis Kingnoreply@blogger.comBlogger404125tag:blogger.com,1999:blog-6061887630060661987.post-39492955104028513272018-12-11T05:49:07.680-05:002018-12-11T05:49:07.680-05:00Hi Davis,
Thank you for providing this great libr...Hi Davis,<br /><br />Thank you for providing this great library!<br />I would like to speed up the inference step of the network on the CPU by using Intel's OpenVino framework. To do this I would first need to convert your network into a format that the OpenVino model optimizer understands (e.g. Caffe). I have tried to use your "convert_dlib_nets_to_caffe" tool, but I ran into a problem.<br />The conversion from .dat to .xml did work, but when I ran the tool (./convert_dlib_nets_to_caffe DlibFaceNet.xml 1 3 150 150) it gave the following error:<br />*************** ERROR CONVERTING TO CAFFE ***************<br />No conversion between dlib pooling layer parameters and caffe pooling layer parameters found for layer 127<br />dlib_output_nc: 35<br />bottom_nc: 72<br />padding_x: 0<br />stride_x: 2<br />kernel_w: 3<br />pad_x: 1<br /><br />Any suggestions on howto fix this? It would be great if we can make your network run on the new Intel Movidius Neural Compute Stick 2.<br /><br />Cheers<br />Kasper van Zonhttps://www.blogger.com/profile/01882471351882070861noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-3722294401371872232018-12-05T03:23:31.545-05:002018-12-05T03:23:31.545-05:00Please do not SPAM here!Please do not SPAM here!Andrey Zakharoffhttps://www.blogger.com/profile/09146432959603914745noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-3961243699570671512018-11-28T03:55:04.710-05:002018-11-28T03:55:04.710-05:00@Tsay Joy Hi Joy, I use formula Probability=sqrt(1...@Tsay Joy Hi Joy, I use formula Probability=sqrt(1.- Euclidean distance), also this is not real probability, but probability-like value. Actually,in this way I de-linearize output value. Due to the changed slope of the function I get stretched scores near 0. and shrinked where Euclidean distance coming to 1. Don't you think, your SVM does something like this?Andrey Zakharoffhttps://www.blogger.com/profile/09146432959603914745noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-52379243213293698212018-11-27T22:40:02.042-05:002018-11-27T22:40:02.042-05:00Hi Andrey, yes it's Euclidean score not euler,...Hi Andrey, yes it's Euclidean score not euler, my bad ;)<br />(Euclidean score = 1.0 - Euclidean distance)<br /><br /> As for the second question, yes there were not-sure regions (Euclidean score 60~70) where the face recognition(FR) had trouble giving correct results. Therefore, I previously skipped these frames completely, due to the inference is a video, and I have many frames of face images to use.<br /><br /> In short, Euclidean score below 60 was set as "Unconfidence" where the inference face is labeled "Unknown" (Unknown means not enrolled in database). In contrast, Euclidean score above 70 will be labeled as the enrolled name in database e.g. "WILL". For Euclidean score between 60~70, false results will occur, i.e. the FR will think it's someone else "John" when it's actually "WILL". <br /><br /> But all these measures are just a work around for Euclidean score, as the SVM score now can give a more definite "-1" as different faces and "+1" as same faces between inference and enrolled. I guess you can say high varianced SVM score (I normalized from -1~1 to 0.00~1.00) is better in FR application, due to differ the "higher known confidence" and "lower unknown Unconfidence".Tsai Joyhttps://www.blogger.com/profile/07913588115407332454noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-39134419472762359692018-11-27T01:40:50.548-05:002018-11-27T01:40:50.548-05:00@Tsai Joy, good morning!
It is most important tas...@Tsai Joy, good morning!<br /> It is most important task to lower False Positive for Unknown, you are right.<br />I have some misunderstanding:<br />1) Do you mean Euclidean distance when say "euler distance"?<br />2)Is it good, that for the same person image- "WILL", you get so high varianced SVM score?<br />It is better, if for right person ("WILL") we get much higher score, and lower score for wrong (unknown) person(not "WILL", not "JOHN" etc).<br />Could you specify, please?Andrey Zakharoffhttps://www.blogger.com/profile/09146432959603914745noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-37404194070809407082018-11-26T22:33:27.466-05:002018-11-26T22:33:27.466-05:00As an update to the svm_c_linear_dcd_trainer for F...As an update to the svm_c_linear_dcd_trainer for FR:<br />I used the disturb_colors from dlib to jitter the enrolled face <br />(due to our application need to enroll one face with only one image of that person)<br />and pushed all disturbed color faces into the sample points in vector to train the svm_c_linear_dcd_trainer.<br /><br />The results looks much better than euler score (1.0 - euler distance):<br />name: WILL, euler score: 0.6078, SVM score: 0.3353, cosine score: 0.9223 <br />name: WILL, euler score: 0.8007, SVM score: 0.8076, cosine score: 0.9800 <br />name: WILL, euler score: 0.6252, SVM score: 0.3715, cosine score: 0.9286 <br />name: WILL, euler score: 0.7867, SVM score: 0.7762, cosine score: 0.9771 <br /><br />as you can see the euler score used to range from "0.60~0.80"<br />and now SVM score range from "0.33~0.80"<br />with this range we can cut the Confidence threshold at e.g. "0.50" and get lower false alarms(lower FAR) e.g. "0.60" & "0.62" these not sure scores will be made to unknown instead of name id "WILL".<br />However large tests are still needed to verify FAR, I will test on larger enroll databases and update when done testing.<br />Thanks Davis for all the help!Tsai Joyhttps://www.blogger.com/profile/07913588115407332454noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-59895914291880244492018-11-26T16:19:37.204-05:002018-11-26T16:19:37.204-05:00whats the estimate time to train CNN for face dete...whats the estimate time to train CNN for face detection using CPU?Unknownhttps://www.blogger.com/profile/09135585388741718122noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-15664499799013112362018-11-22T07:27:10.448-05:002018-11-22T07:27:10.448-05:00I have no idea what you did so I can't say. I...I have no idea what you did so I can't say. I have a feeling you didn't check to see what value of C is right to use though. You must read the documentation if you want to know how to use things.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-19150512198125744932018-11-22T02:05:01.423-05:002018-11-22T02:05:01.423-05:00Dear Davis:
I used the svm_c_linear_dcd_trainer us...Dear Davis:<br />I used the svm_c_linear_dcd_trainer using m(128) with this result:<br /> 1 //George01 Same enroll image pushed to 5 samples as svm training label(+1)<br /> 0.323433 //Henry01<br /> 0.409045 //Henry02<br /> 0.425634 //George02<br /> -0.339184 //Peter01<br /> 0.3545 //Henry03<br /> 0.350297 //Henry04<br />George, Henry, and Peter are different Asian people which look alike.<br />The results can see that it can differentiate -0.339184 Peter01 from the enrolled image George01.<br />Also 0.425634 George02 is indeed the highest score from the SVM same as the enrolled image George01.<br />However, from your original results in svm_c_linear_dcd_trainer you can make sinc points to nearly 1.0000<br />and non-sinc points to nearly -1.0000. How can I make same faces to +1.000 and different faces to -1.0000?<br />Tsai Joyhttps://www.blogger.com/profile/07913588115407332454noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-14199728539998141002018-11-20T15:17:39.257-05:002018-11-20T15:17:39.257-05:00I would use http://dlib.net/ml.html#svm_c_linear_d...I would use http://dlib.net/ml.html#svm_c_linear_dcd_trainer. Train classifiers independently so you don't have to retrain everything when you add one more person. Whichever model gives the largest output wins when you use it.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-21730194793673378692018-11-20T11:16:24.926-05:002018-11-20T11:16:24.926-05:00Hi Davis, did you see my question regarding the re...Hi Davis, did you see my question regarding the recommended linear SVM classifier? Which one should I look into? we need to distinguish between a greta number of known faces.Mikehttps://www.blogger.com/profile/15549468676645780411noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-47494119068087268872018-11-20T08:47:14.775-05:002018-11-20T08:47:14.775-05:00It will probably not work as well if you only have...It will probably not work as well if you only have between 2-6 instances of each identity.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-26906869388944629422018-11-19T08:43:37.447-05:002018-11-19T08:43:37.447-05:00Hello Davis,
You mentioned training your model wi...Hello Davis,<br /><br />You mentioned training your model with 7485 identities.<br /><br />What I mean to ask is, could a similar model be trained with a low number of samples per individual identity, but still using a large number of images ( > 1 million)?<br /><br />The dataset I work with has 2-6 pictures for each subject, and I wonder if it is enough to train a robust recognition model.<br /><br />I understand this is more of a conceptual question than a technical one about the library, but I take your opinion on the matter could be very helpful.<br /><br />Thanks!nb357https://www.blogger.com/profile/00458216005084733619noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-1353305049320893042018-11-19T07:44:28.466-05:002018-11-19T07:44:28.466-05:00Thanks Davis, could you point me to the right SVM ...Thanks Davis, could you point me to the right SVM trainer in dlib? My understanding is that I would need to look into svm_multiclass_linear_trainer, as it is not binary decision.Mikehttps://www.blogger.com/profile/15549468676645780411noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-75802978220387435962018-11-19T07:36:52.155-05:002018-11-19T07:36:52.155-05:00If you know who you want to recognize then it'...If you know who you want to recognize then it's almost certainly better to train a model like a linear SVM on top of the network output. That's true regardless of any other considerations.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-59923131908687977572018-11-19T07:31:49.110-05:002018-11-19T07:31:49.110-05:00Hi Davis, do you expect a linear SVM to be advanta...Hi Davis, do you expect a linear SVM to be advantageous for recognizing a large number of known faces, e.g. 10,000 faces, enrolled in the database? I was thinking of the SVM function of supervised learning to be an integral part of the neural net.Mikehttps://www.blogger.com/profile/15549468676645780411noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-7537071636317758822018-11-19T07:17:07.540-05:002018-11-19T07:17:07.540-05:00You train a binary linear svm to decide if it'...You train a binary linear svm to decide if it's the person of interest or not.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-4152715664888789122018-11-19T03:58:10.752-05:002018-11-19T03:58:10.752-05:00@Davis, Hi Davis, how to train this svm model- one...@Davis, Hi Davis, how to train this svm model- one against all, or many in database against all set of unknown?Andrey Zakharoffhttps://www.blogger.com/profile/09146432959603914745noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-28079089187779191462018-11-18T20:17:56.173-05:002018-11-18T20:17:56.173-05:00There are always going to be failure cases with an...There are always going to be failure cases with any model. But what you should also do is train something like a linear svm to recognize a specific person if you want to get better performance for that specific person.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-18133688208839019082018-11-18T14:37:27.581-05:002018-11-18T14:37:27.581-05:00@Tsai Joy
Thanks for your valuable insight in your...@Tsai Joy<br />Thanks for your valuable insight in your results after training. I am experiencing the same behavior, that unknown faces score very close to known faces as weil. I did not train the network myself but used the data provided by Davis.<br /><br />Can you confirm this same behavior in your investigations or do you observe this only with the net trained by yourself?<br />Did you find a solution for a better separation of known and unknown faces?Mikehttps://www.blogger.com/profile/15549468676645780411noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-29992832961164130422018-11-14T04:03:51.419-05:002018-11-14T04:03:51.419-05:00Dear Tsay Joy, in Issue "Knn classifier #655&...Dear Tsay Joy, in Issue "Knn classifier #655" of "ageitgey/face_recognition" I wrote my question about using knn method. If you are in the theme, could you answer the question there?Andrey Zakharoffhttps://www.blogger.com/profile/09146432959603914745noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-61831355040322320052018-11-09T05:28:57.640-05:002018-11-09T05:28:57.640-05:00No that's what I've done. I also tried to ...No that's what I've done. I also tried to unsubscribe from the email.<br />It just says you are already unsubscribed. Nothing really changesoctfhttps://www.blogger.com/profile/07175518647098429595noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-82512750477747244402018-11-09T05:18:38.730-05:002018-11-09T05:18:38.730-05:00@octf
1.look down this blog page and find the str...@octf<br /><br />1.look down this blog page and find the string<br />Follow-up comments will be sent to "your_email" Unsubscribe<br />2. Push hipertext "Unsubscribe". Easy.Andrey Zakharoffhttps://www.blogger.com/profile/09146432959603914745noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-38782781333146582892018-11-09T04:58:28.545-05:002018-11-09T04:58:28.545-05:00For real, how can I unsubscribe from this thread? ...For real, how can I unsubscribe from this thread? I tried many times but new mails always pop up. It's been some months now.octfhttps://www.blogger.com/profile/07175518647098429595noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-3107463718468164232018-11-09T04:49:23.135-05:002018-11-09T04:49:23.135-05:00Dear Andrey Zakharoff:
As you can see in the comme...Dear Andrey Zakharoff:<br />As you can see in the comment above, I am confronting the similar problem myself.<br />I used the same method as you: find the minimal distance from the database and give its label name to the face if it's smaller than a given threshold. This results in some false recognition: unknown to known and known to other known. I read in this article that you can train a KNN classifier:<br />https://github.com/ageitgey/face_recognition/wiki/Face-Recognition-Accuracy-Problems<br />but I still think this is an overshot if you can make the distance accurate via training in the first place.<br />Joy<br />Tsai Joyhttps://www.blogger.com/profile/07913588115407332454noreply@blogger.com