Skip to main content

MUSS: Multimodal Satellite Dataset Builder (Sentinel-1/2)

Project description

๐ŸŒ MUSS โ€” Multimodal Unified Satellite System

MUSS is a dynamic dataset builder and modeling framework for multimodal remote sensing.

It allows users to:

  • ๐Ÿ“ก Fetch satellite data (Sentinel-1, Sentinel-2, etc.)
  • ๐Ÿง  Build datasets on-the-fly
  • โšก Train deep learning models directly on generated data
  • ๐Ÿงฉ Combine multiple modalities (optical, SAR, indices)

๐Ÿš€ Key Features

  • โšก Dynamic dataset generation (no pre-download required)
  • ๐Ÿ›ฐ๏ธ Multi-source support (Sentinel-1, Sentinel-2, etc.)
  • ๐Ÿง  Built-in preprocessing (tiling, reprojection, normalization)
  • ๐Ÿ“ฆ Torch-compatible datasets (NonGeoDataset)
  • ๐Ÿ”„ Lazy / Cache / Prebuild modes
  • ๐Ÿ“Š Index-based learning (NDVI, NDWI, etc.)
  • ๐Ÿค– Ready for deep learning (PyTorch + TorchGeo)

๐Ÿ“ Project Structure

.
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ cache/                  # Generated tiles
โ”œโ”€โ”€ dist/                   # Build artifacts
โ”œโ”€โ”€ muss/
โ”‚   โ”œโ”€โ”€ builder/            # Dataset builder engine
โ”‚   โ”œโ”€โ”€ providers/          # STAC data providers
โ”‚   โ”œโ”€โ”€ datasets/           # Torch datasets
โ”‚   โ”œโ”€โ”€ processing/         # Preprocessing pipeline
โ”‚   โ”œโ”€โ”€ models/             # Deep learning models
โ”‚   โ”œโ”€โ”€ tiling/             # Spatial tiling logic
โ”‚   โ”œโ”€โ”€ storage/            # Cache management
โ”‚   โ”œโ”€โ”€ configs/            # YAML configs
โ”‚   โ””โ”€โ”€ test/
โ””โ”€โ”€ sample.png

โš™๏ธ Installation

Install from source

pip install -e .

Build package

python -m build

Install from PyPI (when published)

pip install muss-dataset

๐Ÿงฉ Configuration

Example config (configs/config.yaml):

data:
  bbox: [lon_min, lat_min, lon_max, lat_max]
  resolution: 10
  time:
    start: "2022-01-01"
    end: "2022-12-31"

processing:
  temporal:
    method: median
  reprojection:
    target_crs: "EPSG:3857"

๐Ÿ“ก Supported Providers

  • Sentinel-2 (optical)
  • Sentinel-1 (SAR)
  • (optional) land cover datasets (e.g., WorldCover)

๐Ÿ—๏ธ Dataset Usage

from muss.datasets import MussDataset
from torch.utils.data import DataLoader

dataset = MussDataset(
    config_file="configs/config.yaml",
    mode="lazy",  # lazy | cache-only | prebuild
)

loader = DataLoader(dataset, batch_size=8, num_workers=4)

for batch in loader:
    x = batch["image"]
    print(x.shape)

๐Ÿง  Training Example (Soft Labels)

for batch in loader:
    x = batch["image"]

    y_soft = build_soft_labels(x)
    y_pred = model(x)

    loss = soft_cross_entropy(y_pred, y_soft)

    optimizer.zero_grad()
    loss.backward()
    optimizer.step()

๐Ÿ“Š Indices-Based Learning

MUSS supports weak supervision via remote sensing indices:

  • NDVI โ†’ vegetation
  • NDWI โ†’ water
  • SAR โ†’ structure

Soft labels are computed as:

Y* = sigmoid((I - ฮผ) / ฯƒ)

๐Ÿง  Models

Inside muss/models/:

  • Diffusion Residual Autoencoder (Diff-RAE)
  • ResNet-based encoders/decoders

โšก Build Dataset CLI

muss-build --config configs/config.yaml

This will:

  • Query STAC API
  • Download data
  • Build tiles
  • Cache results

๐Ÿ“ฆ Modes

Mode Description
lazy build on demand
cache-only use existing tiles only
prebuild build all tiles first

โš ๏ธ Known Issues

  • STAC API rate limits (Planetary Computer)
  • CRS missing in some Sentinel-1 items (use sentinel-1-rtc)
  • Tile size mismatch (must enforce fixed size)

๐Ÿ› ๏ธ Requirements

  • Python โ‰ฅ 3.10
  • PyTorch
  • TorchGeo
  • xarray
  • rasterio
  • stackstac
  • pystac-client

๐Ÿ“ธ Example Output

Sample


๐Ÿค Contributing

Contributions are welcome:

  • new providers
  • new models
  • performance optimizations

๐Ÿ“œ License

MIT License


๐Ÿš€ Roadmap

  • More datasets (Dynamic World, Landsat)
  • Distributed tile building
  • Cloud-native training
  • HuggingFace integration

๐Ÿ‘ค Author

Developed as part of a research project DroMUPS. Dr. Yassine Gacha


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

muss_dataset-0.1.5.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

muss_dataset-0.1.5-py3-none-any.whl (27.8 kB view details)

Uploaded Python 3

File details

Details for the file muss_dataset-0.1.5.tar.gz.

File metadata

  • Download URL: muss_dataset-0.1.5.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for muss_dataset-0.1.5.tar.gz
Algorithm Hash digest
SHA256 d0d75128f3134e6a85d8047209c14085eb7632483ef4eb07cceaa23c62cc3734
MD5 632ae435e40930ac3940aef3eed089c4
BLAKE2b-256 0270175d2bf1b4009c7871e91b40924bad8d676a6867129c8da976a1635a7ea2

See more details on using hashes here.

File details

Details for the file muss_dataset-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: muss_dataset-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 27.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for muss_dataset-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 98d1865140cf958ea3a688cbed108240674ff633ec2b2cd4c4ff1ef7b60ff0e5
MD5 9d5b739d954d7413f462949769ee28b9
BLAKE2b-256 161bf0bc0c76e8488a5648e28e898c281b7c2dfc7a115432e26f5802affc4f9f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page