This project aims to classify flower species using pretrained deep learning models (EfficientNet, ResNet, and VGG). The classifier can identify the species of a flower from an image and provides a detailed classification.
- Image classification using pretrained models: EfficientNet, ResNet50, and VGG16.
- Supports image input in local file format.
- Implements early stopping to prevent overfitting.
- Python 3.8
- Anaconda or Miniconda for environment management
-
Clone the repository:
git clone https://github.com/yourusername/flower-species-classification.git cd flower-species-classification
-
Create and activate a conda environment:
conda create --name flower-classifier python=3.8 conda activate flower-classifier
-
Install the required packages:
conda install pytorch torchvision numpy tqdm matplotlib
-
Prepare the data:
Ensure your data is organized in the following structure:
flowers/ train/ valid/ test/
-
Train the classifier:
python train.py <data-folder-path> --arch <model-name> --epochs <int> --learning_rate <float> --gpu
-
Evaluate the classifier:
Once the training is complete, the model will be saved as a checkpoint in the specified directory.
python predict.py <image-path> <checkpoint-path> --topk <int> --category_names <json-file-path> --gpu
This project was created as part of the AWS AI ML Nanodegree program.