Skip to content

000jd/FlowerResNet

Repository files navigation

FlowerResNet

This GitHub project showcases the classification of flower images using a custom ResNet model implemented in PyTorch. The Flowers-299 dataset, consisting of 299 flower classes, is utilized for training and evaluation. The project covers various aspects including data preprocessing, model training with SGD optimizer, validation, and model checkpointing for reusability.

Features

  • Custom ResNet model for flower image classification
  • Data preprocessing with resizing, normalization, and augmentation
  • Training using Stochastic Gradient Descent (SGD) optimizer
  • Validation during training for monitoring model performance
  • Checkpointing to save and load model for future use

Demo

Live Demo
App Screenshot

Accuracy and Loss Graphs

Accuracy Screenshot

Loss Screenshot

Accuracy and Loss Graphs of quantized Mode

Accuracy Screenshot

Loss Screenshot

Usage

To run the Streamlit application download the model and put it in the base diractry and runthe command.

    Streamlit run 1_🔮_Flower_Prediction.py

Usage

To use this project, follow these steps:

  1. Clone the repository and install the required dependencies.

        pip install -r requirements.txt
  2. Prepare the dataset:

    • Download the Flowers-299 dataset and place it in the data/flowers-299 directory.
    • Ensure the dataset is structured with separate folders for each class.
  3. Train the model:

    • Adjust the hyperparameters in the training script according to your requirements.
    • Start the training process.
        python train.py
  4. Evaluate the model:

    • Adjust the paths in the evaluation script to point to the trained model checkpoint and test dataset.
    • Run the evaluation script to assess the model's performance on the test dataset.
        python evaluate.py
  5. Use the model for predictions:

    • Adjust the paths in the prediction script to point to the trained model checkpoint and the image you want to classify.
    • Run the prediction script to make predictions using the trained model.
        python predict.py

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.

Acknowledgements

We would like to thank the creators of the Flowers-299 dataset for providing the valuable data for this project.

References

About

This GitHub project classifies flower images using a custom ResNet model implemented in PyTorch. The Flowers-299 dataset with 299 flower classes is utilized. It includes data preprocessing, training with SGD, validation, and model checkpointing for reusability. The project offers insights into image classification and serves as a valuable resource.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages