Convolutional Neural Network (CNN) built with TensorFlow/Keras to classify cat and dog images, achieving 68.0% accuracy.
This project involves building, training, and optimizing a Convolutional Neural Network (CNN) to correctly classify images of cats and dogs. This challenge was completed as part of the freeCodeCamp Machine Learning with Python Certification.
- Final Accuracy: 68.0% (Passed the required 63% threshold).
- Methodology: Used Transfer Learning principles and Keras for rapid model prototyping and training.
- Primary Language: Python
- Frameworks: TensorFlow 2.x, Keras
- Libraries: NumPy, Matplotlib
- Environment: Google Colaboratory (GPU Acceleration)
The final model was optimized to prevent overfitting on the small dataset through aggressive regularization and architectural deepening.
- Deep CNN Structure: A 4-block stack of
Conv2DandMaxPooling2Dlayers (with filters up to 256) was used to ensure the model had enough capacity to extract complex features. - Data Augmentation: The training dataset was artificially expanded using random image transformations (rotation, zoom, flips) to increase diversity and prevent memorization.
- Aggressive Regularization: Dropout layers (set to 0.4) were placed after every
MaxPooling2Dlayer in the feature extraction stack, forcing the model to generalize and avoid overreliance on specific patterns.
Click the link below to view the executable Google Colab notebook.