ModelApp / README.md
Bhavi23's picture
Update README.md
b14ea5b verified

A newer version of the Gradio SDK is available: 6.9.0

Upgrade
metadata
title: Satellite Classification Dashboard
emoji: πŸ›°οΈ
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 5.38.0
app_file: app.py
pinned: false
license: mit

πŸ›°οΈ Satellite Classification Dashboard

Hugging Face Spaces Python TensorFlow Gradio

A powerful web application for classifying satellite images using state-of-the-art deep learning models. Upload satellite images and get instant predictions with confidence scores and detailed visualizations.

πŸš€ Live Demo

πŸ‘‰ Try the App Live on Hugging Face Spaces

πŸ“Έ Screenshots

Upload your satellite images and get instant AI-powered classifications!

✨ Features

🎯 Multi-Model Classification

  • 4 Pre-trained Models optimized for satellite imagery
  • Comparative Analysis - Run multiple models simultaneously
  • Performance Metrics - Accuracy, speed, and confidence scores

πŸ–ΌοΈ Easy Image Upload

  • Support for PNG, JPG, JPEG formats
  • Drag & Drop interface
  • Real-time Processing

πŸ“Š Rich Visualizations

  • Confidence Comparison across models
  • Probability Distribution for top predictions
  • Interactive Plots with Plotly

πŸ† Smart Recommendations

  • AI-powered model selection based on confidence and performance
  • Detailed comparison tables
  • Best model highlighting

πŸ›°οΈ Supported Satellite Classes

The model can classify images into 11 different satellite categories:

Class Description Examples
AcrimSat Solar irradiance monitoring Climate research satellites
Aquarius Ocean salinity measurement Marine science missions
Aura Atmospheric chemistry Ozone layer monitoring
Calipso Cloud and aerosol profiling Weather prediction
Cloudsat Cloud structure analysis Meteorological studies
CubeSat Small form-factor satellites Educational, research missions
Debris Space debris objects Space situational awareness
Jason Ocean altimetry Sea level monitoring
Sentinel-6 Ocean topography Climate change research
TRMM Tropical rainfall measurement Weather forecasting
Terra Earth observation Land surface monitoring

πŸ€– Available Models

Model Performance Comparison

Model Accuracy Inference Speed Model Size Best Use Case
Custom CNN 95.2% 45ms 25.3MB Specialized satellite detection
MobileNetV2 92.8% 18ms ⚑ 8.7MB Quick predictions, mobile deployment
EfficientNetB0 96.4% πŸ† 35ms 20.1MB Best overall performance
DenseNet121 94.7% 52ms 32.8MB Complex pattern recognition

Model Details

🎯 EfficientNetB0 (Recommended)

  • Highest Accuracy: 96.4%
  • Balanced Performance: Great speed-accuracy tradeoff
  • Best for: General-purpose satellite classification

⚑ MobileNetV2 (Fastest)

  • Ultra-Fast: 18ms inference time
  • Lightweight: Only 8.7MB
  • Best for: Real-time applications, mobile deployment

πŸ”¬ Custom CNN (Specialized)

  • Custom Architecture: Tailored specifically for satellite imagery
  • High Accuracy: 95.2% on satellite datasets
  • Best for: Domain-specific applications

🧠 DenseNet121 (Complex)

  • Dense Connections: Excellent feature reuse
  • Pattern Recognition: Superior at complex visual patterns
  • Best for: Detailed analysis, research applications

πŸ› οΈ Technical Architecture

Frontend

  • Gradio 4.0+: Modern, responsive web interface
  • Plotly: Interactive visualizations
  • Real-time Updates: Progress tracking and live results

Backend

  • TensorFlow 2.13+: Deep learning inference
  • Model Caching: Efficient memory management
  • Error Handling: Robust error recovery and fallbacks

Deployment

  • Hugging Face Spaces: Cloud-hosted with automatic scaling
  • Docker: Containerized deployment
  • Git LFS: Large model file management

πŸš€ Quick Start

Option 1: Use Online (Recommended)

Simply visit the Live Demo - no installation required!

Option 2: Local Installation

Prerequisites

  • Python 3.8 or higher
  • pip package manager
  • 4GB+ RAM recommended

Installation Steps

  1. Clone the Repository
git clone https://huggingface.co/spaces/Bhavi23/ModelApp
cd ModelApp
  1. Create Virtual Environment
# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
  1. Install Dependencies
pip install -r requirements.txt
  1. Run the Application
python app.py
  1. Open in Browser Navigate to http://localhost:7860 to use the application locally.

πŸ“‹ Usage Instructions

Step-by-Step Guide

  1. πŸ“€ Upload Image

    • Click "Upload Satellite Image" or drag & drop
    • Supported formats: PNG, JPG, JPEG
    • Recommended size: 224x224 pixels or larger
  2. πŸ€– Select Models

    • Choose one or more models from the checkbox list
    • Start with EfficientNetB0 for best results
    • Select multiple models for comparison
  3. πŸš€ Classify

    • Click the "Classify Image" button
    • Wait for processing (may take 30-60 seconds for first run)
    • View results in real-time
  4. πŸ“Š Analyze Results

    • Check the recommended model highlight
    • Compare confidence scores across models
    • Explore probability distributions for detailed insights

Tips for Best Results

βœ… DO:

  • Use clear, high-resolution satellite images
  • Ensure good contrast and visibility
  • Try multiple models for comparison
  • Check confidence scores before making decisions

❌ AVOID:

  • Blurry or low-resolution images
  • Non-satellite imagery (photos, drawings, etc.)
  • Extremely dark or overexposed images

πŸ”§ Configuration

Environment Variables

# Optional: Set custom model URLs
CUSTOM_CNN_URL="https://your-custom-url/model.keras"
MOBILENETV2_URL="https://your-custom-url/model.keras"

Model Customization

You can easily add new models by modifying the MODEL_CONFIGS dictionary in app.py:

MODEL_CONFIGS = {
    "Your Custom Model": {
        "url": "https://your-model-url/model.keras",
        "input_shape": (224, 224, 3)
    }
}

πŸ“Š Performance Benchmarks

Accuracy on Test Dataset

  • EfficientNetB0: 96.4% ⭐
  • Custom CNN: 95.2%
  • DenseNet121: 94.7%
  • MobileNetV2: 92.8%

Speed Benchmarks (Average)

  • MobileNetV2: 18ms ⚑
  • EfficientNetB0: 35ms
  • Custom CNN: 45ms
  • DenseNet121: 52ms

Benchmarks measured on Hugging Face Spaces infrastructure

πŸ› Troubleshooting

Common Issues

Models Not Loading

  • Cause: Network connectivity or model URL issues
  • Solution: Check internet connection, try refreshing the page

Slow Performance

  • Cause: Large model files, limited resources
  • Solution: Use MobileNetV2 for faster results, or try fewer models at once

Upload Errors

  • Cause: Unsupported file format or size
  • Solution: Convert to JPG/PNG, ensure file size < 10MB

Out of Memory

  • Cause: Multiple large models loaded simultaneously
  • Solution: Select fewer models, refresh the page to clear cache

Getting Help

  • Check Logs: Look for error messages in the interface
  • Try Different Models: Some models may be temporarily unavailable
  • Refresh Page: Clears model cache and resets the application
  • Contact Support: Open an issue on the repository

🀝 Contributing

We welcome contributions! Here's how you can help:

Ways to Contribute

  1. πŸ› Bug Reports: Found a bug? Open an issue with details
  2. πŸ’‘ Feature Requests: Suggest new features or improvements
  3. πŸ”§ Code Contributions: Submit pull requests with enhancements
  4. πŸ“š Documentation: Help improve docs and examples
  5. πŸ§ͺ Model Contributions: Share new pre-trained models

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Contribution Guidelines

  • Follow Python PEP 8 style guidelines
  • Add docstrings to new functions
  • Include tests for new features
  • Update documentation as needed

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Third-Party Licenses

  • TensorFlow: Apache License 2.0
  • Gradio: Apache License 2.0
  • Plotly: MIT License

πŸ“ž Contact & Support

Get Help

Stay Updated

  • ⭐ Star this repo to get notifications
  • πŸ‘€ Watch for new releases
  • 🍴 Fork to contribute

πŸ™ Acknowledgments

Special Thanks

  • Hugging Face for providing the amazing Spaces platform
  • TensorFlow Team for the robust deep learning framework
  • Gradio Team for the intuitive web interface library
  • Open Source Community for various tools and libraries used

Research & Data

  • Satellite imagery datasets from various space agencies
  • Research papers on satellite image classification
  • Open source computer vision community

🌟 Star History

Star History Chart


Made with ❀️ by Bhavi23

Empowering satellite image analysis with AI πŸ›°οΈβœ¨