This project demonstrates a TensorFlow-based image classification pipeline, including data preprocessing, augmentation, model building, and training using Convolutional Neural Networks (CNNs). The dataset consists of images stored in Google Drive, categorized into different classes for training and testing.
It is just a baby step in my long journey to be professional in deep learning, I hope it helps beginners who are curios about deep learning.
- Tensor Operations: Introduction to TensorFlow tensors and basic operations.
- Data Loading: Fetching and organizing image data from Google Drive.
- Data Preprocessing: Resizing, converting to RGB, and structuring datasets for model training.
- Data Augmentation: Enhancing dataset diversity using flipping, rotation, and zooming.
- CNN Model Construction: A sequential CNN model with multiple convolutional, pooling, dropout, and dense layers.
- Model Training and Evaluation: Using the CIFAR-10 dataset for training and visualization of accuracy and loss.
- Model Saving: Exporting the trained model for future use.
- Google Colab or a local machine with TensorFlow installed
- Python 3.x
- Required libraries:
pip install tensorflow opencv-python numpy matplotlib scikit-learn imutils
- TensorFlow-TUT_Ali.ipynb: Main script for data loading, preprocessing, model building, and training.
- cnn_model.h5: Trained model saved for future inference.
- Mount Google Drive: Ensure images are stored in
/content/drive/MyDrive/animal_database/. - Run
TensorFlow-TUT_Ali.ipynb: Execute the script to preprocess images, train the model, and visualize results. - Model Evaluation: Inspect training history and validate performance.
-
The model's accuracy and loss are plotted during training.
-
The final trained model can be used for classification tasks.
- Implementing hyperparameter tuning.
- Experimenting with different CNN architectures.
- Adding more augmentation techniques to improve generalization.
Ali Magdi
This project is open-source and free to use for educational and research purposes.

