https://github.com/kashifmoin1410/computer-vision-traditional-vs.-deep-learning-approaches
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.
https://github.com/kashifmoin1410/computer-vision-traditional-vs.-deep-learning-approaches
bag-of-words cifar10 cnn comparative-analysis computer-vision deep-learning feature-extraction image-classification keras knn-classification machine-learning model-evaluation neural-network python3 resnet scikit-learn sift-algorithm svm-classifier
Last synced: 4 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/kashifmoin1410/computer-vision-traditional-vs.-deep-learning-approaches
- Owner: KashifMoin1410
- Created: 2025-05-24T20:39:52.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-05-24T20:59:46.000Z (5 months ago)
- Last Synced: 2025-05-24T21:30:33.515Z (5 months ago)
- Topics: bag-of-words, cifar10, cnn, comparative-analysis, computer-vision, deep-learning, feature-extraction, image-classification, keras, knn-classification, machine-learning, model-evaluation, neural-network, python3, resnet, scikit-learn, sift-algorithm, svm-classifier
- Language: Jupyter Notebook
- Homepage: https://www.cs.toronto.edu/~kriz/cifar.html
- Size: 0 Bytes
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **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](https://www.cs.toronto.edu/~kriz/cifar.html)## **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](https://www.cs.toronto.edu/~kriz/cifar.html)
* TensorFlow and Keras for providing robust deep learning frameworks.
* OpenCV and scikit-learn for traditional computer vision and machine learning tools.