How ankit-20285/cats-vs-dogs-cnn-classifier works
This is a small TensorFlow/Keras cats-versus-dogs classifier. Its main workflow trains a CNN from a directory-based image dataset, saves a model, then loads that model to classify images in Prediction_Samples. The README also describes data cleaning and training visualization, but the available source does not show their implementation. Note that train.py saves to the current directory while predict.py loads from Models/.
Main entry points: predict.py Image preprocessing and prediction · train.py Dataset loading and training · cats_vs_dogs.keras Saved model · Prediction_Samples Prediction samples
Components 8
Model training
- Dataset loading and training
train.py - CNN architecture
train.py
Image inference
- Image preprocessing and prediction
predict.py - Cat or dog result
predict.py
Model and samples
- Saved model
Models/cats_vs_dogs.keras - Prediction samples
Prediction_Samples
Other components
- User
- Cat dog dataset
Connections 7
- Dataset loading and training → Cat dog dataset: loads images
train.py - Dataset loading and training → CNN architecture: fits model
train.py - Dataset loading and training → Saved model: saves model
train.py - User → Image preprocessing and prediction: runs
README.md - Image preprocessing and prediction → Saved model: loads model
predict.py - Image preprocessing and prediction → Prediction samples: reads images
predict.py - Image preprocessing and prediction → Cat or dog result: prints label
predict.py