CloudMorph Lens is a robust, production-ready deep learning platform for automated cloud type classification and segmentation from satellite or aerial imagery. Leveraging state-of-the-art computer vision models (ResNet50 for classification, U-Net for segmentation), StratoVision provides both a Python API and a Flask-based web interface for rapid experimentation, integration, and deployment.
-
Multi-label Cloud Classification
Accurately predicts the presence of multiple cloud types (cirrus, cumulus, stratus, nimbus, altostratus) in a single image. -
Cloud Segmentation
Generates pixel-level masks to delineate cloudy vs. non-cloudy regions. -
Explainability
Integrated Grad-CAM visualizations for model interpretability. -
RESTful API
Exposes endpoints for classification, segmentation, and overlay generation. -
Web UI
User-friendly interface for uploading images and visualizing results. -
Synthetic Data Pipeline
Includes utilities for generating and visualizing synthetic MODIS-like cloud images for rapid prototyping.
model-2/
│
├── app.py # Flask application (API + UI)
├── cloud_model.pth # Trained classification model weights
├── cloud_seg_model.pth # Trained segmentation model weights
├── m2_StratoHack_Cloud.ipynb # End-to-end Jupyter notebook (training, inference, API)
├── requirements.txt # Python dependencies
├── snap-1.png # Example image
├── templates/
│ └── index.html # Jinja2 template for web UI
└── uploads/
└── ... # Uploaded images (runtime)
git clone https://github.com/your-org/stratovision.git
cd stratovision/model-2It is recommended to use a virtual environment:
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txtpython app.pyVisit http://localhost:5000 in your browser.
- Description: Predict cloud type probabilities for an uploaded image.
- Request:
multipart/form-datawith afilefield (image). - Response:
JSON with class probabilities.
- Description: Generate a binary cloud mask for an uploaded image.
- Request:
multipart/form-datawith afilefield (image). - Response:
PNG image (cloud mask).
- Description: Overlay predicted cloud mask on the original image.
- Request:
multipart/form-datawith afilefield (image). - Response:
PNG image (overlay).
-
Classification:
- Architecture: ResNet50 (multi-label head)
- Output: Probability for each cloud type
-
Segmentation:
- Architecture: U-Net
- Output: Binary mask (cloud vs. non-cloud)
-
Explainability:
- Grad-CAM for visualizing model attention
All training, evaluation, and API code is available in m2_StratoHack_Cloud.ipynb.
The notebook is fully self-contained and can be run end-to-end for reproducibility.
import requests
with open("snap-1.png", "rb") as f:
files = {"file": f}
response = requests.post("http://localhost:5000/predict_class", files=files)
print(response.json())curl -X POST -F "file=@snap-1.png" http://localhost:5000/predict_classContributions are welcome! Please open issues or submit pull requests for improvements, bug fixes, or new features.
This project is licensed under the MIT License.
For questions, support, or collaboration, please contact atharvklhare18@gmail.com.