CoolFace
Apppublic

Frough11/animal-classification

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

Animal Image Classification

A deep learning web application that classifies animal images into 15 categories using a fine-tuned EfficientNetB0 model. Built with TensorFlow and Streamlit, and deployable on Hugging Face Spaces.


Overview

This project demonstrates image classification using transfer learning. Users can upload an image, and the app predicts the animal category with a confidence score.


Features

  • Transfer Learning: EfficientNetB0 model trained on a labeled animal image dataset.
  • Streamlit Web App: Simple and intuitive interface for users to upload and classify images.
  • Ready for Deployment: Easily deployable to Hugging Face Spaces.

Supported Animal Classes

  • Bear
  • Bird
  • Cat
  • Cow
  • Deer
  • Dog
  • Dolphin
  • Elephant
  • Giraffe
  • Horse
  • Kangaroo
  • Lion
  • Panda
  • Tiger
  • Zebra

Project Structure

animal-image-classification/
├──Dataset                         # Folder containing 15 categories of animal images
├── app.py                         # Streamlit application
├── efficientnetb0_best.h5         # Pretrained model (EfficientNetB0)
├── mobilenetv2_best.h5            # Optional pretrained model
├── ml animal classification.ipynb # Training notebook
├── requirements.txt               # Dependencies
├── Image Classification of animals.pdf  # Project summary
└── README.md                      # Project documentation

Getting Started

1. Clone the Repository

bash
git clone https://github.com/Hurmath123/animal-image-classifier.git
cd animal-image-classifier

2. Set Up a Virtual Environment

bash
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

3. Install Dependencies

bash
pip install -r requirements.txt

4. Run the App

bash
streamlit run app.py

Deploy to Hugging Face

  1. 1.Go to Hugging Face Spaces
  2. 2.Click Create new Space → Choose Streamlit and Python
  3. 3.Upload:
  4. 4.app.py
  5. 5.efficientnetb0_best.h5
  6. 6.requirements.txt
  1. 1.The app will auto-deploy once all files are uploaded.

📁 Dataset

The model was trained on Frough11/animal_classes, a folder-based image classification dataset.


Author

Frough Hurmath S Hurmath123 GitHub Profile


License

This project is licensed under the MIT License.