Spaces:
Build error
Build error
metadata
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
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
- Upload a satellite image (PNG, JPG, JPEG, TIFF).
- Preview the image and click "Run Classification".
- 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.h5model.weights.best.kerasclass_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
Create a new Space on Hugging Face:
- Go to Hugging Face Spaces.
- Click "Create new Space".
- Choose SDK: Docker.
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.
- Push your entire project (including the
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 for details.
This Space is powered by Streamlit and Hugging Face Spaces.