Train your own custom image classifiers, object detectors, and object trackers.

gurus_kickstarter_cat_dog_demo

Did you watch the Super Bowl this past weekend?

I did. Kind of.

I spent Super Bowl Sunday (which is practically a holiday in the United States) at my favorite Indian bar.

Pounding Kingfisher beers.

Savoring a delicious dish of Tandoori chicken…

…all while hacking up a storm on my laptop and coding up some custom image classifiers, object detectors, & object trackers for the PyImageSearch Gurus computer vision course.

And oh yeah — the Super Bowl game was on in the background. Can’t say I watched much of it though, I was too busy with my nose in my laptop, looking like a deranged programmer! I’m sure it was a peculiar sight to see.

Anyway, I’m posting this article today because I wanted to share with you the results of my Indian beer fueled hacking binge…a preview of the image classifiers, object detectors, and object trackers we’ll be building inside PyImageSearch Gurus.

Let’s start off with something simple, training your own face detector:

Inside PyImageSearch Gurus you'll learn how to train your own custom object detector to detect faces in images.

Figure 1: Inside PyImageSearch Gurus you’ll learn how to train your own custom object detector to detect faces in images.

Here you can see that I have trained my custom object detector using the Histogram of Oriented Gradients descriptor and a Linear SVM to detect faces from the cast of Back to the Future.

And here I have trained another custom object detector using Histogram of Oriented Gradients to detect the presence of a car in an image:

Learn how to detect a car in an image inside the PyImageSearch Gurus course.

Figure 2: Learn how to detect a car in an image inside the PyImageSearch Gurus course.

Let’s do something a little more complicated now. In the below image I have trained a Pyramid of Bag of Visual Words (PBOW) and a Pyramid of Histogram of Oriented Gradients (PHOG) to recognize images from the popular CALTECH-101 dataset:

Figure 3: Learn how to train an image classifier on the popular 101 category CALTECH dataset.

Figure 3: Learn how to train an image classifier on the popular 101 category CALTECH dataset.

As another example, I have trained a classifier to tell the difference between Fido and Mrs. Whiskers on the ASIRRA Cats vs. Dogs dataset:

Figure 4: You'll learn how to train a custom image classifier to recognize the difference between cats and dogs.

Figure 4: You’ll learn how to train a custom image classifier to recognize the difference between cats and dogs.

Lastly, I utilized keypoint detection, local invariant descriptors, and keypoint matching to track the cover of a video game box in a real-time video stream:

Figure 5: Training your own custom object tracker for use in real-time video is a breeze. Discover how inside PyImageSearch Gurus.

Figure 5: Training your own custom object tracker for use in real-time video is a breeze. Discover how inside PyImageSearch Gurus.

Really cool, right?

These techniques aren’t magic — and I guarantee that you can learn them yourself.

Join PyImageSearch Gurus before the door closes…

As you can see, we’ll be learning a lot of actionable skills inside the PyImageSearch Gurus course. From custom image classifiers, to object detectors, to real-time object tracking, you’re guaranteed to become a computer vision master inside the PyImageSearch Gurus course.

So if you’re interested in uncovering these techniques and becoming a computer vision master, I would definitely suggest joining me inside PyImageSearch Gurus!

Once the Kickstarter ends you will not be able to enroll in PyImageSearch Gurus again until August! This is your chance! Be sure to get in now…

There are still a few seats left open in the PyImageSearch Gurus course, so definitely act now and claim your spot!

, , , , , ,

13 Responses to Train your own custom image classifiers, object detectors, and object trackers.

  1. Ahmet Sezgin Duran July 10, 2015 at 11:14 am #

    Hello Adrian,

    I would like to ask something: Is is possible to train a classifier to detect more abstract types? For example, your system detects cats and dogs separately but I want to detect “animals”.

    • Adrian Rosebrock July 10, 2015 at 5:07 pm #

      Theoretically it is possible to train a detector to recognize a general class of “animals”; however, I don’t think it would work well in practice. Animals, even with a species, can have extremely different visual appearances. It would be more realistic to train a classifier on a subset of animals you would like to recognize, and whenever you see those classifications, you’ll know they are indeed “animals”.

  2. vinod October 7, 2016 at 1:33 pm #

    is it possible to detect traffic sign , also same like displaying the name of the signs?? is it real time detection or detecting using images ??

    https://www.pyimagesearch.com/pyimagesearch-gurus/

    • Adrian Rosebrock October 11, 2016 at 1:15 pm #

      Yes, it’s absolutely possible. You would simply train a sign detector for each of the signs you wanted to detect. These algorithms can in most cases also run in real-time or near real-time.

  3. Aashray May 29, 2017 at 7:19 am #

    Hey Adrian

    Can you please give some references on how to Extract HOG features and train SVM classifier using it in Python?

    • Adrian Rosebrock May 31, 2017 at 1:22 pm #

      Hi Aashray — I detail the basics of how to train your custom HOG + Linear SVM detector here. I then demonstrate how to implement a HOG + Linear SVM detector from scratch inside the PyImageSearch Gurus course.

  4. Rahul July 16, 2017 at 9:31 am #

    Great work Adrian. Need little information here. After training and recognizing the objects how can i control raspberry pi for a particular object. I want one set of controls for one particular object detection. For example if a dog is detected do some hardware operations in raspberry pi.Please give me some information. Thanks.

    • Adrian Rosebrock July 18, 2017 at 10:01 am #

      Hey Rahul — if you can detect a given object, then whatever you want to do next is arbitrary. This question isn’t specific, so the best I can do is point you to this tutorial where I show how to work with the Pi and GPIO.

  5. Somesh November 21, 2017 at 8:17 am #

    Hey Adrian, I have followed almost all of your posts regarding object detection using openCV. I need a small help, I have tried object detection using Microsoft CNTK. It works well with images of small dimensions. However, I have to get the result on the images with dimensions 10 times to that of the regular images used for testing.My problem hereis, Does any of the object detection model can process images of that size(eg:10000*8000 pixels)

    Note:Even though the images are of huge size the objects in the image will be of normal size.To be clear, the image contains 100 to 200 different or same objects.. So the image will be of large size.Please suggest a solution for this

    • Adrian Rosebrock November 21, 2017 at 1:17 pm #

      We typically don’t process images that are larger than 600-1000 pixels along their longest dimension. A 10,000 x 8,000 pixel is quite large. Perhaps you could clarify what you mean by “normal size”? What does “normal size” mean in this context?

  6. Somesh November 21, 2017 at 11:37 pm #

    Hi Adrian, Thank you for the reply.

    Here, “normal size” means, the object size will be below or just above 100 pixels. for eg: I have the objects of size 62*108 and 91*92 and so on with similar sizes.

    Note: Is there any course for Object detection.I am willing to take it as a crash course.

    • Adrian Rosebrock November 22, 2017 at 9:56 am #

      I cover HOG + Linear SVM-based object detectors inside the PyImageSearch Gurus course and deep learning-based object detection inside Deep Learning for Computer Vision with Python, but I don’t cover that large of image sizes. I can’t speak specifically for Microsoft CNTK, but the same principles of object detection will work on larger images (but will be significantly slower).

  7. Haider January 12, 2019 at 11:59 pm #

    Hi Adrian!

    Thanks for the awesome blogs.
    I am working on terrain classification.
    1. Is it possible to detect stairs if your camera is mounted on a moving(have wheels) robot. The camera is tilted so that it can classify other surfaces like grass, gravel,etc that comes in it’s path.
    2. If it possible what is the estimated number of images I have gather.
    3. Do I have to take pictures of stairs as a whole or only the part that will be visible when camera is mounted on the robot(estimated angle is about 45 degrees from plain surface).
    Thanks.

Leave a Reply

[email]
[email]