- Training data: 100 images in per class (15 classes, 1500 images total)
- Test data: 2985 unclassified images
- Uses k-nearest neighbour (k-NN) as the classifier
- Feature extraction:
- Crop image to a central square
- Resize to 16x16 pixels
- Flatten pixels into a vector
- Normalise: zero mean, unit length
- Uses an ensemble of 15 one-vs-all linear classifiers
- Feature extraction:
- Densely sample 8x8 pixel patches (every 4 pixels in x and y directions)
- Mean-centre and normalise before clustering
- Use K-means clustering to form a vocabulary of visual words
- Use Vector quantisation to map patches to visual words
- Uses a Support Vector Machine (SVM) with a Radial Basis Function (RBF) kernel
- Feature extraction:
- Create a filter bank of 32 Gabor filters (8 orientations x 4 scales)
- Convert the images to grayscale
- Apply a Gaussian filter
- Resize to 256x256 pixels while maintaining the original aspect ratio
- Apply the filter bank to each image
- Divide each image into a 4x4 grid, and calculate the mean of each grid cell
- Each cell mean represents a feature, concatenated to form the GIST descriptor
- Given 32 filters and 16 cells per image, each descriptor contains 512 features
- Multiprocessing was used to speed up feature extraction
- Clone the repository
git clone https://github.com/simran-ss-sandhu/Image-Classification-Comparison.git
- Navigate to the project directory
cd Image-Classification-Comparison
- Set up a virtual environment (optional but recommended)
- Windows
python -m venv venv && venv\Scripts\activate
- UNIX (Linux, MacOS, etc.)
python -m venv venv && source venv/bin/activate
- Windows
- Install dependencies
pip install -e .
Start the project by using the following command in the project directory:
python -m image_classification_comparison
- Simran Sandhu
- Henry Card
- James Martin
- Ayush Varshney