How dpird-dma/omnicloudmask works
OmniCloudMask is a Python library that predicts cloud and cloud-shadow classes from satellite imagery. Its main workflow accepts arrays, batches, or caller-loaded scenes; prepares and tiles input; runs segmentation models; and returns masks, optionally exporting raster results. Sensor-specific loaders support Sentinel-2 and Landsat as well as general multiband rasters. The README documents support for several imagery sources and batch prediction. Edges rely on README statements and the supplied source excerpts and index; some internal calls are not visible in the excerpts.
Main entry points: cloud_mask.py Prediction entry points · download_models.py Model downloads · raster_utils.py Patch extraction · model_utils.py Model construction
Components 17
Prediction API
- Prediction entry points
omnicloudmask/cloud_mask.py
Imagery Input
- Raster loaders
omnicloudmask/data_loaders.py - Patch extraction
omnicloudmask/raster_utils.py - Raster export
omnicloudmask/raster_utils.py
Model Inference
- Input normalization
omnicloudmask/model_utils.py - Model construction
omnicloudmask/model_utils.py - Batch inference
omnicloudmask/model_utils.py - Prediction mosaics
omnicloudmask/model_utils.py
Model Assets
- Model downloads
omnicloudmask/download_models.py - Model version index
omnicloudmask/model_download_links.csv - Local model files
- Package version
omnicloudmask/__version__.py
Runtime Support
- Apple MPS compatibility
omnicloudmask/mps_patch.py - Device argmax
omnicloudmask/optimizations.py
Other components
- Library user
- Hugging Face
- Google Drive
Connections 18
- Library user → Prediction entry points: requests prediction
README.md - Library user → Raster loaders: selects loader
README.md - Prediction entry points → Raster loaders: uses scene loader
README.md - Prediction entry points → Patch extraction: extracts patches
omnicloudmask/cloud_mask.py - Patch extraction → Input normalization: normalizes patches
omnicloudmask/raster_utils.py - Prediction entry points → Model construction: loads models
omnicloudmask/cloud_mask.py - Prediction entry points → Batch inference: runs inference
omnicloudmask/cloud_mask.py - Prediction entry points → Prediction mosaics: assembles predictions
omnicloudmask/cloud_mask.py - Prediction entry points → Raster export: exports results
omnicloudmask/cloud_mask.py - Prediction entry points → Model downloads: requests weights
omnicloudmask/cloud_mask.py - Model downloads → Model version index: reads versions
omnicloudmask/download_models.py - Model downloads → Local model files: saves weights
omnicloudmask/download_models.py - Model downloads → Hugging Face: downloads weights
omnicloudmask/download_models.py - Model downloads → Google Drive: downloads weights
omnicloudmask/download_models.py - Model construction → Local model files: loads weights
- Prediction entry points → Apple MPS compatibility: patches MPS models
omnicloudmask/cloud_mask.py - Prediction entry points → Device argmax: selects argmax
omnicloudmask/cloud_mask.py - Model downloads → Package version: names cache version
omnicloudmask/download_models.py