This project implements a neural network using numpy and scipy to classify cat images from non-cat images. The neural network is built and trained in a Jupyter Notebook. The dataset used for training and testing consists of cat and non-cat images.
The neural network architecture comprises several layers, including linear, ReLU (Rectified Linear Unit), and sigmoid activation functions. It is implemented as a 4-layer neural network with customizable layer dimensions.
cat_image_classification.ipynb: Jupyter Notebook containing the code for the neural network implementation, training, and evaluation.datasets/: Directory containing the dataset for training and testing (train_catvnoncat.h5andtest_catvnoncat.h5).
The project relies on the following libraries:
- NumPy
- SciPy
- h5py
- Matplotlib
- PIL (Python Imaging Library)
- Dataset Preparation: Ensure the dataset (
train_catvnoncat.h5andtest_catvnoncat.h5) is placed in thedatasets/directory. - Jupyter Notebook Execution: Open and execute the
cat_image_classification.ipynbJupyter Notebook to train and evaluate the neural network. - Modify Parameters (Optional): Modify the neural network architecture, learning rate, or number of iterations in the notebook for experimentation.
The trained neural network achieves a certain level of accuracy in classifying cat images from non-cat images. The notebook provides visualizations of the training process, accuracy, and misclassified images.
The rendered site of the notebook can be accessed here.
Contributions, issues, and feature requests are welcome. Feel free to submit a pull request or open an issue for any suggestions or improvements.
This project is licensed under the MIT License.