A comprehensive deep learning project exploring different approaches to classify car models from images. This project implements and compares three distinct methodologies for fine-grained visual classification of 196 different car models. The project demonstrates:
- Advanced transfer learning techniques with EfficientNetV2L
- Novel application of KNN with deep embeddings
- Custom implementation of ResNet architecture
- Systematic experimentation with model architectures and hyperparameters
- Comprehensive evaluation using multiple performance metrics
- Environment Setup
- Dataset
- Project Structure
- Methodologies
- Results
- Technical Details
- Future Work
- Contributing
- License
This project is designed to run in Google Colab, leveraging its GPU capabilities for efficient model training. The notebook includes all necessary setup steps:
- Google Drive mounting for data persistence
- Directory structure creation
- Required package installation
- GPU runtime configuration
The Stanford Cars Dataset provides a challenging benchmark for fine-grained visual classification:
- 196 unique car classes (make, model, year)
- 8,152 training images (split into training and validation)
- 8,048 test images
- Diverse image conditions:
- Various lighting conditions
- Different angles and perspectives
- Complex backgrounds
- Multiple scales and resolutions
The project is organized to maintain clear separation between data, models, and documentation:
Google Drive/
└── [Project Directory]/
├── dataset/ # Image data
├── models/ # Saved models
├── final_project.ipynb # Main notebook
└── annotations.xlsx # Class metadata
dataset/ and models/ directories can be created using designated notebook cells
Exploration of transfer learning approaches using EfficientNetV2L as the backbone:
-
Base Architecture
- Minimalist approach with single dense layer
- Moderate regularization
- Baseline for performance comparison
-
Enhanced Capacity
- Deeper architecture with multiple dense layers
- Hierarchical feature learning
- Increased model expressiveness
-
High Regularization
- Aggressive dropout strategy
- Focus on generalization
- Overfitting prevention
An innovative hybrid approach combining deep learning feature extraction with traditional machine learning:
- Feature extraction using EfficientNetV2L
- Exploration of neighborhood dynamics:
- Tight neighborhoods (k=3) for precision
- Balanced approach (k=5) for general cases
- Broad context (k=10) for robustness
Implementation of residual networks with systematic depth variation:
-
Architecture Philosophy:
- Skip connections for gradient flow
- Batch normalization for training stability
- Strategic depth increases
-
Depth Configurations:
- Shallow (3 blocks): Fast and efficient
- Medium (5 blocks): Balanced complexity
- Deep (7 blocks): Maximum feature hierarchy
Comprehensive image preprocessing pipeline:
- Standardized sizing (224x224)
- Advanced augmentation techniques
- Normalization and standardization
- Efficient data loading and caching
Carefully crafted training configuration:
- Optimized batch sizes for GPU memory
- Strategic learning rate management
- Multi-metric evaluation
- Performance monitoring and validation
Focus on efficient resource utilization:
- GPU memory management
- Data pipeline optimization
- Strategic model checkpointing
- Training time optimization
[Coming soon: Comprehensive comparison of model performances, including:
- Accuracy metrics across architectures
- Training dynamics analysis
- Resource utilization comparison
- Error analysis and insights]
Potential areas for exploration and improvement:
- Advanced data augmentation strategies
- Model ensemble techniques
- Architecture optimization
- Performance enhancement methods
Idan David Or Lavi Senior Data Scientist
- Stanford Cars Dataset creators
- TensorFlow and Google Colab teams
- Kaggle community
- GPU: Google Colab (Tesla T4/P100)
- RAM: 12GB+ (Colab provided)
- Storage: Google Drive space for dataset
- The notebook is optimized for Google Colab's GPU runtime
- Training times may vary based on Colab's GPU availability
- Consider using Colab Pro for more consistent GPU access