tag:blogger.com,1999:blog-6061887630060661987.post4973963882005416171..comments2024-03-13T13:54:35.259-04:00Comments on dlib C++ Library: Fast Multiclass Object Detection in Dlib 19.7Davis Kinghttp://www.blogger.com/profile/16577392965630448489noreply@blogger.comBlogger77125tag:blogger.com,1999:blog-6061887630060661987.post-86124089945169347972019-08-13T00:02:56.008-04:002019-08-13T00:02:56.008-04:00I'm writing this here, so other people can see...I'm writing this here, so other people can see the answer: I just compiled DLib w/ the cuda stuff and cuDNN, etc, and it built fine. Now, what's the way I pass my cv::cuda::GpuMat to dlib to get it to detect? Do I have to call download() on it first, to get it into CPU memory? Would it be faster to use OpenCV's cuda-based hog detector? (because it does take a GpuMat)! anybody have timing comparisons for GPU-based face detection? I'm so confused about which might be better, i'm now looking on NVidia's site for their face-detection stuff.<br />Zipwaxhttps://www.blogger.com/profile/00180345248705938226noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-19416545718941598462019-03-15T14:58:45.395-04:002019-03-15T14:58:45.395-04:00Hi @davis, by any chance does dlib 19.17 use threa...Hi @davis, by any chance does dlib 19.17 use threading to speed up face detection?Anonymoushttps://www.blogger.com/profile/09595865337012080460noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-85039467192067189222018-07-16T16:21:47.187-04:002018-07-16T16:21:47.187-04:00@sumit perhaps this will helpful
https://www.pyima...@sumit perhaps this will helpful<br />https://www.pyimagesearch.com/2018/04/02/faster-facial-landmark-detector-with-dlib/Anonymoushttps://www.blogger.com/profile/06364685497957008172noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-67206931434107430502018-07-03T05:23:45.755-04:002018-07-03T05:23:45.755-04:00Hey Davis,
Is the 5 point Landmark Detection impl...Hey Davis,<br /><br />Is the 5 point Landmark Detection implements the same algorithms as the 68 point Landmark Detection Model? Or this one is based on something different.sumithttps://www.blogger.com/profile/13671907596935554214noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-57757004869545106052018-07-02T09:04:21.181-04:002018-07-02T09:04:21.181-04:00Hi Davis!
Could you share FAR FRR for dlib?Hi Davis!<br />Could you share FAR FRR for dlib?Anonymoushttps://www.blogger.com/profile/10578099517916378657noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-82200549794704183802018-06-01T08:42:05.781-04:002018-06-01T08:42:05.781-04:00Hi Davis,
Can we use varying aspect ratios of bou...Hi Davis,<br /><br />Can we use varying aspect ratios of bounding box for each label?johnpuskin99https://www.blogger.com/profile/07521845771170679150noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-29081378598393630822018-04-11T07:09:42.803-04:002018-04-11T07:09:42.803-04:00Turn on compiler optimizations and link to the Int...Turn on compiler optimizations and link to the Intel MKL.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-2617986880511787622018-04-11T06:38:17.972-04:002018-04-11T06:38:17.972-04:00I used your model to detect the sample graph you g...I used your model to detect the sample graph you gave. It takes 6 seconds to test a graph with the CPU. Is there any way to make it faster?Anonymoushttps://www.blogger.com/profile/00834724333918103009noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-80458941648139726202018-04-02T15:45:49.495-04:002018-04-02T15:45:49.495-04:00http://dlib.net/dlib/dnn/input_abstract.h.html#EXA...http://dlib.net/dlib/dnn/input_abstract.h.html#EXAMPLE_INPUT_LAYERDavis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-52705861573649856602018-04-02T15:16:07.866-04:002018-04-02T15:16:07.866-04:00I'm not sure what you are referring to as inpu...I'm not sure what you are referring to as input layer. Is it <br /><br />line 308 of https://github.com/davisking/dlib/blob/master/dlib/dnn/input.h<br /><br />line 2714 of https://github.com/davisking/dlib/blob/master/dlib/dnn/core.h<br /><br />or something else?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-39745543745539054982018-04-02T14:28:53.020-04:002018-04-02T14:28:53.020-04:00Look at the input layer's code. It's not ...Look at the input layer's code. It's not just copying the data to the tensor. You have to replicate its behavior.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-71681338485326197072018-04-02T13:57:20.194-04:002018-04-02T13:57:20.194-04:00Hi Davis,
I just tried using the operator() we sp...Hi Davis,<br /><br />I just tried using the operator() we spoke about, but I am running into a snag. <br /><br />My prototype code, which works, looked like this:<br /> <br /> net_type net; <br /> <br /> //frame is a cv::Mat of type CV_8UC3<br /><br /> dlib::cv_image cvimg(frame);<br /> dlib::matrix img;<br /> dlib::assign_image(img, cvimg);<br /><br /> auto mmod_rectangles = net(img); <br /><br />I would like my productized code to look something like:<br /><br /> unsigned char* devPtr = ...; // pointer to CUDA memory on GPU, where input image data already lives.<br /> <br /> dlib::resizable_tensor tensorInput;<br /> tensorInput.set_size(1, 3, h, w); //h, w are height and width of image<br /><br /> myFancyConversionKernel<<<...>>>(tensorInput.device_write_only(), devPtr);<br /><br /> //Here, myFancyConversionKernel is responsible for: <br /> // 1) Convert from uchar8 pixel data to float32 in the range of 0.0f to 255.0f. <br /> // 2) Deinterleave the RGB channels so that tensorInput contains data in planar format. <br /> std::vector> mmod_rectangles;<br /> net(tensorInput, std::back_insert_iterator(mmod_rectangles));<br /><br />The new code build, runs, but does not seem to produce any face bounding box (i.e. mmod_rectangles.size() == 1, mmod_rectangles.at(0).size() == 0).<br /><br />Is there anything that stands out as incorrect in what I am doing? I am uncertain about converting from uchar8 to float32, since in the prototype code, I did not perform any explicit conversion. I only did this conversion because it seems that dlib::resizable_tensor only supports float32 numerical format. <br /><br />Thank you,<br /><br />DaleiAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-65891848668752612082018-04-01T10:08:39.274-04:002018-04-01T10:08:39.274-04:00That's right. You could also pass a tensor to...That's right. You could also pass a tensor to any of the other functions of the immediate sublayer, of which there are many options. But the operator() you mentioned is as good as any.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-45613831440188556992018-04-01T09:49:25.990-04:002018-04-01T09:49:25.990-04:00Hi Davis,
Thank you for your reply. Regarding you...Hi Davis,<br /><br />Thank you for your reply. Regarding your suggestion of passing a tensor to the network, my understanding is that the net work is really an object of dlib::loss_mmod templated class. dlib::loss_mmod is itself an alias of an instantiation of dlib::add_loss_layer class. dlib::add_loss_layer class has an operator() that takes a dlib::tensor as input, and that is the function you are referring to. Is my analysis correct?<br /><br />Thank you<br />Dalei Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-71290825522692636522018-04-01T08:13:39.607-04:002018-04-01T08:13:39.607-04:00You could write a custom input layer that takes in...You could write a custom input layer that takes input from your other source, which shouldn't be a big deal. You can also just call one of the network's member functions that takes a tensor as input rather than a matrix. <br /><br />All the network computations run on the default CUDA stream. But you can just use per-thread default streams. Read the CUDA docs for details.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-17325689766141087262018-03-31T18:37:44.602-04:002018-03-31T18:37:44.602-04:00Hi Davis,
I am trying to do something similar to ...Hi Davis,<br /><br />I am trying to do something similar to the sample program: dnn_mmod_face_detection_ex.cpp<br /><br />In the sample, the input to the CNN is a matrix object that is allocated on the host. In my code, prior to calling the net, I have some CUDA kernels that preprocess the image, so the image data is already on the GPU. Is there a way to invoke the CNN on the image data without first copying the image data back to the host?<br /><br />Also, is there a way to run the CNN in a specified CUDA stream (i.e. the stream I used to run my preprocessing kernels)?<br /><br /><br />Thank you,<br /><br />Dalei WangAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-76538304805069909932018-03-14T20:40:54.295-04:002018-03-14T20:40:54.295-04:00Yes, you can train whatever you want.Yes, you can train whatever you want.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-91607729489269632862018-03-14T13:44:52.083-04:002018-03-14T13:44:52.083-04:00Hello Davis
Nice to see the vehicle ...Hello Davis<br /><br /> Nice to see the vehicle detector after face detector :) I would like to know, if we can train dlib to detect different classes - two wheeler, four wheeler, pedestrian.<br /><br />Thanks<br />BhomikAnonymoushttps://www.blogger.com/profile/00082683941555045175noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-23026501063778389502018-03-07T17:31:27.666-05:002018-03-07T17:31:27.666-05:00Yes, that's what the boxes are.Yes, that's what the boxes are.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-12402639205503200052018-03-07T16:21:18.809-05:002018-03-07T16:21:18.809-05:00Currently looking at train_face_5point_model and t...Currently looking at train_face_5point_model and the associated data-set dlib_faces_5points.tar... I notice that each file entry has two bounding boxes specified. Am I right in thinking that these are simply the two different bounding boxes detected by the CNN and the HOG detector? Otherwise, what do the two boxes represent? Thanks!Anonymoushttps://www.blogger.com/profile/05581407156247134098noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-73518345468955833082018-02-22T21:21:49.080-05:002018-02-22T21:21:49.080-05:00Loading more data than will fit on your GPU.Loading more data than will fit on your GPU.Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-32495171471602428752018-02-22T19:40:03.920-05:002018-02-22T19:40:03.920-05:00HI Davis,
What cases would cause this message &q...HI Davis, <br /><br />What cases would cause this message "Not enough memory to handle tile data" on a GPU box?<br /><br />Thank you!mhttps://www.blogger.com/profile/03433743106611630779noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-47099815006038134922018-02-01T10:11:12.758-05:002018-02-01T10:11:12.758-05:00Ok. I will try to find what the problem is. Thank ...Ok. I will try to find what the problem is. Thank you.Sigmar Heldenhammerhttps://www.blogger.com/profile/15555183125470768295noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-49584486875305500502018-02-01T09:50:46.772-05:002018-02-01T09:50:46.772-05:00It should be much better than that. I don't k...It should be much better than that. I don't know what the problem is, but you aren't doing something right :)Davis Kinghttps://www.blogger.com/profile/16577392965630448489noreply@blogger.comtag:blogger.com,1999:blog-6061887630060661987.post-86351314285706573392018-02-01T09:44:27.328-05:002018-02-01T09:44:27.328-05:00I mean that is less accurate than reported in the ...I mean that is less accurate than reported in the paper. For example these images:<br /><br />Original result from paper<br /><br />https://ibb.co/mjW49R<br /><br />The model I have trained obtain this result<br /><br />https://ibb.co/dwwnUR<br /><br />I supposed that the problem is on the training phase. Any parameter must be tuned? Any other idea? Thank you in advance.Sigmar Heldenhammerhttps://www.blogger.com/profile/15555183125470768295noreply@blogger.com