tag:blogger.com,1999:blog-6061887630060661987.post1798735030667723341..comments2024-03-13T13:54:35.259-04:00Comments on dlib C++ Library: Dlib 18.7 released: Make your own object detector in Python!Davis Kinghttp://www.blogger.com/profile/16577392965630448489noreply@blogger.comBlogger60125tag:blogger.com,1999:blog-6061887630060661987.post-26310806434199563752020-11-01T07:52:20.070-05:002020-11-01T07:52:20.070-05:00Your labels are most likely inaccurate or inconsis...Your labels are most likely inaccurate or inconsistent in some way. Train on a smaller dataset that you are sure is labeled the way you really want. Get it working on that, then run that resulting model on the other images and see where it disagrees with labels. Or add more images but review them to make sure the boxes are in the right places.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-69048128970696256842020-10-27T08:18:59.660-04:002020-10-27T08:18:59.660-04:00Hello David,
First, thank you so much for your wor...Hello David,<br />First, thank you so much for your work it is really helpful in many ways.<br /><br />I am trying to retrain the face detector on some thermal images. To do so I am using the Python code train_object_detector.py and I am actually having some issue with the dlib.train_simple_object_detector() function.<br /><br />My first goal was to train it on 5000 images of dimension 160x120 pixels.<br /><br />But I have been having some RAM issues. I try to resized the images but then the bounding boxes were too small "smaller than about 400 <br />pixels in area". <br />So I found out that 500 images were the maximum I could use.<br />So now I am training on those 500 images and I am always getting:<br /><br />Training accuracy: precision: 1, recall: 0, average precision: 0<br />Testing accuracy: precision: 1, recall: 0, average precision: 0<br /><br />Do you have any idea of what could be wrong in what I am doing?<br /><br />Thanks a lotAnonymoushttps://www.blogger.com/profile/16275301404215879117noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-20864313255520996992019-04-01T04:22:57.750-04:002019-04-01T04:22:57.750-04:00Many thanks for the reply.Many thanks for the reply.Jayhttps://www.blogger.com/profile/05252584215108621326noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-30353735398526890452019-03-31T15:39:48.427-04:002019-03-31T15:39:48.427-04:00The output includes the SVM confidence values. Co...The output includes the SVM confidence values. Consult the documentation to see how to get it.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-31644813523409511432019-03-30T12:44:08.310-04:002019-03-30T12:44:08.310-04:00Hi Davis,
In my training data with images...Hi Davis,<br /> In my training data with images, I have six classes which includes a background class (negative class). I would like to know whether it is possible to obtain Multiclass SVM probabilities in dlib. I want the SVM to output not only the class labels but also it's confidence value. Please help me in this regard.<br /><br /><br />Jayhttps://www.blogger.com/profile/05252584215108621326noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-67997052032913455722018-08-26T16:40:07.325-04:002018-08-26T16:40:07.325-04:00Hi Davis
I am working on blind spot detection pro...Hi Davis<br /><br />I am working on blind spot detection problem of a vehicle. So, I want to detect cars, motorbikes, pedestrians or any vulnerable vehicles while changing lanes. So, I thought of detecting vehicles using dlib. We wanted to try HOG + SVM detector. I tried using detection window size - 80x80, 60x60, 40x40 etc and also changed pyramid param from 6 to 12. But, it always produces errors as shown below. So, I think the problem is with varying aspect ratios. So, I get errors like below with an exception - <br /><br />An impossible set of object labels was detected. This is happening because none<br />of the object locations checked by the supplied image scanner is a close enough<br />match to one of the truth boxes in your training dataset. To resolve this you<br />need to either lower the match_eps, adjust the settings of the image scanner so<br />that it is capable of hitting this truth box, or adjust the offending truth<br />rectangle so it can be matched by the current image scanner. Also, if you are<br />using the scan_fhog_pyramid object then you could try using a finer image<br />pyramid. Additionally, the scan_fhog_pyramid scans a fixed aspect ratio box<br />across the image when it searches for objects. So if you are getting this error<br />and you are using the scan_fhog_pyramid, it's very likely the problem is that<br />your training dataset contains truth rectangles of widely varying aspect<br />ratios. The solution is to make sure your training boxes all have about the<br />same aspect ratio. <br /><br />image index 2<br />match_eps: 0.5<br />best possible match: 0.457987<br />truth rect: [(561, 484) (621, 566)]<br />truth rect width/height: 0.73494<br />truth rect area: 5063<br />nearest detection template rect: [(572, 492) (652, 572)]<br />nearest detection template rect width/height: 1<br />nearest detection template rect area: 6561<br /><br />Would you be kind enough to tell me what does match_eps stands for. I could just understand that its the 3rd image in order, but what do other parameters represent ? So, could you please suggest me how to go ahead to the problem ? We wanted to do it on CPU preferably, if possibleAnonymoushttps://www.blogger.com/profile/00082683941555045175noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-3947096298671147472018-08-26T16:33:46.534-04:002018-08-26T16:33:46.534-04:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/00082683941555045175noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-26503027883621701402018-05-26T15:25:49.969-04:002018-05-26T15:25:49.969-04:00Hi Davis,
get_frontal_face_detector is based on HO...Hi Davis,<br />get_frontal_face_detector is based on HOG features and a linear classifier (SVM). You call get_frontal_face_detector in face detection programs without deserializing the previous SVM training results. I wonder how get_frontal_face_detector works without training data.johnpuskin99https://www.blogger.com/profile/07521845771170679150noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-644641368198152112018-03-19T07:07:28.592-04:002018-03-19T07:07:28.592-04:00Nothing in dlib cares about the file extension.Nothing in dlib cares about the file extension.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-56803722268595360172018-03-19T06:23:30.752-04:002018-03-19T06:23:30.752-04:00How to convert SVM file to DAT file extension?How to convert SVM file to DAT file extension?Anonymoushttps://www.blogger.com/profile/17045503610622022458noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-74988369110121855452018-02-20T21:33:05.903-05:002018-02-20T21:33:05.903-05:00Not all images in the training data need labels. ...Not all images in the training data need labels. Any part of any image that doesn't have a box on it is treated as negative data and the algorithm will learn to not put boxes there.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-20219442848009050352018-02-20T13:24:57.680-05:002018-02-20T13:24:57.680-05:00Hi Davis;
Is it possible to use images that conta...Hi Davis;<br /><br />Is it possible to use images that contain any target object -so no box in xml for this image- in training? Anonymoushttps://www.blogger.com/profile/00411723892037313760noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-63518008855719312422017-06-16T06:47:46.706-04:002017-06-16T06:47:46.706-04:00As you would expect, more training data makes trai...As you would expect, more training data makes training take longer.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-36949194432003246362017-06-16T03:35:54.520-04:002017-06-16T03:35:54.520-04:00how about training time, how different would that ...how about training time, how different would that be?Anonymoushttps://www.blogger.com/profile/13359625124309812690noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-47688568691641950482016-08-16T06:50:49.523-04:002016-08-16T06:50:49.523-04:00The detection time is always the same.The detection time is always the same.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-439596340700254212016-08-16T05:14:10.406-04:002016-08-16T05:14:10.406-04:00hi,if I use more training data to train an object ...hi,if I use more training data to train an object detector, does the detection time will be longer than before? For example, I use 50 people to train detector V1, and I use 100 people to train detector V2. Then I use V1 and V2 to detector face, I want to know if the detection time is the same? Many thanks.Xunan Zhanghttps://www.blogger.com/profile/07856212923197361458noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-91954616162800742612016-01-28T05:16:11.687-05:002016-01-28T05:16:11.687-05:00i am using the Python example, to train a custom o...i am using the Python example, to train a custom object (road sign), but the detection window draws a bigger arbitrary box around the detection area. I thought it would be accurate and just draw it exactly around the matching object. obviously something has gone wrong with the training. has anyone else experienced this before. I resized all boxes to 80x80 and set my detection size to 6400. Anonymoushttps://www.blogger.com/profile/10272295300617383622noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-72493344790794115382015-12-17T05:19:46.187-05:002015-12-17T05:19:46.187-05:00Tuning is difficult for me
Thank you DavisTuning is difficult for me<br />Thank you DavisAnonymoushttps://www.blogger.com/profile/07534935192972347575noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-20951245982424848932015-12-17T05:16:17.892-05:002015-12-17T05:16:17.892-05:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/07534935192972347575noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-90225510753408132462015-12-16T18:54:08.362-05:002015-12-16T18:54:08.362-05:00Which is best really depends on your application, ...Which is best really depends on your application, and in particular, how much you care about different types of errors.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-29778852405490849562015-12-16T16:03:25.794-05:002015-12-16T16:03:25.794-05:00Thank you Davis
I have created my original detecto...Thank you Davis<br />I have created my original detector.<br />that's result is<br /><br />Trained with C: 5<br />Training accuracy: precision: 0.991111, recall: 0.771626, average precision: 0.769863<br />Testing accuracy: precision: 0.986111, recall: 0.731959, average precision: 0.723225<br /><br />Trained with C: 10<br />Training accuracy: precision: 0.991701, recall: 0.82699, average precision: 0.82468<br />Testing accuracy: precision: 0.975309, recall: 0.814433, average precision: 0.804037<br /><br />Trained with C: 20<br />Training accuracy: precision: 0.992248, recall: 0.885813, average precision: 0.883479<br />Testing accuracy: precision: 0.976744, recall: 0.865979, average precision: 0.854488<br /><br />Trained with C: 25<br />Training accuracy: precision: 0.996169, recall: 0.899654, average precision: 0.897599<br />Testing accuracy: precision: 0.977011, recall: 0.876289, average precision: 0.864523<br /><br />Trained with C: 30<br />Training accuracy: precision: 0.996212, recall: 0.910035, average precision: 0.908016<br />Testing accuracy: precision: 0.967033, recall: 0.907216, average precision: 0.894226<br /><br />Trained with C: 40<br />Training accuracy: precision: 0.996255, recall: 0.920415, average precision: 0.918458<br />Testing accuracy: precision: 0.967033, recall: 0.907216, average precision: 0.895631<br /><br />Trained with C: 50<br />Training accuracy: precision: 0.99631, recall: 0.934256, average precision: 0.932443<br />Testing accuracy: precision: 0.967391, recall: 0.917526, average precision: 0.904212<br /><br />Trained with C: 100<br />Training accuracy: precision: 0.996377, recall: 0.951557, average precision: 0.949977<br />Testing accuracy: precision: 0.9375, recall: 0.927835, average precision: 0.913309<br /><br />I think C: 30 is the best<br />What do you think about this?Anonymoushttps://www.blogger.com/profile/07534935192972347575noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-23948689498054225232015-12-11T07:54:57.951-05:002015-12-11T07:54:57.951-05:00hi davis,
how do i reuse .svm generated by hog_obj...hi davis,<br />how do i reuse .svm generated by hog_object_detector. I am using visual studio 12 as compiler.Anonymoushttps://www.blogger.com/profile/07523599259161443632noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-2150115378072987882015-09-10T09:12:34.051-04:002015-09-10T09:12:34.051-04:00how to put text on the top of the detection rectan...how to put text on the top of the detection rectangle Anonymoushttps://www.blogger.com/profile/02913134940672317269noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-19982705512494049892015-07-09T04:53:44.471-04:002015-07-09T04:53:44.471-04:00Tracking is a little bit more than just detection....Tracking is a little bit more than just detection. You might want to use dlib's Real Time Video Object Tracking: http://blog.dlib.net/2015/02/dlib-1813-released.htmlmdfwnhttps://www.blogger.com/profile/08562633170525062231noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-23032699232718558202015-07-09T04:49:32.111-04:002015-07-09T04:49:32.111-04:00Can i use the dlib training method to detect peopl...Can i use the dlib training method to detect people by feeding it pictures of people body shape etc. and track them using a RASPBERRY PI? would it have enough power to do tracking using dlib in real time?Anonymoushttps://www.blogger.com/profile/04086910866079385555noreply@blogger.com