In MNIST, there are 28x28 images of hand written digits.
What features would one extract in order to classify then without any Deep Learning involved?
How does Dimensionality Reduction get in the processing pipeline?
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.
Sign up to join this communityIn MNIST, there are 28x28 images of hand written digits.
What features would one extract in order to classify then without any Deep Learning involved?
How does Dimensionality Reduction get in the processing pipeline?
There are many modern known features for images. Among them:
Those are classic and popular features. Since the blossom of Deep Learning people are less and less invest in researching newer features.
Basically the optimal feature extraction per task is the one which does both extraction of relevant feature and in low dimension. There is no single optimal feature extractor. Though for natural images we can see that modern nets (Deep Learning) can generalize very well.
The attached code in the following section is general and you may use different features to get better results.
Remark: We'll analyze this work using the MNIST Data Set. Though the result is nice I haven't cross validated any step. So it is a representation of the concept. Yet for real world one should optimize each block.
In the classic machine learning a standard pipeline could be something like:
Input Image
│
│
┌─────────────────────────────▼─────────────────────────┐
│ │
│ Pre Processing │
│ │
└─────────────────────────────┬─────────────────────────┘
│
│
┌─────────────────────────────▼─────────────────────────┐
│ │
│ Feature Extraction and / or Dimensionality Reduction │
│ │
└─────────────────────────────┬─────────────────────────┘
│
│
┌─────────────────────────────▼─────────────────────────┐
│ │
│ Classifier │
│ │
└───────────────────────────────────────────────────────┘
Remark
The flow above using ASCII Flow.
The heavy block here is the Feature Extraction / Dimensionality Reduction / Feature Selection (They can be done sequentially but there is som.
Each image we have in MNIST is an 28x28 image. Namely we have data in $ \mathbb{R}^{784} $.
We'll build our pipeline as following:
Remark: Pay attention that possibly using t-SNE directly on the data with a classifier would yield a better result. So in that context t-SNE is both a feature extractor and reduce dimensionality. Which any good feature extractor should do. But the issue would be using t-SNE for test set.
After applying the LDA we get (Looking only at the 2 first features):
The result is marginally better than what we got in Image Clustering Using Linear Discriminant Analysis (LDA) Compared to t-SNE / UMAP.
Using the classifier we get the following Confusion Matrix:
We got 91.48%
success rate.
In our days it is not impressive at all. But still it shows a formulation of a pipeline.
The magic in Deep Learning is that the first layers are doing the job by learning instead of hard coded feature extractor / dimensionality reduction.
The code is available at my StackExchange Codes Signal Processing Q80949 GitHub Repository (Look at the SignalProcessing\Q80994
folder).
gscatter(mF(:, 1), mF(:, 2), vTrainSetLabel);
? E.g gscatter(mF(:, 1), mF(:, 3), vTrainSetLabel);
and gscatter(mF(:, 2), mF(:, 3), vTrainSetLabel);
$\endgroup$