Spaces:
Build error
Build error
| title: Land Cover Classification | |
| emoji: π | |
| colorFrom: green | |
| colorTo: blue | |
| sdk: docker | |
| app_file: app.py | |
| pinned: false | |
| # Land Cover Classification (Hugging Face Space) | |
| A web-based land cover classification system using a pretrained ResNet50 model and the EuroSAT dataset. This Space features a modern Streamlit interface for easy image upload, prediction, and visualization of land type probabilities. | |
| ## π Demo | |
| [](https://huggingface.co/spaces/YOUR_USERNAME/YOUR_SPACE_NAME) | |
| ## Features | |
| - **Deep Learning Model**: Pretrained ResNet50 fine-tuned on EuroSAT satellite imagery. | |
| - **User-Friendly Web App**: Built with Streamlit for interactive image upload and real-time predictions. | |
| - **Class Visualization**: Displays prediction confidence for each land cover class. | |
| - **Modular Code**: Clean separation of model, data processing, and visualization logic. | |
| ## How to Use | |
| 1. **Upload a satellite image** (PNG, JPG, JPEG, TIFF). | |
| 2. **Preview the image** and click "Run Classification". | |
| 3. **View the predicted land cover class** and confidence scores. | |
| ## Land Cover Classes | |
| | Index | Class Name | | |
| |-------|------------------------| | |
| | 0 | AnnualCrop | | |
| | 1 | Forest | | |
| | 2 | HerbaceousVegetation | | |
| | 3 | Highway | | |
| | 4 | Industrial | | |
| | 5 | Pasture | | |
| | 6 | PermanentCrop | | |
| | 7 | Residential | | |
| | 8 | River | | |
| | 9 | SeaLake | | |
| ## Project Structure | |
| ``` | |
| . | |
| βββ app.py # Streamlit web app | |
| βββ model_handler.py # Model loading and prediction logic | |
| βββ data_processor.py # Data preprocessing utilities | |
| βββ config.py # Configuration (class names, paths) | |
| βββ requirements.txt # Python dependencies | |
| βββ models/ # Model files (see below) | |
| βββ assets/ # Static images for the app | |
| βββ Dockerfile # Docker configuration for Hugging Face Spaces | |
| βββ README.md # This file | |
| ``` | |
| ## Model Files | |
| The following files must be present in the `models/` directory: | |
| - `ResNet50_eurosat.h5` | |
| - `model.weights.best.keras` | |
| - `class_indices.npy` | |
| If you fork this Space, upload these files via the Hugging Face web interface if they are too large for git. | |
| ## Deploying on Hugging Face Spaces | |
| ### Docker Space Deployment | |
| 1. **Create a new Space on Hugging Face:** | |
| - Go to [Hugging Face Spaces](https://huggingface.co/spaces). | |
| - Click **"Create new Space"**. | |
| - Choose **SDK: Docker**. | |
| 2. **Push your code:** | |
| - Push your entire project (including the `Dockerfile`) to the Space. | |
| - If your model files are too large for git, upload them via the Hugging Face web interface after the initial push. | |
| 3. **Wait for the build:** | |
| - Hugging Face will build and run your Docker container. | |
| - Your Streamlit app will be available at the Space URL. | |
| ## License | |
| MIT License. See [LICENSE](LICENSE) for details. | |
| --- | |
| *This Space is powered by [Streamlit](https://streamlit.io/) and [Hugging Face Spaces](https://huggingface.co/spaces).* | |