![ExamplePot](https://private-user-images.githubusercontent.com/94445094/336947634-e2525b32-0a72-4f3a-bc5a-5e59842b15cc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ5NzI1MDQsIm5iZiI6MTcyNDk3MjIwNCwicGF0aCI6Ii85NDQ0NTA5NC8zMzY5NDc2MzQtZTI1MjViMzItMGE3Mi00ZjNhLWJjNWEtNWU1OTg0MmIxNWNjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI5VDIyNTY0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTEzYjAzZjM2M2I2ZjAxNmQ1Y2JkNzMzY2VhYTUzNTQ1OTJmZjdlMzdmYzFkMzY4NDIxMzgwOThjZWE4MjA3OGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.TWGrnFKkHjXt-iYTRJTCYCOfgMaXwZ6HPGSRWIIIZNk)
This is a Convolutional Neural Network (CNN) model developed for educational purposes using TensorFlow and Keras to create, train, and evaluate deep neural networks. The model is designed to classify images of cats and dogs, leveraging a dataset provided by TensorFlow.
The dataset consists of 2000 images of cats and dogs for training and 1000 images for validation, organized into separate directories for each purpose. Before training, the images are resized to 160x160 pixels. Color values in the images are normalized to a range between 0 and 1.
You can see more about the dataset by clicking here.
Or just download it here.
The CNN model consists of several layers:
- Rescaling Layer: Rescales the input images to the desired size.
- Convolutional Layers: Convolutional layers with ReLU activation functions to introduce non-linearity.
- MaxPooling Layers: Downsamples the feature maps generated by the convolutional layers.
- Flatten Layer: Flattens the output of the convolutional layers into a 1-dimensional array.
- Dense Layers: Fully connected layers with ReLU activation functions.
- Output Layer: A single node with a sigmoid activation function for binary classification (0 for cat, 1 for dog).
The model is trained using the Adam optimizer with binary cross-entropy loss. Training occurs over 20 epochs with a batch size of 32.
To use the model, you can either download the model and load it in your code using the following command:
model = tf.keras.models.load_model('path/to/model')
Alternatively, you can create a copy of the ImageClassification.ipynb notebook and run/manipulate the entire code (including training).
After training, the model's performance can be evaluated by visualizing predictions on a test dataset. The plot_dataset_predictions
function generates a visualization of 9 predictions as images, comparing them with their ground truth labels.
This model is still under development. The next steps involve evaluating the quality of the generated model by applying metrics to our validation dataset. After analyzing the performance and accuracy of the model training, I will need to address any related issues found. For example, to find a way to prevent overfitting.
Additionally, I plan to apply transfer learning to this model, leveraging pre-trained models in TensorFlow for similar training tasks.
- TensorFlow
- Matplotlib