A simple implementation of multi-stage image classification using support vector machine (SVM). Further classification using Feature Vector and Softmax score are done using SVM
(This is not a deployment-ready code as much of the files are redacted)
Libraries include numpy, pandas, tensorflow, matplotlib
- alexnetG2.py - Main Alexnet implementation using the pretrained weights from the model zoo. The pretrained weights are related to ImageNet
- datagenerator.py - On-the-fly data generator for training
- caffe_classes.py - Contains the classes script for training
- finetune.py - Main implementation of the whole training pipeline using softmax
- testing.py - Sample script to perform the model testing using TF1
SVM_FeatureVector.ipynb
- Features from the penultimate layer are extracted and a linear SVM is training for 2 class classification
SVM_SoftmaxScore.ipynb
- Final layer scores are extracted to be using in SVM as input. The classes are separated using a hyperplane which is trained according to the distances from the score of the classes.
Name: Prem Kumar Date: 7th June 2021
Please do reach out if more information or any help is required in running these files. Keep in mind that these files are reserved as a guide only.