enigmaceo/example-cat-vs-dog-classification-svm
0
Cat vs Dog Classification with SVM
A simple and efficient cat vs dog image classifier using Support Vector Machines.
Features
- Upload & Classify: Upload cat or dog images for instant classification
- Real-time Results: Get predictions with confidence scores
- Clean Architecture: Models loaded from separate Hugging Face repository
How to Use
- Click "Upload Image" to select a cat or dog photo
- View the prediction results with confidence scores
- The model uses HOG, color histogram, and LBP features
Model Information
This application loads the trained SVM model from the Model Repository.
- Model: SVM with RBF kernel (87% accuracy)
- Features: HOG + Color Histogram + LBP
- Training: Balanced dataset of 2000 images
API Endpoints
GET /: Interactive dashboardPOST /api/predict: Image classificationGET /api/health: Service health check
Environment Variables
HF_MODEL_REPO: Model repository name (automatically set)
Technical Stack
- Backend: FastAPI with Python
- Frontend: HTML5 + Tailwind CSS
- Machine Learning: scikit-learn SVM
- Deployment: Docker on Hugging Face Spaces
