Update README.md
Browse files
README.md
CHANGED
|
@@ -1,47 +1,20 @@
|
|
| 1 |
|
| 2 |
title: Satellite Classification Dashboardemoji: 🛰️colorFrom: bluecolorTo: purplesdk: gradiosdk_version: 5.0.2app_file: app.pypinned: false
|
| 3 |
🛰️ Satellite Classification Dashboard
|
| 4 |
-
A
|
| 5 |
-
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
Multiple Model Support: Choose from four pre-trained models with varying strengths:
|
| 10 |
-
Custom CNN: Tailored for satellite imagery (95.2% accuracy).
|
| 11 |
-
MobileNetV2: Lightweight and fast (92.8% accuracy, 18ms inference).
|
| 12 |
-
EfficientNetB0: Best accuracy-efficiency balance (96.4% accuracy).
|
| 13 |
-
DenseNet121: Complex pattern recognition (94.7% accuracy).
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
Visualizations: Interactive Plotly charts for confidence comparison and class probability distribution.
|
| 17 |
-
Model Recommendation: Automatically suggests the best model based on confidence and performance metrics.
|
| 18 |
-
Supported Classes: Classifies 11 categories:
|
| 19 |
-
AcrimSat, Aquarius, Aura, Calipso, Cloudsat, CubeSat, Debris, Jason, Sentinel-6, TRMM, Terra
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
🎯 Quick Start
|
| 24 |
-
Try the Live Demo
|
| 25 |
-
Visit the Hugging Face Space to use the application directly in your browser: https://huggingface.co/spaces/your-username/Satellite-Classification-Gradio
|
| 26 |
-
Local Installation
|
| 27 |
-
|
| 28 |
-
Clone the repository:git clone https://huggingface.co/spaces/your-username/Satellite-Classification-Gradio
|
| 29 |
cd Satellite-Classification-Gradio
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
Create a virtual environment (optional but recommended):python -m venv venv
|
| 33 |
source venv/bin/activate # On Windows: venv\Scripts\activate
|
|
|
|
|
|
|
| 34 |
|
|
|
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
Run the application:python app.py
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
Open your browser and navigate to http://localhost:7860.
|
| 43 |
-
|
| 44 |
-
📦 Dependencies
|
| 45 |
Listed in requirements.txt:
|
| 46 |
|
| 47 |
gradio==5.0.2
|
|
@@ -53,195 +26,35 @@ Pillow==10.4.0
|
|
| 53 |
requests==2.32.3
|
| 54 |
protobuf==3.20.3
|
| 55 |
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
Upload Image: Upload a satellite image (PNG, JPG, or JPEG).
|
| 59 |
-
Select Models: Choose one or more models (Custom CNN, MobileNetV2, EfficientNetB0, DenseNet121).
|
| 60 |
-
Classify: Click "Classify Image" to get predictions.
|
| 61 |
-
View Results:
|
| 62 |
-
Table of predictions (model, predicted class, confidence, inference time).
|
| 63 |
-
Recommended model based on confidence and performance.
|
| 64 |
-
Confidence comparison bar chart.
|
| 65 |
-
Top 5 class probabilities for the recommended model.
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
📊 Model Performance
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
Model
|
| 74 |
-
Accuracy
|
| 75 |
-
Precision
|
| 76 |
-
Recall
|
| 77 |
-
F1-Score
|
| 78 |
-
Inference Time
|
| 79 |
-
Model Size
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
EfficientNetB0
|
| 84 |
-
96.4%
|
| 85 |
-
96.1%
|
| 86 |
-
96.2%
|
| 87 |
-
96.1%
|
| 88 |
-
35ms
|
| 89 |
-
20.1MB
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
Custom CNN
|
| 93 |
-
95.2%
|
| 94 |
-
94.8%
|
| 95 |
-
95.1%
|
| 96 |
-
94.9%
|
| 97 |
-
45ms
|
| 98 |
-
25.3MB
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
DenseNet121
|
| 102 |
-
94.7%
|
| 103 |
-
94.2%
|
| 104 |
-
94.5%
|
| 105 |
-
94.3%
|
| 106 |
-
52ms
|
| 107 |
-
32.8MB
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
MobileNetV2
|
| 111 |
-
92.8%
|
| 112 |
-
92.1%
|
| 113 |
-
92.5%
|
| 114 |
-
92.3%
|
| 115 |
-
18ms
|
| 116 |
-
8.7MB
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
🎯 Model Selection Guide
|
| 120 |
-
|
| 121 |
-
Best Overall Accuracy: EfficientNetB0 (96.4%)
|
| 122 |
-
Fastest Inference: MobileNetV2 (18ms)
|
| 123 |
-
Most Lightweight: MobileNetV2 (8.7MB)
|
| 124 |
-
Best Balance: EfficientNetB0 (High accuracy + efficiency)
|
| 125 |
-
Mobile/Edge Deployment: MobileNetV2
|
| 126 |
-
Research/High Accuracy: EfficientNetB0 or DenseNet121
|
| 127 |
-
|
| 128 |
-
🏗️ Architecture
|
| 129 |
-
Model Sources
|
| 130 |
-
All models are hosted on Hugging Face Model Hub:
|
| 131 |
-
|
| 132 |
-
Custom CNN: Bhavi23/Custom_CNN
|
| 133 |
-
MobileNetV2: Bhavi23/MobilenetV2
|
| 134 |
-
EfficientNetB0: Bhavi23/EfficientNet_B0
|
| 135 |
-
DenseNet121: Bhavi23/DenseNet
|
| 136 |
-
|
| 137 |
-
Data Pipeline
|
| 138 |
-
|
| 139 |
-
Image Upload: Supports PNG, JPG, JPEG formats.
|
| 140 |
-
Preprocessing: Resize to 224x224, normalize to [0,1].
|
| 141 |
-
Model Inference: Multi-model prediction with timing.
|
| 142 |
-
Post-processing: Confidence scoring and model recommendations.
|
| 143 |
-
|
| 144 |
-
🔧 Technical Details
|
| 145 |
-
|
| 146 |
-
Input Requirements:
|
| 147 |
-
Image Format: PNG, JPG, JPEG
|
| 148 |
-
Input Size: 224x224x3 (RGB)
|
| 149 |
-
Preprocessing: Automatic resizing and normalization
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
Output Format:
|
| 153 |
-
Class Prediction: One of 11 satellite categories
|
| 154 |
-
Confidence Score: Percentage confidence (0-100%)
|
| 155 |
-
Inference Time: Milliseconds for prediction
|
| 156 |
-
Probability Distribution: Full softmax output for all classes
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
Performance Optimization:
|
| 160 |
-
Model Caching: Models loaded on-demand.
|
| 161 |
-
Efficient Preprocessing: Optimized image pipeline.
|
| 162 |
-
Memory Management: Automatic cleanup of model objects.
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
🚢 Deployment
|
| 167 |
-
The application is deployed on Hugging Face Spaces using:
|
| 168 |
-
|
| 169 |
-
Runtime: Python 3.9
|
| 170 |
-
Framework: Gradio
|
| 171 |
-
Resources: CPU-optimized for inference
|
| 172 |
-
|
| 173 |
-
Docker Deployment (Optional)
|
| 174 |
-
If needed, use this Dockerfile:
|
| 175 |
-
FROM python:3.9-slim
|
| 176 |
-
WORKDIR /app
|
| 177 |
-
COPY requirements.txt .
|
| 178 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 179 |
-
COPY . .
|
| 180 |
-
EXPOSE 7860
|
| 181 |
-
CMD ["python", "app.py"]
|
| 182 |
-
|
| 183 |
-
🤝 Contributing
|
| 184 |
-
We welcome contributions! Please follow these steps:
|
| 185 |
-
|
| 186 |
-
Fork the repository.
|
| 187 |
-
Create a feature branch (git checkout -b feature/amazing-feature).
|
| 188 |
-
Commit changes (git commit -m 'Add amazing feature').
|
| 189 |
-
Push to branch (git push origin feature/amazing-feature).
|
| 190 |
-
Open a Pull Request.
|
| 191 |
-
|
| 192 |
-
Development Setup
|
| 193 |
-
# Clone your fork
|
| 194 |
-
git clone https://huggingface.co/spaces/your-username/Satellite-Classification-Gradio
|
| 195 |
-
# Create virtual environment
|
| 196 |
-
python -m venv venv
|
| 197 |
-
source venv/bin/activate # On Windows: venv\Scripts\activate
|
| 198 |
-
# Install dependencies
|
| 199 |
-
pip install -r requirements.txt
|
| 200 |
-
# Run in development mode
|
| 201 |
-
python app.py
|
| 202 |
-
|
| 203 |
-
📄 License
|
| 204 |
-
This project is licensed under the MIT License - see the LICENSE file for details.
|
| 205 |
-
🙏 Acknowledgments
|
| 206 |
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
|
|
|
|
|
|
|
|
|
| 211 |
|
| 212 |
-
📞 Support
|
| 213 |
|
| 214 |
-
|
| 215 |
-
Discussions: Hugging Face Discussions
|
| 216 |
-
Email: bhavithrass@gmail.com
|
| 217 |
|
| 218 |
-
🔮 Future Enhancements
|
| 219 |
|
| 220 |
-
Real-time video classification.
|
| 221 |
-
Batch processing for multiple images.
|
| 222 |
-
API endpoint for programmatic access.
|
| 223 |
-
Advanced visualizations with satellite orbit data.
|
| 224 |
|
| 225 |
-
🛠️ Troubleshooting
|
| 226 |
-
If you encounter errors during deployment or runtime, try the following:
|
| 227 |
ModuleNotFoundError: No module named 'tensorflow'
|
| 228 |
|
| 229 |
-
Cause: TensorFlow failed to install during the
|
| 230 |
Fix:
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
git push
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
Check build logs in the Space’s Settings tab for dependency installation errors.
|
| 238 |
-
Test locally to confirm compatibility:python -m venv venv
|
| 239 |
source venv/bin/activate
|
| 240 |
pip install -r requirements.txt
|
| 241 |
python app.py
|
| 242 |
|
| 243 |
|
| 244 |
-
If
|
| 245 |
WORKDIR /app
|
| 246 |
COPY requirements.txt .
|
| 247 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
@@ -250,27 +63,11 @@ EXPOSE 7860
|
|
| 250 |
CMD ["python", "app.py"]
|
| 251 |
|
| 252 |
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
Contact Support: If unresolved, open an issue on Hugging Face or check the Hugging Face Forums.
|
| 257 |
-
|
| 258 |
-
Missing configuration in README
|
| 259 |
-
|
| 260 |
-
Cause: The README.md lacked the required YAML front matter.
|
| 261 |
-
Fix: This file includes the correct YAML header (see top). Ensure it is saved as README.md in the repository root:git add README.md
|
| 262 |
-
git commit -m "Add YAML front matter to README.md"
|
| 263 |
-
git push
|
| 264 |
|
| 265 |
|
| 266 |
-
Restart Space: Go to the Space’s Settings tab and click Restart Space to apply changes.
|
| 267 |
|
| 268 |
-
|
| 269 |
-
Track your application usage:
|
| 270 |
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
Performance Metrics: Response time tracking.
|
| 274 |
-
|
| 275 |
-
Built with ❤️ using Gradio and TensorFlow
|
| 276 |
-
For more information, visit our Hugging Face Space
|
|
|
|
| 1 |
|
| 2 |
title: Satellite Classification Dashboardemoji: 🛰️colorFrom: bluecolorTo: purplesdk: gradiosdk_version: 5.0.2app_file: app.pypinned: false
|
| 3 |
🛰️ Satellite Classification Dashboard
|
| 4 |
+
A Gradio-based application for classifying satellite images using pre-trained deep learning models. Upload a PNG, JPG, or JPEG image, select one or more models (Custom CNN, MobileNetV2, EfficientNetB0, DenseNet121), and view predictions with confidence scores and visualizations.
|
| 5 |
+
Quick Start
|
| 6 |
|
| 7 |
+
Try the Live Demo: Visit https://huggingface.co/spaces/your-username/Satellite-Classification-Gradio.
|
| 8 |
+
Local Setup:git clone https://huggingface.co/spaces/your-username/Satellite-Classification-Gradio
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
cd Satellite-Classification-Gradio
|
| 10 |
+
python -m venv venv
|
|
|
|
|
|
|
| 11 |
source venv/bin/activate # On Windows: venv\Scripts\activate
|
| 12 |
+
pip install -r requirements.txt
|
| 13 |
+
python app.py
|
| 14 |
|
| 15 |
+
Open http://localhost:7860 in your browser.
|
| 16 |
|
| 17 |
+
Dependencies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
Listed in requirements.txt:
|
| 19 |
|
| 20 |
gradio==5.0.2
|
|
|
|
|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34 |
+
Ensure this README.md is saved in the repository root with exact filename README.md.
|
| 35 |
+
Verify YAML syntax (no extra spaces, correct indentation).
|
| 36 |
+
Push to repository:git add README.md
|
| 37 |
+
git commit -m "Add YAML front matter to README.md"
|
| 38 |
+
git push
|
| 39 |
|
|
|
|
| 40 |
|
| 41 |
+
Restart the Space in the Settings tab.
|
|
|
|
|
|
|
| 42 |
|
|
|
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
|
|
|
|
|
|
| 45 |
ModuleNotFoundError: No module named 'tensorflow'
|
| 46 |
|
| 47 |
+
Cause: TensorFlow failed to install during the build.
|
| 48 |
Fix:
|
| 49 |
+
Verify requirements.txt includes tensorflow-cpu==2.15.0 and protobuf==3.20.3.
|
| 50 |
+
Check build logs in the Space’s Settings tab.
|
| 51 |
+
Test locally:python -m venv venv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
source venv/bin/activate
|
| 53 |
pip install -r requirements.txt
|
| 54 |
python app.py
|
| 55 |
|
| 56 |
|
| 57 |
+
If unresolved, add a Dockerfile:FROM python:3.9-slim
|
| 58 |
WORKDIR /app
|
| 59 |
COPY requirements.txt .
|
| 60 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 63 |
CMD ["python", "app.py"]
|
| 64 |
|
| 65 |
|
| 66 |
+
Switch the Space’s SDK to Docker and push the Dockerfile.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
|
| 68 |
|
|
|
|
| 69 |
|
| 70 |
+
Support
|
|
|
|
| 71 |
|
| 72 |
+
Issues: Hugging Face Discussions
|
| 73 |
+
Email: bhavithrass@gmail.com
|
|
|
|
|
|
|
|
|
|
|
|