{"id":29092199,"url":"https://github.com/sumlgrupa4/pet_breed_classifier","last_synced_at":"2026-05-04T08:43:12.503Z","repository":{"id":301605608,"uuid":"1009652973","full_name":"SUMLgrupa4/Pet_Breed_Classifier","owner":"SUMLgrupa4","description":"Interactive web app for classifying dog and cat breeds from images using AutoGluon. Features model training, validation, Docker deployment, and CI/CD with GitHub Actions. Hosted on Hugging Face Spaces","archived":false,"fork":false,"pushed_at":"2025-06-27T20:32:06.000Z","size":292,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-27T20:33:57.091Z","etag":null,"topics":["autogluon","ci-cd","docker","hugging-face","mashine-learning","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SUMLgrupa4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-27T13:37:31.000Z","updated_at":"2025-06-27T20:32:09.000Z","dependencies_parsed_at":"2025-06-27T19:24:31.233Z","dependency_job_id":"9e97c901-ac0d-496d-afef-0574addea46a","html_url":"https://github.com/SUMLgrupa4/Pet_Breed_Classifier","commit_stats":null,"previous_names":["rutkowskakarolina/pet_breed_classifier","sumlgrupa4/pet_breed_classifier"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SUMLgrupa4/Pet_Breed_Classifier","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUMLgrupa4%2FPet_Breed_Classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUMLgrupa4%2FPet_Breed_Classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUMLgrupa4%2FPet_Breed_Classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUMLgrupa4%2FPet_Breed_Classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SUMLgrupa4","download_url":"https://codeload.github.com/SUMLgrupa4/Pet_Breed_Classifier/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SUMLgrupa4%2FPet_Breed_Classifier/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278551497,"owners_count":26005386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autogluon","ci-cd","docker","hugging-face","mashine-learning","streamlit"],"created_at":"2025-06-28T07:03:57.671Z","updated_at":"2025-10-06T02:46:28.775Z","avatar_url":"https://github.com/SUMLgrupa4.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: Pet Breed Classifier\nemoji: 🐾\ncolorFrom: blue\ncolorTo: purple\nsdk: streamlit\nsdk_version: 1.28.0\napp_file: app.py\npinned: false\nlicense: mit\npython_version: \"3.9\"\n---\n\n# Pet Breed Classifier 🐾\n\nA machine learning model that classifies pet breeds from images using AutoGluon and Streamlit. This project includes a complete CI/CD pipeline for automated training and deployment.\n\n## 🚀 Features\n\n- **23 Pet Breeds**: Classify popular dog and cat breeds\n- **High Accuracy**: 92.54% overall accuracy\n- **Fast Inference**: Real-time predictions with confidence scores\n- **Beautiful UI**: Modern Streamlit interface\n- **CI/CD Pipeline**: Automated training and deployment\n- **Training Results**: Confusion matrix, classification reports, and model analysis\n\n## 📊 Model Performance\n\n- **Overall Accuracy**: 92.54%\n- **Average Precision**: 0.92\n- **Average Recall**: 0.91\n- **Average F1-Score**: 0.91\n- **Supported Breeds**: 23 (Dogs \u0026 Cats)\n\n## 🛠️ Technologies\n\n- **AutoGluon**: Multi-modal deep learning framework\n- **Streamlit**: Web application framework\n- **Python 3.9+**: Core programming language\n- **GitHub Actions**: CI/CD automation\n- **Docker**: Containerization\n\n## 📁 Project Structure\n\n```\nPet_Breed_Classifier-master/\n├── .github/workflows/          # CI/CD workflows\n│   ├── train-and-deploy.yml    # Training and deployment workflow\n│   ├── tests.yml               # Testing workflow\n│   ├── ci.yml                  # Continuous integration\n│   └── cd.yml                  # Continuous deployment\n├── scripts/                    # Training scripts\n│   ├── preprocess.py           # Data preprocessing\n│   ├── train_model.py          # Model training\n│   ├── validate_model.py       # Model validation\n│   └── fetch_data.py           # Data fetching\n├── models/                     # Trained models\n├── outputs/                    # Training results\n├── data/                       # Training data\n│   ├── pet_breeds/             # Pet images by breed\n│   └── metadata/               # Labels and metadata\n├── app.py                      # Web application\n├── run_pipeline.py             # Complete training pipeline\n├── requirements.txt            # Python dependencies\n├── docker-compose.yml          # Docker configuration\n├── Dockerfile.optimized        # Optimized Docker image\n├── Dockerfile.production       # Production Docker image\n└── README.md                   # This file\n```\n\n## 🚀 Quick Start\n\n### Option 1: GitHub Actions (Recommended)\n\n1. **Push to GitHub** - The workflows will run automatically\n2. **Set up secrets** (see Setup section below)\n3. **Monitor progress** in the Actions tab\n\n### Option 2: Local Development\n\n1. **Clone the repository**\n   ```bash\n   git clone \u003cyour-repo-url\u003e\n   cd Pet_Breed_Classifier-master\n   ```\n\n2. **Install dependencies**\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Fetch training data**\n   ```bash\n   python scripts/fetch_data.py\n   ```\n\n4. **Run the training pipeline**\n   ```bash\n   python run_pipeline.py\n   ```\n\n5. **Launch the Streamlit app**\n   ```bash\n   streamlit run app.py\n   ```\n\n### Option 3: Docker Deployment\n\n```bash\n# Build and run with Docker Compose\ndocker-compose up --build\n\n# Or run with Docker directly\ndocker build -f Dockerfile.production -t pet-breed-classifier .\ndocker run -p 8501:8501 pet-breed-classifier\n```\n\n## 🔧 Setup\n\n### GitHub Actions Setup\n\n1. **Add GitHub Secrets**\n   - Go to your GitHub repository → Settings → Secrets and variables → Actions\n   - Add the following secrets:\n     - `KAGGLE_USERNAME`: Your Kaggle username\n     - `KAGGLE_KEY`: Your Kaggle API key\n     - `DOCKER_USERNAME`: Your Docker Hub username\n     - `DOCKER_PASSWORD`: Your Docker Hub password/token\n\n2. **Trigger Workflows**\n   - **Automatic**: Push to `main` or `develop` branch\n   - **Manual**: Go to Actions tab → Select workflow → Run workflow\n\n### Available Workflows\n\n#### 1. **Model Training and Deployment** (`train-and-deploy.yml`)\n- ✅ Fetches training data from Kaggle\n- ✅ Trains the model using your pipeline\n- ✅ Builds Docker image with trained model\n- ✅ Saves artifacts for later use\n\n#### 2. **Basic Tests** (`tests.yml`)\n- ✅ Tests all imports (Streamlit, PyTorch, AutoGluon)\n- ✅ Tests data fetching functionality\n- ✅ Tests preprocessing pipeline\n- ✅ Tests Docker build process\n- ✅ Validates app functionality\n\n## 🐳 Docker Images\n\n### Available Dockerfiles\n\n- **`Dockerfile.optimized`**: Space-efficient build with multi-stage optimization\n- **`Dockerfile.production`**: Production-ready with security features\n- **`Dockerfile.training`**: Training-specific with all dependencies\n\n### Building Images\n\n```bash\n# Optimized build (recommended)\ndocker build -f Dockerfile.optimized -t pet-breed-classifier:latest .\n\n# Production build\ndocker build -f Dockerfile.production -t pet-breed-classifier:prod .\n\n# Training build\ndocker build -f Dockerfile.training -t pet-breed-classifier:training .\n```\n\n### Running Containers\n\n```bash\n# Run with volume mounts (recommended)\ndocker run -d \\\n  -p 8501:8501 \\\n  -v $(pwd)/data:/app/data \\\n  -v $(pwd)/models:/app/models \\\n  -v $(pwd)/outputs:/app/outputs \\\n  --name pet-breed-classifier \\\n  pet-breed-classifier:latest\n\n# Run with Docker Compose\ndocker-compose up --build -d\n```\n\n## 📈 Training Results\n\nAfter each training run, the following artifacts are generated:\n\n### 📊 Confusion Matrix\n- Visual representation of model predictions vs actual labels\n- Helps identify which breeds are most/least accurately classified\n\n### 📋 Classification Report\n- Detailed precision, recall, and F1-score for each breed\n- Overall model performance metrics\n\n### 📊 Model Analysis\n- Model size and complexity analysis\n- Training time and resource usage\n\n### 🎯 Final Assessment\n- Summary of model performance\n- Recommendations for improvement\n\n## 🔍 Troubleshooting\n\n### Common Issues\n\n1. **\"No space left on device\"**\n   - ✅ Fixed! Use `Dockerfile.optimized` for smaller images\n   - ✅ Added `.dockerignore` to reduce build context\n\n2. **\"Module not found: scripts\"**\n   - ✅ Fixed! Updated `PYTHONPATH` in Dockerfiles\n   - ✅ Removed `scripts/` from `.dockerignore`\n\n3. **Dependency conflicts**\n   - ✅ Fixed! Updated `requirements.txt` with compatible versions\n   - ✅ Added version ranges to prevent conflicts\n\n### Getting Help\n\n1. Check the **Actions** tab for detailed error logs\n2. Verify all required files are present\n3. Ensure GitHub secrets are properly configured\n4. Use the test workflow to validate your setup\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n---\n\n**🎉 Ready to classify some pets? Push your code and watch the magic happen!** 🚀 ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumlgrupa4%2Fpet_breed_classifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsumlgrupa4%2Fpet_breed_classifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsumlgrupa4%2Fpet_breed_classifier/lists"}