Classifier for CIFAR-10. Grayscaling, HOG, PCA, and RBF SVM. 62% test accuracy. This classifier does NOT use any neural network or convolutional filters/layers/kernels.
Add the following code as the first cell:
!pip install scikit-learn-intelex
Then, run the rest of the cells.
Install the following packages:
pip install scikit-learn sklearn-intelex scikit-image numpy matplotlib opencv-python tqdm joblib
Then, run the code.
- Input
32x32x3 => 3072
- Grayscale
32x32x1 => 1024
- HOG
pixels_per_cell=(8, 8), cells_per_block=(2, 2) => 324
- PCA
80% explained variance => 66
- Input -> Grayscaling -> HOG -> PCA -> Stardardization + normalization -> SVM
- Support Vector Machine (SVM) with the radial basis function (KBF) kernel
C = 10
- Scikit-learn modules are used
- This training time of this non-linear SVM grows faster than linear time against the number of samples
- Training takes 3 minutes on Google Colab Free
- Scoring against the test dataset takes 1 minuite