
In today’s blog post, I interview Davis King , the creator and chief maintainer of dlib ― a toolkit for real-world machine learning, computer vision, and data analysis in C++ (with python bindings included, when appropriate).
I’ve personally used dlib in a number of projects (especially for object detection), so it’s quite the honor to be interviewing Davison the PyImageSearch blog.
In the remainder of this blog post, Davis:
Discusses his inspiration behind working in the computer vision and machine learning field. Explains the origin of dlib , why it exists, and what the library is mainly used for. Talks aboutthe most difficult aspect of maintaining a popular open source library such as dlib. Describes the details behind his novel Max-Margin Object Detection paper, the cornerstone of object detection inside the dlib library. Reflects onthe latest release of dlib which includes deep metric learning , suitable for state-of-the-art face recognition and face verification. Provides helpful suggestions and advice for readers who are are just getting started in their computer vision and deep learning careers.The majority of these questions camefrom the brilliant Kyle McDonald whom I first met over Twitter when chatting with Davis regarding his latest dlib release. Kyle was nice enough to let me use and modify his original questions (along with adding a few others from myself and David McDuffee, the correspondence coordinatorfor PyImageSearch) to help make this interview possible. Be sure to give a shoutout to Kyle and David and tell them thanks!
To learn more about Davis King, the dlib toolkit, and how the library can be used for computer vision, machine learning, and deep learning, just keep reading.
An interview with Davis King, creator of dlibAdrian:Hey Davis! I know you are very busy, thank you for taking the time to do this interview. It’s an honor and a privilege to have you on the PyImageSearch blog. For people who don’t know you, who are you and what do you do?
Davis : Thanks for having me. I’m a software developer who works on applied machine learning problems. Most of my work has been on machine vision and natural language processing for US defense applications. A lot of that is doing computer vision stuff with different kinds of sensors like sonar, lidar, radar, optical cameras, etc. I’ve also worked on industrial automation and sensing for autonomous underwater vehicles as well as machine learning systems for automated financial trading.
But publicly, most people know me as the author of the open source projects dlib ( dlib.net ) and MITIE ( github.com/mit-nlp/MITIE ).
Adrian: What inspired you to start working in the computer vision, machine learning, and deep learning field?
Davis : I wanted to work in some area that was interesting and important. For the longest time I’ve been convinced that automation is hugely important. Also, since I was a kid I knew I wanted to do some computer science thing and it turns out I’m pretty good at programming and I love math. Machine learning is where the cutting edge of automation is and involves a lot of math and programming, so here I am. I’m also a fan of sci-fi authors like Isaac Asimov and Vernor Vinge . Machine learning and its related fields seem like the most obvious path to interesting kinds of sci-fi AI. So that’s pretty cool too, even if still far away at this point

Figure 1:dlib ― A toolkit for real-world computer vision and machine learning ( higher resolution ).
Adrian : What is dlib? What is the library mainly used for?
Davis : Dlib is a general purpose open source C++ software library. I started writing it 15 years ago and it initially had nothing to do with machine learning. I was then, and still am, a huge fan of contract programming however. So the initial motivation for dlib was to use the “design by contract” approach to make a bunch of nice cross-platform tools that weren’t available at the time. For instance, there weren’t non-frustrating portable threading, networking, or linear algebra tools for C++ 15 years ago.
So that’s how dlib started, as a cross-platform C++ library containing a bunch of random systems tools. For example, one of the most popular things in dlib is the dlib::pipe, a type-safe tool to pass messages between threads, which is used on a huge number of embedded/real-time processing applications that don’t do any kind of machine learning. And really, this is still what dlib is today, a collection of C++ tools written in the design by contract style. It’s just that I’ve spent the last 10 years making mostly machine learning tooling. So as of 2017, dlib is dominated by machine learning stuff, which has really driven its popularity in the last few years. In particular, the face detection, landmarking, and recognition example programs are now probably the most popular parts of dlib.
Adrian : Do you see dlib setting any precedents in terms of new research, or do you aspire to make published work more accessible?
Davis : Not really. There are some things in dlib that are novel, like the MMOD detector . But by and large my goal with dlib has always been to make really clean and easy to use tools. That’s a different goal from doing novel research and somewhat at odds with it since brand new ideas generally don’t come in clean and easy to use forms. Most of the time when I’m adding something to dlib it’s something from the published literature that’s already known to be really great, which means it’s been around for a little while.
So with dlib, my goals are definitely more about making published work more accessible. Which is also why I selected the license I did for dlib. I want as many people as possible to be able to take advantage of state-of-the-art machine learning tooling and use it for whatever they want. I think that’s great.
I also do most of my original research at work, which means I usually can’t publish it. Original research is also hard. Part of the reason I work on dlib is so I can do something relatively easier and relaxing after my day job. There is also the issue that original research, at least the kind I tend to do at my day job, is very application specific and not of very general interest. So it usually wouldn’t be appropriate for dlib anyway.
Adrian : Do you see dlib eventually being “feature complete”, or is it an ongoing project?
Davis : No, it will never be complete. Dlib is just a collection of useful tools, and obviously you