Skip to content

shimantranjan/animal_classifier

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

29 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐾 Animal Skin Disease Classifier API

This project is a FastAPI-based backend that classifies common skin conditions in dogs, cats, and cows using pre-trained TensorFlow/Keras models.
It also provides medicine suggestions for the predicted disease using Gemini (via med.py). NOTE: Create and load your own Gemini api key before running the app.


πŸš€ Features

  • Image upload support (.jpg, .png, .jpeg)
  • Lazy model loading for efficient memory usage
  • Supported animals:
    • 🐢 Dogs β†’ Demodicosis, Dermatitis, Fungal Infection, Hypersensitivity, Ringworm, Healthy
    • 🐱 Cats β†’ Flea Allergy, Ringworm, Scabies, Healthy
    • πŸ„ Cows β†’ Lumpy Skin, Healthy
  • Normalizes inconsistent labels
  • Fetches medicine suggestions using Gemini

πŸ“‚ Project Structure

.
β”œβ”€β”€ app.py              # Main FastAPI application
β”œβ”€β”€ model_loader.py     # Handles lazy loading of Keras models
β”œβ”€β”€ utils.py            # Utility functions (e.g., image preprocessing)
β”œβ”€β”€ med.py              # Gemini API integration for medicine suggestions
β”œβ”€β”€ Dog.keras           # Pre-trained dog model
β”œβ”€β”€ cat.keras           # Pre-trained cat model
β”œβ”€β”€ cow.keras           # Pre-trained cow model
β”œβ”€β”€ requirements.txt    # Python dependencies
└── README.md           # Project documentation


---

## βš™οΈ Installation & Running

```bash
git clone https://github.com/ankitkr1375/animal_classifier.git
cd animal_classifier

python -m venv venv
# Windows
venv\Scripts\activate
# Mac/Linux
source venv/bin/activate

pip install -r requirements.txt
venv\Scripts\activate
uvicorn main:app --reload
streamlit run app.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.5%
  • Procfile 0.5%