This project implements a Convolutional Neural Network (CNN) to classify images from the CIFAR-10 dataset. The project is structured into several Python scripts, each responsible for different parts of the workflow: data loading and preprocessing, model building, model training, model evaluation, and utility functions.
data_loading_and_preprocessing.py
: Contains code for loading the CIFAR-10 dataset, preprocessing the data, and visualizing class distributions.model_building.py
: Defines and compiles the CNN architecture.model_training.py
: Contains code for training the CNN model with data augmentation and early stopping.model_evaluation.py
: Evaluates the model's performance and visualizes predictions.utility_functions.py
: Contains additional utility functions, such as creating a DenseNet model.
- Python 3.x
- TensorFlow 2.x
- Keras
- NumPy
- Matplotlib
- Scikit-learn
- Clone the repository to your local machine.
- Navigate to the project directory.
- Install the required packages using pip:
pip install tensorflow keras numpy matplotlib scikit-learn
Run data_loading_and_preprocessing.py
to load and preprocess the CIFAR-10 dataset:
python data_loading_and_preprocessing.py
Run model_building.py
to define and compile the CNN architecture:
python model_building.py
Run model_training.py
to train the CNN model:
python model_training.py
Run model_evaluation.py
to evaluate the model's performance and visualize predictions:
python model_evaluation.py
utility_functions.py
contains additional utility functions for creating models and visualizing the neural network. You can run and modify it as needed for your specific use cases.
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
- The CIFAR-10 dataset is publicly available and provided by the Canadian Institute for Advanced Research.
- This project uses TensorFlow and Keras for building and training the neural network.