Over the past three years running PyImageSearch.com I have received and answered tens of thousands of questions from readers just like yourself who are interested in studying computer vision, OpenCV, and deep learning.
Looking back on this time, I can say that the vast majority of the questions I have answered have been a real pleasure to respond to.
Other inquires required a bit of digging and going back and forth with the reader to resolve what the actual underlying question was. That’s okay as well. Some questions are complicated and need to be “finessed” a bit until we can coax out the primary issue.
On the other hand, a small percentage of questions were a bit trying and tedious, requiring both the patience of myself and the person asking the question. These tough questions were not “difficult” in their content or subject matter, but rather figuring out what the reader was trying to accomplish — and doing so in a manner that was respectful of both my time and theirs.
In last week’s blog post I discussed the five key components of asking insightful computer vision questions (with the end goal of getting you better answers).
Today we are going to take this a step further and apply these components to actual questions I have received on the PyImageSearch blog.
My goal here is to:
- Provide a set of guidelines you can use when contacting me (or any other subject matter expert) to ensure your computer vision question is answered.
- Contribute examples of both positive and negative qualities of questions that you can use and learn from when crafting your own inquiries.
- Help me help you better by ensuring your question is asked in a manner that is respectful of both my time and yours.
To learn more about how to ask questions on the PyImageSearch blog (and get the best possible answer to your questions), just keep reading.
A guide to asking questions on the PyImageSearch blog
You might be wondering why I’m writing an full-fledged guide to asking questions on the PyImageSearch blog?
The reason is because PyImageSearch has grown over the past three years — a lot.
I now receive hundreds of emails per day asking questions regarding computer vision, OpenCV, and deep learning.
Don’t get me wrong:
It’s a pleasure interacting with you, answering your questions, and learning from you:
It’s the highlight of my day.
However, the sheer volume of the questions has required me to formalize the process a bit to help make Q&A as efficient as possible.
Since I don’t want to resort to using awkward, impersonal surveys or a “weekly roundup” of top questions (where only a small percentage of your questions get answered), I’ve decided the best course of action is to create a guide that provides:
- An outline and template that you can use when crafting your own questions.
- Examples of both positive and negative qualities of actual questions I have received so you can learn from them.
By using these resources I am confident that we can both benefit through more efficient question and answering.
Remember, my end goal is to help you, but you need to help me understand your question first.
Note: All names, universities, and affiliations have been anonymized in this blog post to protect the identify of the reader who asked the question. Any real-life correlation with the names, questions, or affiliations is purely coincidental.
Why it’s in your best interest to ask questions (and learn from them)
Asking questions is a fundamental aspect of computer science (and all sciences in general).
In fact, questions are the cornerstone of the scientific method:
This process of asking a question, running an experiment, measuring/evaluating the results, drawing a conclusion, and repeating the process allows us to acquire new knowledge.
Through these questions we find growth both in terms of ourselves, but also in terms of the scientific method in general.
As a student of computer vision, it’s in your best interest to ask questions — this enables you to gain new insights, eliminate confusion, and solve projects you are working on.
That said, there are best practices we can apply to ensure we ask the right types of questions.
You see, asking questions is an acquired skill, similar to an art.
It takes time to master — but once you do, it unlocks a world where others (such as myself) can better help you understand computer vision.
Key Takeaway: The more clarity you can provide upfront regarding your question, the better I can do at helping point you in the right direction and solving your problem (but you’ll still need to do the hard work yourself).
To learn the best practices when asking a question here on the PyImageSearch blog, keep reading.
An outline to asking questions
Whether emailing myself or any other subject matter expert, I would suggest following this simple outline:
- Introduce yourself.
- Ask your question.
- Explain why you are asking.
- Mention what computer vision experience (if any) you have.
Let’s dive into each of these bullet points.
All good questions start with an introduction
I consider it a privilege and an honor to run the PyImageSearch blog and I want to get to know you.
Tell me your name. Tell me about your experience level with computer vision. Let me know if you’re a computer vision student, researcher, hobbyist, or programmer who simply finds computer vision interesting.
Also, if you are emailing me for the first time, it’s helpful for me to know how you found the PyImageSearch blog (ex., Google, recommendation from friend/colleague, link from StackOverflow/reddit/etc.).
From there, ask your question
Take the time to formulate your question and think through it.
I have written an entirely separate guide on how to get better answers to your computer vision questions — be sure to read it before writing your question.
Reading this guide before you ask your question will save us both a lot of of time and ensure your question is answered properly.
After you ask your question, explain why you are asking
It’s crucial for not only me (but yourself as well) to understand the context of why you are asking a particular question.
If you’re a computer vision hobbyist hacking on your Raspberry Pi on the weekends, my suggestion of techniques to utilize will be substantially different than a researcher at a university who looking to do state-of-the-art research.
Take the time to understand the why behind your question and make sure you relay it to me — the more context I have regarding the problem that your question is stemming from, the better I will be at helping you.
Finally, be sure to let me know your computer vision experience (if any)
Just like the context and why behind a question are important, it’s also pivotal to understand your experience level with computer vision.
If you don’t have any experience with computer vision, that’s 100% okay — but I do need to know this so I can recommend a path forward for you that includes the fundamentals.
Similarly, if you know the basics of computer vision and OpenCV, be sure to let me know so I can recommend more advanced techniques to you.
Finally, if you’re doing research at a university of institution, that’s also really help for me to know so I can try to point you towards publications that may be of interest.
A template to asking questions
Combining the question asking outline above, I have put together a “fill in the blank” template to help you out when formulating your question and emailing me (or any other subject matter expert):
Hi Adrian,
My name is {{ first_name }}. I first found you because of {{ source }}.
I am interested in {{ topic }}.
My question is:
{{ question }}
The reason I am asking is because {{ question_reason }}.
My experience with {{ topic }} is {{ experience_level }}.
Thanks,
{{ first_name }}
To understand why it’s important to apply this template, let’s consider a subject entirely separate from computer vision — planning a trip. Let’s pretend that I want to visit Cambodia and in order to plan this trip I am going to email Karen, my (fictional) travel agent.
Without using the template, my initial email to Karen may look like this:
Hi Karen,
I want to visit Cambodia. Please help me.
Adrian
This email isn’t very helpful to Karen. Besides me stating that that I want to visit Cambodia, she has nothing to go on:
- Why am I visiting Cambodia?
- What time of year do I want to visit?
- Is this trip for business or for pleasure?
- What is my budget for the trip?
- Have I been to Cambodia before?
- Am I interested in doing any “sight seeing” while in Cambodia?
It’s plain to see that based off of my initial inquiry it’s going to take a few back-and-forth emails between myself and Karen before she has a clear picture of what my intentions are when visiting Cambodia.
However, if I were to use the template above my initial email becomes more much clear:
Hi Karen,
My name is Adrian. I was referred to you from my friend, Trisha — she said you were an excellent travel agent.
At some point in the next year I would like to visit Cambodia.
I have never been to Cambodia before, but I have relatives who live there and I would like to visit them. They don’t speak much english so it’s important that I have a good grasp on how this trip will work (flights, car rentals, accommodations, etc.).
I also don’t know what time of year is best to visit Cambodia. Can you provide suggestions on the best time of year to visit?
My budget for the trip is $1,500. What can I do with this budget to ensure I can afford a flight and still see all the major sites while I’m there?
Thanks!
-Adrian
At this point Karen knows exactly what my intentions are and can better help me. She still may have a few clarifying questions, but at least the groundwork has been laid.
The point here is that I need to first help myself by formulating a question that Karen can better answer. From there, Karen can better help me.
How to apply this template to your questions on the PyImageSearch blog
Let’s pretend that my name is Steve and I am interested in Content-based Image Retrieval (CBIR) or more simply, image search engines.
I have just found the PyImageSearch blog on Google through the query “image search engine python” and landed on The Complete guide to building image search engines with Python and OpenCV” tutorial.
Let’s also suppose that I have some experience with the Python programming language, but no prior knowledge of OpenCV.
I could then fill in the template like this:
Hi Adrian,
My name is Steve. I found your blog via Google as I was searching for “image search engines python”.
I am interested in building image search engines and read through your complete guide to image search engines tutorial. It was really helpful to see how a basic image search engine is built and put together. Thanks so much.
My question is:
You used color histograms to quantify image contents in that tutorial. What if I wanted to recognize texture or shape?
The reason I ask is because I work for a large stock photo company and we need to build a system that can (automatically) search for similar images based on the image content.
I don’t have any prior experience with computer vision or OpenCV, but I do know how to write code in Python, PHP, and C++.
If you can point me in the right direction, I would appreciate it.
Thanks!
Steve
Steve’s question is an excellent example of an insightful computer vision question:
- It is well thought out and to the point.
- It has specific goals:
- Steve wants to learn more about image search engines.
- Using this knowledge, he wants to build an image search engine for the company he works for.
- It provides enough context and background (including prior programming experience).
Given that Steve is just getting started with computer vision and OpenCV, I can recommend a path to him that will:
- Teach him the fundamentals of computer vision and image processing.
- Educate him on various color, shape, and texture image descriptors.
- Guide Steve on how to build a scalable image search engine.
Again, Steve walks into this question with an open mind.
He’s not looking for a “done for him” solution, but rather a path to understanding image search engines so that he may complete his project.
As we’ll see throughout the rest of these example equations, there are rarely (if ever) “done for you” solutions in the computer vision field. Even if there are, these solutions likely require you to tweak various knobs and levers. Without knowledge of the basic fundamentals of computer vision and image processing, you’ll likely struggle to get these knobs dialed in correctly.
Example questions I’ve received on the PyImageSearch blog
In the remainder of this guide we’ll be looking at actual questions I have received on the PyImageSearch blog.
We’ll be examining each of these questions and pulling out both the positive and negative qualities of the questions so you may use this knowledge to craft awesome computer vision questions of your own.
Each of the example questions falls into the five components of asking a good computer vision question:
- Component #1: Know the purpose.
- Component #2: Provide context.
- Component #3: Do your research.
- Component #4: Ask the question (and be respectful of others time).
- Component #5: Repeat the process as necessary.
Some of these questions are excellent examples of the respective components above.
Others are lacking in certain ways.
In either case, I’ll be calling out both qualities so you can learn from them — this will enable me to help you better by understanding your question.
Component #1: Know the purpose of the question
Our first example comes from Jason:
SUBJECT: Contact Form Submission from Jason
How to track cup? Please answer me.
Jason’s email is brutally short — and to be honest with you, it’s an example of question that is extremely challenging for me to answer.
The reason is because I can’t extract the purpose of the question.
I don’t know what types of cups Jason wants to recognize and track:
- Every type of cup?
- Does this include glasses and stemware?
- What about beer mugs?
- What material are the cups? Are they glass, ceramic, plastic, metal, etc.?
- Or are we limited to just a specific type of cup Jason has in his kitchen cabinet at home?
I also don’t know the reason why Jason wants to build his cup recognition and tracking system:
- Is he preparing for graduation and this cup tracker is supposed to be his final capstone project?
- Does he work for a company that mass produces cups and needs to detect, track, and count the number of cups on a conveyor belt?
- Or is he simply curious how to track and recognize cups as a hobby project?
The options are endless and it’s impossible for me to discern the “why” out of Jason’s email.
Besides being fundamentally hard to answer, these types of questions are also mentally taxing and tedious.
Because Jason’s email lacks context and detail, it would take many back-and-forth emails between him and myself to determine what the end goals of his project are.
If Jason can put more time into forming a question that includes specific details on what he hopes to accomplish, then I would likely be able to help him more. Otherwise, it becomes very hard for me to respond (or even justify the time spent) on his question.
Emails like these I may respond to asking for more details — but in the future these questions will receive a low priority and may not be answered at all.
If I were to rewrite this email as one that follows our template above (making assumptions on Jason since I don’t know what his motivations are), it would look like this:
SUBJECT: Contact Form Submission from Jason
Hi Adrian,
I am brand new to computer vision and OpenCV. I just found your blog a few hours ago and have read a few articles.
I have a hobby project in mind where I want to detect and track cups in videos.
Why cups?
I have a 2 year old daughter and I recently bought her brightly colored red, yellow, and blue plastic sippy cups to ensure she doesn’t spill juice on the floor.
From the posts that I’ve read, it seems like color can be used to find objects in an image and these cups seem like a good candidate.
Again, I am new to computer vision so this project is just a way for me to teach myself the basics.
How can I apply your techniques to detecting and tracking cups in video?
Where should I start?
Jason
In this rewritten example I would have all the information I need to answer Jason’s question:
- I know his computer vision and OpenCV experience.
- I understand that he’s interested in tracking a specific type of cup.
- And I know this is a hobby project for him.
Based on this information, I can provide Jason with recommendations to start his project, unlike in the original example where I would have to spend at least 3-4 emails going back and forth simply trying to understand the project’s purpose.
Being upfront with the goals of your project will save us both a lot of time.
Component #2: Provide context (i.e., “why” you are asking the question)
This next email comes from Mark:
I am working on a project. I need to count the number of people that cross a line in a video. Plz send code. Thanks ahead of time.
Mark
Mark’s question (which isn’t actually a question) is similar to Jason’s above: very short and not much detail.
Again, I would struggle to answer this question.
I’m not sure why Mark wants to count the number of people in a video or even what he is referring to by “person counting”.
However, based on my experience in the computer vision field (and answering 100’s of similar questions), I assume Mark wants to build something like this:
But again, I would need more details on the project, such as:
- Where is the system supposed to be deployed?
- In a small store?
- In a massive shopping mall?
- As part of a system used to track olympic runners as they cross a finish line?
- What experience level does Mark have with computer vision and OpenCV?
- Has Mark tried any techniques prior to emailing me?
Mark also asks for code to solve the problem for him.
It’s important to understand that it’s extremely rare for computer vision problems to have “off-the-shelf” solutions.
Sure, we have rules of thumb.
Best practices.
And basic recommendations.
But even the most basic computer vision algorithms require a bit of tweaking from one problem to the next.
Even if Mark had the code to track people crossing a line in a video stream, without the understanding of how these algorithms work, he would still struggle to actually tune the knobs and dials to make the solution work in his specific instance.
If you find yourself asking for computer vision code but want to skip understanding how the code actually works, you are likely headed for trouble — take the time to understand the fundamentals first.
Mark doesn’t provide much information, so to turn this into a good example question that follows our template above, I need to make a few assumptions:
Hi Adrian,
My name is Mark. I am database programmer for Oracle during the day, but help my grandfather operate his convenience store on nights and weekends.
It would be helpful to be able to count the number of people who walk in and out of the store on a daily basis so we can compute the most “busy” times of day and ensure more checkout clerks are on staff.
I found an example video online that demonstrates almost exactly what I’m trying to accomplish:
https://www.youtube.com/watch?v=OWab2_ete7s
I write code for a living so I’m confident in my abilities, but I don’t have any experience with computer vision.
Where should I start?
Thanks,
Mark
Mark starts off this email by telling me about his day job: a database programmer, but then goes on to tell me that he helps his grandfather run a local convenience store — this is helpful as it gives me context as to what and why Mark is emailing me.
Mark then provides an example video of what he wants to accomplish. Again, this is helpful because it provides more context.
Based on this information, I know what project Mark is trying to build and why he wants to solve it — I can then give Mark recommendations to help him with his person counter.
Component #3: Do your research
This next question comes from Margaret, a PyImageSearch reader who is interested in deep learning and the Keras library:
SUBJECT: Where can I learn about Keras?
Hi Adrian,
My name is Margaret. I found your blog on Google when I was searching for deep learning tutorials.
I’m currently working as a data scientist (Python and OpenCV mostly) analyzing breast histology images. I want to utilize deep learning to automatically analyze these images for breast cancer risk factors.
I’ve heard that Keras it’s a good deep learning library and can be used for computer vision and recognition.
Do you have any blog posts that cover Keras?
Margaret
Margaret’s question starts off strong:
- She introduces herself.
- Mentions that she is using Python and OpenCV (although it would be helpful to know a little more about this level of experience).
- Explains her motivations in asking her question (wanting to develop a system to detect breast cancer risk factors in images).
However, where the question becomes troublesome is Component #4 of asking an insightful computer vision question — do your research.
On the right-hand side of nearly every page on PyImageSearch you’ll find a “Search” box:
Typing “keras” into this box will return all PyImageSearch pages that mention Keras:
Similarly, you could use a little Google-Fu by heading directly to Google.com and searching using the “site:hcl.pyimagesearch.com keras” query string:
This will return a list of all PyImageSearch webpages that discuss Keras.
With a little more research Margaret could have answered her question, and likely jumped immediately to the more important question: should she be using Keras and where can she study deep learning?
Rewriting Margaret’s question following the template above, it may look like:
Hi Adrian,
My name is Margaret. I found your blog on Google when I was searching for deep learning tutorials (specifically ones about Keras).
I’m currently working as a data scientist using Python and OpenCV. My work mainly involves analyzing breast histology images to automatically determine cancer risk factors.
My research online has shown that deep learning can be really helpful in this task.
After reading your tutorials it seems that you use Keras a lot. Would you recommend Keras to me for this project?
To help you get an idea of what I’m working with, I’ve attached two example images: one of a low-risk breast cancer image and another of a high-risk image.
Margaret
This rewritten example provides me with all the information I need to answer Margaret’s question.
She also provides me with a couple example images to better help me understand what her images look like — this added context is super helpful when answering questions.
Component #4: Ask your question (and be respectful of others time)
One of the most important aspects of asking a question is being respectful of another person’s time.
While the internet is ultimately a positive source of information, we sometimes forget there is an actual human on the other side of the line answering our questions (not a mindless vending machine that dispenses information on our command).
Aditya’s question/request below is an example of an inquiry that could do better by being respectful of others time:
SUBJECT: Help
Sir, I am studying object detection for my masters.
Please provide a list of all papers on the same.
Thank you ahead of time.
Aditya
Aditya is a masters student who is doing research in object detection — this is a great sub-field of computer vision to study. There is much research to be done and we are far from solving it.
The problem is Aditya’s request itself:
He would like me to provide him with an exhaustive list of papers on object detection.
While I’m happy to point Aditya in the right direction with references to a handful of seminal object detection papers, such as:
- Rapid Object Detection Using a Boosted Case of Simple Features
- Histogram of Oriented Gradients for Human Detection
- Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
- SSD: Single Shot MultiBox Detector
It’s also not my responsibility to maintain or publish such an exhaustive list of object detection papers.
In fact, as part of Aditya’s research he should be doing this survey of prior work himself.
To be totally honest with you, these questions are hard for me on a personal level:
I love helping you learn computer vision, OpenCV, and deep learning.
I love helping you reach your goals.
But I would also kindly ask that readers be:
- Respectful of my time.
- Realistic in their questions and requests.
Doing this ensures that I will be able to help you better.
Aditya’s request is also quite frankly rude.
That said, I do like to give people the benefit of the doubt.
Perhaps due to a language barrier Aditya does not understand that his request is rude.
Or perhaps Aditya is honestly seeking help but doesn’t know the right way of going about it.
If I were to rewrite Aditya’s request as a question that follows our template above, it would look like this:
SUBJECT: Need help starting object detection
Hi Adrian,
I am a first year masters student interested in studying object detection.
I plan on writing my thesis on object detection but I first need to do my initial survey of work.
I’ve come across more recent deep learning techniques such as Faster R-CNNs, YOLO, and SSDs, but I am curious about non-deep learning approaches.
Are there any popular techniques that I should be considering?
Aditya
In this updated email we can see that Aditya has taken the time to clarify his question a bit.
He mentions that he is a masters student in his first year and needs to understand what prior research has been done on object detection.
He has also demonstrated that he has taken the time to research recent approaches to object detection using deep learning.
While I’m confident that with time Aditya will come across the more classic Haar cascade and HOG + Linear SVM papers, I don’t mind answering this question — Aditya has clearly put in effort and I wholeheartedly respect that.
Component #5: Repeat the process as necessary
Our final example comes from Abram:
SUBJECT: Deep learning and object detection.
Hi Adrian,
I’m currently studying object detection (mainly using HOG + Linear SVM) during my winter break at the university. I hope to do my dissertation on the topic next year.
Thank you for your blog post on using Intersection of Union as an evaluation metric for object detection:
https://hcl.pyimagesearch.com/2016/11/07/intersection-over-union-iou-for-object-detection/
It has helped me understand how to evaluate my detectors.
You mentioned in the blog post that deep learning can also be used for object detection. I did some research on the topic and found “Faster R-CNNs”, “Single Shot Detectors”, and “You Only Look Once”, but I’m not sure how they work — the papers are very dense.
Do you explain these networks on your blog or in any of your courses? I couldn’t find any detailed mention of them on the blog, perhaps I’m missing a tutorial.
Thanks you for your time.
Abram
Abram’s question here is a shining example of a great question.
He starts by introducing himself.
He then lets me know that he’s a student and is currently studying object detection (specifically the HOG + Linear SVM framework) and that the hopes to write his PhD dissertation on object detection (this helps me understand his reason and purpose behind emailing me).
Based on his link to the Intersection over Union (IoU) tutorial, I know he is at least familiar with the PyImageSearch blog.
His question also indicates that he’s not only read the IoU tutorial but taken the time to research other methods for object detection using deep learning.
Using this information I can craft a reply that is tailored to Abram, ensuring he:
- Can learn more about deep learning frameworks for object detection.
- Utilize this knowledge as he works on his PhD in graduate school.
By putting thought and care into his question, Abram can enjoy a response that is thoroughly crafted to his end goals.
Summary
This blog post is the second in a two part series on how to ask insightful computer vision questions.
You can find the first part of this series here.
The goal of today’s post was to:
- Provide a set of guidelines you can use when contacting me to ensure your computer vision question is answered.
- Contribute examples of both positive and negative qualities of questions that you can use to learn from when crafting your own inquiries.
- Do so in a manner that is both respectful of my time and yours.
Remember, my goal is to help you reach your computer vision goals!
I find a lot of joy in helping others, but my answers can only be as good as the thought and care that went into the original question.
Let me help you — take the time to form a good question and you’ll receive a very helpful response in return.
If you ever want to reach out, say hello, or ask a question, feel free to contact me.
Have a great day!
Join the PyImageSearch Newsletter and Grab My FREE 17-page Resource Guide PDF
Enter your email address below to join the PyImageSearch Newsletter and download my FREE 17-page Resource Guide PDF on Computer Vision, OpenCV, and Deep Learning.