This is a project that makes use of a deep CNN in order to classify animal images into the big 5 South African Animals
# Big Five Image Recognition Project
A project by Mihir Arjun
## Table of Contents
- Image Recognition for Classifying the Big Five Animals of South Africa
- Data Preparation and Cleaning
- Loading and Visualising the Data
- Data Scaling
- Splitting the Data
- Building the Deep Learning Model
- Training the Model
- Plotting Model Performance
- Evaluating the Model
- Testing the Model
- Summary
## Image Recognition for Classifying the Big Five Animals of South Africa
This project focuses on classifying images of the Big Five animals of South Africa using a Convolutional Neural Network (CNN) built with TensorFlow and Keras. The Big Five includes buffalo, elephant, leopard, lion, and rhino. The guide provides a step-by-step approach to building, training, and deploying a CNN for this classification task.
## Data Preparation and Cleaning
- **Image Validation:** Validate each image using OpenCV to ensure it is not corrupted.
- **Format Verification:** Verify the image file type against supported formats.
- **Removal of Invalid Images:** Remove corrupted or unsupported images to maintain dataset integrity.
## Loading and Visualising the Data
Use TensorFlow's `image_dataset_from_directory` utility to load images and automatically infer labels based on subdirectory names. Visualise a few sample images to verify correct loading and labeling.
## Data Scaling
- **Normalising Pixel Values:** Normalise pixel values to a range between 0 and 1 by dividing by 255.0.
- **Verifying Scaling:** Fetch and visualise a batch of images post-normalisation to ensure proper scaling.
## Splitting the Data
Split the dataset into:
1. **Training Set (70%)**: For model training.
2. **Validation Set (20%)**: For hyperparameter tuning and monitoring.
3. **Test Set (10%)**: For final performance evaluation.
## Building the Deep Learning Model
- **Initialising the Model:** Create a Sequential model using Keras.
- **Adding Convolutional and Pooling Layers:** Extract spatial features and …