tag:blogger.com,1999:blog-6061887630060661987.post7713925974419552382..comments2024-03-13T13:54:35.259-04:00Comments on dlib C++ Library: Easily Create High Quality Object Detectors with Deep LearningDavis Kinghttp://www.blogger.com/profile/16577392965630448489noreply@blogger.comBlogger254125tag:blogger.com,1999:blog-6061887630060661987.post-17214101003706561312020-05-22T22:06:23.390-04:002020-05-22T22:06:23.390-04:00The CNN in this context is f() in equation 3. It&...The CNN in this context is f() in equation 3. It's some big function, with a bunch of parameters, that given an image and a location in that image tells you how likely it is there is an object at that location. SGD optimizes over all the parameters of f(). In the paper f() is linear in the parameters, but in the CNN it's not. That's the only difference.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-36844969564695728942020-05-22T10:39:01.186-04:002020-05-22T10:39:01.186-04:00Hi Davis!
I have a question in regards to the SGD...Hi Davis!<br /><br />I have a question in regards to the SGD training of the CNN. <br /><br />In the MMOD paper in equation (8) we have the optimization problem at hands.<br />I understand this optimization for linear models of the type showed in equation (3), but what does the model parameters w mean in the case of a CNN? Is it the actual filter weights? <br /><br />My interpretation is that phi in eqation (3) is the CNN, and w is the SVM parameters. But if this is the case, how is the CNN trained?<br /><br />Sorry if it is an unclear question.Anonymoushttps://www.blogger.com/profile/05264493613281299566noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-81329736871845932922019-01-29T07:40:30.599-05:002019-01-29T07:40:30.599-05:00The answers to your questions are all discussed in...The answers to your questions are all discussed in detail in the dlib documentation. In particular, this blog post you are commenting discusses some of it with links to additional relevant documentation.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-90076373499279503842019-01-28T10:28:31.700-05:002019-01-28T10:28:31.700-05:00I'm new to dlib and object detection (faces to...I'm new to dlib and object detection (faces too).<br />Recently read <a href="https://medium.com/@jonathan_hui/object-detection-speed-and-accuracy-comparison-faster-r-cnn-r-fcn-ssd-and-yolo-5425656ae359" rel="nofollow">article</a> and <a href="https://medium.com/nanonets/how-to-automate-surveillance-easily-with-deep-learning-4eb4fa0cd68d" rel="nofollow">article</a> and have some questions:<br />1. can't figure out what network is used in DLIB<br />2. is there any difference in using other networks with dlib? e.g. if I train a network (SSD+MobileNet, Faster R-CNN with MobileNet/Inception/Resnet, YOLO, etc.) what are specifications to use them?<br />3. how to optimize network and dlib for accuracy and speed?<br /><br />The problems I have for now:<br />1. a long time for "detector", too much CPU usage<br />2. can not use the same "detector" in parallel (threads or tbb tasks for example)<br /><br />Will appreciate any help or suggestions.<br />Thanks in advance.Ruslanhttps://www.blogger.com/profile/10098410235618209495noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-39786718596803691362018-10-09T12:55:59.491-04:002018-10-09T12:55:59.491-04:00Thank you very much!Thank you very much!Pfaeffhttps://www.blogger.com/profile/05775652860949903299noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-13477063703078117832018-10-09T07:43:22.783-04:002018-10-09T07:43:22.783-04:00I forget how long it took. Probably under a day o...I forget how long it took. Probably under a day on a 1080ti.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-25135675654501008062018-10-09T05:39:30.400-04:002018-10-09T05:39:30.400-04:00How long did it take to train the dataset of ~7000...How long did it take to train the dataset of ~7000 faces?Pfaeffhttps://www.blogger.com/profile/05775652860949903299noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-50526033670935441202018-09-09T09:36:59.370-04:002018-09-09T09:36:59.370-04:00Yes, that's right.
There are multiple output...Yes, that's right. <br /><br />There are multiple output channels to support multiple output box shapes and types.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-31634079908863249802018-09-09T09:12:55.396-04:002018-09-09T09:12:55.396-04:00Those visualizations of the image pyramid and the ...Those visualizations of the image pyramid and the heatmaps are exactly what I was looking for, thanks! <br /><br />So if I understand correctly: if you had a sliding window of size 40x40, for example, but some of your labeled images had bounding boxes of size 80x80, then the sliding window would detect those larger labels in the lower levels of the image pyramid, and the bounding box would be scaled up accordingly on the output?<br /><br />And one more question: If the output of the CNN in only one channel, then how is the bounding box information (width, height, coordinates) retrieved to compare to ground truth and compute the IoU?Anonymoushttps://www.blogger.com/profile/16167824903268147300noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-84330934547903725022018-09-09T08:42:51.910-04:002018-09-09T08:42:51.910-04:00Entire images are passed in. See http://blog.dlib...Entire images are passed in. See http://blog.dlib.net/2017/08/vehicle-detection-with-dlib-195_27.html for more details. Also go run the code and look at the images produced by the random cropper.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-92066094635801351682018-09-08T15:03:07.706-04:002018-09-08T15:03:07.706-04:00Hi Davis,
I have a question about the sliding win...Hi Davis,<br /><br />I have a question about the sliding window detection with MMOD. Specifically, one of your examples states that the receptive field of the CNN in 50x50 pixels, but then the random cropper is selecting random dimensions in the range 40x40-270x270. Are 50x50 windows of the cropped image being passed into the network one at a time, or is it the entire cropped image? <br /><br />Maybe I have some misunderstanding, but I appreciate your help! Anonymoushttps://www.blogger.com/profile/16167824903268147300noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-23939696134818162262018-09-08T15:03:04.591-04:002018-09-08T15:03:04.591-04:00Hi Davis,
I have a question about the sliding win...Hi Davis,<br /><br />I have a question about the sliding window detection with MMOD. Specifically, one of your examples states that the receptive field of the CNN in 50x50 pixels, but then the random cropper is selecting random dimensions in the range 40x40-270x270. Are 50x50 windows of the cropped image being passed into the network one at a time, or is it the entire cropped image? <br /><br />Maybe I have some misunderstanding, but I appreciate your help! Anonymoushttps://www.blogger.com/profile/16167824903268147300noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-54223054246331506752018-05-17T09:27:24.366-04:002018-05-17T09:27:24.366-04:00Yes, the DNN scans the image, more or less like HO...Yes, the DNN scans the image, more or less like HOG. There isn't much you can do to change the speed of the CNN without changing the network and retraining.<br /><br />Yes, the CNN outputs confidence. Look at the documentation. It's all described in detail.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-90229529582877684632018-05-16T23:29:28.656-04:002018-05-16T23:29:28.656-04:00Hello Davis,
I really like Dlib and I have used t...Hello Davis, <br />I really like Dlib and I have used this library for training my data for several months.<br />I have two questions about dnn face detection.<br /><br />1. Does dnn face detector scans the image just like HoG detector did?<br />The scanning speed of HoG detection can be set by tuning scanner's parameters. <br />The code is something like this:<br />--<br />typedef dlib::scan_image_pyramid > image_scanner_type;<br />image_scanner_type scanner;<br />scanner.copy_configuration ( HoGDetector.get_scanner() );<br />scanner.set_max_pyramid_levels ( 3 );<br />--<br />But how about dnn detector?<br />I want to set the parameters of the scanner for tuning dnn scanning speed.<br /><br />2. When I used dnn detector, can I get the confidence score of each sliding window?<br />Or can I get the detected boxes which the confidence is lower than 0?<br /><br />Thank you.Anonymoushttps://www.blogger.com/profile/04311123924682272090noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-81318395552229430252018-04-16T13:49:49.243-04:002018-04-16T13:49:49.243-04:00Hi, how can I compile it by using mingw ?
g++ -...Hi, how can I compile it by using mingw ? <br /><br /> g++ -std=c++11 -O3 -I.. ../dlib/all/source.cpp -lpthread -lX11 example_program_name.cpp <br /><br />produce lots of compile error.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-42220876109784340902018-03-26T20:58:59.503-04:002018-03-26T20:58:59.503-04:00Hi Davis,
I have problem on object detection, I re...Hi Davis,<br />I have problem on object detection, I really appreciate if there are solution using dlib.<br />I am currently using yolov2 and yolo-densenet for object detection, the result is not good on distinguishing objects with similar or same shape(but different color), even though I tried modifying parameters on data augmentation(hue,exposure, saturation, etc ) and other parameters, the result is still very bad. Perhaps because I could not get so much images for each class(currently only 8 images for each class), I am not sure, it is not easy to get so much images for each class, as we have more than 60,000 classes! <br /><br />I remember that I have used the object detector sample in dlib 2 years ago, it is robust for color, however I used only for 1 single object detection, could you please give me some advice that if I want to detect objects with huge classes(10,000 at least) , thank you so much.Anguo Yanghttps://www.blogger.com/profile/13336145872505406333noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-80746537658591438402018-03-19T13:30:22.550-04:002018-03-19T13:30:22.550-04:00Thats awesome !! I am running it now on Jetson TK1...Thats awesome !! I am running it now on Jetson TK1 like charm but when face is being recognized on live camera feed, it gets slower. Otherwise its real-time. I am quite suspicious whether its using CPU or GPU to process the recognition ResNet model..AbuShuvomhttps://www.blogger.com/profile/10127507818560121744noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-29525709920896335752018-03-19T13:02:12.925-04:002018-03-19T13:02:12.925-04:00Anything with architecture 3.0 or newer should be ...Anything with architecture 3.0 or newer should be fine.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-70735540248091118382018-03-19T12:59:45.100-04:002018-03-19T12:59:45.100-04:00Awesome work Davis. I just want to know what is th...Awesome work Davis. I just want to know what is the minimum CUDA requirement for running dlib on GPU. I am planning to run it on Jetson TK1 which has a maxwell arch (Compute arch 3.2) and supports CUDA 6.5AbuShuvomhttps://www.blogger.com/profile/10127507818560121744noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-71552725901675766892018-03-04T07:42:20.676-05:002018-03-04T07:42:20.676-05:00Hello , excuse me ,
can anyone teach me how to ca...Hello , excuse me , <br />can anyone teach me how to calculate how many layer does this DNN model ?Anonymoushttps://www.blogger.com/profile/10070065406193050546noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-69430675404844308992018-03-01T06:57:41.133-05:002018-03-01T06:57:41.133-05:00You can see the network definition in the example ...You can see the network definition in the example program: http://dlib.net/dnn_mmod_face_detection_ex.cpp.html. For instance, there are 7 convolution layers.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-59188323938525995562018-03-01T01:15:14.386-05:002018-03-01T01:15:14.386-05:00Excuse me , I want to know how many layer does thi...Excuse me , I want to know how many layer does this DNN face detection model ??Anonymoushttps://www.blogger.com/profile/10070065406193050546noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-70338721062394416962018-02-21T07:59:47.171-05:002018-02-21T07:59:47.171-05:00Look at the object_dector object. You can pull out...Look at the object_dector object. You can pull out whatever parts you want and pack them into a new object_detector. You don't need to retrain. http://dlib.net/dlib/image_processing/object_detector_abstract.h.htmlDavis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-59751682051876556482018-02-21T05:14:52.636-05:002018-02-21T05:14:52.636-05:00Hi, I studied the examples of face detection and t...Hi, I studied the examples of face detection and training using hog. I want to speed up the face detection by using only 3 from 5 detectors from your pretrained model. I was hoping that after deserializing I get std::vector but it is only one object detector (object_detector > >) when I look at frontal_face_detector.h<br />It is even possible to use only 3 detectors (I want only frontal faces, not side looking)? Or I have to train it on my own?<br />thanksAnonymoushttps://www.blogger.com/profile/16959725246438740687noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-68041101417541675442018-01-26T09:04:05.994-05:002018-01-26T09:04:05.994-05:00Way ahead of you :), see http://blog.dlib.net/2014...Way ahead of you :), see http://blog.dlib.net/2014/04/dlib-187-released-make-your-own-object.htmlDavis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.com