Frough11/animal-classification
0
1---2title: Animal Classification3emoji: π4colorFrom: red5colorTo: red6sdk: docker7app_port: 85018tags:9- streamlit10pinned: false11short_description: A system that can identify animal in the given image.12license: mit13---14# Animal Image Classification15 16A 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.17 18---19 20## Overview21 22This project demonstrates image classification using transfer learning. Users can upload an image, and the app predicts the animal category with a confidence score.23 24---25 26## Features27 28- **Transfer Learning**: EfficientNetB0 model trained on a labeled animal image dataset.29- **Streamlit Web App**: Simple and intuitive interface for users to upload and classify images.30- **Ready for Deployment**: Easily deployable to Hugging Face Spaces.31 32---33 34## Supported Animal Classes35 36- Bear37- Bird38- Cat39- Cow40- Deer41- Dog42- Dolphin43- Elephant44- Giraffe45- Horse46- Kangaroo47- Lion48- Panda49- Tiger50- Zebra51 52---53 54## Project Structure55 56```57animal-image-classification/58βββDataset # Folder containing 15 categories of animal images59βββ app.py # Streamlit application60βββ efficientnetb0_best.h5 # Pretrained model (EfficientNetB0)61βββ mobilenetv2_best.h5 # Optional pretrained model62βββ ml animal classification.ipynb # Training notebook63βββ requirements.txt # Dependencies64βββ Image Classification of animals.pdf # Project summary65βββ README.md # Project documentation66```67 68---69 70## Getting Started71 72### 1. Clone the Repository73 74```bash75git clone https://github.com/Hurmath123/animal-image-classifier.git76cd animal-image-classifier77```78 79### 2. Set Up a Virtual Environment80 81```bash82python -m venv venv83source venv/bin/activate # Windows: venv\Scripts\activate84```85 86### 3. Install Dependencies87 88```bash89pip install -r requirements.txt90```91 92### 4. Run the App93 94```bash95streamlit run app.py96```97 98---99 100## Deploy to Hugging Face101 1021. Go to [Hugging Face Spaces](https://huggingface.co/spaces)1032. Click **Create new Space** β Choose **Streamlit** and **Python**1043. Upload:105 - `app.py`106 - `efficientnetb0_best.h5`107 - `requirements.txt`108 1094. The app will auto-deploy once all files are uploaded.110 111---112 113## π Dataset114 115The model was trained on [Frough11/animal_classes](https://huggingface.co/datasets/Frough11/animal_classes), a folder-based image classification dataset.116 117---118 119## Author120Frough Hurmath S121**Hurmath123** 122[GitHub Profile](https://github.com/Hurmath123)123 124---125 126## License127 128This project is licensed under the [MIT License](LICENSE).129 130 