paint-brush
Interview with the Author of PyImageSearch and Computer Vision Practitioner: Dr. Adrian Rosebrockby@init_27
4,339 reads
4,339 reads

Interview with the Author of PyImageSearch and Computer Vision Practitioner: Dr. Adrian Rosebrock

by Sanyam BhutaniDecember 4th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

If you’re interested, you can find the Index to all the other <a href="https://hackernoon.com/interviews-with-machine-learning-heroes-504762ba5dd6" target="_blank">“Interviews with ML Heroes” here</a>

People Mentioned

Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Interview with the Author of PyImageSearch and Computer Vision Practitioner: Dr. Adrian Rosebrock
Sanyam Bhutani HackerNoon profile picture

Part 13 of The series where I interview my heroes.

If you’re interested, you can find the Index to all the other “Interviews with ML Heroes” here

Today, I’m talking with One of my Gurus and mentors: Dr. Adrian Rosebrock

Adrian is the author of the PyImageSearch blog, he runs one of the best Computer Vision Course: PyImageSearch Gurus, where I had the chance of being mentored by him.

He also holds a Ph.D. in CS, he’s a serial entrepreneur and has been working on startups for the past 8 years.

About the Series:

I have very recently started making some progress with my Self-Taught Machine Learning Journey. But to be honest, it wouldn’t be possible at all without the amazing community online and the great people that have helped me.

In this Series of Blog Posts, I talk with People that have really inspired me and whom I look up to as my role-models.

The motivation behind doing this is, you might see some patterns and hopefully you’d be able to learn from the amazing people that I have had the chance of learning from.

**Sanyam Bhutani:**​ Hello Adrian, Thank you for taking the time to do this.

Adrian Rosebrock: Thanks for having me, Sanyam! You’ve had quite the distinguished set of guests on your blog. Thank you for including me amongst them :-)

Sanyam Bhutani: Today, you’re running one of the best Blogs on Computer Vision, you’re also author of Deep Learning for Computer Vision with Python, Practical Python and OpenCV, and the PyImageSearch Gurus course. You hold a PhD in CS.

Can you tell us how did Computer Vision come into the picture, what got you interested at first?

Adrian Rosebrock: The first time I became interested in computer vision was actually during my senior year of high school. I was taking AP Statistics at the time and instead of a final exam our teacher instead assigned a “final project”. We were free to choose the project ourselves but it had to incorporate statistics in some manner.

I decided that I was going to build a simple image search engine using basic statistics. I gathered up some photos on my hard drive (~50 in total) and created an algorithm that:

  1. Computed the mean and standard deviation for each RGB channel for every image in the dataset (six values per image)
  2. Given that each image was now quantified as six values, I concatenated the mean and standard deviations in a list to form my feature vector
  3. I then column-normalized the features by performing min/max normalization
  4. And finally, I compared images by computing the Euclidean distances between features

I tested my basic image search engine with a few query image and was really happy with the results given the simplicity of the system. Since that point I knew I wanted to continue studying computer vision.

**Sanyam Bhutani:**​ Can you tell us more about how does a day at PyImageSearch headquarters looks like. Whats a day in your life like?

Adrian Rosebrock: Well, the PyImageSearch “headquarters” is really just a second bedroom in my house. I don’t have an official “office” for PyImageSearch.

Each day I wake up between 4–5AM. Get out of bed. Make a cup of coffee. And within the first ten minutes of being away, I’m working.

I’m an author and I write best in the morning. I normally block off the hours of 5–10AM exclusively for writing with no distractions. The only exception is that my wife and I have breakfast together before she goes to work. Otherwise, during this time periods I’m purposely hard to get a hold of (unless I’m not writing).

Before lunch I typically take a 20 minute walk to help clear my head. I normally listen to audiobooks on 2–3x speed during that time, mostly non-fiction but sometimes fiction.

After lunch I work for 2–3 more hours before I workout for 45–60 minutes. Fitness is extremely important to me and something I always prioritize.

By that time it’s normally 3–3:30PM so I take on what I call more “procedural” and “non-creative” tasks, such as answering email, responding to blog post comments, etc.

I normally end the day by practicing guitar for 45 minutes. I enjoy playing guitar and it helps activate and exercise parts of my brain that are potentially not used or utilized as much as they should be during the day.

I end the day with my wife, normally reading or watching a few episodes of what TV series we are binging at the time.

Sanyam Bhutani: You’ve had an interesting career path. After completing your PhD you started your first company and later decided to switch to teaching the tech that you had worked on over the years.

What made you start the PyImageSearch blog. Why was it important to you?

Adrian Rosebrock: There are actually two reasons I started PyImageSearch.

The first is I had built and launched a two computer vision and machine learning startups while in college. It was a fun experience and I learned a lot during the process. But I always missed writing as well.

The second is that I was self-taught much of my computer vision education. At my school there were some incredible professors doing work in machine learning and graphics, but no one in particular was dedicating their work to the computer vision field.

I took my first (and only) computer vision-related course during my final year of my undergraduate career from a part-time instructor. I then took three separate machine learning and data science courses.

Everything else, including the practical elements of how to “glue” all the pieces together and build an actual computer vision solution with OpenCV, was something I had to learn on my own.

It was a lot of hard work and back then the documentation was hard to find, incorrect, or “only okay” at best. Furthermore, practical, hands-on tutorials were few and far between.

During the final semester of my graduate school career I decided to start PyImageSearch. I felt I had a lot to share and I really wanted to help others who were either (1) self-taught as I was or (2) trying to find practical tutorials to supplement their university courses/education.

I also knew that I wanted to write a book regarding computer vision but I wasn’t sure what the topic would be. Starting the blog helped me learn from my readers and ultimately lead to my first book, Practical Python and OpenCV.

Sanyam Bhutani: You’ve written many amazing blog posts over the years. Which project/development has been your favourite one?

Adrian Rosebrock: It’s hard to pick just one favorite, but I think my favorite is where I used OpenCV + Keras + a Raspberry Pi to create a Santa/Not Santa detector:

I write a lot of technical content on the blog and in my books/courses so it was fun to create something light-hearted and fun while at the same time actually teaching readers how they could utilize OpenCV, Keras, and Deep Learning in their own projects.

Another one of my favorites is my Keras tutorial on how to get started with deep learning and Python. I often get asked what is the best way to get started with deep learning. I wrote that Keras tutorial to help readers learn incrementally, starting with a simple neural network and eventually training their first Convolutional Neural Network, all in a single blog post. I love that tutorial as I’ve seen it help developers and engineers get their start in computer vision and deep learning.

Sanyam Bhutani: I have to say, like many others, I’m a fan of your articles.

Could you share some tips on effectively writing technical blog posts?

Adrian Rosebrock: One of the worst ways to start writing anything, whether technical or not, is to open a new document and expect that you’ll have words pouring out of you, magically filling up the page — it rarely works like that and it’s normally a recipe for frustration and failure.

Instead, I recommend outlining first. I personally outline in bullet points.

Start with your headers first — what are you going to cover? And in what order?

From there you back and start filling in the sub-headers. What do you need to cover in each section?

Finally, I go back and include the details for each section. Sometimes I even write in complete sentences, but that’s a personal choice.

I always leave notes to myself such as “Insert an image here” or “Lines X-Y of some_script.py go here”. I try to keep myself focused on the actual writing process as much as I can. The actual images and code can be inserted later during typesetting.

Sanyam Bhutani: You’ve always used a “theory minimum” approach when teaching a concept. Why do you think a code-first approach is useful when both-learning and building a project?

Adrian Rosebrock: I think “some” theory can go a long way when implementing a computer vision or deep learning algorithm but when you go to colleges or universities that’s all you find in the textbooks. Lots of mathematics. Lots of equations. That is only one side of the coin though — those books are missing the practical implementation.

The best way to learn these concepts is to intersect the two. Teach a bit of theory then show how it’s done in code. Many books and textbooks purposely try to separate the two — in my opinion that is the incorrect approach.

The fact we live in a world where developers and engineers can now type `import sklearn` or import keras` has changed the machine learning landscape.

The notion that people need a decade of mathematics or a college degree in computer science to perform machine learning is frankly incorrect.

The best way to get started in machine learning is to get started. Install one of the Python machine learning or deep learning packages. Follow the basic tutorials and examples the best you can. Train your first machine learning model and look at the result.

Did it get you excited? Do you want to learn more? Awesome, that’s great! Go dig into the documentation or other tutorials where you’ll continue to learn.

If you didn’t like it, that’s fine too. It’s better that you learn now that you don’t enjoy coding or writing machine learning code before you spend a year studying it.

Don’t get me wrong — theory is very important, especially if you wish to write scientific publications. But if you’re a programmer just getting started with machine learning or deep learning, start with existing code-based tutorials first. See if you like it and enjoy it — then supplement your education with theory as you go along.

Sanyam Bhutani: For the readers and the beginners who are interested in working on Computer Vision, what would be your best advice?

Adrian Rosebrock: I would recommend you install OpenCV on your system and following my free OpenCV tutorial on how to learn OpenCV. I created the guide to help readers new to computer vision take a code-first dive into image processing.

Inside the tutorial you’ll learn the basics of image processing along with how to drive the OpenCV library. You’ll learn the fundamentals through code and I believe you’ll have fun doing it as well.

Sanyam Bhutani: Before we conclude, any tips for the beginners who are afraid to get started because of the idea that Deep Learning or Computer Vision is an advanced field?

Adrian Rosebrock: I would tell beginners to just get started and don’t make any excuses for yourself. Don’t worry that you don’t have a degree in computer science or mathematics. This is an incredible time to be working with computer vision and machine learning — there are so many guides and tutorials to help you along the way.

The best possible think you can do right this second is get started — no excuses.

If you’re interested in getting your start in computer vision and deep learning I offer a free 17-day crash course on the them. Inside the course you’ll learn the fundamentals of computer vision, eventually building your way up to face detection, neural networks, and deep learning. You can find the free 17-day crash course on my website, PyImageSearch.com.

Sanyam Bhutani: Thank you so much for doing this interview.

If you found this interesting and would like to be a part of My Learning Path, you can find me on Twitter here.

If you’re interested in reading about Deep Learning and Computer Vision news, you can checkout my newsletter here.