Machine Learning, AI
Cat vs. Dog AI Classifier
Project URL: https://colab.research.google.com/drive/1FVuhVa5wUVTAxHoF_o8hNUNfwk3CAKJx?usp=sharing
This project aims to build a neural network model to distinguish between cats and dogs in images, using the TensorFlow and Keras deep learning frameworks within Google Colab. Libraries Used: The following libraries were utilized for various aspects of the project:
- TensorFlow and Keras: To build and train the neural network model.
- OpenCV: For image preprocessing, including resizing and converting images.
- NumPy: For handling arrays and numerical data manipulation.
- scikit-learn: To split the dataset into training and validation sets.
- Matplotlib: For visualizing the data and training progress.
- TQDM: For creating progress bars during data loading and processing.
train_test_split
from scikit-learn.
Model Architecture:
A sequential neural network model was designed, incorporating convolutional layers (Conv2D), pooling layers (MaxPooling2D), and dense layers for feature extraction and classification. The model was compiled using the binary cross-entropy loss function since the task involves a binary classification—either cat or dog. The Adam optimizer was used to ensure efficient convergence.
model.compile(loss='binary_crossentropy',
optimizer='adam',
metrics=['accuracy'])