Skip to content

This project compares traditional Bag-of-Words with SVM and a custom ResNet-style CNN for image classification on the CIFAR-10 dataset. It covers the full workflow: feature extraction, model building, training, evaluation, and visualization. Results demonstrate the superior accuracy and robustness of deep learning models over classic ML pipelines.

Notifications You must be signed in to change notification settings

KashifMoin1410/Computer-Vision-Traditional-vs.-Deep-Learning-Approaches

Repository files navigation

Comparative Analysis of Traditional and Neural Network-Based Computer Vision Techniques

Overview

This project delves into a comparative study between traditional computer vision methods and deep learning-based neural network approaches. By implementing and evaluating both techniques on the CIFAR-10 dataset, the study aims to highlight their respective strengths, limitations, and suitability for various image classification tasks.

Dataset

  • Name: CIFAR-10
  • Description: The CIFAR-10 dataset consists of 60,000 32x32 color images in 10 different classes, with 6,000 images per class. It is divided into 50,000 training images and 10,000 test images.
  • Source: CIFAR-10 Dataset

Objective

To implement and compare traditional computer vision techniques with deep learning-based neural networks for image classification, analyzing their performance, complexity, and applicability.

Methodology

1. Traditional Computer Vision Approach

  • Feature Extraction: Utilized hand-crafted features such as Histogram of Oriented Gradients (HOG) and Scale-Invariant Feature Transform (SIFT).

  • Classification: Implemented classifiers like Support Vector Machines (SVM) and k-Nearest Neighbors (k-NN) on the extracted features.

  • Evaluation: Assessed performance based on accuracy, precision, recall, and F1-score.

    2. Neural Network-Based Approach

  • Model Architecture: Developed an enhanced ResNet architecture tailored for the CIFAR-10 dataset.

  • Training: Trained the model using backpropagation and stochastic gradient descent, incorporating techniques like data augmentation and dropout for regularization.

  • Evaluation: Measured performance using the same metrics as the traditional approach for a fair comparison.

Results

The comparative analysis revealed that while traditional methods are computationally less intensive and easier to interpret, they often fall short in accuracy compared to deep learning models. The enhanced ResNet model demonstrated superior performance in classifying complex images, albeit at the cost of higher computational resources and longer training times.

Approach Accuracy Macro Precision Macro Recall Macro F1-Score
Traditional (BoW + SVM) 53.4% 0.533 0.533 0.533
ResNet-style CNN 91.2% 0.912 0.912 0.912
  • Traditional (BoW + SVM): Bag-of-Visual-Words pipeline using Dense SIFT features, MiniBatchKMeans clustering, TF-IDF normalization, and RBF SVM.

  • ResNet-style CNN: Custom convolutional neural network with SE blocks, MixUp augmentation, and label smoothing.

The deep learning approach dramatically outperforms the traditional pipeline across all metrics, confirming the superiority of modern CNN architectures for image classification tasks on CIFAR-10.

Dependencies

  • Python 3
  • NumPy
  • OpenCV
  • scikit-learn
  • TensorFlow / Keras
  • Matplotlib

Future Enhancements

  • Incorporate additional traditional feature extraction methods for a broader comparison.
  • Experiment with different neural network architectures like VGGNet and Inception for varied insights.
  • Extend the study to include other datasets for generalizability.

Acknowledgements

  • CIFAR-10 Dataset
  • TensorFlow and Keras for providing robust deep learning frameworks.
  • OpenCV and scikit-learn for traditional computer vision and machine learning tools.

About

This project compares traditional Bag-of-Words with SVM and a custom ResNet-style CNN for image classification on the CIFAR-10 dataset. It covers the full workflow: feature extraction, model building, training, evaluation, and visualization. Results demonstrate the superior accuracy and robustness of deep learning models over classic ML pipelines.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published