So what is image segmentation anyway?
So before we dive into the segmentation part, let's talk a little bit about some tasks in computer
vision that preceded segmentation.
So first, we're going to start by the task that is called classification, so classification is one
of the most basic tasks in computer vision, but very important one.
So in classification, what we want is to create some sort of a system, in our case, a deep learning
system or a deep learning model that you give it an image such as this one here, and your model will
tell you whether there is a cat or there is a dog or some other thing in your different classes.
So this is what your model will do now.
And the computer vision history after classification, we want to push this basically extraction of
information a little further.
So there was another test, which is called object detection.
In this task.
What you actually do is.
Or what your mother needs to do is to tell you whether there is a cat or a dog in the image, and it
needs to tell you the coordinates of where that cat is.
So the coordinates of a bounding box.
So usually what we predict are two points, for example, that represent the two corners of a rectangle.
So your model gives you extra information.
It doesn't just tell you that there is a cat or dog in the image, but in fact, it tells you where
that dog or cat are inside your image.
And then comes amid segmentation.
So here we're going to speak about semantic segmentation, but I'll explain a little bit further what
we mean by semantic segmentation.
But if we talk about image segmentation, then this is a representation of it.
So now what you would what you would want your model to do is that you would give it an image and then
you model needs to tell you exactly where the cat and the dog are in the image.
So it's pixel precise, not like object detection, where you get a bounding box and your model tells
you, OK, the dog or the cat are inside that bounding box.
But as you can see, there are so many pixels, for example, here, here, here, that they don't belong
to the pixels that represent the cat.
But in a segmentation, that's what we want, we want actually to have big, so precise predictions.
So here these green pixels represent the pixels that they belong to, the cat object and the blue pixels
represent the dog.
So, as you can see, semantic segmentation is one step forward.
If you think of this as some sort of a historical progress, then classification is the simplest.
And then comes object detection where we just want to basically localize our objects inside the image.
And then an image segmentation.
We go a step further where we want to know pixel precise where those objects are.
In our case, it's a cat and a dog.
And in fact, there could be another class such as background, so so that when you're given an image,
you can even know the background as well.
So this is what image segmentation means.
And don't worry about the word semantic for now.
I'll explain it a little bit further.