Sure! Below is the template for the README file based on the provided code:
- Description
- Getting Started
- Prerequisites
- Installation
- Usage
- Model Training
- Results
- Contributing
- License
- Contact
This project is part of Homework 1 of Artificial Neural Networks and Deep Learning(AN2DL) course at Politecnico di Milano (A.Y 22/23) and focuses on image classification using transfer learning with various pre-trained models such as ResNet50, ResNet152, and EfficientNetB4. The goal is to classify images into one of the eight categories.
To get started with the project, you can clone this repository to your local machine:
git clone https://github.com/kiarashRezaei/PlantClassification-CNN.git
To run the code, you will need the following dependencies:
- Python 3.x
- Jupyter Notebook
- TensorFlow
- Keras
- NumPy
- Pandas
- Matplotlib
- OpenCV
- PIL (Python Imaging Library)
You can install the required packages using the following command:
pip install tensorflow numpy pandas matplotlib opencv-python pillow
After installing the dependencies, download the training dataset zip file ('training_dataset_homework1.zip') and place it in the project directory.
- Open the 'Homework_1_Image_Classification.ipynb' notebook in Jupyter Notebook.
- Run the cells in the notebook sequentially to perform the following tasks:
- Extract the training dataset from the zip file.
- Preprocess the images and split them into training and validation sets.
- Create and train transfer learning models using ResNet50 and ResNet152 architectures.
- Evaluate the model performance and visualize the training/validation loss and accuracy.
The code uses transfer learning with pre-trained models (ResNet50, ResNet152, EfficientNetB4) for image classification. The models are fine-tuned with custom dense layers to adapt to the specific classification task.
The project evaluates the model's performance on the validation set, providing metrics such as loss and accuracy. Additionally, it visualizes the training and validation loss/accuracy over epochs to monitor model training.
Contributions to this project are welcome. If you find any bugs or have suggestions for improvements, please submit an issue or create a pull request.
This project is licensed under the MIT License.
For any questions or inquiries related to this project, you can contact Kiarash Rezaei.