So now let's talk about some early object detectors, and this would include horror cascade classifiers
and using sliding windows with hugs.
So let's take a look at the history of these early detectors.
So first, we will start with her cascade classifiers.
So object detection algorithms have been wrong since the early days of computer vision, and the first
good attempts were in the early 90s.
However, the first really successful implementation of object action was in 2001, with the introduction
of hard cascade classifiers used by Violet joins for fierce detection.
It was surprisingly fast and easy to use, and it was got pretty good accuracy, to be honest.
It's still used today in a lot of applications, actually when we use open TV and we load that frontal
fierce detector.
It actually works quite well.
I mean, even the deep learning methods nowadays or dylib and a bunch of the other algorithms, they
do look better, but they're not substantially better.
So how does it work?
Well, it takes horror features as inputs, and we'll discuss what our features are in the next slide
into a series of cascading classifiers and then uses a series of steps to determine if a face has been
detected and horror classic classifiers are very effective.
However, they are very difficult to develop and train, as well as optimize because they do rely on
some manual parameter tweaking to adjust sensitivity.
So it's not always easy to work with.
And that's why it never took off for general object detection tests.
But it worked very well with faces which tend tends to be sort of has limited interest class variability
because we know with two eyes news is that the circle of a face those types of things, so it works
well with that.
So let's talk about how we can train on how Hardcastle Tusk Cascade classifiers actually work.
Firstly, they're trained using the positive images of images, but faces and then images without faces.
So we have negative images in that case, and features are extracting using rectangular blocks of various
shapes.
Those are the horror features I mentioned in the previous slide, and this is what they look like here.
You can see there are various forms of edge detectors, lying detectors, full rectangle features,
and there are actually many others, to be honest.
And they use a process called into images that is used to speed up this process tremendously.
And the researchers also used it to boost it a boost as a boosting technique.
So you use a number of weak classifiers to build a strong classifier to improve the performance of accuracy
with reduced features.
So the volumes application of this method and used to the end stages of various features to detect faces.
So you can see an illustration of it here.
Stage one had one feature and it got no features, then moved to the stage two and you can see all the
way.
We keep increasing the number of features that these things that we're extracting all the way up to
28.
So now let's talk about a histogram of gradients with SVM sliding windows.
So firstly, sliding windows seems intuitive.
Do you know what it is?
It's a method where we extract segments of our image piece by piece in the form of a rectangle rectangle
extractor window.
So remember when we have to be huddle convolution filters and we were multiplying the kernel by the
image?
It's the exact same pattern we move right to love and keep going down one step, right?
So that's again, one step.
And then eventually that's how it works and two different image sizes as well.
So in the histogram of gradients, what we're doing here, we're calculating calculating dogs that in
the wind in the window here, and this is what hogs look like.
You can actually see it a bit here.
It's basically the direction of the color of the intensity in that square in that region.
We're looking at.
And then once we have the hog features extracted from the block here, we can then feed it into SVM
classifier to classify whether the object was in that window or not.
So as you can see, previous object detection methods would basically this manual feature extraction
methods combined with sliding windows.
So was it like Hardcastle classifiers and.
That's basically what they are.
But we can eliminate eliminate some of the complexity by using sliding methods with CNN's as well.
However, think about something here.
Using a sliding window across an image results in hundreds, even thousands of classifications done
on a single image.
Because I mean, there's so many positions a sliding window can take over an image, especially if it's
a large image.
So the scaling issue is what size window do we use?
Is permitting robust enough that?
Scaling the image of different skills, we have one x two x 4x 8x and then getting smaller, I should
say not larger.
So what if the window isn't defined as we set it up to be?
Do we use windows of different ratios that do use rectangular windows or square windows, so you can
easily see how this could just blow up?
And you can.
Basically, it can be millions of classifications per image, especially if it's large.
So it's an illustration.
How do you slide the even slide left to right, right to left?
Do you take a stride of two that is jumping to pixels at a time?
So many questions.
So how do we use hugs with sliding windows?
Well, let's take a look at how to hug them with sliding windows works.
So using a pixel grid, basically, we just take this box here and we compute the gradient of vector
edge orientations at each pixel.
That's how we get the system ropes.
This generates 64 gradient vectors, which are then represented as a histogram.
Each cell is split into angular bins.
So the Angela bins are basically what the gradient was pointing to in that region, so you could have
different angles.
Remember gradients, movement level from intensity?
So from like from this white to this darker color, the gradient will be pointing towards some direction
and that's how you get angles here.
So we can use different number of bins and de la La Land, for example, to use nine bins from zero
to 180 degrees so you can do anything you want to reveal.
And this effectively reduces 64 vectors to just nine values because we just have these these big space
things here zero to 20, 2040, so we can scale it down into these bins.
And as it's towards a gradient magnitudes, it's relatively immune to emissions, which is a good thing.
So we don't normalize the gradients to ensure that invariant and illumination changes.
Does that brightness and contrast example the images under right here you can see if we divide vectors
by the gradient magnitude, we get point zero seven four or this is normalization.
So this is a good illustration of normalization here.
You can go through the mathematics if you want and take a look at it as well.
So instead of individual window cell normalization, a method called block normalization was used.
This takes into account neighbouring blocks that we normalize take into consideration the larger segments
of the window.
So something like this here?
Oops.
So that's basically it for histogram of gradients at sliding windows.
This illustration for early object detection.
I don't expect you to want to know much more about this because we don't especially use these methods
anymore.
But it's nevertheless it's good to understand the history of it so that when we move into the deep learning
parts of it, you can appreciate that what the deep learning methods bring to the table.
So next, we'll take a look at some of the metrics in how we assess object vector performance.
And we'll starting with the intersection of reunion because this is the basis of the metric that is
used to analyze how well our bounding boxes are located.
So that's it.
For this lesson, I'll see you in the next section.
Thank.