### What is it?
Image classification is the task of categorizing and assigning labels to groups of pixels or vectors within an image dependent on particular rules. The categorization law can be applied through one or multiple spectral or textural characterizations.
Image classification techniques are mainly divided into two categories: Supervised and Unsupervised
# Image Classification Types
### Unsupervised classification
An unsupervised classification technique is a fully automated method that does not leverage training data. This means machine learning algorithms are used to analyze and cluster unlabeled datasets by discovering hidden patterns or data groups **without the need for human intervention.**
With the help of a suitable algorithm, the particular characterizations of an image are recognized systematically during the image processing stage. **Pattern recognition and image clustering** are two of the most common image classification methods used here. Two popular algorithms used for unsupervised image classification are ‘K-mean’ and ‘ISODATA.’
- K-means is an unsupervised classification algorithm that groups objects into k groups based on their characteristics. It is also called “clusterization.” K-means clustering is one of the simplest and very popular unsupervised machine learning algorithms.
- ISODATA stands for “Iterative Self-Organizing Data Analysis Technique,” it is an unsupervised method used for image classification. The ISODATA approach includes iterative methods that use Euclidean distance as the similarity measure to cluster data elements into different classes. While the k-means assumes that the number of clusters is known a priori (in advance), the ISODATA algorithm allows for a different number of clusters.
### Supervised classification
Supervised image classification methods use previously classified reference samples (the ground truth) in order to train the classifier and subsequently classify new, unknown data. Therefore, the supervised classification technique is the process of visually choosing samples of training data within the image and allocating them to pre-chosen categories, including vegetation, roads, water resources, and buildings. This is done to create statistical measures to be applied to the overall image.
## Image classification methods
Two of the most common methods to classify the overall image through training data are **‘maximum likelihood’** and **‘minimum distance.’** For instance, ‘maximum likelihood’ classification uses the statistical traits of the data where the standard deviation and mean values of each textural and spectral indices of the picture are analyzed first.
Later, the likelihood of each pixel to separate classes is calculated by means of a normal distribution for the pixels in each class. Moreover, a few classical statistics and probabilistic relationships are also used. Eventually, the pixels are marked to a class of features that show the highest likelihood
# How does image classification work?
A computer analyzes an image in the **form of pixels.** It does it by considering the image as an array of matrices with the size of the matrix reliant on the image resolution.
Put simply, image classification in a computer’s view is the analysis of this statistical data using algorithms. In digital image processing, image classification is done by automatically grouping pixels into specified categories, so-called “classes.”
The algorithms segregate the image into a series of its most prominent features, lowering the workload on the final classifier. These characteristics give the classifier an idea of what the image represents and what class it might be considered into.
The **characteristic extraction process** makes up the most important step in categorizing an image as the rest of the steps depend on it.
Image classification, particularly supervised classification, is also reliant hugely on the data fed to the algorithm. A well-optimized classification dataset works great in comparison to a bad dataset with data imbalance based on class and poor quality of images and image annotations.